Posts

Showing posts from July, 2025
 using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.Xml; using System.IO.Compression; using System.Text; namespace WebApplication1 {     public abstract class BaseResponse     {         protected XmlDocument _xmlDoc;         protected readonly X509Certificate2 _certificate;         protected XmlNamespaceManager _xmlNameSpaceManager; //we need this one to run our XPath queries on the SAML XML         public string Xml { get { return _xmlDoc.OuterXml; } }         public BaseResponse(string certificateStr, string responseString = null) : this(Encoding.ASCII.GetBytes(certificateStr), responseString) { }         public BaseResponse(byte[] certificateBytes, string responseString = null)        ...