mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Resolve #621: Config option for allowed SSL ciphers
In the global section, for example:
SSLCiphers = ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
https://www.openssl.org/docs/apps/ciphers.html
https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers
This commit is contained in:
@@ -16,14 +16,27 @@
|
||||
|
||||
#include <znc/User.h>
|
||||
#include <znc/IRCNetwork.h>
|
||||
#include <znc/znc.h>
|
||||
#include <signal.h>
|
||||
|
||||
CZNCSock::CZNCSock(int timeout) : Csock(timeout) {
|
||||
DisableSSLProtocols(EDP_SSL);
|
||||
#ifdef HAVE_LIBSSL
|
||||
CString sCipher = CZNC::Get().GetSSLCiphers();
|
||||
if (!sCipher.empty()) {
|
||||
SetCipher(sCipher);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
CZNCSock::CZNCSock(const CString& sHost, u_short port, int timeout) : Csock(sHost, port, timeout) {
|
||||
DisableSSLProtocols(EDP_SSL);
|
||||
#ifdef HAVE_LIBSSL
|
||||
CString sCipher = CZNC::Get().GetSSLCiphers();
|
||||
if (!sCipher.empty()) {
|
||||
SetCipher(sCipher);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned int CSockManager::GetAnonConnectionCount(const CString &sIP) const {
|
||||
|
||||
Reference in New Issue
Block a user