1

私は双方向のSSL通信を行おうとしています。私のサーバーは1つのweblogicサーバーにデプロイされ、クライアントは別のサーバーにデプロイされています。クライアント側で有効な証明書をインポートし、httpsで実行されているWebサービスを呼び出そうとしています。httpsでWebサービスを呼び出す単純なサーブレットクラスを作成しました。クライアントコードに次のプロパティを設定しました。

System.setProperty("javax.net.ssl.keyStore","/opt/bea1/certificates/VDFNLimitedV01.p12");
System.setProperty("javax.net.ssl.keyStorePassword", "XXXXX");
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");

UNIXサーバーを介してスタンドアロンの単純なクライアントコードをコンパイルして実行すると、正常に実行されますが、クライアントをweblogicにデプロイして、URLを押すと、不正な証明書の例外が発生します。 クライアント側のエラー

   oled Threads]]weblogic.security.SSL.jsseadapter: SSLENGINE: Exception occurred during SSLEngine.unwrap(ByteBuffer,ByteBuffer).
    javax.net.ssl.SSLException: Received fatal alert: bad_certificate
            at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
            at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1467)
            at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1435)
            at com.sun.net.ssl.internal.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1601)
            at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1031)
            at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:845)
            at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:721)
            at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:607)
            at weblogic.security.SSL.jsseadapter.JaSSLEngine$4.run(JaSSLEngine.java:118)
            at weblogic.security.SSL.jsseadapter.JaSSLEngine.doAction(JaSSLEngine.java:732)
            at weblogic.security.SSL.jsseadapter.JaSSLEngine.unwrap(JaSSLEngine.java:116)
            at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:93)
            at weblogic.socket.JSSEFilterImpl.doHandshake(JSSEFilterImpl.java:59)
            at weblogic.socket.JSSEFilterImpl.write(JSSEFilterImpl.java:391)
            at weblogic.socket.JSSESocket$JSSEOutputStream.write(JSSESocket.java:78)
            at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
            at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
            at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
            at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:162)
            at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:376)
            at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37)
            at java.net.URL.openStream(URL.java:1010)
            at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:842)
            at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:289)
            at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:138)
            at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:284)
            at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:246)
            at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:197)
            at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:187)
            at weblogic.wsee.jaxws.spi.WLSServiceDelegate.<init>(WLSServiceDelegate.java:84)
            at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.<init>(WLSProvider.java:598)
            at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:120)
            at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:112)
            at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:83)
            at javax.xml.ws.Service.<init>(Service.java:56)
            at com.vodafone.main.TokenService.<init>(TokenService.java:49)
            at vodafone.TransactClient.getMessage(TransactClient.java:65)
            at vodafone.TransactClient.doGet(TransactClient.java:77)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

サーバー側エラー:

[Raw read]: length = 5>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <0000: 16 03 01 00 4D                                     ....M
[Raw read]: length = 77>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <0000: 0B 00 00 03 00 00 00 10   00 00 42 00 40 49 59 42  ..........B.@IYB
0010: 09 08 EF 92 70 2E E7 49   E6 73 00 B0 33 7C A9 F0  ....p..I.s..3...
0020: 42 D1 3F F2 DA B9 80 FD   9E E8 15 21 C3 7E 42 A2  B.?........!..B.
0030: CF 1A 20 A0 17 ED B3 D6   3B 5C 68 1E 49 06 97 65  .. .....;\h.I..e
0040: 70 8A 40 03 C1 93 FB 3F   A9 26 B6 E9 67           p.@....?.&..g
ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', READ: TLSv1 Handshake, length = 77>
**<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <*** Certificate chain>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <***>**
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', fatal error: 42: null cert chain
javax.net.ssl.SSLHandshakeException: null cert chain>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', SEND TLSv1 ALERT:  fatal, description = bad_certificate>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', WRITE: TLSv1 Alert, length = 2>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', fatal: engine already closed.  Rethrowing javax.net.ssl.SSLHandshakeException: null cert chain>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', called closeOutbound()>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', closeOutboundInternal()>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <[Raw write]: length = 7>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <0000: 15 03 01 00 02 02 2A                               ......*
ExecuteThread: '2' for queue: 'weblogic.socket.Muxer', called closeOutbound()>
<Dec 12, 2012 3:06:54 PM UTC> <Notice> <Stdout> <BEA-000000> <ExecuteThread: '2' for queue: 'weblogic.socket.Muxer', closeOutboundInternal()>

UNIXボックスを介してJavaコードを実行すると、クライアント証明書を送信できますが、weblogicからは送信できません。誰かplzはこれで私を助けることができますか?WeblogicをSSLクライアントとして機能するように構成するにはどうすればよいですか?

ありがとう、Pooja Kulkarni

4

0 に答える 0