1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-27 06:16:37 +02:00
Files
unrealircd/include/ssl.h
T
Bram Matthys 7f703d8991 Add the ability to enable/disable TLS versions via set::ssl::protocols
Accepted values are: All (enable all), TLSv1, TLSv1.1, TLSv1.2
You can use + and - modifiers, in fact you are encouraged to.
Example: set { ssl { protocols "All,-TLSv1,-TLSv1.1"; }; };
This will only allow TLSv1.2 at time of writing, and later whenever
TLSv1.3 is released it will allow TLSv1.2 and TLSv1.3.
Note that 'SSLv2' and 'SSLv3' do not exist, as UnrealIRCd 4.x never
supported these old versions (and never will).
2016-09-26 14:47:45 +02:00

21 lines
746 B
C

extern MODVAR SSL_CTX *ctx;
extern MODVAR SSL_CTX *ctx_server;
extern MODVAR SSL_CTX *ctx_client;
extern SSL_METHOD *meth;
extern int init_ssl();
extern int ssl_handshake(aClient *); /* Handshake the accpeted con.*/
extern int ssl_client_handshake(aClient *, ConfigItem_link *); /* and the initiated con.*/
extern int ircd_SSL_accept(aClient *acptr, int fd);
extern int ircd_SSL_connect(aClient *acptr, int fd);
extern int SSL_smart_shutdown(SSL *ssl);
extern void ircd_SSL_client_handshake(int, int, void *);
extern void SSL_set_nonblocking(SSL *s);
#define SSL_PROTOCOL_TLSV1 0x0001
#define SSL_PROTOCOL_TLSV1_1 0x0002
#define SSL_PROTOCOL_TLSV1_2 0x0004
#define SSL_PROTOCOL_TLSV1_3 0x0008
#define SSL_PROTOCOL_ALL 0xffff