Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7950145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:10:45+00:00 2026-06-04T02:10:45+00:00

I am trying to connect with a SOAP Service which requires Mutual SSL Authentication.

  • 0

I am trying to connect with a SOAP Service which requires Mutual SSL Authentication.

We created a self-signed certificate and transferred it to the service operator for them to verify our connections. Likewise, they sent us a copy of their ssl certificate.

I have been able to successfully connect to an get the expected SOAP response from the service by using openssl s_client and manually entering the HTTP request, headers and SOAP content.
I use the parameters similar to the following to make the successful connection:

openssl s_client -connect example.com:443 -key my_key.pem -cert my_cert.pem -pass file:my_passphrase
  • my_key.pem is the filename of my private key
  • my_cert.pem is the filename of the self-signed certificate forwarded to the service operator.
  • my_passphrase contains the passphrase for the private key.

I am now trying to access the same service using gSOAP and its C bindings. I followed the documentation at http://www.cs.fsu.edu/~engelen/soapdoc2.html to create binding from the service WSDL and added a call to soap_ssl_client_context() to set up the SSL connection, but I’m running into a problem.

I presumed that I should use the path to my_key.pem as the keyfile parameter, but using gdb, I can see that it is the call to SSL_CTX_use_certificate_chain_file() which is failing.
gSOAP passes the keyfile parameter as the file argument to this call.

Any help is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:10:47+00:00Added an answer on June 4, 2026 at 2:10 am

    The solution is that gSOAP expects the certificate and key to be in the same file.

    From SSL Certificates and Key Files in the gSOAP documentation:

    The keyfiles (client.pem and server.pem) are created by concatenating the private key PEM with the certificate PEM.

    You can achieve this by concatenating the two files together. This is simple using the Unix tool cat. At your shell prompt, and using the same file names as in the question:

    $ cat my_cert.pem my_key.pem > my_certkey.pem
    

    Where my_certkey.pem is the output file. Now, you can use the path to my_certkey.pem as the keyfile parameter in the call to soap_ssl_client_context().

    Tools like openssl s_client and curl will understand the concatenated key-cert file as argument to the -cert options and use both the key and cert from there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to connect to an ASP.net soap service using Kerberos authentication using
I am trying to connect to Yudu's web service via soap/php. When I send
I am trying to connect to a Web Service which is password protected and
I am trying to connect to a SOAP service, that's all fine. But I
Im trying to connect to a SOAP service using Android and have read in
I am trying to connect to a remote web service endpoint by soap ui
I trying to connect to a Java Service with some special security requirements It
I'm developing a simple wcf service and trying to expose it as Soap for
I have been trying to set up a PHP based SOAP client to connect
I would like to connect to a SOAP web service using C#. Before I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.