diff options
Diffstat (limited to 'src/testcurl/https/tls_test_common.h')
-rw-r--r-- | src/testcurl/https/tls_test_common.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h index a3fcc5dc..784ab173 100644 --- a/src/testcurl/https/tls_test_common.h +++ b/src/testcurl/https/tls_test_common.h | |||
@@ -44,6 +44,35 @@ | |||
44 | #define MHD_E_FAILED_TO_CONNECT \ | 44 | #define MHD_E_FAILED_TO_CONNECT \ |
45 | "Error: server connection could not be established\n" | 45 | "Error: server connection could not be established\n" |
46 | 46 | ||
47 | |||
48 | /* The local copy if GnuTLS IDs to avoid long #ifdefs list with various | ||
49 | * GnuTLS versions */ | ||
50 | /** | ||
51 | * The list of know (at the moment of writing) GnuTLS IDs of TLS versions. | ||
52 | * Can be safely casted to/from @a gnutls_protocol_t. | ||
53 | */ | ||
54 | enum know_gnutls_tls_id | ||
55 | { | ||
56 | KNOWN_BAD = 0, /**< No TLS */ | ||
57 | KNOWN_TLS_SSLv3 = 1, /**< GNUTLS_SSL3 */ | ||
58 | KNOWN_TLS_V1_0 = 2, /**< GNUTLS_TLS1_0 */ | ||
59 | KNOWN_TLS_V1_1 = 3, /**< GNUTLS_TLS1_1 */ | ||
60 | KNOWN_TLS_V1_2 = 4, /**< GNUTLS_TLS1_2 */ | ||
61 | KNOWN_TLS_V1_3 = 5, /**< GNUTLS_TLS1_3 */ | ||
62 | KNOWN_TLS_MIN = KNOWN_TLS_SSLv3, /**< Minimum valid value */ | ||
63 | KNOWN_TLS_MAX = KNOWN_TLS_V1_3 /**< Maximum valid value */ | ||
64 | }; | ||
65 | |||
66 | /** | ||
67 | * Map @a know_gnutls_tls_ids values to printable names. | ||
68 | */ | ||
69 | extern const char *tls_names[6]; | ||
70 | |||
71 | /** | ||
72 | * Map @a know_gnutls_tls_ids values to GnuTLS priorities strings. | ||
73 | */ | ||
74 | extern const char *priorities_map[6]; | ||
75 | |||
47 | struct https_test_data | 76 | struct https_test_data |
48 | { | 77 | { |
49 | void *cls; | 78 | void *cls; |