ports/www/links1/files/patch-connect.c
Dmitry Marakasov 9430d3e612 - Fix build with openssl-devel and libressl-devel
- Add LICENSE
- Pass maintainership to submitter

PR:		216915
Submitted by:	pkubaj@anongoth.pl
2017-02-22 10:19:19 +00:00

20 lines
714 B
C

--- connect.c.orig 2017-02-08 12:41:56 UTC
+++ connect.c
@@ -106,7 +106,7 @@ void ssl_want_read(struct connection *c)
set_timeout(c);
- if (c->no_tsl) c->ssl->options |= SSL_OP_NO_TLSv1;
+ if (c->no_tsl) SSL_set_options(c->ssl, SSL_OP_NO_TLSv1);
switch (SSL_get_error(c->ssl, SSL_connect(c->ssl))) {
case SSL_ERROR_NONE:
c->newconn = NULL;
@@ -186,7 +186,7 @@ void connected(struct connection *c)
if (c->ssl) {
c->ssl = getSSL();
SSL_set_fd(c->ssl, *b->sock);
- if (c->no_tsl) c->ssl->options |= SSL_OP_NO_TLSv1;
+ if (c->no_tsl) SSL_set_options(c->ssl, SSL_OP_NO_TLSv1);
switch (SSL_get_error(c->ssl, SSL_connect(c->ssl))) {
case SSL_ERROR_WANT_READ:
setcstate(c, S_SSL_NEG);