-1

How to convert Public key from Pkcs11Interop to X509 certificate or pem format

Noppadol
  • 11
  • 3
  • Can you please describe what you are trying to achieve in more details? Maybe add some code. Currently its very hard to understand your problem. – jariq Sep 13 '18 at 02:07
  • Thanks jariq. I want to send public key to another program that support only pem format or X509 format. for my code // Generate asymetric key pair ObjectHandle publicKey = null; ObjectHandle privateKey = null; List publicKeyAttributes = null; List privateKeyAttributes = null; GenerateKeyPair(session,out publicKeyAttributes, out privateKeyAttributes,out publicKey, out privateKey); – Noppadol Sep 13 '18 at 02:31

1 Answers1

0

If you want to extract RSA public key value then you need to read CKA_PUBLIC_EXPONENT and CKA_MODULUS attributes.

jariq
  • 11,681
  • 3
  • 33
  • 52