[prev in list] [next in list] [prev in thread] [next in thread]
List: httpclient-users
Subject: public key protected PKCS12 not supported
From: "Lalit Sahoo" <lalit.s () sonata-software ! com>
Date: 2007-03-13 10:47:33
Message-ID: B10440BAFBB0D8458E87DBBCF682625E02663F54 () southendmsg ! SONATA ! LOCAL
[Download RAW message or body]
Hi All,
I am using HttpClient 3.0 and Tomcat web server.
I am implementing certificate-based client authentication over SSL.
For this I have created a client certificate "client2.p12" by using
OpenSSL tool.
When I am loading this certificate by keystore.load (inputstream,
password) it works fine.
But when I doing following steps then I am getting exception as given
below.
Can anybody help me in resolving this issue?
1. Reading the certificate file and storing the data as a String.
2. Then creating ByteArrayInputStream from this String and passing the
input stream to keystore.load().
SEVERE: I/O error reading keystore/truststore file:
java.io.IOException: public key protected PKCS12 not supported
at com.sun.net.ssl.internal.ssl.PKCS12KeyStore.engineLoad(Unknown
Source)
at java.security.KeyStore.load(Unknown Source)
at
com.cramer.agent.protocol.http.AuthSSLProtocolSocketFactory.createKeySto
re(AuthSSLProtocolSocketFactory.java:317)
at
com.cramer.agent.protocol.http.AuthSSLProtocolSocketFactory.createSSLCon
text(AuthSSLProtocolSocketFactory.java:401)
at
com.cramer.agent.protocol.http.AuthSSLProtocolSocketFactory.getSSLContex
t(AuthSSLProtocolSocketFactory.java:523)
at
com.cramer.agent.protocol.http.AuthSSLProtocolSocketFactory.createSocket
(AuthSSLProtocolSocketFactory.java:544)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:70
6)
at
com.cramer.agent.protocol.http.HttpProtocol.connect(HttpProtocol.java:92
4)
at
com.cramer.agents.integration.http.HttpImplTest.testTwoWaySSLWithCertAut
hentication(HttpImplTest.java:1272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:196)
Regards,
Lalit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic