Fix LibreSSL version output in `--version` #1029

Closed
wants to merge 2 commits into
from

Projects

None yet

1 participant

@Sp1l
Contributor
Sp1l commented Sep 19, 2016

LibreSSL defines OPENSSL_VERSION_NUMBER as 0x20000000L for all versions (https://github.com/libressl-portable/openbsd/blob/master/src/lib/libcrypto/opensslv.h#L10), returning LibreSSL/2.0.0 for any LibreSSL version.
Copied the SSLeay() function from https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/cversion.c#L104 using LIBRESSL_VERSION_NUMBER in curl -V output in stead.

$ curl --version
curl 7.50.3 (amd64-portbld-freebsd11.0) libcurl/7.50.3 LibreSSL/2.0.0 zlib/1.2.8 nghttp2/1.14.0
Sp1l added some commits Sep 19, 2016
@Sp1l Sp1l Merge pull request #1 from curl/master
Merge curl/curl master
62aec49
@Sp1l Sp1l Fix LibreSSL version output in `--version`
LibreSSL defines `OPENSSL_VERSION_NUMBER` as `0x20000000L` for all versions (https://github.com/libressl-portable/openbsd/blob/master/src/lib/libcrypto/opensslv.h#L10), returning `LibreSSL/2.0.0` for any LibreSSL version.
Copied the SSLeay() function from https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/cversion.c#L104 using `LIBRESSL_VERSION_NUMBER` in `curl -V` output in stead.
{{{
$ curl --version
curl 7.50.3 (amd64-portbld-freebsd11.0) libcurl/7.50.3 LibreSSL/2.0.0 zlib/1.2.8 nghttp2/1.14.0
}}}
0c52e82
@bagder bagder added a commit that closed this pull request Sep 19, 2016
@Sp1l @bagder Sp1l + bagder libressl: fix version output
LibreSSL defines `OPENSSL_VERSION_NUMBER` as `0x20000000L` for all
versions returning `LibreSSL/2.0.0` for any LibreSSL version.

This change provides a local OpenSSL_version_num function replacement
returning LIBRESSL_VERSION_NUMBER instead.

Closes #1029
01c8db4
@bagder bagder closed this in 01c8db4 Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment