ucspi-ssl 0.13.03
ucspi-ssl
Loading...
Searching...
No Matches
ssl_context.c
Go to the documentation of this file.
1#include "ucspissl.h"
2
3SSL_CTX *ssl_context(const SSL_METHOD *m)
4{
5 SSL_CTX *ctx;
6
7 SSL_library_init();
8 ctx = SSL_CTX_new(m);
9#ifdef SSL_TWEAKING
10 SSL_CTX_set_options(ctx,SSL_OP_SINGLE_DH_USE|SSL_OP_NO_COMPRESSION|SSL_OP_CIPHER_SERVER_PREFERENCE);
11#else
12 SSL_CTX_set_options(ctx,SSL_OP_SINGLE_DH_USE);
13#endif
14#ifdef SSLv2_DISABLE
15 SSL_CTX_set_options(ctx,SSL_OP_NO_SSLv2);
16#endif
17#ifdef SSLv3_DISABLE
18 SSL_CTX_set_options(ctx,SSL_OP_NO_SSLv3);
19#endif
20#ifdef TLSv1_DISABLE
21 SSL_CTX_set_options(ctx,SSL_OP_NO_TLSv1);
22#endif
23#ifdef TLSv1_1_DISABLE
24 SSL_CTX_set_options(ctx,SSL_OP_NO_TLSv1_1);
25#endif
26#ifdef TLSv1_2_DISABLE
27 SSL_CTX_set_options(ctx,SSL_OP_NO_TLSv1_2);
28#endif
29#ifdef TLSv1_3_DISABLE
30 SSL_CTX_set_options(ctx,SSL_OP_NO_TLSv1_3);
31#endif
32 return ctx;
33}
34
SSL_CTX * ssl_context(const SSL_METHOD *m)
Definition: ssl_context.c:3
SSL_CTX * ctx
Definition: sslclient.c:105
Header file to be used with sqmail; previously called ssl.h. (name clash)