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

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:

<soapenv:Envelope xmlns:soapenv=""
        <principal>E. ten Westenend</principal><telephoneNumber>0031629061745</telephoneNumber>

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

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.

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!

It works fine when running the sever as a exe, when installing it as  a service i get the next error:

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.

Forum Jump:

Users browsing this thread: 1 Guest(s)