1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 10:23:11 +02:00

Index: Changes

===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/Changes,v
retrieving revision 1.1.1.1.2.1.2.1.2.2404
diff -u -r1.1.1.1.2.1.2.1.2.2404 Changes
--- Changes	17 May 2007 09:56:42 -0000	1.1.1.1.2.1.2.1.2.2404
+++ Changes	17 May 2007 10:52:33 -0000
@@ -1707,3 +1707,4 @@
   through this under load, and speeding up connection).
 - IRCd now also sets the &me fd as being non blocking (wasn't before, that
   was odd..)
+- Added set::ssl::server-cipher-list, #002368 requested by Beastie
This commit is contained in:
stskeeps
2007-05-17 10:52:42 +00:00
parent 832c612317
commit bcd5d4a339
4 changed files with 23 additions and 2 deletions
+1
View File
@@ -1707,3 +1707,4 @@ MOTDs
through this under load, and speeding up connection).
- IRCd now also sets the &me fd as being non blocking (wasn't before, that
was odd..)
- Added set::ssl::server-cipher-list, #002368 requested by Beastie
+4 -2
View File
@@ -75,7 +75,7 @@ struct zConfiguration {
unsigned mkpasswd_for_everyone:1;
unsigned allow_part_if_shunned:1;
unsigned check_target_nick_bans:1;
unsigned use_egd;
unsigned use_egd : 1;
long host_timeout;
int host_retries;
char *name_server;
@@ -101,10 +101,11 @@ struct zConfiguration {
#ifdef USE_SSL
char *x_server_cert_pem;
char *x_server_key_pem;
char *x_server_cipher_list;
char *trusted_ca_file;
long ssl_options;
#elif defined(_WIN32)
void *bogus1, *bogus2, *bogus3;
void *bogus1, *bogus2, *bogus3, *bogus5;
long bogus4;
#endif
enum UHAllowed userhost_allowed;
@@ -269,6 +270,7 @@ struct SetCheck {
unsigned has_mkpasswd_for_everyone:1;
unsigned has_allow_part_if_shunned:1;
unsigned has_ssl_egd:1;
unsigned has_ssl_server_cipher_list :1;
unsigned has_dns_timeout:1;
unsigned has_dns_retries:1;
unsigned has_dns_nameserver:1;
+10
View File
@@ -1273,6 +1273,7 @@ void free_iConf(aConfiguration *i)
#ifdef USE_SSL
ircfree(i->x_server_cert_pem);
ircfree(i->x_server_key_pem);
ircfree(i->x_server_cipher_list);
ircfree(i->trusted_ca_file);
#endif
ircfree(i->restrict_usermodes);
@@ -6872,6 +6873,10 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
if (cepp->ce_vardata)
tempiConf.egd_path = strdup(cepp->ce_vardata);
}
else if (!strcmp(cepp->ce_varname, "server-cipher-list"))
{
ircstrdup(tempiConf.x_server_cipher_list, cepp->ce_vardata);
}
else if (!strcmp(cepp->ce_varname, "certificate"))
{
ircstrdup(tempiConf.x_server_cert_pem, cepp->ce_vardata);
@@ -7775,6 +7780,11 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
if (!strcmp(cepp->ce_varname, "egd")) {
CheckDuplicate(cep, ssl_egd, "ssl::egd");
}
else if (!strcmp(cepp->ce_varname, "server-cipher-list"))
{
CheckNull(cepp);
CheckDuplicate(cep, ssl_server_cipher_list, "ssl:server-cipher-list");
}
else if (!strcmp(cepp->ce_varname, "certificate"))
{
CheckNull(cepp);
+8
View File
@@ -215,6 +215,14 @@ SSL_CTX *ctx_server;
mylog("Failed to check SSL private key");
goto fail;
}
if (iConf.x_server_cipher_list)
{
if (SSL_CTX_set_cipher_list(ctx_server, iConf.x_server_cipher_list) == 0)
{
mylog("Failed to set SSL cipher list for clients");
goto fail;
}
}
if (iConf.trusted_ca_file)
{
if (!SSL_CTX_load_verify_locations(ctx_server, iConf.trusted_ca_file, NULL))