Take a look at how it's done in the tests that I mailed you a link to earlier - you have to supply your own implementation.
Colm. On Tue, Jan 23, 2018 at 10:09 AM, Al Grant <[email protected]> wrote: > Ok. > > I have followed on from the message signing with this code: > > // APACHE CXF CLIENT SETUP - MESSAGE SIGNING > > > ((BindingProvider)irsiservice).getRequestContext().put( > SecurityConstants.ENCRYPT_PROPERTIES, > "client_sign.properties"); > > ((BindingProvider)irsiservice).getRequestContext().put( > SecurityConstants.SIGNATURE_PROPERTIES, > "client_sign.properties"); > > ((BindingProvider)irsiservice).getRequestContext().put( > SecurityConstants.SIGNATURE_USERNAME, > "signingonly"); > > ((BindingProvider)irsiservice).getRequestContext().put( > SecurityConstants.CALLBACK_HANDLER, > ClientCallbackHandler.class.getName()); > > // Logging > LoggingOutInterceptor loi = new LoggingOutInterceptor(); > LoggingInInterceptor lii = new LoggingInInterceptor(); > > org.apache.cxf.endpoint.Client client = > org.apache.cxf.frontend.ClientProxy.getClient(irsiservice); > org.apache.cxf.endpoint.Endpoint cxfEndpoint = > client.getEndpoint(); > > cxfEndpoint.getOutInterceptors().add(loi); > cxfEndpoint.getInInterceptors().add(lii); > > // CXF CLIENT FOR MUTUAL TLS > > // Setup TLS client params > TLSClientParameters tlsParams = new TLSClientParameters(); > TrustManager trustManager = new TrustManager(); // trust manager is > abstract and cannot be instantiated > TrustManager[] trustManagers = new TrustManager[1]; > trustManagers[0] = trustManager; > tlsParams.setTrustManagers(trustManagers); > tlsParams.setDisableCNCheck(true); > > HTTPConduit http = (HTTPConduit) client.getConduit(); > http.setTlsClientParameters(tlsParams); > > // Sending the data > response = irsiservice.setSale(request); > > System.out.println(response.isSuccess()); > System.out.println("Sent"); > > However I dont seem to be able to instatiate TrustManager in that way? > > > > -- > Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
