Bug 1029544

Summary: Getting "SunX509 KeyManagerFactory not available" when trying to call a SSL secured web service on IBM JDK
Product: [JBoss] JBoss Enterprise Application Platform 5 Reporter: Chris Dolphy <cdolphy>
Component: jbossasAssignee: Carlo de Wolf <cdewolf>
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.2.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-27 07:58:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
example servlet none

Description Chris Dolphy 2013-11-12 14:58:07 UTC
Description of problem:

Using an IBM JDK, if you invoke a SSL secured webservice after setting the truststore, you get the following exception when trying to ceate 
java.io.IOException: Error initializing socket factory SSL context: SunX509 KeyManagerFactory not available
	sun.security.jca.GetInstance.getInstance(GetInstance.java:171)
	javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:10)
	org.jboss.remoting.security.SSLSocketBuilder.loadKeyManagers(SSLSocketBuilder.java:1501)
	org.jboss.remoting.security.SSLSocketBuilder.initializeSocketFactorySSLContext(SSLSocketBuilder.java:1334)

Caused by DEFAULT_KEY_STORE_ALGORITHM in SSLSocketBuilder being SunX509.  The default keystore algorithm should be determined with TrustStoreFactory.getDefaultAlgorithm().

Version-Release number of selected component (if applicable):
JBoss 5.2.0

How reproducible:
Easy

Steps to Reproduce:
1. Create a servlet that invokes a web service client after setting the truststore.  For example,

HelloWorldService port = new HelloWorldService_Service().getHelloWorld();
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put("org.jboss.ws.keyStore", "/path/to/keystore.jks");
port.sayHello();
2. Setup JBoss on IBM JDK and deploy servlet
3. Invoke serlvet

Actual results:
Above exception

Expected results:
Success using IbmX509.

Additional info:

Comment 1 Chris Dolphy 2013-11-12 14:59:52 UTC
Created attachment 823014 [details]
example servlet