|
|
Set myStore = Server.CreateObject("CAPICOM.Store")
myStore.Open CAPICOM_LOCAL_MACHINE_STORE, "My" , CAPICOM_STORE_OPEN_READ_ONLY
Set myCertificates = myStore.Certificates.Find(CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME, subject)
Set myCertificates = myCertificates.Find(CAPICOM_CERTIFICATE_FIND_ISSUER_NAME, issuer)
If myCertificates.Count > 0 Then
Set mSignerCert = myCertificates(1)
Set myCertificates = Nothing
myStore.Close
Set myStore = Nothing
Else
Set myCertificates = Nothing
myStore.Close
Set myStore = Nothing
Err.Raise vbObjectError + 512, "clsEWP", "Cannot find certificate issued to " & subject & " by " & issuer
End If |
|