diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-08-04 23:54:44 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-08-04 23:54:44 +0200 |
commit | 7efff86639dbc60820d545c8bf41655e9720e4c0 (patch) | |
tree | 0b0f053d96b8080b726c6145f8186f2f4bafdbd1 /lib | |
parent | 67920e15167790e6d5f347ef7672bb4a2e5f712f (diff) |
Curl_ossl_version: detect and show libressl
LibreSSL is otherwise OpenSSL API compliant (so far)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/openssl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 2ff425e0d..03717249f 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2830,8 +2830,13 @@ size_t Curl_ossl_version(char *buffer, size_t size) sub[0]='\0'; } - return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx%s", - (ssleay_value>>28)&0xf, + return snprintf(buffer, size, "%s/%lx.%lx.%lx%s", +#ifdef LIBRESSL_VERSION_NUMBER + "LibreSSL" +#else + "OpenSSL" +#endif + , (ssleay_value>>28)&0xf, (ssleay_value>>20)&0xff, (ssleay_value>>12)&0xff, sub); |