diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-11-24 16:56:17 +0100 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-11-24 17:07:17 +0100 |
commit | 1baacd434046adcdf7cace66750f34ba3fc78b52 (patch) | |
tree | a3cd57d23d6ca242b51000e668b10db61723da9a /src/IO/tls.c | |
parent | 5683fc63485590f6f35ed8978899e6d6a0eae4bb (diff) |
Add support to query version in TLS backends
Diffstat (limited to 'src/IO/tls.c')
-rw-r--r-- | src/IO/tls.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/IO/tls.c b/src/IO/tls.c index 4c0cfe7e..e91162da 100644 --- a/src/IO/tls.c +++ b/src/IO/tls.c @@ -4,7 +4,7 @@ * Copyright (C) 2011 Benjamin Johnson <obeythepenguin@users.sourceforge.net> * (for the https code offered from dplus browser that formed the basis...) * Copyright 2016 corvid - * Copyright (C) 2023 Rodrigo Arias Mallo <rodarima@gmail.com> + * Copyright (C) 2023-2024 Rodrigo Arias Mallo <rodarima@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,22 @@ #include "tls_mbedtls.h" /** + * Get the version of the TLS library. + */ +const char *a_Tls_version(char *buf, int n) +{ +#if ! defined(ENABLE_TLS) + return NULL; +#elif defined(HAVE_OPENSSL) + return a_Tls_openssl_version(buf, n); +#elif defined(HAVE_MBEDTLS) + return a_Tls_mbedtls_version(buf, n); +#else +# error "no TLS library found but ENABLE_TLS set" +#endif +} + +/** * Initialize TLS library. */ void a_Tls_init(void) |