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_config.c | |
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_config.c')
-rw-r--r-- | src/lib/libtls/tls_config.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index 07019252a7..9992c60661 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_config.c,v 1.52 2018/04/07 16:35:34 jsing Exp $ */ | 1 | /* $OpenBSD: tls_config.c,v 1.53 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 | * |
@@ -27,6 +27,14 @@ | |||
27 | 27 | ||
28 | #include "tls_internal.h" | 28 | #include "tls_internal.h" |
29 | 29 | ||
30 | static const char default_ca_file[] = "/etc/ssl/cert.pem"; | ||
31 | |||
32 | const char * | ||
33 | tls_default_ca_cert_file(void) | ||
34 | { | ||
35 | return default_ca_file; | ||
36 | } | ||
37 | |||
30 | int | 38 | int |
31 | tls_config_load_file(struct tls_error *error, const char *filetype, | 39 | tls_config_load_file(struct tls_error *error, const char *filetype, |
32 | const char *filename, char **buf, size_t *len) | 40 | const char *filename, char **buf, size_t *len) |