how to get CKK_RSA key pair values?
Raymond Xiong
Raymond.Xiong at Sun.COM
Mon Jul 7 22:05:10 PDT 2008
On 07/07/08, Raymond Xiong wrote:
> Hello,
>
> I used the code Darren suggested in the following thread and could
> get key value of, say, CKK_AES successfully.
>
> http://www.opensolaris.org/jive/thread.jspa?messageID=196252
>
> However, if I used the same approach(I increased the buffer size)
> to get, say, CKK_RSA key pairs values, C_GetAttributeValue()
> returned CKR_ATTRIBUTE_TYPE_INVALID error.
>
> What's the reason for that, and how can I get CKK_RSA key pairs
> values? (all keys were session objects in my experiments)
To answer my own question, CKA_VALUE is not a common attribute.
To display public key or private key, one should call C_GetAttributeValue()
to get modulus and exponent. Here is one example:
http://docs.sun.com/app/docs/doc/819-2145/chapter2-15?a=view
Sorry for the spam.
--
Regards,
Raymond
More information about the crypto-discuss
mailing list