From: Selva Nair Date: Sat, 27 Jul 2019 03:12:21 +0000 (-0400) Subject: Correct the return value of cryptoapi RSA signature callbacks X-Git-Tag: v2.4.8~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed67cf0e7f6cbe596495c2f83aeea7c15db0d6e;p=thirdparty%2Fopenvpn.git Correct the return value of cryptoapi RSA signature callbacks Fixes the wrong check on siglen instead of *siglen for signing failures. Bug reported by: lilulo Signed-off-by: Selva Nair Acked-by: Steffan Karger Message-Id: <1564197141-30513-1-git-send-email-selva.nair@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18708.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/cryptoapi.c b/src/openvpn/cryptoapi.c index 720fce096..35a9ebc47 100644 --- a/src/openvpn/cryptoapi.c +++ b/src/openvpn/cryptoapi.c @@ -393,7 +393,7 @@ rsa_sign_CNG(int type, const unsigned char *m, unsigned int m_len, } *siglen = priv_enc_CNG(cd, alg, m, (int)m_len, sig, RSA_size(rsa), padding); - return (siglen == 0) ? 0 : 1; + return (*siglen == 0) ? 0 : 1; } /* decrypt */