ucspi-ssl
0.13.03
ucspi-ssl
Loading...
Searching...
No Matches
ucspi-ssl-0.13.03
src
ssl_context.c
Go to the documentation of this file.
1
#include "
ucspissl.h
"
2
3
SSL_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_context
SSL_CTX * ssl_context(const SSL_METHOD *m)
Definition:
ssl_context.c:3
ctx
SSL_CTX * ctx
Definition:
sslclient.c:105
ucspissl.h
Header file to be used with sqmail; previously called ssl.h. (name clash)
Generated on Mon Sep 23 2024 11:30:08 for ucspi-ssl by
1.9.6