]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn-ssl.c
Specify session context for OpenSSL clients
[ngircd-alex.git] / src / ngircd / conn-ssl.c
index 493bcc75c66847e0ed50f118e805d3a81a58da4e..be6ee0a8f9490be9dd5a15976d483ab0d9a850d0 100644 (file)
@@ -1,6 +1,13 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c) 2005-2008 Florian Westphal <fw@strlen.de>
+ * Copyright (c)2005-2008 Florian Westphal (fw@strlen.de).
+ * Copyright (c)2008-2014 Alexander Barton (alex@barton.de) and Contributors.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * Please read the file COPYING, README and AUTHORS for more information.
  */
 
 #include "portab.h"
@@ -10,7 +17,6 @@
  * SSL wrapper functions
  */
 
-#include "imp.h"
 #include "conf-ssl.h"
 
 #ifdef SSL_SUPPORT
@@ -29,7 +35,6 @@
 #include "conn-ssl.h"
 #include "log.h"
 
-#include "exp.h"
 #include "defines.h"
 
 extern struct SSLOptions Conf_SSLOptions;
@@ -312,6 +317,7 @@ ConnSSL_InitLibrary( void )
                goto out;
        }
 
+       SSL_CTX_set_session_id_context(newctx, (unsigned char *)"ngircd", 6);
        SSL_CTX_set_options(newctx, SSL_OP_SINGLE_DH_USE|SSL_OP_NO_SSLv2);
        SSL_CTX_set_mode(newctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
        SSL_CTX_set_verify(newctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,