Reputation: 7423
I have a generated CXF 2.7.10 client for SOAP SSL WebService. How to I specify a private key/certificate (ideally in pem format) at runtime for it instead of hardcoding JKS in XML configuration?
Upvotes: 2
Views: 1448
Reputation: 11238
Take a look at this blog post wherein an implementation of the WSS4J Crypto
interface is created by extending CryptoBase, obtaining the public keys from a centralized PKI store and the private key from the default crypto provider (Merlin) in a local keystore as usual.
In your case, assuming you want to continue using the default keystore for the public keys, you would flip the public/private key retrieval implementation around.
Source code references: WSS4J's Merlin.java extends CryptoBase.java
Upvotes: 2