Permalink
Browse files

ssl cert gen issues

git-svn-id: svn://svn.caucho.com/resin/trunk@5977 9c94448d-38f1-0310-a231-d98308ff1ebf
  • Loading branch information...
ferg
ferg committed Aug 21, 2009
1 parent 231091d commit 96de31370ffd0153eb45fc49725a9b796bc11224
View
@@ -13,6 +13,7 @@
<s2 title="4.0.2 snapshot">
<ul>
<li>cluster: add com.caucho.cluster.LockManager for distributed locking (#3464, rep by Martin Thompson)</li>
<li>build: jsf-api.jar needs to be in src distribution (#3633, rep by joey)</li>
<li>loader: sync/deadlock in EnvironmentClassLoader on startup (rep by Patrik Styme, #3641)</li>
<li>jms: ClusterQueue single consumer (#2766, rep by Eric Masson)</li>
@@ -306,8 +306,11 @@ private SSLServerSocketFactory createAnonymousFactory(InetAddress hostAddr,
String []cipherSuites = _cipherSuites;
if (cipherSuites == null)
/*
if (cipherSuites == null) {
cipherSuites = sslContext.createSSLEngine().getSupportedCipherSuites();
}
*/
String selfSignedName = _selfSignedName;
@@ -88,20 +88,22 @@ public static SelfSignedCert create(String name,
String keyAlgName = null;
String sigAlgName = null;
for (String s : cipherSuites) {
if (s.indexOf("RSA") >= 0 && s.indexOf("SHA") >= 0) {
keyAlgName = "RSA";
sigAlgName = "SHA1WithRSA";
}
else if (sigAlgName == null
&& s.indexOf("DSS") >= 0 && s.indexOf("SHA") >= 0) {
keyAlgName = "DSA";
sigAlgName = "SHA1WithDSA";
}
else if (sigAlgName == null
&& s.indexOf("RSA") >= 0 && s.indexOf("MD5") >= 0) {
keyAlgName = "RSA";
sigAlgName = "MD5WithRSA";
if (cipherSuites != null) {
for (String s : cipherSuites) {
if (s.indexOf("RSA") >= 0 && s.indexOf("SHA") >= 0) {
keyAlgName = "RSA";
sigAlgName = "SHA1WithRSA";
}
else if (sigAlgName == null
&& s.indexOf("DSS") >= 0 && s.indexOf("SHA") >= 0) {
keyAlgName = "DSA";
sigAlgName = "SHA1WithDSA";
}
else if (sigAlgName == null
&& s.indexOf("RSA") >= 0 && s.indexOf("MD5") >= 0) {
keyAlgName = "RSA";
sigAlgName = "MD5WithRSA";
}
}
}

0 comments on commit 96de313

Please sign in to comment.