From ecfcc533c8bb391db374a9ab5204ec97cdcf9afe Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 10 Apr 2015 10:38:31 -0700 Subject: [PATCH] add library version getters --- src/ssl.c | 15 +++++++++++++++ wolfssl/ssl.h | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index f6903707c..d91092294 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -9139,6 +9139,21 @@ const char* wolfSSL_get_version(WOLFSSL* ssl) return "unknown"; } + +/* current library version */ +const char* wolfSSL_lib_version(void) +{ + return LIBWOLFSSL_VERSION_STRING; +} + + +/* current library version in hex */ +word32 wolfSSL_lib_version_hex(void) +{ + return LIBWOLFSSL_VERSION_HEX; +} + + int wolfSSL_get_current_cipher_suite(WOLFSSL* ssl) { WOLFSSL_ENTER("SSL_get_current_cipher_suite"); diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index a5e0a64d8..8c8adf280 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -813,6 +813,11 @@ WOLFSSL_API int wolfSSL_Init(void); /* call when done to cleanup/free session cache mutex / resources */ WOLFSSL_API int wolfSSL_Cleanup(void); +/* which library version do we have */ +WOLFSSL_API const char* wolfSSL_lib_version(void); +/* which library version do we have in hex */ +WOLFSSL_API unsigned int wolfSSL_lib_version_hex(void); + /* turn logging on, only if compiled in */ WOLFSSL_API int wolfSSL_Debugging_ON(void); /* turn logging off */