Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
fixes/refactoring for building against LibreSSL #7586
Conversation
jonasschnelli
added
the
GUI
label
Feb 24, 2016
|
Added a commit that fixes a logical text-issue when compiling with LibreSSL. |
|
In main.cpp we explicitly cede for LibreSSL, do we want a similar construction here? (or even: factor it out somehow so it exists only in one place, so that we don't have this inconsistency next time)
|
|
Yes. Let me factor it out. But not sure about extra treating LibreSSL, IMO we should just use I could imaging allow compiling against different OpenSSL alternatives (Apple also has it's own IIRC). |
|
IIRC support for (or we have the |
|
It's not LibreSSL's mistake. They forked at a specific version of OpenSSL that they guarantee API compatibility with. That version uses SSLEAY_VERSION. So LibreSSL has to keep that in order to keep the API compatibility promise. The change in OpenSSL is after the fork. |
|
Added a commit that refactors the SSL detection. |
That's true but they do report a newer OpenSSL version in the |
|
@jonasschnelli just a note, CentOS is not a LibreSSL distribution. I built and run LibreSSL on it, as the OpenSSL it has is old and has poor ECC support. |
jonasschnelli
added
Refactoring
and removed
GUI
labels
Feb 24, 2016
jonasschnelli
changed the title from
[Qt] fix for building against LibreSSL
to
fixes/refactoring for building against LibreSSL
Feb 24, 2016
Aside, as it is no reason to have worse support for LibreSSL, but as of 0.12, ECC support in OpenSSL is no longer a requirement for Bitcoin Core. |
|
@laanwj yeah, but while I can have both openssl and libressl installed at the same time I can't have the header files to both installed at the same time, at least not with both installed in /usr/include |
MarcoFalke
commented on the diff
Feb 24, 2016
|
Concept ACK |
paveljanik
commented on the diff
Feb 24, 2016
| @@ -847,3 +847,14 @@ std::string CopyrightHolders(const std::string& strPrefix) | ||
| } | ||
| return strCopyrightHolders; | ||
| } | ||
| + | ||
| +const char * SSLProductAndVersionInfo() | ||
| +{ | ||
| +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) | ||
| + return OpenSSL_version(OPENSSL_VERSION); | ||
| +#elif defined(SSLEAY_VERSION_NUMBER) || defined(OPENSSL_VERSION_NUMBER) | ||
| + return SSLeay_version(SSLEAY_VERSION); | ||
| +#else | ||
| + return NULL; |
paveljanik
Contributor
|
paveljanik
commented on the diff
Feb 24, 2016
| @@ -847,3 +847,14 @@ std::string CopyrightHolders(const std::string& strPrefix) | ||
| } | ||
| return strCopyrightHolders; | ||
| } | ||
| + | ||
| +const char * SSLProductAndVersionInfo() | ||
| +{ | ||
| +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) | ||
| + return OpenSSL_version(OPENSSL_VERSION); | ||
| +#elif defined(SSLEAY_VERSION_NUMBER) || defined(OPENSSL_VERSION_NUMBER) | ||
| + return SSLeay_version(SSLEAY_VERSION); | ||
| +#else | ||
| + return NULL; | ||
| +#endif | ||
| +} |
|
|
|
Debug log: before:
after:
I propose to change the text to "Using SSL library" |
paveljanik
commented on the diff
Feb 24, 2016
| @@ -249,4 +249,6 @@ template <typename Callable> void TraceThread(const char* name, Callable func) | ||
| std::string CopyrightHolders(const std::string& strPrefix); | ||
| +/* returns the current SSL product and version info */ |
paveljanik
Contributor
|
|
Since its no longer part of consensus does it make sense to log it? Bitcoind doesn't log the boost version or the QT version. |
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Feb 25, 2016
|
Agree with @gmaxwell. This way we could get rid of the hacky logic and also tidy up the GUI a bit, keeping in mind there are other ways to detect the library version, if this is ever desired. |
|
I think it could be useful in the debug log. But I agree it can be removed in the UI. |
jonasschnelli
referenced this pull request
Feb 26, 2016
Merged
Remove openssl info from init/log and from Qt debug window #7605
|
Closing (#7605 merged) |
jonasschnelli commentedFeb 24, 2016
Alternative solution for #7585. Re-Enables LibreSSL compatibility.
Commit count and credit goes to @AliceWonderMiscreations