Lines 81-87
static void
Link Here
|
81 |
ssl_set_no_tls(struct socket *socket) |
81 |
ssl_set_no_tls(struct socket *socket) |
82 |
{ |
82 |
{ |
83 |
#ifdef CONFIG_OPENSSL |
83 |
#ifdef CONFIG_OPENSSL |
|
|
84 |
#ifdef HAVE_SSL_SET_OPTIONS |
85 |
SSL_set_options((ssl_t *) socket->ssl, SSL_OP_NO_TLSv1); |
86 |
#else |
84 |
((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1; |
87 |
((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1; |
|
|
88 |
#endif /* HAVE_SSL_SET_OPTIONS */ |
85 |
#elif defined(CONFIG_GNUTLS) |
89 |
#elif defined(CONFIG_GNUTLS) |
86 |
/* There is another gnutls_priority_set_direct call elsewhere |
90 |
/* There is another gnutls_priority_set_direct call elsewhere |
87 |
* in ELinks. If you change the priorities here, please check |
91 |
* in ELinks. If you change the priorities here, please check |
Lines 246-252
static int
Link Here
|
246 |
match_uri_host_ip(const unsigned char *uri_host, |
250 |
match_uri_host_ip(const unsigned char *uri_host, |
247 |
ASN1_OCTET_STRING *cert_host_asn1) |
251 |
ASN1_OCTET_STRING *cert_host_asn1) |
248 |
{ |
252 |
{ |
|
|
253 |
#ifdef HAVE_ASN1_STRING_GET0_DATA |
254 |
const unsigned char *cert_host_addr = ASN1_STRING_get0_data(cert_host_asn1); |
255 |
#else |
249 |
const unsigned char *cert_host_addr = ASN1_STRING_data(cert_host_asn1); |
256 |
const unsigned char *cert_host_addr = ASN1_STRING_data(cert_host_asn1); |
|
|
257 |
#endif /* HAVE_ASN1_STRING_GET0_DATA */ |
250 |
struct in_addr uri_host_in; |
258 |
struct in_addr uri_host_in; |
251 |
#ifdef CONFIG_IPV6 |
259 |
#ifdef CONFIG_IPV6 |
252 |
struct in6_addr uri_host_in6; |
260 |
struct in6_addr uri_host_in6; |
Lines 453-459
ssl_connect(struct socket *socket)
Link Here
|
453 |
(SSL *) socket->ssl, |
461 |
(SSL *) socket->ssl, |
454 |
client_cert); |
462 |
client_cert); |
455 |
#else |
463 |
#else |
|
|
464 |
#ifdef HAVE_SSL_GET_SSL_CTX |
465 |
SSL_CTX *ctx = SSL_get_SSL_CTX(socket->ssl); |
466 |
#else |
456 |
SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx; |
467 |
SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx; |
|
|
468 |
#endif /* HAVE_SSL_GET_SSL_CTX */ |
457 |
|
469 |
|
458 |
SSL_CTX_use_certificate_chain_file(ctx, client_cert); |
470 |
SSL_CTX_use_certificate_chain_file(ctx, client_cert); |
459 |
SSL_CTX_use_PrivateKey_file(ctx, client_cert, |
471 |
SSL_CTX_use_PrivateKey_file(ctx, client_cert, |