OK, instead of defining TrustManagers as in the test, use the Java
TrustManagerFactory instead:

https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/TrustManagerFactory.html

You can call "init" on it with a keystore file and then call
"getTrustManagers()" to get the trust managers and set them in CXF. You can
do the same for KeyManagers using KeyManagerFactory:

https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/KeyManagerFactory.html

On Tue, Jan 23, 2018 at 11:12 AM, Al Grant <bigal...@gmail.com> wrote:

> I fear that getting Spring setup could be more pain than trying to complete
> it the way I have done so far.
>
> I have got to :
>
>         // Setup TLS client params
>         TLSClientParameters tlsParams = new TLSClientParameters();
>         X509TrustManager trustManager =new
> X509TrustManager(validPrincipalName);
>         TrustManager[] trustManagers = new TrustManager[1];
>         trustManagers[0] = trustManager;
>         tlsParams.setTrustManagers(trustManagers);
>         tlsParams.setDisableCNCheck(true);
>
> But not sure where to get the values for the following parameters from:
>
> String validPrincipalName =
> "CN=Bethal,OU=Bethal,O=ApacheTest,L=Syracuse,C=US";
>
>
>
>
>
>
>
> --
> Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to