Код: Выделить всё
mySvcClient.SendDocument(cert.Export(X509ContentType.SerializedCert, "password"));
...
Код: Выделить всё
public void SendDocument (byte[] binaryCert)
{
X509Certificate2 cert = new X509Certificate2(binaryCert, "password");
...
Код: Выделить всё
if (cert.HasPrivateKey) // WORKS!!!
{
signedXml.SigningKey = cert.PrivateKey; // THROW "keyset does not exist" EXCEPTION
...
Вопрос: даже если X509Certificate2 воссоздан из массива байтов, мне нужно какое-то специальное разрешение для доступа к закрытому ключу?
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/639 ... -not-exist
Мобильная версия