コード例 #1
0
ファイル: Nfx509Tests.cs プロジェクト: nofuture-git/31g
        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);
        }
コード例 #2
0
ファイル: Nfx509Tests.cs プロジェクト: nofuture-git/31g
        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);
        }