public void AnchorEnsure(string[] args) { string owner = args.GetRequiredValue(0); CertificateFileInfo certFileInfo = CertificateFileInfo.Create(1, args); PushCerts(owner, certFileInfo.LoadCerts(), true, certFileInfo.Status); }
public void CertificateAdd(string[] args) { CertificateFileInfo certFileInfo = CertificateFileInfo.Create(0, args); MemoryX509Store certStore = certFileInfo.LoadCerts(); PushCerts(certStore, false, certFileInfo.Status); }
public void CertificateExportKey(string[] args) { CertificateFileInfo certFileInfo = CertificateFileInfo.Create(0, args); MemoryX509Store certStore = certFileInfo.LoadCerts(); ShowKey(certStore); }
public void CertificateEnsure(string[] args) { CertificateFileInfo certFileInfo = CertificateFileInfo.Create(0, args); MemoryX509Store certStore = certFileInfo.LoadCerts(); // // This checks for duplicates...(using thumbprints) // PushCerts(certStore, true, certFileInfo.Status); }
public void AnchorAddEx(string[] args) { string owner = args.GetRequiredValue(0); bool forIncoming = args.GetRequiredValue <bool>(1); bool forOutgoing = args.GetRequiredValue <bool>(2); bool checkDupes = args.GetRequiredValue <bool>(3); CertificateFileInfo certFileInfo = CertificateFileInfo.Create(4, args); PushCerts(owner, certFileInfo.LoadCerts(), false, certFileInfo.Status, forIncoming, forOutgoing); }
public void CertificateSearchByFile(string[] args) { CertificateFileInfo certFileInfo = CertificateFileInfo.Create(0, args); MemoryX509Store certs = certFileInfo.LoadCerts(); WriteLine(string.Empty); this.Search( x => (certs.FirstOrDefault(y => this.Match(x, y)) != null) ); }
public void AnchorSearchByFile(string[] args) { string owner = args.GetRequiredValue(0); CertificateFileInfo certFileInfo = CertificateFileInfo.Create(1, args); MemoryX509Store certs = certFileInfo.LoadCerts(); WriteLine(string.Empty); this.Search( owner, x => (certs.FirstOrDefault(y => this.CertCommands.Match(x, y)) != null) ); }
public void CertificateEnsureMachine(string[] args) { using (SystemX509Store store = OpenStore(args.GetRequiredValue(0))) { CertificateFileInfo certFileInfo = CertificateFileInfo.Create(1, args); MemoryX509Store certs = certFileInfo.LoadCerts(MachineKeyFlags); foreach (X509Certificate2 cert in certs) { string comment = "EXISTS"; if (!store.Contains(cert)) { store.Add(cert); comment = "ADDED"; } WriteLine("{0}: {1}, Thumbprint:{2}", comment, cert.Subject, cert.Thumbprint); } } }