예제 #1
0
 public void CertificateAddMachine(string[] args)
 {
     using (SystemX509Store store = OpenStore(args.GetRequiredValue(0)))
     {
         CertificateFileInfo certFileInfo = CertificateFileInfo.Create(1, args);
         store.ImportKeyFile(certFileInfo.FilePath, certFileInfo.Password, MachineKeyFlags);
     }
 }
예제 #2
0
        public void AnchorAddMachine(string[] args)
        {
            CertificateFileInfo certFileInfo = CertificateFileInfo.Create(0, args);

            using (SystemX509Store store = SystemX509Store.OpenAnchorEdit())
            {
                store.ImportKeyFile(certFileInfo.FilePath, certFileInfo.Password, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
            }
        }