From users-return-52186-archive-asf-public=cust-asf.ponee.io@cxf.apache.org Tue Jan 23 11:27:59 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id B559C180621 for ; Tue, 23 Jan 2018 11:27:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A4331160C39; Tue, 23 Jan 2018 10:27:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EA281160C17 for ; Tue, 23 Jan 2018 11:27:58 +0100 (CET) Received: (qmail 78280 invoked by uid 500); 23 Jan 2018 10:27:57 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 78261 invoked by uid 99); 23 Jan 2018 10:27:57 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2018 10:27:57 +0000 Received: from mail-pg0-f45.google.com (mail-pg0-f45.google.com [74.125.83.45]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id DC58A1A0068 for ; Tue, 23 Jan 2018 10:27:56 +0000 (UTC) Received: by mail-pg0-f45.google.com with SMTP id n17so9311351pgf.10 for ; Tue, 23 Jan 2018 02:27:55 -0800 (PST) X-Gm-Message-State: AKwxytcRSpNAPzYj7NNcGrLsvjbu7nfNTNZaZ022ro+TFD2tnjURYqCt 95ldXxwWcoJhE3QloX2moAZ5/7hY9qQxslMrjKM= X-Google-Smtp-Source: AH8x227kSQyTOR8P+R+cqiu+84kxLs9O4cjR+Lh3qUBhWswpQrhlc/JTbT7D7R1ouqdu4JBYAKoI6Jzmvy2lt2lUWjs= X-Received: by 10.98.153.2 with SMTP id d2mr10282157pfe.44.1516703274535; Tue, 23 Jan 2018 02:27:54 -0800 (PST) MIME-Version: 1.0 Reply-To: coheigea@apache.org Received: by 10.236.141.133 with HTTP; Tue, 23 Jan 2018 02:27:54 -0800 (PST) In-Reply-To: <1516702188405-0.post@n5.nabble.com> References: <1516362104886-0.post@n5.nabble.com> <1516362938582-0.post@n5.nabble.com> <1516364326737-0.post@n5.nabble.com> <1516560570774-0.post@n5.nabble.com> <1516696354412-0.post@n5.nabble.com> <1516702188405-0.post@n5.nabble.com> From: Colm O hEigeartaigh Date: Tue, 23 Jan 2018 10:27:54 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Original Exception was org.apache.wss4j.common.ext.WSSecurityException: Cannot find key for alias: [devstore] To: users@cxf.apache.org Content-Type: multipart/alternative; boundary="94eb2c0c45f0e88f4005636eff06" --94eb2c0c45f0e88f4005636eff06 Content-Type: text/plain; charset="UTF-8" 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 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 --94eb2c0c45f0e88f4005636eff06--