Resolving ssl Issues
Hi,
Recently while trying to acess one of the external webservice ( webservice which was outside our firewall) and was in a restricted network ( on https).I had to make the following steps to call the service:
You have a external webservice and which is listening on ssl port(443)..I mean the url is https then these were the following steps I had to follw to get the whole step working..
1. Initially I got ConnectException.
This means your proxy is not set you have to pass through your proxy so You have to set the proxy setting on the setDomainEnv.cmd file
set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dwli.home=%WLI_HOME% -Dproperties.home=C:\CVS04102006-Business-Artemis -DproxySet=true -Dhttp.proxyHost=http-proxy.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=ssl-proxy.com -Dhttps.proxyPort=443 -Dhttp.nonProxyHosts="localhost*.domain.com" -Dhttps.nonProxyHosts= "localhost*.domain.com"
To get the detailed Debug option for your ssl errors you can add the below specified arguments also:- Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true
There are some options to ignore.. but Not sure how best they work.. Just came across these while searching for my problem..-Dweblogic.security.SSL.ignoreHostnameVerify=false-Dweblogic.webservice.client.ssl.strictcertchecking=false -Dweblogic.security.SSL.enforceConstraints=off
2. Once The connect exception is solved I was getting the HandShake Exception. <000000> <000000> <000000> <000000>
To resolve the Hand shake exception you need to install a patch CR210310_81sp4 and add the cert files that are provided by the external webservice vendor.
I had received 4 cert files I added them all..( by default ur weblogic server looks into these 2 keystores. Add them to either the Demotrust.jks or the caCerts. You can use keyTool ( jdk provided) to generate and add the key
keytool.exe -import -alias mykey1 -file C:\\bea\\weblogic81\\server\\lib\\cert1.crt -keypass DemoTrustKeyStorePassPhrase -keystore C:\\bea\\weblogic81\\server\\lib\\DemoTrust.jks -storepass DemoTrustKeyStorePassPhrase -storetype JKS
keytool -import -alias ca1 -file C:\\bea\\weblogic81\\server\\lib\\cert1.crt -keystore C:\\bea\\jdk142_05\\jre\\lib\\security\\cacerts -storepass changeit
3.You have to add the 2 patch which you will get from your Bea Support to get rid of the 2 exception:set PRE_CLASSPATH=C:\bea\weblogic81\server\lib\CR210310_81sp4.zip;C:\bea\weblogic81\server\lib\CR177523_81sp4.jar
With the patch CR210310_81sp4 and the keys to be added to the keystore you get the below problem resolved..
with Patch CR177523_81sp4.jar. installed u get the below error resolved
<000000>
<000000>
<000000> java.lang.NullPointerException
at com.certicom.tls.interfaceimpl.CertificateSupport.
isServerHostnameValid(Unknown Source)
at com.certicom.tls.record.handshake.ClientStateReceivedServerHello
.handle(Unknown Source)
I think this will help!!
Recently while trying to acess one of the external webservice ( webservice which was outside our firewall) and was in a restricted network ( on https).I had to make the following steps to call the service:
You have a external webservice and which is listening on ssl port(443)..I mean the url is https then these were the following steps I had to follw to get the whole step working..
1. Initially I got ConnectException.
This means your proxy is not set you have to pass through your proxy so You have to set the proxy setting on the setDomainEnv.cmd file
set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dwli.home=%WLI_HOME% -Dproperties.home=C:\CVS04102006-Business-Artemis -DproxySet=true -Dhttp.proxyHost=http-proxy.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=ssl-proxy.com -Dhttps.proxyPort=443 -Dhttp.nonProxyHosts="localhost*.domain.com" -Dhttps.nonProxyHosts= "localhost*.domain.com"
To get the detailed Debug option for your ssl errors you can add the below specified arguments also:- Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true
There are some options to ignore.. but Not sure how best they work.. Just came across these while searching for my problem..-Dweblogic.security.SSL.ignoreHostnameVerify=false-Dweblogic.webservice.client.ssl.strictcertchecking=false -Dweblogic.security.SSL.enforceConstraints=off
2. Once The connect exception is solved I was getting the HandShake Exception.
To resolve the Hand shake exception you need to install a patch CR210310_81sp4 and add the cert files that are provided by the external webservice vendor.
I had received 4 cert files I added them all..( by default ur weblogic server looks into these 2 keystores. Add them to either the Demotrust.jks or the caCerts. You can use keyTool ( jdk provided) to generate and add the key
keytool.exe -import -alias mykey1 -file C:\\bea\\weblogic81\\server\\lib\\cert1.crt -keypass DemoTrustKeyStorePassPhrase -keystore C:\\bea\\weblogic81\\server\\lib\\DemoTrust.jks -storepass DemoTrustKeyStorePassPhrase -storetype JKS
keytool -import -alias ca1 -file C:\\bea\\weblogic81\\server\\lib\\cert1.crt -keystore C:\\bea\\jdk142_05\\jre\\lib\\security\\cacerts -storepass changeit
3.You have to add the 2 patch which you will get from your Bea Support to get rid of the 2 exception:set PRE_CLASSPATH=C:\bea\weblogic81\server\lib\CR210310_81sp4.zip;C:\bea\weblogic81\server\lib\CR177523_81sp4.jar
With the patch CR210310_81sp4 and the keys to be added to the keystore you get the below problem resolved..
with Patch CR177523_81sp4.jar. installed u get the below error resolved
at com.certicom.tls.interfaceimpl.CertificateSupport.
isServerHostnameValid(Unknown Source)
at com.certicom.tls.record.handshake.ClientStateReceivedServerHello
.handle(Unknown Source)
I think this will help!!

0 Comments:
Post a Comment
<< Home