File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 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)
17411741 return errbuf ;
17421742 }
17431743
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
17441752 if (ERR_GET_LIB (ecode ) == ERR_LIB_SSL &&
17451753 ERR_GET_REASON (ecode ) == SSL_AD_REASON_OFFSET + SSL_AD_NO_APPLICATION_PROTOCOL )
17461754 {
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- */
17521755 snprintf (errbuf , SSL_ERR_LEN , libpq_gettext ("no application protocol" ));
17531756 return errbuf ;
17541757 }
1758+ #endif
17551759
17561760 /*
17571761 * 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