private void CreateRootCertificate()
        {
            var parameters = new MakeCertParameters
            {
                Name = GetRootCertificateName(),
                IsPrivateKeyExportable = true,
                IsSelfSigned           = true,
                OutputStoreName        = DefaultIssuerCertificateStoreName,
                OutputStoreLocation    = DefaultIssuerCertificateStoreLocation,
                Usage           = KeyUsage.ServerAuthentication,
                CertificateType = CertificateType.CertificationAuthority,
                HashAlgorithm   = CertificateHashAlgorithm.SHA1,
                KeyType         = KeyType.Signature
            };

            int output = CommandLine.Run(this.makeCertPath, parameters.ToString());
        }
        private void CreateCertificateForHost(CertificateName hostCertName)
        {
            var parameters = new MakeCertParameters
            {
                Name = hostCertName,
                IsPrivateKeyExportable         = true,
                IssuerCertificateCommonName    = DefaultIssuerCertificateCommonName,
                IssuerCertificateStoreName     = DefaultIssuerCertificateStoreName,
                IssuerCertificateStoreLocation = DefaultIssuerCertificateStoreLocation,
                OutputStoreName     = DefaultOutputStoreName,
                OutputStoreLocation = DefaultOutputStoreLocation,
                Usage           = KeyUsage.ServerAuthentication,
                CertificateType = CertificateType.EndCertificate,
                HashAlgorithm   = CertificateHashAlgorithm.SHA1,
                KeyType         = KeyType.Exchange
            };

            int output = CommandLine.Run(this.makeCertPath, parameters.ToString());
        }
Esempio n. 3
0
        private void CreateRootCertificate()
        {
            var parameters = new MakeCertParameters
            {
                Name = GetRootCertificateName(),
                IsPrivateKeyExportable = true,
                IsSelfSigned = true,
                OutputStoreName = DefaultIssuerCertificateStoreName,
                OutputStoreLocation = DefaultIssuerCertificateStoreLocation,
                Usage = KeyUsage.ServerAuthentication,
                CertificateType = CertificateType.CertificationAuthority,
                HashAlgorithm = CertificateHashAlgorithm.SHA1,
                KeyType = KeyType.Signature
            };

            int output = CommandLine.Run(this.makeCertPath, parameters.ToString());
        }
Esempio n. 4
0
        private void CreateCertificateForHost(CertificateName hostCertName)
        {
            var parameters = new MakeCertParameters
            {
                Name = hostCertName,
                IsPrivateKeyExportable = true,
                IssuerCertificateCommonName = DefaultIssuerCertificateCommonName,
                IssuerCertificateStoreName = DefaultIssuerCertificateStoreName,
                IssuerCertificateStoreLocation = DefaultIssuerCertificateStoreLocation,
                OutputStoreName = DefaultOutputStoreName,
                OutputStoreLocation = DefaultOutputStoreLocation,
                Usage = KeyUsage.ServerAuthentication,
                CertificateType = CertificateType.EndCertificate,
                HashAlgorithm = CertificateHashAlgorithm.SHA1,
                KeyType = KeyType.Exchange
            };

            int output = CommandLine.Run(this.makeCertPath, parameters.ToString());
        }