File tree 1 file changed +9
-5
lines changed
Filter options
1 file changed +9
-5
lines changed
Original file line number Diff line number Diff line change @@ -1741,17 +1741,21 @@ SSLerrmessage(unsigned long ecode)
1741
1741
return errbuf ;
1742
1742
}
1743
1743
1744
+ /*
1745
+ * Server aborted the connection with TLS "no_application_protocol" alert.
1746
+ * The ERR_reason_error_string() function doesn't give any error string
1747
+ * for that for some reason, so do it ourselves. See
1748
+ * https://github.com/openssl/openssl/issues/24300. This is available in
1749
+ * OpenSSL 1.1.0 and later, but as of this writing not in LibreSSL.
1750
+ */
1751
+ #ifdef SSL_AD_NO_APPLICATION_PROTOCOL
1744
1752
if (ERR_GET_LIB (ecode ) == ERR_LIB_SSL &&
1745
1753
ERR_GET_REASON (ecode ) == SSL_AD_REASON_OFFSET + SSL_AD_NO_APPLICATION_PROTOCOL )
1746
1754
{
1747
- /*
1748
- * Server aborted the connection with TLS "no_application_protocol"
1749
- * alert. The ERR_reason_error_string() function doesn't give any
1750
- * error string for that for some reason, so do it ourselves.
1751
- */
1752
1755
snprintf (errbuf , SSL_ERR_LEN , libpq_gettext ("no application protocol" ));
1753
1756
return errbuf ;
1754
1757
}
1758
+ #endif
1755
1759
1756
1760
/*
1757
1761
* In OpenSSL 3.0.0 and later, ERR_reason_error_string randomly refuses to
You can’t perform that action at this time.
0 commit comments