diff options
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_ameth.c')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index 26d81eed7b..85ef234bb9 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dsa_ameth.c,v 1.26 2018/08/24 20:22:15 tb Exp $ */ | 1 | /* $OpenBSD: dsa_ameth.c,v 1.27 2019/01/20 01:56:59 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -515,7 +515,7 @@ old_dsa_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) | |||
| 515 | * Check that q is not a composite number. | 515 | * Check that q is not a composite number. |
| 516 | */ | 516 | */ |
| 517 | 517 | ||
| 518 | if (BN_is_prime_ex(dsa->q, BN_prime_checks, ctx, NULL) == 0) { | 518 | if (BN_is_prime_ex(dsa->q, BN_prime_checks, ctx, NULL) <= 0) { |
| 519 | DSAerror(DSA_R_BAD_Q_VALUE); | 519 | DSAerror(DSA_R_BAD_Q_VALUE); |
| 520 | goto err; | 520 | goto err; |
| 521 | } | 521 | } |
| @@ -525,7 +525,7 @@ old_dsa_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) | |||
| 525 | EVP_PKEY_assign_DSA(pkey, dsa); | 525 | EVP_PKEY_assign_DSA(pkey, dsa); |
| 526 | return 1; | 526 | return 1; |
| 527 | 527 | ||
| 528 | err: | 528 | err: |
| 529 | BN_CTX_free(ctx); | 529 | BN_CTX_free(ctx); |
| 530 | DSA_free(dsa); | 530 | DSA_free(dsa); |
| 531 | return 0; | 531 | return 0; |
