Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Soap Service with clientside Certificate
#1
Hi

I need a way to talk to a webservice which uses clientside certification.

I tried HTTPRio but somehow i don't get it working
The request i need to send it quit simple:

Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:txa="http://txauth.ws.tunix.nl/">
  <soapenv:Header/>
  <soapenv:Body>
     <txa:doAuthenticate>
        <principal>E. ten Westenend</principal><telephoneNumber>0031629061745</telephoneNumber>
     </txa:doAuthenticate>
  </soapenv:Body>
</soapenv:Envelope>

i Can get the Certificate info from the Store using CAPICOM so thats not the problem

I tried to use NetHTTPRequest/NetHTTPCLient but the "OnNeedClientCertificate" is not called and i get an "Empty certificate list" error .
Any help is appreciated

Eric
Reply
#2
Using Indy's TIdHTTP component, try assigning a TIdSSLIOHandlerSocketOpenSSL component to the TIdHTTP.IOHandler property, and then set the IOHandler's RootCertFile, CertFile, and KeyFile properties as needed for your client certificate.  Then you can use the TIdHTTP.Post() method to send your SOAP request to the desired HTTPS URL.

Reply
#3
Photo 
I don't have these files.

I did get a MSI which installs a certificate which i see using "certlm"

I will ask the supplier

I can convert my P12 file but then i just get one pem file

I have it working using the files!

Thanks!
Reply
#4
It works fine when running the sever as a exe, when installing it as  a service i get the next error:

Code:
error:140940E5:SSL routines:ssl3_read_bytes:ssl handshake failure

All  3 PEM files and SSL dll's are in the same folder as the exe

The service could not find the pem files, added the path and the problem was solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)