Esempio n. 1
0
        public static X509EncryptingCredentials GetEncryptingCredentials(this CertificateReferenceElement reference)
        {
            var cert = reference?.GetCertificate();

            if (cert == null)
            {
                return(null);
            }
            return(new X509EncryptingCredentials(cert));
        }
Esempio n. 2
0
        public static X509SigningCredentials GetSigningCredentials(this CertificateReferenceElement reference)
        {
            if (reference == null)
            {
                return(null);
            }

            var cert = reference.GetCertificate();

            if (cert == null)
            {
                return(null);
            }
            return(new X509SigningCredentials(cert));
        }