Exemple #1
0
        public void TestCreateAndSave()
        {
            var dn = new NoFuture.Encryption.NfX509.DistinguishedName("MyTestCert01");
            var myCert = NoFuture.Encryption.NfX509.CreateSelfSignedCert(dn, new DateTime(2047, 1, 1),
                TEST_PWD);
            var pfx = myCert.Export(X509ContentType.Pkcs12, TEST_PWD);

            File.WriteAllBytes(TEST_CERT_PFX_PATH, pfx);
        }
Exemple #2
0
        public void TestCreateAndSave()
        {
            var certPath = PutTestFileOnDisk("MyTestCert01.pfx");
            var dn       = new NoFuture.Encryption.NfX509.DistinguishedName("MyTestCert01");
            var myCert   = NoFuture.Encryption.NfX509.CreateSelfSignedCert(dn, new DateTime(2047, 1, 1),
                                                                           TEST_PWD);
            var pfx = myCert.Export(X509ContentType.Pkcs12, TEST_PWD);

            File.WriteAllBytes(certPath, pfx);
        }