Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AB0A3200BBF for ; Mon, 14 Nov 2016 17:37:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A9833160B0D; Mon, 14 Nov 2016 16:37:02 +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 0E954160AF4 for ; Mon, 14 Nov 2016 17:37:00 +0100 (CET) Received: (qmail 26932 invoked by uid 500); 14 Nov 2016 16:36:55 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 26922 invoked by uid 99); 14 Nov 2016 16:36:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2016 16:36:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8D9F4C09E4 for ; Mon, 14 Nov 2016 16:36:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.82 X-Spam-Level: X-Spam-Status: No, score=-1.82 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=hotmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 6k4BObRYwzs9 for ; Mon, 14 Nov 2016 16:36:50 +0000 (UTC) Received: from BLU004-OMC4S6.hotmail.com (blu004-omc4s6.hotmail.com [65.55.111.145]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C8A015FC8E for ; Mon, 14 Nov 2016 16:36:49 +0000 (UTC) Received: from NAM02-BL2-obe.outbound.protection.outlook.com ([65.55.111.135]) by BLU004-OMC4S6.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 14 Nov 2016 08:36:44 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NbD8jqKihG3qyZFO2lvpZQ6IS/eVLST24hkwdb8S66k=; b=f0L3i5XDNkr6QRccBh9h2y47ajBsrE2VXtFF4qE4lpWR7uZt32ablsx3dcLqZ38nmnO9XhyXjjbSutx8MY4gTcYaCcqTvGNWDJJcIX6MPveNE9Uzb88Gr1xmTk8aqmSGsBhno9aRlqeWaM0VvhAGTxdXLF+CBD9zMoHMovjWgStRJh/wNbMqUt1/g1mnbzHwPPhuLTsG5FYDW7gZzVWmoMLtgdN/JCorrQROzACz+G9Z7Bnmg5QM8rm1uaMpESPOCbRa6Z7l0/1Ej0MxvZ0VL0UrCts8vUfjZD69fviuJ7woQm5NbHfsR2AnKSiJq2Lj9jGWhlBCfuHf7gRT6n/gUQ== Received: from SN1NAM02FT035.eop-nam02.prod.protection.outlook.com (10.152.72.55) by SN1NAM02HT130.eop-nam02.prod.protection.outlook.com (10.152.73.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.3; Mon, 14 Nov 2016 16:36:40 +0000 Received: from DM5PR14MB1770.namprd14.prod.outlook.com (10.152.72.57) by SN1NAM02FT035.mail.protection.outlook.com (10.152.72.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.5 via Frontend Transport; Mon, 14 Nov 2016 16:36:40 +0000 Received: from DM5PR14MB1770.namprd14.prod.outlook.com ([10.171.157.12]) by DM5PR14MB1770.namprd14.prod.outlook.com ([10.171.157.12]) with mapi id 15.01.0721.010; Mon, 14 Nov 2016 16:36:40 +0000 From: Martin Gainty To: "java-user@axis.apache.org" , Sterpu Victor Subject: Re: Axis2 , 2 Way SSL and Fiddler Thread-Topic: Axis2 , 2 Way SSL and Fiddler Thread-Index: AQHSPhbN+0hx0gVCc0ufaB3NHyPHKKDYqoLW Date: Mon, 14 Nov 2016 16:36:40 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: axis.apache.org; dkim=none (message not signed) header.d=none;axis.apache.org; dmarc=none action=none header.from=hotmail.com; x-incomingtopheadermarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:7385;Count:39 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [RfkDdabpJMQr+jXHNmFVMH45KHwYWeJI] x-incomingheadercount: 39 x-eopattributedmessage: 0 x-microsoft-exchange-diagnostics: 1;SN1NAM02HT130;7:tnOLw/3H8yIE8LdJE/8iLmKKg6Axm3tU4d4eCgf9Rc16U95/q8rPRJTnqGe/k59+XbbZt2hB/9ovDWUWBcme0eldukVqqWGyQeTVgTh6aSxOFtnIUlScYvKro8WmwdEWCa29bbJifhPdBUNQvnEEkoR0ZrcjVZQf4J/AR/ckOQyT3T3TKIoQ5mG0MDCirn0NAuUbVVsb5z51koLmWwYsr00jz8eb/ZT7KSx5gUYK6N/2spj0GPHU76i1sAvVm+LK29OLYge9GrADTJoUBZvL7jS97L0Kuw07mRu65udRLkoHYAiJYM2sV9e+Yk9j8kCIgNCObnbBjWmgDRZ0NBF1rXQ9DVAZ1MBkIo2tVQe0Yn8= x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(10019020)(98900003);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1NAM02HT130;H:DM5PR14MB1770.namprd14.prod.outlook.com;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: 8c4e9af7-8df4-4595-0397-08d40cac6928 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(1601124038)(1603103113)(1603101340)(1601125047);SRVR:SN1NAM02HT130; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(432015012)(82015046);SRVR:SN1NAM02HT130;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM02HT130; x-forefront-prvs: 0126A32F74 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_DM5PR14MB17708EF717B5981AB15F7698AEBC0DM5PR14MB1770namp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2016 16:36:40.3039 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM02HT130 X-OriginalArrivalTime: 14 Nov 2016 16:36:44.0109 (UTC) FILETIME=[48E397D0:01D23E95] archived-at: Mon, 14 Nov 2016 16:37:02 -0000 --_000_DM5PR14MB17708EF717B5981AB15F7698AEBC0DM5PR14MB1770namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable verify you have PKCS7 Cryptography libraries installed in your OS *you did= nt mention your OS so I am unable to guide you in the PKCS7 Cryptography libraries you may/may= not have* verify you have unlimited strength JCE jars installed http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-21331= 66.html Java Cryptography Extension (JCE) Unlimited Strength ... www.oracle.com Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Fi= les for JDK/JRE 8 Download export your certificate to pem format openssl x509 -in -inform der -outform pem -out deskcheck certificate input pem and validate attributes with your Security = Admin openssl x509 -in NameOfPem.pem -text display cert in pem format inline here or attach pem in reply Martin ______________________________________________ ________________________________ From: Sterpu Victor Sent: Sunday, November 13, 2016 7:36 PM To: java-user Subject: Axis2 , 2 Way SSL and Fiddler Hello I'm testing Axis2 with 2 way SSL for a few weeks and in my tests I always u= sed Fiddler to debug. Everything went fine but now I must move to production and I stopped fiddle= r and removed these lines: System.setProperty("https.proxyHost", "127.0.0.1"); System.setProperty("https.proxyPort", "8888"); An I almost got a heat attack, I'm in a big time crisis and I can't make Ax= is2 work without Fiddler, I receive the error: "org.apache.axis2.AxisFault:= Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Error s= igning certificate verify". And somewere at the end: "java.security.InvalidKeyException: Unsupported ke= y type: SunPKCS11-SmartCard RSA private key, 2048 bits (id 65541, token obj= ect, sensitive, unextractable)" At the end of the mail I pasted all the trace. Some services are working, but the service that doesn't work sends a PKCS7 = signature to the server. I create the PKCS7 signature using the same PKCS11= token that I use to comunicate 2 way SSL to the server. This is reproductible behaviour, always when I activate Fiddler, Axis2 work= s. And only services where I use PKCS7 signature don't work. Do you have any advice? I have no idea what to do. I attached the whole stub that I generated with the command "wsdl2java.bat = -uri tmp\StoreClinicalDocument.wsdl -p stubs.StoreClinicalDocument.client -= s -sd -ssi -o tmp\build_StoreClinicalDocument\client" and I attached the ws= dl file. Thank you. SEVERE: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja= va:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso= rImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at SoapUtils.Axis2ReflectionBuilder.executeMethod(Axis2ReflectionBuilder.j= ava:295) at SoapUtils.Soap.executeMethod(Soap.java:225) at Util.DES.ExportDES.FOCG_TransmiteDES(ExportDES.java:193) at GenericDBCarier.CustomFunctions$44$15.call(CustomFunctions.java:5346) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja= va:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j= ava:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.axis2.AxisFault: Connection has been shutdown: javax.= net.ssl.SSLHandshakeException: Error signing certificate verify at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessag= eFormatter.java:78) at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequ= estEntity.java:85) at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeReques= tBody(EntityEnclosingMethod.java:499) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBas= e.java:2114) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.jav= a:1096) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpM= ethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMeth= odDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:= 397) at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.execute= Method(HTTPSenderImpl.java:872) at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendVia= Post(HTTPSenderImpl.java:212) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessage= WithCommons(CommonsHTTPTransportSender.java:403) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Commo= nsHTTPTransportSender.java:234) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOpe= ration.java:399) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutIn= AxisOperation.java:225) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:15= 0) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub.storeClini= calDocumentS(StoreClinicalDocumentStub.java:377) ... 12 more Caused by: com.ctc.wstx.exc.WstxIOException: Connection has been shutdown: = javax.net.ssl.SSLHandshakeException: Error signing certificate verify at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:261) at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.flush(XMLStre= amWriterWrapper.java:50) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.= java:231) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.close(MTOMXMLStreamWriter.= java:223) at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$o= rg_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_im= pl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:324) at org.apache.axiom.om.impl.llom.OMElementImpl.serializeAndConsume(OMEleme= ntImpl.java:1) at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessag= eFormatter.java:74) ... 29 more Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.= net.ssl.SSLHandshakeException: Error signing certificate verify at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541) at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1553) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:121) at org.apache.commons.httpclient.WireLogOutputStream.write(WireLogOutputSt= ream.java:68) at org.apache.commons.httpclient.ChunkedOutputStream.flushCacheWithAppend(= ChunkedOutputStream.java:121) at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputSt= ream.java:179) at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:100) at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:225) at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:259) ... 35 more Caused by: javax.net.ssl.SSLHandshakeException: Error signing certificate v= erify at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java= :1119) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:= 348) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.ja= va:1375) at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:121) at org.apache.commons.httpclient.WireLogOutputStream.write(WireLogOutputSt= ream.java:68) at org.apache.commons.httpclient.ChunkedOutputStream.flushCacheWithAppend(= ChunkedOutputStream.java:121) at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputSt= ream.java:179) at com.ctc.wstx.io.UTF8Writer.write(UTF8Writer.java:143) at com.ctc.wstx.sw.BufferingXmlWriter.writeRaw(BufferingXmlWriter.java:269= ) at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.j= ava:568) at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:= 385) at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeCharacte= rs(XMLStreamWriterWrapper.java:96) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStr= eamWriter.java:330) at org.apache.axiom.util.stax.XMLStreamWriterWriter.write(XMLStreamWriterW= riter.java:54) at org.apache.axiom.util.base64.Base64EncodingWriterOutputStream.flushBuff= er(Base64EncodingWriterOutputStream.java:82) at org.apache.axiom.util.base64.Base64EncodingWriterOutputStream.doWrite(B= ase64EncodingWriterOutputStream.java:74) at org.apache.axiom.util.base64.AbstractBase64EncodingOutputStream.encode(= AbstractBase64EncodingOutputStream.java:132) at org.apache.axiom.util.base64.AbstractBase64EncodingOutputStream.write(A= bstractBase64EncodingOutputStream.java:77) at javax.activation.DataHandler.writeTo(DataHandler.java:309) at org.apache.axiom.util.stax.XMLStreamWriterUtils.writeBase64(XMLStreamWr= iterUtils.java:62) at org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(XMLStr= eamWriterUtils.java:138) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$StoreClini= calDocumentRequest.serialize(StoreClinicalDocumentStub.java:4586) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$StoreClini= calDocumentRequest.serialize(StoreClinicalDocumentStub.java:4535) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$StoreClini= calDocumentS.serialize(StoreClinicalDocumentStub.java:2924) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$StoreClini= calDocumentS.serialize(StoreClinicalDocumentStub.java:2887) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$StoreClini= calDocumentSE.serialize(StoreClinicalDocumentStub.java:7727) at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$StoreClini= calDocumentSE.serialize(StoreClinicalDocumentStub.java:7714) at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java= :49) at org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer.ser= ializePushOMDataSource(StAXSerializer.java:53) at org.apache.axiom.om.impl.common.serializer.push.Serializer.serialize(Se= rializer.java:293) at org.apache.axiom.om.impl.common.AxiomSourcedElementSupport.ajc$interMet= hod$org_apache_axiom_om_impl_common_AxiomSourcedElementSupport$org_apache_a= xiom_om_impl_intf_AxiomSourcedElement$internalSerialize(AxiomSourcedElement= Support.aj:434) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OM= SourcedElementImpl.java:1) at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$o= rg_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_im= pl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362) at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatch2$or= g_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1) at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDi= spatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_ax= iom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj) at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org= _apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_i= ntf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519) at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSerialize(OM= ElementImpl.java:1) at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDisp= atch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_= om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj) at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org= _apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_i= ntf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElement= Impl.java:1) at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$o= rg_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_im= pl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362) at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatch2$or= g_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1) at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDi= spatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_ax= iom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj) at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org= _apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_i= ntf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519) at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSerialize(OM= ElementImpl.java:1) at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDisp= atch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_= om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj) at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org= _apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_i= ntf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAP= EnvelopeImpl.java:159) at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$o= rg_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_im= pl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:319) ... 31 more Caused by: java.security.InvalidKeyException: Unsupported key type: SunPKCS= 11-SmartCard RSA private key, 2048 bits (id 65541, token object, sensitive,= unextractable) at sun.security.mscapi.RSACipher.init(RSACipher.java:243) at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:158) at javax.crypto.Cipher.init(Cipher.java:1246) at java.security.Signature$CipherAdapter.engineInitSign(Signature.java:128= 2) at java.security.Signature$Delegate.init(Signature.java:1155) at java.security.Signature$Delegate.chooseProvider(Signature.java:1112) at java.security.Signature$Delegate.engineInitSign(Signature.java:1185) at java.security.Signature.initSign(Signature.java:550) at sun.security.ssl.RSASignature.engineInitSign(RSASignature.java:126) at java.security.Signature$Delegate.engineInitSign(Signature.java:1183) at java.security.Signature.initSign(Signature.java:550) at sun.security.ssl.HandshakeMessage$CertificateVerify.(HandshakeMes= sage.java:1585) at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java= :1116) ... 85 more --_000_DM5PR14MB17708EF717B5981AB15F7698AEBC0DM5PR14MB1770namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


v= erify you have PKCS7=   Cryptography libraries installed in your OS *you didnt mention your OS
so I am unable to guide you in the PKCS7 Cryptography libraries you = may/may not have*

<= br>

verify you have unlimited strength JCE jars installed


http://www.oracle.com/technetwork/java/javase/downloads/jce8-d= ownload-2133166.html

www.oracle.com
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Fi= les for JDK/JRE 8 Download


export your certificate to pem format


openssl x509 -in <certificate= _filename> -inform der -outform pem -out <pem-filename>


deskcheck certificate input pem and validate attributes with your Secu= rity Admin


= openssl x509 -in NameOfPem.pem -text
display cert in pem format inline here or attach pem in= reply


Martin 
______________________________________________




From: Sterpu Victor <vic= tor@caido.ro>
Sent: Sunday, November 13, 2016 7:36 PM
To: java-user
Subject: Axis2 , 2 Way SSL and Fiddler
 
Hello
 
I'm testing Axis2 with 2 way SSL for a few weeks and in my t= ests I always used Fiddler to debug.
Everything went fine but now I must move to production and I stopped f= iddler and removed these lines:
           &nbs= p;    System.setProperty("https.proxyHost", "= 127.0.0.1");
            &nb= sp;   System.setProperty("https.proxyPort", "8888&= quot;);
 
An I almost got a heat attack, I'm in a big time crisis and I can't ma= ke Axis2 work without Fiddler, I receive the error: "org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Error signing cert= ificate verify".
And somewere at the end: "java.security.InvalidKeyException: Unsu= pported key type: SunPKCS11-SmartCard RSA private key, 2048 bits (id 65541,= token object, sensitive, unextractable)"
At the end of the mail I pasted all the trace.
 
Some services are working, but the service that doesn't work sends a P= KCS7 signature to the server. I create the PKCS7 signature using the same P= KCS11 token that I use to comunicate 2 way SSL to the server.
This is reproductible behaviour, always when I activate Fiddler, Axis2= works. And only services where I use PKCS7 signature don't work.
 
Do you have any advice? I have no idea what to do.
I attached the whole stub that I generated with the command "wsdl= 2java.bat -uri tmp\StoreClinicalDocument.wsdl -p stubs.StoreClinicalDocumen= t.client -s -sd -ssi -o tmp\build_StoreClinicalDocument\client" and I = attached the wsdl file.
 
Thank you.
 
 
 
SEVERE: null
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm= pl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc= cessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at SoapUtils.Axis2ReflectionBuilder.executeMethod(Axis2ReflectionBuil= der.java:295)
 at SoapUtils.Soap.executeMethod(Soap.java:225)
 at Util.DES.ExportDES.FOCG_TransmiteDES(ExportDES.java:193)
 at GenericDBCarier.CustomFunctions$44$15.call(CustomFunctions.java:53= 46)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecut= or.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecu= tor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axis2.AxisFault: Connection has been shutdown: javax.= net.ssl.SSLHandshakeException: Error signing certificate verify
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
 at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPM= essageFormatter.java:78)
 at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(Axi= sRequestEntity.java:85)
 at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeR= equestBody(EntityEnclosingMethod.java:499)
 at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMeth= odBase.java:2114)
 at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBas= e.java:1096)
 at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(= HttpMethodDirector.java:398)
 at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Htt= pMethodDirector.java:171)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.= java:397)
 at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.ex= ecuteMethod(HTTPSenderImpl.java:872)
 at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.se= ndViaPost(HTTPSenderImpl.java:212)
 at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:12= 1)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMe= ssageWithCommons(CommonsHTTPTransportSender.java:403)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(= CommonsHTTPTransportSender.java:234)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
 at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAx= isOperation.java:399)
 at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(= OutInAxisOperation.java:225)
 at org.apache.axis2.client.OperationClient.execute(OperationClient.ja= va:150)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub.store= ClinicalDocumentS(StoreClinicalDocumentStub.java:377)
 ... 12 more
Caused by: com.ctc.wstx.exc.WstxIOException: Connection has been shutdown: = javax.net.ssl.SSLHandshakeException: Error signing certificate verify
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:261)<= br>  at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.flush(XM= LStreamWriterWrapper.java:50)
 at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWr= iter.java:231)
 at org.apache.axiom.om.impl.MTOMXMLStreamWriter.close(MTOMXMLStreamWr= iter.java:223)
 at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMet= hod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_= om_impl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:32= 4)
 at org.apache.axiom.om.impl.llom.OMElementImpl.serializeAndConsume(OM= ElementImpl.java:1)
 at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPM= essageFormatter.java:74)
 ... 29 more
Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.= net.ssl.SSLHandshakeException: Error signing certificate verify
 at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)  at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1553)=
 at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71)  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java= :82)
 at java.io.BufferedOutputStream.write(BufferedOutputStream.java:121)<= br>  at org.apache.commons.httpclient.WireLogOutputStream.write(WireLogOut= putStream.java:68)
 at org.apache.commons.httpclient.ChunkedOutputStream.flushCacheWithAp= pend(ChunkedOutputStream.java:121)
 at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOut= putStream.java:179)
 at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:100)
 at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:2= 25)
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:259)<= br>  ... 35 more
Caused by: javax.net.ssl.SSLHandshakeException: Error signing certificate v= erify
 at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
 at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
 at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
 at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker= .java:1119)
 at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.= java:348)
 at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
 at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)  at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)=
 at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketIm= pl.java:1375)
 at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)=
 at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java= :82)
 at java.io.BufferedOutputStream.write(BufferedOutputStream.java:121)<= br>  at org.apache.commons.httpclient.WireLogOutputStream.write(WireLogOut= putStream.java:68)
 at org.apache.commons.httpclient.ChunkedOutputStream.flushCacheWithAp= pend(ChunkedOutputStream.java:121)
 at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOut= putStream.java:179)
 at com.ctc.wstx.io.UTF8Writer.write(UTF8Writer.java:143)
 at com.ctc.wstx.sw.BufferingXmlWriter.writeRaw(BufferingXmlWriter.jav= a:269)
 at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWri= ter.java:568)
 at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.= java:385)
 at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeCha= racters(XMLStreamWriterWrapper.java:96)
 at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMX= MLStreamWriter.java:330)
 at org.apache.axiom.util.stax.XMLStreamWriterWriter.write(XMLStreamWr= iterWriter.java:54)
 at org.apache.axiom.util.base64.Base64EncodingWriterOutputStream.flus= hBuffer(Base64EncodingWriterOutputStream.java:82)
 at org.apache.axiom.util.base64.Base64EncodingWriterOutputStream.doWr= ite(Base64EncodingWriterOutputStream.java:74)
 at org.apache.axiom.util.base64.AbstractBase64EncodingOutputStream.en= code(AbstractBase64EncodingOutputStream.java:132)
 at org.apache.axiom.util.base64.AbstractBase64EncodingOutputStream.wr= ite(AbstractBase64EncodingOutputStream.java:77)
 at javax.activation.DataHandler.writeTo(DataHandler.java:309)
 at org.apache.axiom.util.stax.XMLStreamWriterUtils.writeBase64(XMLStr= eamWriterUtils.java:62)
 at org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(X= MLStreamWriterUtils.java:138)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$Store= ClinicalDocumentRequest.serialize(StoreClinicalDocumentStub.java:4586)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$Store= ClinicalDocumentRequest.serialize(StoreClinicalDocumentStub.java:4535)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$Store= ClinicalDocumentS.serialize(StoreClinicalDocumentStub.java:2924)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$Store= ClinicalDocumentS.serialize(StoreClinicalDocumentStub.java:2887)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$Store= ClinicalDocumentSE.serialize(StoreClinicalDocumentStub.java:7727)
 at stubs.StoreClinicalDocument.client.StoreClinicalDocumentStub$Store= ClinicalDocumentSE.serialize(StoreClinicalDocumentStub.java:7714)
 at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource= .java:49)
 at org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerialize= r.serializePushOMDataSource(StAXSerializer.java:53)
 at org.apache.axiom.om.impl.common.serializer.push.Serializer.seriali= ze(Serializer.java:293)
 at org.apache.axiom.om.impl.common.AxiomSourcedElementSupport.ajc$int= erMethod$org_apache_axiom_om_impl_common_AxiomSourcedElementSupport$org_apa= che_axiom_om_impl_intf_AxiomSourcedElement$internalSerialize(AxiomSourcedEl= ementSupport.aj:434)
 at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSeriali= ze(OMSourcedElementImpl.java:1)
 at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMet= hod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_= om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362)=
 at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatc= h2$org_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1)<= br>  at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMet= hodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apac= he_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSuppor= t.aj)
 at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMetho= d$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_i= mpl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519)<= br>  at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSeriali= ze(OMElementImpl.java:1)
 at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMetho= dDispatch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_a= xiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport= .aj)
 at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMetho= d$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_i= mpl_intf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMEl= ementImpl.java:1)
 at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMet= hod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_= om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362)=
 at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatc= h2$org_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1)<= br>  at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMet= hodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apac= he_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSuppor= t.aj)
 at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMetho= d$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_i= mpl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519)<= br>  at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSeriali= ze(OMElementImpl.java:1)
 at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMetho= dDispatch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_a= xiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport= .aj)
 at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMetho= d$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_i= mpl_intf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513)
 at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize= (SOAPEnvelopeImpl.java:159)
 at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMet= hod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_= om_impl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:31= 9)
 ... 31 more
Caused by: java.security.InvalidKeyException: Unsupported key type: SunPKCS= 11-SmartCard RSA private key, 2048 bits (id 65541, token object, sensitive,= unextractable)
 at sun.security.mscapi.RSACipher.init(RSACipher.java:243)
 at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:158)
 at javax.crypto.Cipher.init(Cipher.java:1246)
 at java.security.Signature$CipherAdapter.engineInitSign(Signature.jav= a:1282)
 at java.security.Signature$Delegate.init(Signature.java:1155)
 at java.security.Signature$Delegate.chooseProvider(Signature.java:111= 2)
 at java.security.Signature$Delegate.engineInitSign(Signature.java:118= 5)
 at java.security.Signature.initSign(Signature.java:550)
 at sun.security.ssl.RSASignature.engineInitSign(RSASignature.java:126= )
 at java.security.Signature$Delegate.engineInitSign(Signature.java:118= 3)
 at java.security.Signature.initSign(Signature.java:550)
 at sun.security.ssl.HandshakeMessage$CertificateVerify.<init>(H= andshakeMessage.java:1585)
 at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker= .java:1116)
 ... 85 more
--_000_DM5PR14MB17708EF717B5981AB15F7698AEBC0DM5PR14MB1770namp_--