diff options
author | tedu <> | 2018-11-29 14:24:23 +0000 |
---|---|---|
committer | tedu <> | 2018-11-29 14:24:23 +0000 |
commit | 8e376166426749fe5f95ab4ad9e6adfc863634d1 (patch) | |
tree | ec4788d4ef28ebf5ffa8baf3093f4d98017df946 /src/lib/libtls/tls.h | |
parent | ee1a55d3c708acf2230e003941964e4f2e0a2967 (diff) | |
download | openbsd-8e376166426749fe5f95ab4ad9e6adfc863634d1.tar.gz openbsd-8e376166426749fe5f95ab4ad9e6adfc863634d1.tar.bz2 openbsd-8e376166426749fe5f95ab4ad9e6adfc863634d1.zip |
expose the default cert file as a function, not a define. it's really
an internal detail of the library, so the string should live inside it,
not in the application code.
ok jsing
Diffstat (limited to 'src/lib/libtls/tls.h')
-rw-r--r-- | src/lib/libtls/tls.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h index 1b2d2c954c..560809ee19 100644 --- a/src/lib/libtls/tls.h +++ b/src/lib/libtls/tls.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.h,v 1.54 2018/11/06 20:34:54 jsing Exp $ */ | 1 | /* $OpenBSD: tls.h,v 1.55 2018/11/29 14:24:23 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -29,8 +29,6 @@ extern "C" { | |||
29 | 29 | ||
30 | #define TLS_API 20180210 | 30 | #define TLS_API 20180210 |
31 | 31 | ||
32 | #define TLS_CA_CERT_FILE "/etc/ssl/cert.pem" | ||
33 | |||
34 | #define TLS_PROTOCOL_TLSv1_0 (1 << 1) | 32 | #define TLS_PROTOCOL_TLSv1_0 (1 << 1) |
35 | #define TLS_PROTOCOL_TLSv1_1 (1 << 2) | 33 | #define TLS_PROTOCOL_TLSv1_1 (1 << 2) |
36 | #define TLS_PROTOCOL_TLSv1_2 (1 << 3) | 34 | #define TLS_PROTOCOL_TLSv1_2 (1 << 3) |
@@ -87,6 +85,8 @@ const char *tls_error(struct tls *_ctx); | |||
87 | struct tls_config *tls_config_new(void); | 85 | struct tls_config *tls_config_new(void); |
88 | void tls_config_free(struct tls_config *_config); | 86 | void tls_config_free(struct tls_config *_config); |
89 | 87 | ||
88 | const char *tls_default_ca_cert_file(void); | ||
89 | |||
90 | int tls_config_add_keypair_file(struct tls_config *_config, | 90 | int tls_config_add_keypair_file(struct tls_config *_config, |
91 | const char *_cert_file, const char *_key_file); | 91 | const char *_cert_file, const char *_key_file); |
92 | int tls_config_add_keypair_mem(struct tls_config *_config, const uint8_t *_cert, | 92 | int tls_config_add_keypair_mem(struct tls_config *_config, const uint8_t *_cert, |