RSA PKCS verify was broken due to an un-initialized variable.
    rsa_parse_block() expects output_data_len with the buffer
    size.

Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
---
 usr/lib/pkcs11/common/mech_rsa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/lib/pkcs11/common/mech_rsa.c b/usr/lib/pkcs11/common/mech_rsa.c
index 076317c..69dd503 100755
--- a/usr/lib/pkcs11/common/mech_rsa.c
+++ b/usr/lib/pkcs11/common/mech_rsa.c
@@ -810,7 +810,7 @@ rsa_pkcs_verify( SESSION             * sess,
    OBJECT          *key_obj  = NULL;
    CK_ATTRIBUTE    *attr     = NULL;
    CK_BYTE          out[512], out_data[512];  // 4096 bits
-   CK_ULONG         i, modulus_bytes, out_data_len;
+   CK_ULONG         i, modulus_bytes, out_data_len=512;
    CK_BBOOL         flag;
    CK_RV            rc;
 
-- 
1.7.2.2


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to