Sun One WS 6.1 + Axis SSL

Hello.

I'm using Sun One Web Server 6.1 SP4 and I'm tying to configure ssl cert. I have to use it in my client connection with apache axis. I've imported the certificate from console (security -> install certificate):

Some code i'm using:

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

System.setProperty("javax.net.ssl.trustStore", "/opt/SUNWwbsvr/alias/https-server-key3.db");

System.setProperty("javax.net.ssl.keyStore", "/opt/SUNWwbsvr/alias/https-server-key3.db");

System.setProperty("javax.net.ssl.keyStorePassword", "myPass);

System.setProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType());

System.setProperty("java.security.debug", "all");

Or do i have to make the key store my self with jvm keytool?

Error:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.net.SocketException: Default SSL context init failed: null

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Default SSL context init failed: null

Please help :)

[1214 byte] By [zenixa] at [2007-11-26 19:08:07]
# 1

The Administration Server GUI configures the certificates used by the server itself. It doesn't configure the certificates used by Java web apps. (Specifically, the Administration Server updates the NSS trust database, not the Java keystore.)

You're right, you need to use Java's keytool to expose certificates to Java web apps.

elvinga at 2007-7-9 21:01:18 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

Ok, i've created an keystore file:

/usr/j2sdk1.4.2_05/jre/bin/keytool -import -v -alias mycert -keystore keystore.jks -file mycert.cert

I'm using fallowing properties...

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

System.setProperty("javax.net.ssl.keyStore", "/webapps/keystore.jks");

System.setProperty("javax.net.ssl.keyStorePassword", "MyPass");

System.setProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType());

Still i'm getting exeption:

faultString: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found

zenixa at 2007-7-9 21:01:18 > top of Java-index,Web & Directory Servers,Web Servers...