public Response() { settings = MnoHelper.Sso.SamlSettings(); string strCert = settings.IdpCertificate; Cert = new Certificate(); Cert.LoadCertificate(strCert); }
/// <summary> /// Return the Certificate used by the Response object /// </summary> /// <returns></returns> public Certificate SamlCertificate() { if (certificate == null) { certificate = new Certificate(); certificate.LoadCertificate(MnoHelper.With(presetName).Sso.SamlSettings().IdpCertificate); } return(certificate); }
public void ItLoadsACertificateFromString() { MnoHelper.Environment = "production"; string strCert = MnoHelper.Sso.X509Certificate; // Build certificate ASCIIEncoding ascii = new ASCIIEncoding(); var bytCert = ascii.GetBytes(strCert); X509Certificate2 cert = new X509Certificate2(bytCert); // Create SAML x509 certificate from string Certificate samlCert = new Certificate(); samlCert.LoadCertificate(strCert); Assert.IsTrue(cert.Equals(samlCert.cert)); }
/// <summary> /// Return the Certificate used by the Response object /// </summary> /// <returns></returns> public Certificate SamlCertificate() { if (certificate == null) { certificate = new Certificate(); certificate.LoadCertificate(MnoHelper.With(presetName).Sso.SamlSettings().IdpCertificate); } return certificate; }