Skip to content

X509CertificateLoaderExtensions.MergeWithPemKey nadal wymaga profilu użytkownika #162

@bail16

Description

@bail16

Wg. changeloga metoda X509CertificateLoaderExtensions.MergeWithPemKey nie wymaga profilu użytkownika, natomiast po wyłączeniu LoadUserProfile na IIS dostaję wyjątek

System.Security.Cryptography.CryptographicException: The EncryptedPrivateKeyInfo structure was decoded but was not successfully interpreted, the password may be incorrect.
 ---> System.Security.Cryptography.CryptographicException: Nie można odnaleźć określonego pliku.
   at System.Security.Cryptography.CngKey.Import(ReadOnlySpan`1 keyBlob, String curveName, CngKeyBlobFormat format, CngProvider provider)
   at System.Security.Cryptography.CngPkcs8.ImportPkcs8(ReadOnlySpan`1 keyBlob)
   at System.Security.Cryptography.CngPkcs8.ImportEncryptedPkcs8PrivateKey(ReadOnlySpan`1 password, ReadOnlySpan`1 source, Int32& bytesRead)
   --- End of inner exception stack trace ---
   at System.Security.Cryptography.CngPkcs8.ImportEncryptedPkcs8PrivateKey(ReadOnlySpan`1 password, ReadOnlySpan`1 source, Int32& bytesRead)
   at System.Security.Cryptography.ECDsaCng.ImportEncryptedPkcs8PrivateKey(ReadOnlySpan`1 password, ReadOnlySpan`1 source, Int32& bytesRead)
   at System.Security.Cryptography.PemKeyHelpers.ImportEncryptedPem[TPass](ReadOnlySpan`1 input, ReadOnlySpan`1 password, ImportEncryptedKeyAction`1 importAction)
   at KSeF.Client.Extensions.X509CertificateLoaderExtensions.MergeWithPemKey(X509Certificate2 publicCert, String privateKeyPem, String password)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions