key store algorithm for Ibm JVM

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1228 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-02-02 14:00:58 +00:00
parent 4db0b78667
commit 1a995d876d
4 changed files with 10 additions and 7 deletions

View File

@ -18,6 +18,7 @@ import java.io.InputStream;
import java.net.UnknownHostException;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.Security;
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.Map;
@ -106,12 +107,12 @@ public class HttpClient extends HttpBuffers implements Attributes
private String _keyStoreLocation;
private String _keyStoreType = "JKS";
private String _keyStorePassword;
private String _keyManagerAlgorithm = "SunX509";
private String _keyManagerAlgorithm = (Security.getProperty("ssl.KeyManagerFactory.algorithm")==null?"SunX509":Security.getProperty("ssl.KeyManagerFactory.algorithm"));
private String _keyManagerPassword;
private String _trustStoreLocation;
private String _trustStoreType = "JKS";
private String _trustStorePassword;
private String _trustManagerAlgorithm = "SunX509";
private String _trustManagerAlgorithm = (Security.getProperty("ssl.TrustManagerFactory.algorithm")==null?"SunX509":Security.getProperty("ssl.TrustManagerFactory.algorithm"));
private SSLContext _sslContext;

View File

@ -2,6 +2,7 @@ package org.eclipse.jetty.server.ssl;
import java.io.File;
import java.security.SecureRandom;
import java.security.Security;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
@ -17,6 +18,8 @@ import org.eclipse.jetty.server.Connector;
*/
public interface SslConnector extends Connector
{
public static final String DEFAULT_KEYSTORE_ALGORITHM=(Security.getProperty("ssl.KeyManagerFactory.algorithm")==null?"SunX509":Security.getProperty("ssl.KeyManagerFactory.algorithm"));;
public static final String DEFAULT_TRUSTSTORE_ALGORITHM=(Security.getProperty("ssl.TrustManagerFactory.algorithm")==null?"SunX509":Security.getProperty("ssl.TrustManagerFactory.algorithm"));
/** Default value for the keystore location path. */
public static final String DEFAULT_KEYSTORE = System.getProperty("user.home") + File.separator + ".keystore";

View File

@ -90,8 +90,8 @@ public class SslSelectChannelConnector extends SelectChannelConnector implements
private String _protocol="TLS";
private String _provider;
private String _secureRandomAlgorithm; // cert algorithm
private String _sslKeyManagerFactoryAlgorithm="SunX509";
private String _sslTrustManagerFactoryAlgorithm="SunX509";
private String _sslKeyManagerFactoryAlgorithm=DEFAULT_KEYSTORE_ALGORITHM;
private String _sslTrustManagerFactoryAlgorithm=DEFAULT_TRUSTSTORE_ALGORITHM;
private String _truststorePath;
private String _truststoreType="JKS"; // type of the key store
private SSLContext _context;

View File

@ -135,9 +135,8 @@ public class SslSocketConnector extends SocketConnector implements SslConnector
private String _protocol= "TLS";
private String _provider;
private String _secureRandomAlgorithm; // cert algorithm
private String _sslKeyManagerFactoryAlgorithm = (Security.getProperty("ssl.KeyManagerFactory.algorithm")==null?"SunX509":Security.getProperty("ssl.KeyManagerFactory.algorithm")); // cert algorithm
private String _sslTrustManagerFactoryAlgorithm = (Security.getProperty("ssl.TrustManagerFactory.algorithm")==null?"SunX509":Security.getProperty("ssl.TrustManagerFactory.algorithm")); // cert algorithm
private String _sslKeyManagerFactoryAlgorithm = DEFAULT_KEYSTORE_ALGORITHM;
private String _sslTrustManagerFactoryAlgorithm = DEFAULT_TRUSTSTORE_ALGORITHM;
private String _truststorePath;
private String _truststoreType = "JKS"; // type of the key store