Farzanenia
Farzanenia

Reputation: 11

Generating/Coping KeyPair on USB Token using NodeJS and PKCS11js library

I have no problem with doing that in java; however, I can't do the same thing in this library.

In java, I give these attributes (plus my session) to the C_CreateObject method for creating (copying) the public key into the token:

CKA_TOKEN
CKA_CLASS
CKA_KEY_TYPE
CKA_MODULUS_BITS
CKA_VERIFY
CKA_MODULUS
CKA_PUBLIC_EXPONENT
CKA_SUBJECT
CKA_ID
CKA_LABEL

Is it the same thing in this library?

Upvotes: 0

Views: 292

Answers (1)

Farzanenia
Farzanenia

Reputation: 11

So Insead of C_CreateObject I used C_GenerateKeyPair and it worked.

Upvotes: 1

Related Questions