diff options
| author | jsing <> | 2014-09-29 15:11:29 +0000 |
|---|---|---|
| committer | jsing <> | 2014-09-29 15:11:29 +0000 |
| commit | 605cec093155820780caa252b95043bde782b7d0 (patch) | |
| tree | 50bbaa9e38aefb427b0f0162ccd9eefee6d46b85 /src/lib/libressl/ressl.h | |
| parent | ed345a015da09482b25daba22e3fffaf60583b83 (diff) | |
| download | openbsd-605cec093155820780caa252b95043bde782b7d0.tar.gz openbsd-605cec093155820780caa252b95043bde782b7d0.tar.bz2 openbsd-605cec093155820780caa252b95043bde782b7d0.zip | |
Add an option that allows the enabled SSL protocols to be explicitly
configured.
Discussed with several.
ok bcook@
Diffstat (limited to 'src/lib/libressl/ressl.h')
| -rw-r--r-- | src/lib/libressl/ressl.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libressl/ressl.h b/src/lib/libressl/ressl.h index 90b51dc7fc..5d980f1f75 100644 --- a/src/lib/libressl/ressl.h +++ b/src/lib/libressl/ressl.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ressl.h,v 1.16 2014/09/28 15:08:01 jsing Exp $ */ | 1 | /* $OpenBSD: ressl.h,v 1.17 2014/09/29 15:11:29 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -18,6 +18,15 @@ | |||
| 18 | #ifndef HEADER_RESSL_H | 18 | #ifndef HEADER_RESSL_H |
| 19 | #define HEADER_RESSL_H | 19 | #define HEADER_RESSL_H |
| 20 | 20 | ||
| 21 | #define RESSL_PROTOCOL_SSLv3 (1 << 0) | ||
| 22 | #define RESSL_PROTOCOL_TLSv1_0 (1 << 1) | ||
| 23 | #define RESSL_PROTOCOL_TLSv1_1 (1 << 2) | ||
| 24 | #define RESSL_PROTOCOL_TLSv1_2 (1 << 3) | ||
| 25 | #define RESSL_PROTOCOL_TLSv1 \ | ||
| 26 | (RESSL_PROTOCOL_TLSv1_0|RESSL_PROTOCOL_TLSv1_1|RESSL_PROTOCOL_TLSv1_2) | ||
| 27 | #define RESSL_PROTOCOLS_DEFAULT \ | ||
| 28 | (RESSL_PROTOCOL_SSLv3|RESSL_PROTOCOL_TLSv1) | ||
| 29 | |||
| 21 | #define RESSL_READ_AGAIN -2 | 30 | #define RESSL_READ_AGAIN -2 |
| 22 | #define RESSL_WRITE_AGAIN -3 | 31 | #define RESSL_WRITE_AGAIN -3 |
| 23 | 32 | ||
| @@ -43,6 +52,8 @@ int ressl_config_set_key_file(struct ressl_config *config, | |||
| 43 | const char *key_file); | 52 | const char *key_file); |
| 44 | int ressl_config_set_key_mem(struct ressl_config *config, const uint8_t *key, | 53 | int ressl_config_set_key_mem(struct ressl_config *config, const uint8_t *key, |
| 45 | size_t len); | 54 | size_t len); |
| 55 | void ressl_config_set_protocols(struct ressl_config *config, | ||
| 56 | uint32_t protocols); | ||
| 46 | void ressl_config_set_verify_depth(struct ressl_config *config, | 57 | void ressl_config_set_verify_depth(struct ressl_config *config, |
| 47 | int verify_depth); | 58 | int verify_depth); |
| 48 | 59 | ||
