From 42b5e13bd2a25cadc3b824153cf6857b18d24a79 Mon Sep 17 00:00:00 2001 From: Bungard Date: Tue, 18 Feb 2020 10:39:26 -0500 Subject: [PATCH] LoadCertificate(byte[]) to instantiate X509Certificate2 with byte array. Addresses 'X509Certificate is immutable on this platform. Use the equivalent constructor instead.' on dotNet Core --- Saml/Saml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Saml/Saml.cs b/Saml/Saml.cs index 6e49541..1b37f4a 100644 --- a/Saml/Saml.cs +++ b/Saml/Saml.cs @@ -75,8 +75,7 @@ public void LoadCertificate(byte[] certificate) { try { - cert = new X509Certificate2(); - cert.Import(certificate); + cert = new X509Certificate2(certificate); } catch (Exception ex) { throw new LoadCertificateException("Failed to load certificate", ex);