35 |
|
|
36 |
|
#ifdef HAVE_TLS_OPENSSL |
37 |
|
|
38 |
+ |
static int TLS_initialized; |
39 |
+ |
|
40 |
|
/* |
41 |
|
* report_crypto_errors - Dump crypto error list to log |
42 |
|
*/ |
55 |
|
return 1; |
56 |
|
} |
57 |
|
|
58 |
+ |
int |
59 |
+ |
tls_is_initialized(void) |
60 |
+ |
{ |
61 |
+ |
return TLS_initialized; |
62 |
+ |
} |
63 |
+ |
|
64 |
|
/* tls_init() |
65 |
|
* |
66 |
|
* inputs - nothing |
122 |
|
int |
123 |
|
tls_new_cred(void) |
124 |
|
{ |
125 |
+ |
TLS_initialized = 0; |
126 |
+ |
|
127 |
|
if (!ConfigServerInfo.ssl_certificate_file || !ConfigServerInfo.rsa_private_key_file) |
128 |
|
return 1; |
129 |
|
|
219 |
|
if (ConfigServerInfo.ssl_cipher_list) |
220 |
|
SSL_CTX_set_cipher_list(ConfigServerInfo.tls_ctx.server_ctx, ConfigServerInfo.ssl_cipher_list); |
221 |
|
|
222 |
+ |
TLS_initialized = 1; |
223 |
|
return 1; |
224 |
|
} |
225 |
|
|