aboutsummaryrefslogtreecommitdiff
path: root/crypto/dsa/dsa_backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dsa/dsa_backend.c')
-rw-r--r--crypto/dsa/dsa_backend.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_backend.c b/crypto/dsa/dsa_backend.c
index f9a71bdc9e0b..389df304bdce 100644
--- a/crypto/dsa/dsa_backend.c
+++ b/crypto/dsa/dsa_backend.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2022 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -173,7 +173,10 @@ DSA *ossl_dsa_key_from_pkcs8(const PKCS8_PRIV_KEY_INFO *p8inf,
ERR_raise(ERR_LIB_DSA, DSA_R_BN_ERROR);
goto dsaerr;
}
- DSA_set0_key(dsa, dsa_pubkey, dsa_privkey);
+ if (!DSA_set0_key(dsa, dsa_pubkey, dsa_privkey)) {
+ ERR_raise(ERR_LIB_DSA, ERR_R_INTERNAL_ERROR);
+ goto dsaerr;
+ }
goto done;