Exemple #1
0
        public void DER_Test_24_CSR_8_Generic_SHA512()
        {
            using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(4096))
            {
                CertificateRequest CertificateRequest = new CertificateRequest(new RsaSha512(RSA))
                {
                    Country                 = "SE",
                    StateOrProvince         = "Stockholm",
                    Locality                = "Locality",
                    Organization            = "Example Ltd",
                    OrganizationalUnit      = "Development",
                    CommonName              = "www.example.com",
                    SubjectAlternativeNames = new string[] { "example.com" },
                    Surname                 = "Smith",
                    Description             = "Domain certificate",
                    Name      = "Mr Smith",
                    GivenName = "Mr"
                };

                byte[] CSR = CertificateRequest.BuildCSR();

                this.PrintCSR(CSR);
            }
        }