March 14th, 2012, 07:28 AM
Import a CNG private key
I am trying to import an ECDSA PFX onto a smartcard using CNG apis on
CryptAcquireCertificatePrivateKey using the appropriate flags yields
an Ncrypt_key_Handle. However NCryptExportKey using the returned key
handle always fails with "The requested operation is not supported."
Call in question looks like
....) always returns 0x80090029
What I want to be able to do is - export the private key blob, export
the certificate, then use the Scard CNG provider to import the private
key and the certificate onto the smartcard ...
Is this the correct way to do things ?
Any pointers would be appreciated ...