diff options
Diffstat (limited to 'src/lib/libcrypto/ecdsa')
| -rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_ossl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_ossl.c b/src/lib/libcrypto/ecdsa/ecs_ossl.c index e7e7a52665..2429e36b59 100644 --- a/src/lib/libcrypto/ecdsa/ecs_ossl.c +++ b/src/lib/libcrypto/ecdsa/ecs_ossl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecs_ossl.c,v 1.22 2021/04/20 17:23:37 tb Exp $ */ | 1 | /* $OpenBSD: ecs_ossl.c,v 1.23 2022/01/20 11:03:48 inoguchi Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project | 3 | * Written by Nils Larsch for the OpenSSL project |
| 4 | */ | 4 | */ |
| @@ -216,7 +216,7 @@ ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | |||
| 216 | } | 216 | } |
| 217 | } while (BN_is_zero(r)); | 217 | } while (BN_is_zero(r)); |
| 218 | 218 | ||
| 219 | if (!BN_mod_inverse_ct(k, k, order, ctx)) { | 219 | if (BN_mod_inverse_ct(k, k, order, ctx) == NULL) { |
| 220 | ECDSAerror(ERR_R_BN_LIB); | 220 | ECDSAerror(ERR_R_BN_LIB); |
| 221 | goto err; | 221 | goto err; |
| 222 | } | 222 | } |
| @@ -487,7 +487,7 @@ ecdsa_do_verify(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, | |||
| 487 | if (!ecdsa_prepare_digest(dgst, dgst_len, order, m)) | 487 | if (!ecdsa_prepare_digest(dgst, dgst_len, order, m)) |
| 488 | goto err; | 488 | goto err; |
| 489 | 489 | ||
| 490 | if (!BN_mod_inverse_ct(u2, sig->s, order, ctx)) { /* w = inv(s) */ | 490 | if (BN_mod_inverse_ct(u2, sig->s, order, ctx) == NULL) { /* w = inv(s) */ |
| 491 | ECDSAerror(ERR_R_BN_LIB); | 491 | ECDSAerror(ERR_R_BN_LIB); |
| 492 | goto err; | 492 | goto err; |
| 493 | } | 493 | } |
