store the generated public key on the token.

Thanks to Rickard Bondesson for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-February/011884.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3663 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2009-03-12 08:33:37 +00:00
parent cd6adb4e26
commit 9ef196c2cd
1 changed files with 2 additions and 1 deletions

View File

@ -1042,13 +1042,14 @@ static int gen_keypair(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
CK_OBJECT_CLASS privkey_class = CKO_PRIVATE_KEY;
CK_ATTRIBUTE publicKeyTemplate[20] = {
{CKA_CLASS, &pubkey_class, sizeof(pubkey_class)},
{CKA_TOKEN, &_true, sizeof(_true)},
{CKA_ENCRYPT, &_true, sizeof(_true)},
{CKA_VERIFY, &_true, sizeof(_true)},
{CKA_WRAP, &_true, sizeof(_true)},
{CKA_MODULUS_BITS, &modulusBits, sizeof(modulusBits)},
{CKA_PUBLIC_EXPONENT, publicExponent, sizeof(publicExponent)}
};
int n_pubkey_attr = 6;
int n_pubkey_attr = 7;
CK_ATTRIBUTE privateKeyTemplate[20] = {
{CKA_CLASS, &privkey_class, sizeof(privkey_class)},
{CKA_TOKEN, &_true, sizeof(_true)},