Using client certificates in ASP

L

languy

Hi there,

I have an ASP page, which have to connect to an SSL server that
requires a
client certificate, but I get the following error:

Erroror Type:
msxml3.dll (0x80072F0C)
A certificate is required to complete client authentication
/test/test.asp, line 34

Here goes my code:
const DQ = """"
dim responseText
dim strRequest
dim objSrvHTTP
dim objXMLDocument
dim objXMLReponseDocument
strRequest = "xxx test xxx"
set objSrvHTTP = CreateObject("MSXML2.ServerXMLHTTP")
set objXMLDocument = CreateObject("MSXML2.DOMDocument")
set objXMLReponseDocument = CreateObject("MSXML2.DOMDocument")
objXMLDocument.async = false
objXMLDocument.loadXML(strRequest)
'objSrvHTTP.setOption(2) = SXH_OPTION_SELECT_CLIENT_SSL_CERT
'objSrvHTTP.setOption(3) = "Local_Machine\My\www.notourwebsite.com"
objSrvHTTP.setOption 3, "cert_name"
objSrvHTTP.open "POST", "https://host:8443", false
objSrvHTTP.SetRequestHeader "content-Type","text/xml"
objSrvHTTP.send objXMLDocument ' Line 34
Response.Write objSrvHTTP.responseText
Response.End
<snip>

Can someone please help me with this issue?

Thanks in regards,
Jess
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top