中央論壇 - CENTER BBS
標題:
在憑放存放區中搜尋憑證
[打印本頁]
作者:
f66666602
時間:
2007-7-27 21:00
標題:
在憑放存放區中搜尋憑證
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
歡迎光臨 中央論壇 - CENTER BBS (https://mail.centerbbs.com/)
Powered by Discuz! X3