Closed Jester3141 closed 6 years ago
Thank you, but my BIO_new_mem_buf
declaration looks like this:
BIO *BIO_new_mem_buf(const void *buf, int len);
Are you sure you are using OpenSSL, and not BoringSSL or LibreSSL? I think I remember that BoringSSL had wrong BIO_new_mem_buf
declaration at some time.
Same issue here when trying to build on an older Ubuntu release with OpenSSL 1.01f-1ubuntu2.22. Looking at the history of the OpenSSL project it looks like the 'const' flag was added to this parameter in a more recent release.
This is therefore not a bug with the project, but an incompatibility with older distributions.
As a workaround for anybody else that hits this issue, either update OpenSSL, or if you don't care about HTTPS (ie: for local experimentation like I'm currently doing), just comment out in CMakeFiles.txt any reference to OpenSSL (two 'if' conditions+contents and the find_package call).
I added a workaround for this problem in https://github.com/eidheim/Simple-Web-Server/commit/702a571451899f903660aa33835cc279051c0b0e
The latest release candidate examples wont build when openssl is detected due to a invalid conversion in crypto.hpp.
This would likely affect any program including crypto.hpp.
The following is from my compile log...
I am running Centos 7.3. gcc version 4.8.5