I'm trying to run the XMPPServer with Apache Harmony harmony 5.0 M12a
and getting this exception:
java.lang.RuntimeException: java.security.KeyStoreException: KeyStore
JKS implementation not found
at
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext.setTlsContextFactory(DefaultServerRuntimeContext.java:204)
at org.apache.vysper.xmpp.server.XMPPServer.start(XMPPServer.java:117)
at test.TestVysperServer.main(TestVysperServer.java:60)
Caused by: java.security.KeyStoreException: KeyStore JKS implementation
not found
at java.security.KeyStore.getInstance(KeyStore.java:120)
at
org.apache.vysper.xmpp.cryptography.AbstractTLSContextFactory.createSSLContext(AbstractTLSContextFactory.java:76)
at
org.apache.vysper.xmpp.cryptography.AbstractTLSContextFactory.getSSLContext(AbstractTLSContextFactory.java:70)
at
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext.setTlsContextFactory(DefaultServerRuntimeContext.java:202)
at org.apache.vysper.xmpp.server.XMPPServer.start(XMPPServer.java:117)
... 1 more
The same test [1] runs OK with other JDKs.
Looks like Vysper hardcodes the Keystore type to JKS [2], which is not
supported by Harmony [3][4]. Would there be a way to make this
configurable (with a set method on XMPPServer?) and support another
Keystore type like Bouncy Castle BKS?
[1]
http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/components/chat/test/TestVysperServer.java
[2]
http://svn.apache.org/repos/asf/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/cryptography/AbstractTLSContextFactory.java
[3] http://issues.apache.org/jira/browse/HARMONY-6098
[4]
http://cwiki.apache.org/GMOxDOC22/apache-harmony.html#ApacheHarmony-Changedefaultkeystoretype
--
Jean-Sebastien