|
24 | 24 | static const long Cryptography_HAS_PSK;
|
25 | 25 | static const long Cryptography_HAS_VERIFIED_CHAIN;
|
26 | 26 | static const long Cryptography_HAS_KEYLOG;
|
| 27 | +static const long Cryptography_HAS_GET_PROTO_VERSION; |
27 | 28 |
|
28 | 29 | /* Internally invented symbol to tell us if SSL_MODE_RELEASE_BUFFERS is
|
29 | 30 | * supported
|
|
312 | 313 | long SSL_total_renegotiations(SSL *);
|
313 | 314 | long SSL_get_secure_renegotiation_support(SSL *);
|
314 | 315 |
|
| 316 | +long SSL_CTX_set_min_proto_version(SSL_CTX *, int); |
| 317 | +long SSL_CTX_set_max_proto_version(SSL_CTX *, int); |
| 318 | +long SSL_set_min_proto_version(SSL *, int); |
| 319 | +long SSL_set_max_proto_version(SSL *, int); |
| 320 | +
|
| 321 | +long SSL_CTX_get_min_proto_version(SSL_CTX *); |
| 322 | +long SSL_CTX_get_max_proto_version(SSL_CTX *); |
| 323 | +long SSL_get_min_proto_version(SSL *); |
| 324 | +long SSL_get_max_proto_version(SSL *); |
| 325 | +
|
315 | 326 | /* Defined as unsigned long because SSL_OP_ALL is greater than signed 32-bit
|
316 | 327 | and Windows defines long as 32-bit. */
|
317 | 328 | unsigned long SSL_CTX_set_options(SSL_CTX *, unsigned long);
|
|
330 | 341 |
|
331 | 342 | /* methods */
|
332 | 343 |
|
333 |
| -/* |
334 |
| - * TLSv1_1 and TLSv1_2 are recent additions. Only sufficiently new versions of |
335 |
| - * OpenSSL support them. |
336 |
| - */ |
337 | 344 | const SSL_METHOD *TLSv1_1_method(void);
|
338 | 345 | const SSL_METHOD *TLSv1_1_server_method(void);
|
339 | 346 | const SSL_METHOD *TLSv1_1_client_method(void);
|
|
363 | 370 | const SSL_METHOD *SSLv23_server_method(void);
|
364 | 371 | const SSL_METHOD *SSLv23_client_method(void);
|
365 | 372 |
|
| 373 | +const SSL_METHOD *TLS_method(void); |
| 374 | +const SSL_METHOD *TLS_server_method(void); |
| 375 | +const SSL_METHOD *TLS_client_method(void); |
| 376 | +
|
366 | 377 | /*- These aren't macros these arguments are all const X on openssl > 1.0.x -*/
|
367 | 378 | SSL_CTX *SSL_CTX_new(SSL_METHOD *);
|
368 | 379 | long SSL_CTX_get_timeout(const SSL_CTX *);
|
|
674 | 685 | #else
|
675 | 686 | static const long Cryptography_HAS_TLSv1_3 = 1;
|
676 | 687 | #endif
|
| 688 | +
|
| 689 | +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 && !CRYPTOGRAPHY_IS_LIBRESSL |
| 690 | +static const long Cryptography_HAS_GET_PROTO_VERSION = 0; |
| 691 | +
|
| 692 | +long (*SSL_CTX_get_min_proto_version)(SSL_CTX *) = NULL; |
| 693 | +long (*SSL_CTX_get_max_proto_version)(SSL_CTX *) = NULL; |
| 694 | +long (*SSL_get_min_proto_version)(SSL *) = NULL; |
| 695 | +long (*SSL_get_max_proto_version)(SSL *) = NULL; |
| 696 | +#else |
| 697 | +static const long Cryptography_HAS_GET_PROTO_VERSION = 1; |
| 698 | +#endif |
677 | 699 | """
|
0 commit comments