Hi All,
When I using SSL in XMLRPC, I found some errors,that is:
1). set SSL properity:
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.ww
w.protocol");
System.setProperty("javax.net.ssl.keyStore", "hello");
System.setProperty("javax.net.ssl.keyStorePassword", "hello");
System.setProperty("javax.net.ssl.trustStore", "hello");
System.setProperty("javax.net.ssl.trustStorePassword", "hello");
System.setProperty("com.sun.net.ssl.dhKeyExchangeFix", "true");
try {
Security.addProvider((Provider)Class.forName(SecurityTool.getSecurityProvide
rClass()).newInstance());
} catch (Exception e) {
System.err.println ("Error: " + e.getMessage());
}
But I get the errors like this:
java.net.SocketException: Default SSL context init failed: null
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown
Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
Source)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknow
n Source)
at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getOut
putStream(Unknown Source)
at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHttpTr
ansport.java:67)
at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTrans
port.java:144)
at
org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport
.java:95)
at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTra
nsport.java:39)
at
org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:
53)
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
In my opinion, I don't need to initiate the SSL, because the socket and
connection are created by the library, so this library should do the
initiation, right? And I use the xmlrpc-3.0b1, can anyone tell me what is
the problem? thanks very much!!
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-user-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-user-help@ws.apache.org
|