[Cryptech-Commits] [sw/pkcs11] 01/01: Don't insist that both keys in a pair must be token objects if either one is. Apparently making the public key be a session object is a standard hack for conserving space on the token.

git at cryptech.is git at cryptech.is
Fri Jul 17 14:23:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository sw/pkcs11.

commit 4786afd48cc19533b4232bca2519ec6ad2853e5c
Author: Rob Austein <sra at hactrn.net>
Date:   Fri Jul 17 16:21:57 2015 +0200

    Don't insist that both keys in a pair must be token objects if either
    one is.  Apparently making the public key be a session object is a
    standard hack for conserving space on the token.
---
 pkcs11.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pkcs11.c b/pkcs11.c
index 9997768..2cf704f 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -1796,10 +1796,9 @@ static CK_RV generate_keypair_rsa_pkcs(p11_session_t *session,
   }
 
   /*
-   * We require a key size, and if either key is a token object, the
-   * other must be too.
+   * We require a key size.
    */
-  if (keysize == 0 || public_handle_flavor != private_handle_flavor)
+  if (keysize == 0)
     return CKR_TEMPLATE_INCOMPLETE;
 
   /*



More information about the Commits mailing list