I am getting following error while getting response back to our server
----
java.io.IOException: weblogic.security.AuthenticationException: Incorrect encrypted
block possibly incorrect SSLServerCertificateChainFileName set for this server
certificate
at weblogic.security.SSL.SSLCertificate.verify(SSLCertificate.java:171)
----
I would appreciate help from anyone out there.
regards
"Subramanyam" <ksubra...@lgsoftindia.com> wrote in message
news:3e3903f8$1...@newsgroups.bea.com...
1. I have installed weblogic 6.1 with sp2
2. Applied service pack sp4
3. Generated CSR using mydomain <Generated on same machine where we are hosting
the application>
4. Got trial certificate from verisign
a. certificate <cert.pem>
b. CA root getcacert.cer <getcacert.der> renamed .cer to .der
5. Set following values for SSL in weblogic server
a. ServerKeyFileName --> key.pem generated while CSR
b. ServerCertificateFileName --> cert.pem
c. ServerCertificateChainFileName --> getcacert.der
6. After configuration started WLS 6.1 server for the new application domain
7. Started without any error.
8. I am able to browse the application using http or https protocol
9. This application provides online buying which has interface with payment gateway
10. There is server to server communication between merchant server (our WLS 6.1
server) and payment gateway server.
11. I am getting error while I am getting response from payment gateway server.
Following is error:
--------
weblogic.security.CipherException: Incorrect encrypted block
at weblogic.security.RSApkcs1.decrypt(RSApkcs1.java:208)
at weblogic.security.RSAMDSignature.verify(RSAMDSignature.java:89)
at weblogic.security.X509.verifySignature(X509.java:243)
at weblogic.security.X509.verify(X509.java:172)
at weblogic.security.SSL.SSLCertificate.verify(SSLCertificate.java:131)
at weblogic.security.SSL.SSLCertificate.input(SSLCertificate.java:115)
at weblogic.security.SSL.Handshake.input(Handshake.java:118)
at weblogic.security.SSL.SSLSocket.getHandshake(SSLSocket.java:1160)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:450)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:297)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:243)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:128)
at weblogic.security.SSL.SSLSocketFactory.createSocket(SSLSocketFactory.java:50)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:147)
at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:126)
at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:158)
at com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:861)
at com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
at com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
java.io.IOException: weblogic.security.AuthenticationException: Incorrect encrypted
block possibly incorrect SSLServerCertificateChainFileName set for this server
certificate
at weblogic.security.SSL.SSLCertificate.verify(SSLCertificate.java:171)
at weblogic.security.SSL.SSLCertificate.input(SSLCertificate.java:115)
at weblogic.security.SSL.Handshake.input(Handshake.java:118)
at weblogic.security.SSL.SSLSocket.getHandshake(SSLSocket.java:1160)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:450)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:297)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:243)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:128)
at weblogic.security.SSL.SSLSocketFactory.createSocket(SSLSocketFactory.java:50)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:147)
at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:126)
at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:158)
at com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:861)
at com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
at com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
weblogic.security.CipherException: Incorrect encrypted block
at weblogic.security.RSApkcs1.decrypt(RSApkcs1.java:208)
at weblogic.security.RSAMDSignature.verify(RSAMDSignature.java:89)
at weblogic.security.X509.verifySignature(X509.java:243)
at weblogic.security.X509.verify(X509.java:172)
at weblogic.security.SSL.SSLCertificate.verify(SSLCertificate.java:131)
at weblogic.security.SSL.SSLCertificate.input(SSLCertificate.java:115)
at weblogic.security.SSL.Handshake.input(Handshake.java:118)
at weblogic.security.SSL.SSLSocket.getHandshake(SSLSocket.java:1160)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:450)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:297)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:243)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:128)
at weblogic.security.SSL.SSLSocketFactory.createSocket(SSLSocketFactory.java:50)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:147)
at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:126)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:281)
at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:29)
at weblogic.net.http.HttpURLConnection.getInternalResponseCode(HttpURLConnection.java:659)
at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:644)
at com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:885)
at com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
at com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
weblogic.security.CipherException: Incorrect encrypted block
at weblogic.security.RSApkcs1.decrypt(RSApkcs1.java:208)
at weblogic.security.RSAMDSignature.verify(RSAMDSignature.java:89)
at weblogic.security.X509.verifySignature(X509.java:243)
at weblogic.security.X509.verify(X509.java:172)
at weblogic.security.SSL.SSLCertificate.verify(SSLCertificate.java:131)
at weblogic.security.SSL.SSLCertificate.input(SSLCertificate.java:115)
at weblogic.security.SSL.Handshake.input(Handshake.java:118)
at weblogic.security.SSL.SSLSocket.getHandshake(SSLSocket.java:1160)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:450)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:297)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:243)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:128)
at weblogic.security.SSL.SSLSocketFactory.createSocket(SSLSocketFactory.java:50)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:147)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:313)
at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:29)
at weblogic.net.http.HttpURLConnection.getInternalResponseCode(HttpURLConnection.java:659)
at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:644)
at com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:885)
at com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
at com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
EXCEPTION :: PaymentAction :: sendStatusQuery() :: IOEXCEPTION for Order ID: 290306580301
java.io.IOException: weblogic.security.AuthenticationException: Incorrect encrypted
block possibly incorrect SSLServerCertificateChainFileName set for this server
certificate
at weblogic.security.SSL.SSLCertificate.verify(SSLCertificate.java:171)
at weblogic.security.SSL.SSLCertificate.input(SSLCertificate.java:115)
at weblogic.security.SSL.Handshake.input(Handshake.java:118)
at weblogic.security.SSL.SSLSocket.getHandshake(SSLSocket.java:1160)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:450)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:297)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:243)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:128)
at weblogic.security.SSL.SSLSocketFactory.createSocket(SSLSocketFactory.java:50)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:147)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:313)
at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:29)
at weblogic.net.http.HttpURLConnection.getInternalResponseCode(HttpURLConnection.java:659)
at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:644)
at com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:885)
at com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
at com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
<Jan 29, 2003 3:06:11 PM IST> <Error> <HTTP> <[WebAppServletContext(2972848,webINMallApp,/webINMallApp)]
Servlet failed with Exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1519)
at com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:565)
at com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
--------
regards
Subramanyam
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3B96B07C
.A92A501%40directcommerce.com&rnum=7&prev=/groups%3Fq%3Dweblogic.security.Ci
pherException%253A%2BIncorrect%2Bencrypted%2Bblock%26ie%3DUTF-8%26oe%3DUTF-8
%26hl%3Den
-utpal
"Subramanyam" <ksubra...@lgsoftindia.com> wrote in message
news:3e3a...@newsgroups.bea.com...
> at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
> at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
> at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
> at
weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:1
47)
> at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
> at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
> at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
> at
weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:1
47)
> at
weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:31
3)
> at
weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnecti
on.java:29)
> at
weblogic.net.http.HttpURLConnection.getInternalResponseCode(HttpURLConnectio
n.java:659)
> at
weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:6
44)
> at
com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:885)
> at
com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
> at
com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
> at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:262)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:198)
> at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:117)
> at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:175)
> at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:84)
> at
weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:1
47)
> at
weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:31
3)
> at
weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnecti
on.java:29)
> at
weblogic.net.http.HttpURLConnection.getInternalResponseCode(HttpURLConnectio
n.java:659)
> at
weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:6
44)
> at
com.tienda.order.PaymentAction.invokeBankServlet(PaymentAction.java:885)
> at
com.tienda.order.PaymentAction.sendStatusQuery(PaymentAction.java:557)
> at
com.tienda.order.PaymentAction.processBankResponse(PaymentAction.java:216)
> at com.tienda.order.PaymentAction.service(PaymentAction.java:150)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:262)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:198)
> at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
Can you send me a mail to my mailID. I am not able to go ahead with the this problem.
regards
Subramanyam
"Utpal" <ugand...@yahoo.com> wrote:
>Refer to,
>
>http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3B96B07C
>..A92A501%40directcommerce.com&rnum=7&prev=/groups%3Fq%3Dweblogic.security.Ci