[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
|
void
|
||||||
rb_get_ssl_info(char *buf, size_t len)
|
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));
|
LIBGNUTLS_VERSION, gnutls_check_version(NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -643,8 +643,8 @@ rb_get_ssl_info(char *buf, size_t len)
|
||||||
char version_str[512];
|
char version_str[512];
|
||||||
mbedtls_version_get_string(version_str);
|
mbedtls_version_get_string(version_str);
|
||||||
|
|
||||||
snprintf(buf, len, "MBEDTLS: compiled (%s), library(%s)",
|
snprintf(buf, len, "ARM mbedTLS: compiled (v%s), library (v%s)",
|
||||||
MBEDTLS_VERSION_STRING, version_str);
|
MBEDTLS_VERSION_STRING, version_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
|
|
@ -810,9 +810,23 @@ rb_supports_ssl(void)
|
||||||
void
|
void
|
||||||
rb_get_ssl_info(char *buf, size_t len)
|
rb_get_ssl_info(char *buf, size_t len)
|
||||||
{
|
{
|
||||||
snprintf(buf, len, "Using SSL: %s compiled: 0x%lx, library 0x%lx",
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
SSLeay_version(SSLEAY_VERSION),
|
if (OpenSSL_version_num() == OPENSSL_VERSION_NUMBER)
|
||||||
(long)OPENSSL_VERSION_NUMBER, SSLeay());
|
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 *
|
const char *
|
||||||
|
|
Loading…
Reference in a new issue