diff options
author | Rob Austein <sra@hactrn.net> | 2015-07-17 16:21:57 +0200 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-07-17 16:21:57 +0200 |
commit | 4786afd48cc19533b4232bca2519ec6ad2853e5c (patch) | |
tree | 4470e74c77604944506c1bb35a0ec5ab259df30c | |
parent | d78d4072c30a4cb215371f70a8535cfd6a2dbd73 (diff) |
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.
-rw-r--r-- | pkcs11.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; /* |