|
Posted by Tom on February 18, 2008, 10:54 am
Please log in for more thread options
We have obtained a client certificate from a 3rd party to install and use to
obtain 3rd party's XML data.
The only instructions they provided us was to download and import the cert
into IE and then export to .pfx file. With that done, when we try to access
the 3rd party secured site we were getting the error:
msxml3.dll error '80072f0c'
A certificate is required to complete client authentication
I've made some progress in that I'm now getting a different error. I think
I've successfully used the winhttpcertcfg.exe to get the cert into the
certificate store. I'm just not sure about the account.I've granted access
to the following by using the following:
winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "CsS Services -a IWAM_SECURE
I've run that command for various accounts. Here's the listing now using:
winhttpcertcfg -l -c LOCAL_MACHINE\MY -s "CsS Services"
Microsoft (R) WinHTTP Certificate Configuration Tool
Copyright (C) Microsoft Corporation 2001.
Matching certificate:
E=myemailaddress
CN=CsS Services
OU=Identity authenticated by RA
OU=Email control validated by GeoTrust
OU=See TCX CPS www.geotrust.com/resources/CPS
OU=CPS terms incorp. by ref. liability ltd.
O=Org. not validated.
Additional accounts and groups with access to the private key include:
BUILTIN\Administrators
NT AUTHORITY\SYSTEM
SECURE\IUSR_SECURE
SECURE\IWAM_SECURE
SECURE\ASPNET
Now when I run this VBscript code in ASP using WinHttp.WinHttpRequest I get
the following error:
WinHttp.WinHttpRequest error '80072f9a'
A security error occurred
This still occurs on objSrvHTTP.Send. I've tried both GET and POST and get
the same error
set objSrvHTTP = Server.CreateObject ("WinHttp.WinHttpRequest.5.1")
set objXMLDocument = Server.CreateObject("MSXML2.DOMDocument")
set objXMLReponseDocument = Server.CreateObject("MSXML2.DOMDocument")
objXMLDocument.async = false
objXMLDocument.load(Server.MapPath("Request.xml"))
' WinHttp.WinHttpRequest.5.1
objSrvHTTP.SetClientCertificate "LOCAL_MACHINE\MY\CsS Services"
objSrvHTTP.open "GET", "https://test.rbsecure.com/secure2/bin/XMLPost",
false
objSrvHTTP.SetRequestHeader "content-Type","text/xml"
objSrvHTTP.send objXMLDocument
Response.Write objSrvHTTP.ResponseText
|