I have a previously generated RSA private signing key, which is stored as a PRIVATEKEYBLOB. I am trying to move this into a new certificate for better management of the key. How do I take this blob and turn it into a .pfx certificate?
I have a HCRYPTPROV (uses MS_ENHANCED_PROV and PROV_RSA_FULL). I can get a HCRYPTKEY from CryptImportKey.
PFXExportCertStoreEx seems to be the function to export it to a PFX blob (which I'm assuming I would then write to a file), but I don't understand how to get the key into it.