diff --git a/librb/src/gnutls.c b/librb/src/gnutls.c index 1b7f0c860..a352440a2 100644 --- a/librb/src/gnutls.c +++ b/librb/src/gnutls.c @@ -748,7 +748,7 @@ rb_supports_ssl(void) void rb_get_ssl_info(char *buf, size_t len) { - snprintf(buf, len, "GNUTLS: compiled (%s), library(%s)", + snprintf(buf, len, "GNUTLS: compiled (%s), library (%s)", LIBGNUTLS_VERSION, gnutls_check_version(NULL)); } diff --git a/librb/src/mbedtls.c b/librb/src/mbedtls.c index cbedbb9ba..f13b74ea2 100644 --- a/librb/src/mbedtls.c +++ b/librb/src/mbedtls.c @@ -643,8 +643,8 @@ rb_get_ssl_info(char *buf, size_t len) char version_str[512]; mbedtls_version_get_string(version_str); - snprintf(buf, len, "MBEDTLS: compiled (%s), library(%s)", - MBEDTLS_VERSION_STRING, version_str); + snprintf(buf, len, "ARM mbedTLS: compiled (v%s), library (v%s)", + MBEDTLS_VERSION_STRING, version_str); } const char * diff --git a/librb/src/openssl.c b/librb/src/openssl.c index 6418b6083..aef767472 100644 --- a/librb/src/openssl.c +++ b/librb/src/openssl.c @@ -810,9 +810,23 @@ rb_supports_ssl(void) void rb_get_ssl_info(char *buf, size_t len) { - snprintf(buf, len, "Using SSL: %s compiled: 0x%lx, library 0x%lx", - SSLeay_version(SSLEAY_VERSION), - (long)OPENSSL_VERSION_NUMBER, SSLeay()); +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + if (OpenSSL_version_num() == OPENSSL_VERSION_NUMBER) + snprintf(buf, len, "OpenSSL: 0x%lx, %s", + OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT); + else + snprintf(buf, len, "OpenSSL: compiled (0x%lx, %s), library (0x%lx, %s)", + OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT, + OpenSSL_version_num(), OpenSSL_version(OPENSSL_VERSION)); +#else + if (SSLeay() == SSLEAY_VERSION_NUMBER) + snprintf(buf, len, "OpenSSL: 0x%lx, %s", + SSLeay(), SSLeay_version(SSLEAY_VERSION)); + else + snprintf(buf, len, "OpenSSL: compiled (0x%lx, %s), library (0x%lx, %s)", + SSLEAY_VERSION_NUMBER, "???", + SSLeay(), SSLeay_version(SSLEAY_VERSION)); +#endif } const char *