mirror of
https://github.com/curl/curl.git
synced 2024-12-09 06:30:06 +08:00
curl.h: change CURL_SSLVERSION_* from enum to defines
C++20 and later compilers emit a deprecation warning if values from two different enums are combined with a bitwise operation the way the CURL_SSLVERSION_* values were previously created. Reported-by: Michael Kaufmann Fixes #13510 Closes #13511
This commit is contained in:
parent
137aecfbf1
commit
eb06c1b25b
@ -2318,30 +2318,26 @@ enum CURL_NETRC_OPTION {
|
||||
CURL_NETRC_LAST
|
||||
};
|
||||
|
||||
enum {
|
||||
CURL_SSLVERSION_DEFAULT,
|
||||
CURL_SSLVERSION_TLSv1, /* TLS 1.x */
|
||||
CURL_SSLVERSION_SSLv2,
|
||||
CURL_SSLVERSION_SSLv3,
|
||||
CURL_SSLVERSION_TLSv1_0,
|
||||
CURL_SSLVERSION_TLSv1_1,
|
||||
CURL_SSLVERSION_TLSv1_2,
|
||||
CURL_SSLVERSION_TLSv1_3,
|
||||
#define CURL_SSLVERSION_DEFAULT 0
|
||||
#define CURL_SSLVERSION_TLSv1 1 /* TLS 1.x */
|
||||
#define CURL_SSLVERSION_SSLv2 2
|
||||
#define CURL_SSLVERSION_SSLv3 3
|
||||
#define CURL_SSLVERSION_TLSv1_0 4
|
||||
#define CURL_SSLVERSION_TLSv1_1 5
|
||||
#define CURL_SSLVERSION_TLSv1_2 6
|
||||
#define CURL_SSLVERSION_TLSv1_3 7
|
||||
|
||||
CURL_SSLVERSION_LAST /* never use, keep last */
|
||||
};
|
||||
#define CURL_SSLVERSION_LAST 8 /* never use, keep last */
|
||||
|
||||
enum {
|
||||
CURL_SSLVERSION_MAX_NONE = 0,
|
||||
CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16),
|
||||
CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16),
|
||||
CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16),
|
||||
CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16),
|
||||
CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16),
|
||||
#define CURL_SSLVERSION_MAX_NONE 0
|
||||
#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1 << 16)
|
||||
#define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
|
||||
#define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
|
||||
#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
|
||||
#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
|
||||
|
||||
/* never use, keep last */
|
||||
CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16)
|
||||
};
|
||||
#define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16)
|
||||
|
||||
enum CURL_TLSAUTH {
|
||||
CURL_TLSAUTH_NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user