/// <summary> /// Loads a cert file. /// </summary> /// <param name="cert"></param> /// <returns></returns> public static CertificateChain Load(Stream cert) { CertificateChain certificateChain = new CertificateChain(); certificateChain.ParseCert(cert); return(certificateChain); }
/// <summary> /// Loads a cert file. /// </summary> /// <param name="certFile"></param> /// <returns></returns> public static CertificateChain Load(byte[] certFile) { CertificateChain certificateChain = new CertificateChain(); MemoryStream memoryStream = new MemoryStream(certFile); try { certificateChain.ParseCert(memoryStream); } catch { memoryStream.Dispose(); throw; } memoryStream.Dispose(); return(certificateChain); }