summaryrefslogtreecommitdiff
blob: 3b3adc09dd55cda216d5b40046b9772f9540d4e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# diff -pU5 hexchat-2.12.4/src/common/ssl.c.old hexchat-2.12.4/src/common/ssl.c
--- hexchat-2.12.4/src/common/ssl.c
+++ hexchat-2.12.4/src/common/ssl.c
@@ -174,11 +174,11 @@ _SSL_get_cert_info (struct cert_info *ce
 	key = X509_get_X509_PUBKEY(peer_cert);
 	if (!X509_PUBKEY_get0_param(NULL, NULL, 0, &algor, key))
 		return 1;
 
 	alg = OBJ_obj2nid (algor->algorithm);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
 	sign_alg = OBJ_obj2nid (peer_cert->sig_alg->algorithm);
 #else
 	sign_alg = X509_get_signature_nid (peer_cert);
 #endif
 	ASN1_TIME_snprintf (notBefore, sizeof (notBefore),
@@ -304,11 +304,11 @@ _SSL_socket (SSL_CTX *ctx, int sd)
 		/* FATAL */
 		__SSL_critical_error ("SSL_new");
 
 	SSL_set_fd (ssl, sd);
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
 	method = ctx->method;
 #else
 	method = SSL_CTX_get_ssl_method (ctx);
 #endif
 	if (method == SSLv23_client_method())