[
https://issues.apache.org/jira/browse/CXF-6094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14205220#comment-14205220
]
Benson Margulies commented on CXF-6094:
---------------------------------------
Well, in my case:
* I am not using client certificates
* The service I am talking to via HTTPS has a cert signed by an intermediate
cert that is not in the JRE's list
* If I don't configure the trust store, I can't connect at all
* If I do configure the trust store, it works fine -- but it spits out this
warning, except that:
* When I force the use of the async http transport, the warning goes away.
I explicitly configure a truststore as follows:
{code}
builder.trustStore(setupSslCert(keystore));
{code}
setupSslCert looks like:
{code}
private KeyStore setupSslCert(File trustStore) throws IOException,
NoSuchAlgorithmException, KeyStoreException, CertificateException,
KeyManagementException {
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
ByteSource keystoreByteSource = Files.asByteSource(trustStore);
InputStream keystoreStream = null;
try {
keystoreStream = keystoreByteSource.openStream();
//TODO: deal with the actual password whatever it is.
keystore.load(keystoreStream, "changeit".toCharArray());
} finally {
IOUtils.closeQuietly(keystoreStream);
}
return keystore;
}
{code}
[~dkulp] I don't follow why the warning makes sense in my case.
> wsdl2java - Default key managers cannot be initialized
> ------------------------------------------------------
>
> Key: CXF-6094
> URL: https://issues.apache.org/jira/browse/CXF-6094
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.0.2
> Environment: java 1.7
> Reporter: member sound
> Assignee: Daniel Kulp
> Priority: Blocker
>
> C:\Users\Administrator\workspace\apache-cxf-3.0.2\bin> wsdl2java
> https://example.com/V1/HelpService?wsdl
> *Nov 03, 2014 1:11:20 PM org.apache.cxf.configuration.jsse.SSLUtils
> getDefaultKeyStoreManagers WARNING: Default key managers cannot be
> initialized: C:\Users\Administrator.keystore (The system cannot find the file
> specified)
> I'm getting the same error about 100 times if I start a soap webservice
> client that was autogenerated with cxf 3.0.1 but uses the new version 3.0.2.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)