Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea8bc34

Browse files
committed
Make detection of SSL_CTX_set_min_proto_version more portable
As already explained in configure.in, using the OpenSSL version numberto detect presence of functions doesn't work, because LibreSSL reportsincompatible version numbers. Fortunately, the functions we need hereare actually macros, so we can just test for them directly.
1 parente73e67c commitea8bc34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/libpq/be-secure-openssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static bool dummy_ssl_passwd_cb_called = false;
6868
staticboolssl_is_server_start;
6969

7070
staticintssl_protocol_version_to_openssl(intv,constchar*guc_name);
71-
#if (OPENSSL_VERSION_NUMBER<0x10100000L)
71+
#ifndefSSL_CTX_set_min_proto_version
7272
staticintSSL_CTX_set_min_proto_version(SSL_CTX*ctx,intversion);
7373
staticintSSL_CTX_set_max_proto_version(SSL_CTX*ctx,intversion);
7474
#endif
@@ -1273,7 +1273,7 @@ ssl_protocol_version_to_openssl(int v, const char *guc_name)
12731273
/*
12741274
* Replacements for APIs present in newer versions of OpenSSL
12751275
*/
1276-
#if (OPENSSL_VERSION_NUMBER<0x10100000L)
1276+
#ifndefSSL_CTX_set_min_proto_version
12771277

12781278
/*
12791279
* OpenSSL versions that support TLS 1.3 shouldn't get here because they
@@ -1327,4 +1327,4 @@ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version)
13271327
return1;/* success */
13281328
}
13291329

1330-
#endif/*OPENSSL_VERSION_NUMBER */
1330+
#endif/*!SSL_CTX_set_min_proto_version */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp