From 84209949c46887bb553cef76fb200c5752d14cca Mon Sep 17 00:00:00 2001 From: inoguchi Date: Thu, 20 Jan 2022 11:08:12 +0000 Subject: [PATCH] Fix check for BN_mod_inverse_ct return value ok jsing@ millert@ tb@ --- lib/libcrypto/rsa/rsa_chk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1