diff --git a/certtostore_windows.go b/certtostore_windows.go index e6a7be8..7515e61 100644 --- a/certtostore_windows.go +++ b/certtostore_windows.go @@ -51,9 +51,11 @@ type WinCertStorage interface { CertStorage // Remove removes certificates issued by any of w.issuers from the user and/or system cert stores. - // If it is unable to remove any certificates, it returns an error. Remove(removeSystem bool) error + // RemoveByCertInfo removes certificate(s) with the given subject and serial number from the user and/or system cert stores. + RemoveByCertInfo(certinfo *windows.CertInfo, removeSystem bool) error + // Link will associate the certificate installed in the system store to the user store. Link() error @@ -97,8 +99,10 @@ const ( certStoreLocalMachineID = 2 // CERT_SYSTEM_STORE_LOCAL_MACHINE_ID infoIssuerFlag = 4 // CERT_INFO_ISSUER_FLAG compareNameStrW = 8 // CERT_COMPARE_NAME_STR_A + compareSubjectCert = 11 // CERT_COMPARE_SUBJECT_CERT compareShift = 16 // CERT_COMPARE_SHIFT findIssuerStr = compareNameStrW<