From: inoguchi Date: Thu, 20 Jan 2022 11:08:12 +0000 (+0000) Subject: Fix check for BN_mod_inverse_ct return value X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=84209949c46887bb553cef76fb200c5752d14cca;p=openbsd Fix check for BN_mod_inverse_ct return value ok jsing@ millert@ tb@ --- diff --git a/lib/libcrypto/rsa/rsa_chk.c b/lib/libcrypto/rsa/rsa_chk.c index 807eae084eb..ac9dbf7a227 100644 --- a/lib/libcrypto/rsa/rsa_chk.c +++ b/lib/libcrypto/rsa/rsa_chk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_chk.c,v 1.15 2022/01/10 00:03:02 tb Exp $ */ +/* $OpenBSD: rsa_chk.c,v 1.16 2022/01/20 11:08:12 inoguchi Exp $ */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. * @@ -199,7 +199,7 @@ RSA_check_key(const RSA *key) } /* iqmp = q^-1 mod p? */ - if (!BN_mod_inverse_ct(i, key->q, key->p, ctx)) { + if (BN_mod_inverse_ct(i, key->q, key->p, ctx) == NULL) { ret = -1; goto err; }