admserv/cgi-src40/sec-activate.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
New commits:
commit 9e3d76254a5bfd2a3d431c4b0069a68d8f007367
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Feb 2 18:14:46 2011 -0800
Bug 151705 - Need to update Console Cipher Preferences with new ciphers
https://bugzilla.redhat.com/show_bug.cgi?id=151705
Description: When a cipher is updated on the Admin Console | Cipher
Preference dialog, NSSCipherSuite value in console.conf is updated
based on the modification. If the cipher is on the TLS list, it
was ignored in sec-activate.c. This patch merges the tls list
into the ssl3 list. Then, the TLS ciphers are also written to
console.conf.
diff --git a/admserv/cgi-src40/sec-activate.c b/admserv/cgi-src40/sec-activate.c
index 921f584..52bd41d 100644
--- a/admserv/cgi-src40/sec-activate.c
+++ b/admserv/cgi-src40/sec-activate.c
@@ -486,6 +486,8 @@ int main(int argc, char *argv[])
char *security = NULL;
char *ssl2 = NULL;
char *ssl3 = NULL;
+ char *tls = NULL;
+ char *merged_ssl3 = NULL;
char *ssl2_act = NULL;
char *ssl3_act = NULL;
char *clientauth = NULL;
@@ -607,6 +609,7 @@ int main(int argc, char *argv[])
security = get_cgi_var("security", "", "");
ssl2 = get_cgi_var("ssl2", "", "");
ssl3 = get_cgi_var("ssl3", "", "");
+ tls = get_cgi_var("tls", "", "");
ssl2_act = get_cgi_var("ssl2-activated", "", "");
ssl3_act = get_cgi_var("ssl3-activated", "", "");
clientauth = get_cgi_var("clientauth", "", "");
@@ -630,7 +633,20 @@ int main(int argc, char *argv[])
get_family_input(&family_head);
/* set cipher family info */
- SetSSLFamilyAttributes(pset, family_head, ssl2, ssl3, ssl2_act, ssl3_act);
+ if (ssl3 && (strlen(ssl3) > 0)) {
+ if (tls && (strlen(tls) > 0)) {
+ merged_ssl3 = PR_smprintf("%s,%s", ssl3, tls);
+ } else {
+ merged_ssl3 = strdup(ssl3);
+ }
+ } else {
+ if (tls && (strlen(tls) > 0)) {
+ merged_ssl3 = strdup(tls);
+ } else {
+ merged_ssl3 = strdup("");
+ }
+ }
+ SetSSLFamilyAttributes(pset, family_head, ssl2, merged_ssl3, ssl2_act, ssl3_act);
set_attribute(pset, "configuration.encryption.nsSSLClientAuth",
clientauth);
@@ -655,7 +671,8 @@ int main(int argc, char *argv[])
rv = update_conf(configdir, "console.conf", "NSSProtocol",
protocols);
- snprintf(ciphers, sizeof(ciphers), "%s,%s", ssl2, ssl3);
+ snprintf(ciphers, sizeof(ciphers), "%s,%s", ssl2, merged_ssl3);
+ PR_smprintf_free(merged_ssl3);
ciphers[sizeof(ciphers)-1] = 0;
rv = update_conf(configdir, "console.conf", "NSSCipherSuite",
ciphers);