Exemple #1
0
        private void BuildClientCert()
        {
            CertificateAuthority.subjectAltName alt = new CertificateAuthority.subjectAltName();
            alt.Dns.Add(this.dnsName);

            ClientPKCS12Cert = ca.SignCert(this.name + " (proxy)", false, alt, false, DateTime.Now.AddYears(10));
        }
Exemple #2
0
        private void BuildServerCert()
        {
            CertificateAuthority.subjectAltName alt = new CertificateAuthority.subjectAltName();
            alt.Dns.Add(this.dnsName);

            ServerPKCS12Cert = ca.SignCert(this.name + " (server)", false, alt, false, DateTime.Now.AddYears(10));

            Byte[] tmp = Convert.FromBase64String(ServerPKCS12Cert);

            X509Certificate cert = CATools.GetX509CertFromPKCS12(tmp, key);

            ServerCert = CATools.X509ToBase64(cert);
        }