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 */