]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Correct the return value of cryptoapi RSA signature callbacks
authorSelva Nair <selva.nair@gmail.com>
Sat, 27 Jul 2019 03:12:21 +0000 (23:12 -0400)
committerGert Doering <gert@greenie.muc.de>
Sun, 28 Jul 2019 20:02:43 +0000 (22:02 +0200)
Fixes the wrong check on siglen instead of *siglen for
signing failures.

Bug reported by: lilulo <lilulo@gmail.com>

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
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 <gert@greenie.muc.de>
src/openvpn/cryptoapi.c

index 720fce096d14eca71f5108c44ad72f32ae7667e6..35a9ebc4703c19f5989e93a7bb1e1fed3e1e3dfa 100644 (file)
@@ -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 */