summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls.h
diff options
context:
space:
mode:
authorjsing <>2015-02-12 04:35:17 +0000
committerjsing <>2015-02-12 04:35:17 +0000
commit5b03392fa282336c76610fc4e06e4516d6e6a518 (patch)
tree7164ebd8d1579088586c09f6eabd205585445338 /src/lib/libtls/tls.h
parentbb381a403dc7a97a33d072ed48e90a2236ceb69e (diff)
downloadopenbsd-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 'src/lib/libtls/tls.h')
-rw-r--r--src/lib/libtls/tls.h4
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);
59void tls_config_set_verify_depth(struct tls_config *config, int verify_depth); 59void tls_config_set_verify_depth(struct tls_config *config, int verify_depth);
60 60
61void tls_config_clear_keys(struct tls_config *config); 61void tls_config_clear_keys(struct tls_config *config);
62int tls_config_parse_protocols(uint32_t *protocols, const char *protostr);
63
62void tls_config_insecure_noverifyhost(struct tls_config *config); 64void tls_config_insecure_noverifyhost(struct tls_config *config);
63void tls_config_insecure_noverifycert(struct tls_config *config); 65void tls_config_insecure_noverifycert(struct tls_config *config);
64void tls_config_verify(struct tls_config *config); 66void tls_config_verify(struct tls_config *config);