\r
// defaults\r
static String defaultProtocol = "TLS";\r
- static String defaultAlgorithm = "SunX509";\r
static boolean defaultClientAuth = false;\r
static String defaultKeystoreType = "JKS";\r
private static final String defaultKeystoreFile\r
// Certificate encoding algorithm (e.g., SunX509)\r
String algorithm = (String) attributes.get("algorithm");\r
if (algorithm == null) {\r
- algorithm = defaultAlgorithm;\r
+ algorithm = KeyManagerFactory.getDefaultAlgorithm();;\r
}\r
\r
String keystoreType = (String) attributes.get("keystoreType");\r
\r
String trustAlgorithm = (String)attributes.get("truststoreAlgorithm");\r
if( trustAlgorithm == null ) {\r
- trustAlgorithm = algorithm;\r
+ trustAlgorithm = TrustManagerFactory.getDefaultAlgorithm();\r
}\r
// Create and init SSLContext\r
SSLContext context = SSLContext.getInstance(protocol); \r
*/\r
protected TrustManager[] getTrustManagers(String keystoreType, String algorithm)\r
throws Exception {\r
- if (attributes.get("truststoreAlgorithm") == null) {\r
- // in 1.5, the Trust default isn't the same as the Key default.\r
- algorithm = TrustManagerFactory.getDefaultAlgorithm();\r
- }\r
String crlf = (String) attributes.get("crlFile");\r
\r
TrustManager[] tms = null;\r