This method generates and returns the Secure Hashing Algorithm (SHA) hash of the subject name and issuer name for a user's certificate.
IDL Definition
HRESULT HashCert(
BSTR bszSubjectName,
BSTR bszIssuerName,
[out, retval] BSTR* pbstrCertHash
);
Parameters
bszSubjectName
The subject in the certificate
bszIssuerName
The certificate issuer name
pbstrCertHash
On return, the hash of the certificate.
Return Values
a standard HRESULT value
Example
<%
Set gMemUserObject = Server.CreateObject("Membership.UserObjects")
If Request("REMOTE_USER") = "" Then
ScriptError("Not Authenticated")
End if
set x = Server.CreateObject("Membership.verifusr.1")
y = x.HashCert(Request.ClientCertificate("SUBJECT"),Request.ClientCertificate("ISSUER"))
gMemUserObject.Put "userCertificateHash", y
gMemUserObject.setinfo
%>