# XMLRPCSERVER, Mutual TLS

**URL:** <https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [February 20, 2018, 12:14pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191 "2018-02-20T12:14:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 20, 2018, 12:14pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/1 "2018-02-20T12:14:36Z")

</div>

We have standalone instances of XMLRPCSERVER for managing communications from NATURAL to web services. We need to use a web service that requires mutual TLS authentication. How do you configure XMLRPCSERVER to present a client certificate when requested by the target service?

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 20, 2018, 12:41pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/2 "2018-02-20T12:41:11Z")

</div>

Hello James,

I think it is sufficient to set the Java system properties javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword in the batch script which calls the XML RPC Server.

---

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 21, 2018, 3:29pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/3 "2018-02-21T15:29:59Z")

</div>

Hi Rolf. Thank you. I have a standalone instance on my desktop in Windows. It works successfully with client auth, just as you described.  
I also have a standalone instance in UNIX. That is where we run our actual TEST and PROD instances so that is where I need it to work It is essentially the same configuration and uses a similar script and keystores and keys. Having struggled with it for a day, I cannot get it to work with the client auth service. I get the error below. There must be something different about the UNIX environment. We use the JVM supplied by Software AG. I guess I can open a support ticket, but is there a way to get a more detailed trace that might indicate the SSL problem. I feel like the runtime might be ignoring the keystore it is being pointed to.  
James.

2018-02-21 09:03:23.699\> EntireX-\*orker-1( CP:HTTPTransport.invoke() I:SendReceive Exception: com.softwareag.wsstack.client.API.WSClientException: org.apache.axis2.AxisFault: Received fatal alert: bad\_certificate  
at com.softwareag.wsstack.client.impl.WSOperationClientImpl.execute(WSOperationClientImpl.java:68)  
at com.softwareag.entirex.xml.rt.HttpTransportImpl.sendReceive(HttpTransportImpl.java:654)  
at com.softwareag.entirex.xml.rt.TransportHandler.sendReceive(TransportHandler.java:212)  
at com.softwareag.entirex.xml.rt.MessageHandler.processRPCMessage(MessageHandler.java:125)  
at com.softwareag.entirex.xml.rt.XMLRPCServerRPCMessageHandler.processMessage(XMLRPCServerRPCMessageHandler.java:152)  
at com.softwareag.entirex.aci.ServerRPCMessage.doNonConversation(ServerRPCMessage.java:56)  
at com.softwareag.entirex.aci.ServerWorker.run(ServerWorker.java:185)  
Caused by: org.apache.axis2.AxisFault: Received fatal alert: bad\_certificate  
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)  
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:98)  
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)  
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)  
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)  
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)  
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)  
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)  
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:622)  
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)  
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 21, 2018, 3:53pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/4 "2018-02-21T15:53:15Z")

</div>

Hi James,

you can use -Djavax.net.debug=all to see all SSL activity of the JVM.

---

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 21, 2018, 4:03pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/5 "2018-02-21T16:03:41Z")

</div>

Thank you again. I already have that parameter set, but the only part of the trace that indicates there is any problem is what I posted. The trace level is SUPPORT.  
James.

---

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 21, 2018, 4:04pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/6 "2018-02-21T16:04:04Z")

</div>

Thank you again. I already have that parameter set, but the only part of the trace that indicates there is any problem is what I posted. The trace level is SUPPORT.  
James.

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 21, 2018, 4:11pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/7 "2018-02-21T16:11:01Z")

</div>

You have to set the parameters in the batch script as below; note the " characters.

SSLV=“-Djavax.net.ssl.keyStore=/opt/softwareag/RPC/keys.jks -Djavax.net.ssl.keyStorePassword=yourpassword -Djavax.net.ssl.trustStore=/opt/softwareag/RPC/cacerts”  
export SSLV

The Java SSL trace is not written to the log file, it goes to stdout.

---

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 21, 2018, 4:25pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/8 "2018-02-21T16:25:17Z")

</div>

Here is my full startup script:-  
cd /opt/WebApps/XMLRPCSERVERDELUNIX $0  
SSL=“-Djavax.net.ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl -Djavax.net.ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl -Djavax.net.ssl.keyStore=/opt/WebApps/XMLRPCSERVERDELUNIX/EntireX/xmlfirewallsupport.jks -Djavax.net.ssl.keyStorePassword=[password omitted]-Djavax.net.ssl.trustStore=/opt/WebApps/XMLRPCSERVERDELUNIX/EntireX/ExxCACert.jks -Djavax.net.ssl.trustStorePassword=[password omitted] -Djavax.net.debug=all”  
CLASSPATH=“.:/opt/WebApps/XMLRPCSERVERDELUNIX/EntireX/classes/entirex.jar:/opt/WebApps/XMLRPCSERVERDELUNIX/WS-Stack/lib/wsstack-client.jar:/opt/IBM/WebSphere/AppServer/plugins/com.ibm.ws.security.crypto.jar”  
echo $CLASSPATH  
/opt/WebApps/XMLRPCSERVERDELUNIX/jre18/bin/java “$SSL” -Dentirex.sdk.default.trace.propertiesfile=entirex.trace.properties -classpath “$CLASSPATH” com.softwareag.entirex.xml.rt.XMLRPCServer -p entirex.xmlrpcserver.properties -c entirex.xmlrpcserver.configuration.xml  
exit 0

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 22, 2018, 9:50am UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/9 "2018-02-22T09:50:20Z")

</div>

Try changing the parameters so the default SSL implementation of the JVM is used.  
Remove  
-Djavax.net.ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl  
-Djavax.net.ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl  
/opt/IBM/WebSphere/AppServer/plugins/com.ibm.ws.security.crypto.jar

---

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 22, 2018, 12:15pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/10 "2018-02-22T12:15:43Z")

</div>

Hi Rolf. Since it’s evidently an SSL problem, I had tried that already but it will not run without any one of those. Without them I just get class not found errors. It was many years ago, but I think I added those on the advice of Software AG support when we were trying to get this running. I think I’m using the JVM supplied by Software AG. Where should the default SSL implementation be and how can I make the service use it?

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 22, 2018, 1:17pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/11 "2018-02-22T13:17:18Z")

</div>

Hi James,  
I see that you opened a support ticket. So let’s continue this via support.

---

<div class="post-metadata">

**Author:** ![James3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@James3](https://techcommunity.softwareag.com/u/James3)\
**Post date:** [February 22, 2018, 1:20pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/12 "2018-02-22T13:20:12Z")

</div>

OK Rolf. Thank you for your assistance so far,  
James.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:40pm UTC](https://techcommunity.softwareag.com/t/xmlrpcserver-mutual-tls/198191/13 "2021-04-02T15:40:09Z")

</div>


