Never mind. The file that I was specifying was in the wrong location.  It's 
kind of weird that in the ftpserver code that the file is found on the 
classpath but when the file input stream reads from the classpath I get the 
keystore format error however, when I specified the correct file location and 
the file input stream read the file from the filesystem things worked.  Weird 
but at least I'm going now.


-----Original Message-----
From: Goodwin, Matthew
Sent: Wednesday, May 22, 2013 1:56 PM
To: ftpserver-users@mina.apache.org
Subject: ftps invalid keystore format

I am trying to use ftps and I am getting invalid keystore format when using 
jdk6. I have attempted to use my own keytool generated certificate as well as 
the ftpserver.jks file that is in the Apache FtpServer distribution.  Here is 
the section of code that is failing (pretty much taken directly from 
documentation on FtpServer page):

serverFactory = new FtpServerFactory();
factory = new ListenerFactory();
factory.setPort(2221);

// define SSL configuration
SslConfigurationFactory ssl = new SslConfigurationFactory(); 
ssl.setKeystoreFile(new File("ftpserver.jks")); 
ssl.setKeystorePassword("password");

// set the SSL configuration for the listener 
factory.setSslConfiguration(ssl.createSslConfiguration()); <---- fails here 
factory.setImplicitSsl(true);

Any help would be appreciated.

Thanks,

Matt

________________________________

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.

________________________________

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.

Reply via email to