[TLS Backends] Make version strings more useful and consistent
This commit is contained in:
parent
0fe9dd4119
commit
c40eede13b
3 changed files with 20 additions and 6 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue