From e1513577fb701dd9690aaecf3eda22fe011a80be Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Sun, 7 Oct 2007 21:42:38 +0000 Subject: [PATCH] added error message in case of incorrect padding --- src/libstrongswan/crypto/rsa/rsa_public_key.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libstrongswan/crypto/rsa/rsa_public_key.c b/src/libstrongswan/crypto/rsa/rsa_public_key.c index 931e03528..9e1eedd3d 100644 --- a/src/libstrongswan/crypto/rsa/rsa_public_key.c +++ b/src/libstrongswan/crypto/rsa/rsa_public_key.c @@ -19,6 +19,8 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. + * + * RCSID $Id$ */ #include @@ -168,6 +170,7 @@ static status_t verify_emsa_pkcs1_signature(const private_rsa_public_key_t *this /* check magic bytes */ if (*(em.ptr) != 0x00 || *(em.ptr+1) != 0x01) { + DBG1("incorrect padding - probably wrong RSA key"); goto end; } em.ptr += 2;