I am trying to import an ECDSA PFX onto a smartcard using CNG apis on
WIN7.

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
ss =
NcryptExportKey(ncrypt_key_handle_returned_from_CryptAcquireCertificatePriv*
ateKey,
NULL,
LEGACY_RSAPRIVATE_BLOB,
NULL,
....) 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 ...