diff options
author | jsing <> | 2016-04-28 17:05:59 +0000 |
---|---|---|
committer | jsing <> | 2016-04-28 17:05:59 +0000 |
commit | f4470c187e09c2ca1bfcf671080ac97b7fc86df2 (patch) | |
tree | 046b15c71afb290bae07f4b238cfdc296f78ca6b /src/lib/libtls/tls.h | |
parent | 2666540eb58ec0e76b541248bed9d159e6a2ccea (diff) | |
download | openbsd-f4470c187e09c2ca1bfcf671080ac97b7fc86df2.tar.gz openbsd-f4470c187e09c2ca1bfcf671080ac97b7fc86df2.tar.bz2 openbsd-f4470c187e09c2ca1bfcf671080ac97b7fc86df2.zip |
Factor our the keypair handling in libtls. This results in more readable
and self-contained code, while preparing for the ability to handle
multiple keypairs. Also provide two additional functions that allow
a public certificate and private key to be set with a single function
call.
ok beck@
Diffstat (limited to 'src/lib/libtls/tls.h')
-rw-r--r-- | src/lib/libtls/tls.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h index da229d1fee..6994f1417b 100644 --- a/src/lib/libtls/tls.h +++ b/src/lib/libtls/tls.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.h,v 1.27 2016/04/28 16:48:44 jsing Exp $ */ | 1 | /* $OpenBSD: tls.h,v 1.28 2016/04/28 17:05:59 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -66,6 +66,10 @@ int tls_config_set_ecdhecurve(struct tls_config *_config, const char *_name); | |||
66 | int tls_config_set_key_file(struct tls_config *_config, const char *_key_file); | 66 | int tls_config_set_key_file(struct tls_config *_config, const char *_key_file); |
67 | int tls_config_set_key_mem(struct tls_config *_config, const uint8_t *_key, | 67 | int tls_config_set_key_mem(struct tls_config *_config, const uint8_t *_key, |
68 | size_t _len); | 68 | size_t _len); |
69 | int tls_config_set_keypair_file(struct tls_config *_config, | ||
70 | const char *_cert_file, const char *_key_file); | ||
71 | int tls_config_set_keypair_mem(struct tls_config *_config, const uint8_t *_cert, | ||
72 | size_t _cert_len, const uint8_t *_key, size_t _key_len); | ||
69 | void tls_config_set_protocols(struct tls_config *_config, uint32_t _protocols); | 73 | void tls_config_set_protocols(struct tls_config *_config, uint32_t _protocols); |
70 | void tls_config_set_verify_depth(struct tls_config *_config, int _verify_depth); | 74 | void tls_config_set_verify_depth(struct tls_config *_config, int _verify_depth); |
71 | 75 | ||