SIPSorcery.SIP.SIPTLSChannel.GetServerCert C# (CSharp) Method

GetServerCert() private method

private GetServerCert ( ) : X509Certificate
return System.Security.Cryptography.X509Certificates.X509Certificate
        private X509Certificate GetServerCert()
        {
            //X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
            X509Store store = new X509Store(StoreName.CertificateAuthority, StoreLocation.LocalMachine);
            store.Open(OpenFlags.ReadOnly);
            X509CertificateCollection cert = store.Certificates.Find(X509FindType.FindBySubjectName, "10.0.0.100", true);
            return cert[0];
        }