Add the "RSA Parse Block Failed" error message at index 195 in the error
messages array. However, I think this should go at index 130 to replace
the "Random Number Generate Failed" error message, which appears to out
of place.

Signed-off-by: Ramon de Carvalho Valle <[email protected]>
---
 usr/lib/pkcs11/common/log.c      |    4 +++-
 usr/lib/pkcs11/common/mech_rsa.c |   10 ++--------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/usr/lib/pkcs11/common/log.c b/usr/lib/pkcs11/common/log.c
index bce00b6..fd28e66 100755
--- a/usr/lib/pkcs11/common/log.c
+++ b/usr/lib/pkcs11/common/log.c
@@ -673,6 +673,8 @@ struct messages err_msg[]={
                {"AES Wrap Get Data Failed"},
                {"AES Wrap Format Failed"},
                {"Domain Parameter Invalid"},
-               {"File \"%s\" could not be opened, errno=%d"}
+               {"File \"%s\" could not be opened, errno=%d"},
+               //195
+               {"RSA Parse Block Failed"}
 };
 
diff --git a/usr/lib/pkcs11/common/mech_rsa.c b/usr/lib/pkcs11/common/mech_rsa.c
index 2ed2c06..b3682ce 100755
--- a/usr/lib/pkcs11/common/mech_rsa.c
+++ b/usr/lib/pkcs11/common/mech_rsa.c
@@ -710,10 +710,7 @@ rsa_pkcs_decrypt( SESSION           *sess,
 
    rc = rsa_parse_block(out, modulus_bytes, out_data, out_data_len, PKCS_BT_2);
    if (rc != CKR_OK) {
-      /*
-       * FIXME: rsa_parse_block() should have it's own error message.
-       */
-      st_err_log(133, __FILE__, __LINE__);
+      st_err_log(195, __FILE__, __LINE__);
       return rc;
    }
 
@@ -849,10 +846,7 @@ rsa_pkcs_verify( SESSION             * sess,
          }
       }
       else
-         /*
-          * FIXME: rsa_parse_block() should have it's own error message.
-          */
-         st_err_log(132, __FILE__, __LINE__);
+         st_err_log(195, __FILE__, __LINE__);
 
    }
    else
-- 
1.7.0.4


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to