Commit ff549eb5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

SubjectDN now includes C, ST, L, OU, O, etc. JM-1140

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9531 b35dd754-fafc-0310-a699-88a17e54d16e
parent c7e46d6a
...@@ -62,6 +62,13 @@ ...@@ -62,6 +62,13 @@
issuerDN.append(", L=").append(city); issuerDN.append(", L=").append(city);
issuerDN.append(", ST=").append(state); issuerDN.append(", ST=").append(state);
issuerDN.append(", C=").append(countryCode); issuerDN.append(", C=").append(countryCode);
StringBuilder subjectDN = new StringBuilder();
subjectDN.append("CN=").append(domain);
subjectDN.append(", OU=").append(organizationalUnit);
subjectDN.append(", O=").append(organization);
subjectDN.append(", L=").append(city);
subjectDN.append(", ST=").append(state);
subjectDN.append(", C=").append(countryCode);
// Update certs with new issuerDN information // Update certs with new issuerDN information
for (Enumeration<String> certAliases = keyStore.aliases(); certAliases.hasMoreElements();) { for (Enumeration<String> certAliases = keyStore.aliases(); certAliases.hasMoreElements();) {
String alias = certAliases.nextElement(); String alias = certAliases.nextElement();
...@@ -74,10 +81,10 @@ ...@@ -74,10 +81,10 @@
if (isSelfSigned || isSigningPending) { if (isSelfSigned || isSigningPending) {
if (CertificateManager.isDSACertificate(certificate)) { if (CertificateManager.isDSACertificate(certificate)) {
CertificateManager.createDSACert(keyStore, SSLConfig.getKeyPassword(), alias, CertificateManager.createDSACert(keyStore, SSLConfig.getKeyPassword(), alias,
issuerDN.toString(), "cn=" + domain, "*." + domain); issuerDN.toString(), subjectDN.toString(), "*." + domain);
} else { } else {
CertificateManager.createRSACert(keyStore, SSLConfig.getKeyPassword(), alias, CertificateManager.createRSACert(keyStore, SSLConfig.getKeyPassword(), alias,
issuerDN.toString(), "cn=" + domain, "*." + domain); issuerDN.toString(), subjectDN.toString(), "*." + domain);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment