diff options
author | Adriaan de Jong <dejong@fox-it.com> | 2011-06-29 17:59:55 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-10-19 22:45:01 +0200 |
commit | f4047d7420bac6bce5e8862771f0c20d42ba68ed (patch) | |
tree | 336becfd1daa6416d2adb044b1d65423beee4e9d /ssl_backend.h | |
parent | d494c31501635cbd5ae0e864849901bb3a4d3565 (diff) | |
download | openvpn-f4047d7420bac6bce5e8862771f0c20d42ba68ed.tar.gz openvpn-f4047d7420bac6bce5e8862771f0c20d42ba68ed.tar.xz openvpn-f4047d7420bac6bce5e8862771f0c20d42ba68ed.zip |
Refactored load certificate functions
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'ssl_backend.h')
-rw-r--r-- | ssl_backend.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ssl_backend.h b/ssl_backend.h index 127647f..0af1469 100644 --- a/ssl_backend.h +++ b/ssl_backend.h @@ -173,6 +173,26 @@ void tls_ctx_load_cryptoapi(struct tls_root_ctx *ctx, const char *cryptoapi_cert #endif /* WIN32 */ /** + * Load certificate file into the given TLS context. If the given certificate + * file contains a certificate chain, load the whole chain. + * + * @param ctx TLS context to use + * @param cert_file The file name to load the certificate from, or + * "[[INLINE]]" in the case of inline files. + * @param cert_file_inline A string containing the certificate + * @param x509 An optional certificate, if x509 is NULL, + * do nothing, if x509 is not NULL, *x509 will be + * allocated and filled with the loaded certificate. + * *x509 must be NULL. + */ +void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, +#if ENABLE_INLINE_FILES + const char *cert_file_inline, +#endif + X509 **x509 + ); + +/** * Show the TLS ciphers that are available for us to use in the OpenSSL * library. */ |