We have a secure key store which features a PKCS#11 interface. We access keys on it using the PKCS#11 Interop Library for .NET. We also need to import keys from certificates. How to import the PrivateKey of an X509Certificate2
via our PKCS#11 interface into our key store?
var key = x509Certificate2.PrivateKey;
var attributes = new List<ObjectAttribute>();
// What to do here? How to fill in the key into those attributes?
pkcs11Session.CreateObject(attributes);