Lines 319-330
Link Here
|
319 |
#endif /* defined(USE_SSL_VERIFY) */ |
319 |
#endif /* defined(USE_SSL_VERIFY) */ |
320 |
if (ssl_ctx == NULL) { |
320 |
if (ssl_ctx == NULL) { |
321 |
int option; |
321 |
int option; |
322 |
#if SSLEAY_VERSION_NUMBER < 0x0800 |
322 |
#if OPENSSL_VERSION_NUMBER < 0x0800 |
323 |
ssl_ctx = SSL_CTX_new(); |
323 |
ssl_ctx = SSL_CTX_new(); |
324 |
X509_set_default_verify_paths(ssl_ctx->cert); |
324 |
X509_set_default_verify_paths(ssl_ctx->cert); |
325 |
#else /* SSLEAY_VERSION_NUMBER >= 0x0800 */ |
325 |
#else /* SSLEAY_VERSION_NUMBER >= 0x0800 */ |
|
|
326 |
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
326 |
SSLeay_add_ssl_algorithms(); |
327 |
SSLeay_add_ssl_algorithms(); |
327 |
SSL_load_error_strings(); |
328 |
SSL_load_error_strings(); |
|
|
329 |
#else |
330 |
OPENSSL_init_ssl(0, NULL); |
331 |
#endif |
328 |
if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method()))) |
332 |
if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method()))) |
329 |
goto eend; |
333 |
goto eend; |
330 |
SSL_CTX_set_cipher_list(ssl_ctx, "DEFAULT:!LOW:!RC4:!EXP"); |
334 |
SSL_CTX_set_cipher_list(ssl_ctx, "DEFAULT:!LOW:!RC4:!EXP"); |