I work on a server in a distributed application that has browser clients, and also participates in communication between the server and a third-party user. My server has a CA certificate, allowing my clients to connect using TLS (SSL) using HTTP / S and XMPP (secure). It all works fine.
Now I need to securely connect to a third-party server using JAX-WS over HTTPS / SSL. In this post, my server acts as a client in JAX-WS interation, and I have a client certificate signed by a third party.
I tried adding a new keystore through the standard system configuration ( -Djavax.net.ssl.keyStore=xyz ), but my other components are clearly affected by this. Although my other components use dedicated parameters for their SSL configuration ( my.xmpp.keystore=xxx, my.xmpp.truststore=xxy, ... ), it seems that they end up using the global SSLContext . (The configuration namespace my.xmpp. to indicate separation, but it is not)
I also tried adding my client certificate to my original keystore, but I don't think I like the other components either.
I think my only option is to programmatically connect to the JAX-WS HTTPS configuration to configure the keystore and trust store to interact with the JAX-WS client.
Any ideas / pointers on how to do this? All the information I find either uses the javax.net.ssl.keyStore method, or sets the global SSLContext , which, it seems to me, will end up in the same confilc. The closest I got to something useful is an old error report that requests the function I need: Add support for passing SSLContext to the JAX-WS client runtime
Anyone accept?
java certificate ssl jax-ws
maasg Jun 12 2018-12-12T00: 00Z
source share