diff options
| author | jsing <> | 2015-02-12 04:35:17 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-12 04:35:17 +0000 |
| commit | 5b03392fa282336c76610fc4e06e4516d6e6a518 (patch) | |
| tree | 7164ebd8d1579088586c09f6eabd205585445338 /src/lib/libtls/tls.h | |
| parent | bb381a403dc7a97a33d072ed48e90a2236ceb69e (diff) | |
| download | openbsd-5b03392fa282336c76610fc4e06e4516d6e6a518.tar.gz openbsd-5b03392fa282336c76610fc4e06e4516d6e6a518.tar.bz2 openbsd-5b03392fa282336c76610fc4e06e4516d6e6a518.zip | |
Add a tls_config_parse_protocols() function that allows a protocols string
to be converted into a libtls protocols value. This allows for things like:
"tlsv1.0,tlsv1.1" (TLSv1.0 and TLSv1.1)
"all,!tlsv1.0" (all protocols except TLSv1.0)
Discussed with tedu@ and reyk@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libtls/tls.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h index 0fafcc6e23..0af6194879 100644 --- a/src/lib/libtls/tls.h +++ b/src/lib/libtls/tls.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls.h,v 1.8 2015/02/12 04:23:17 jsing Exp $ */ | 1 | /* $OpenBSD: tls.h,v 1.9 2015/02/12 04:35:17 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -59,6 +59,8 @@ void tls_config_set_protocols(struct tls_config *config, uint32_t protocols); | |||
| 59 | void tls_config_set_verify_depth(struct tls_config *config, int verify_depth); | 59 | void tls_config_set_verify_depth(struct tls_config *config, int verify_depth); |
| 60 | 60 | ||
| 61 | void tls_config_clear_keys(struct tls_config *config); | 61 | void tls_config_clear_keys(struct tls_config *config); |
| 62 | int tls_config_parse_protocols(uint32_t *protocols, const char *protostr); | ||
| 63 | |||
| 62 | void tls_config_insecure_noverifyhost(struct tls_config *config); | 64 | void tls_config_insecure_noverifyhost(struct tls_config *config); |
| 63 | void tls_config_insecure_noverifycert(struct tls_config *config); | 65 | void tls_config_insecure_noverifycert(struct tls_config *config); |
| 64 | void tls_config_verify(struct tls_config *config); | 66 | void tls_config_verify(struct tls_config *config); |
