openssl version issues with OSX
akshayknarayan opened this issue · 3 comments
I have written a small application that uses mvfst and therefore also fizz. On OSX 10.14.4, it compiles and links with openssl 1.0.2r:
⇒ brew install openssl
Warning: openssl 1.0.2r is already installed and up-to-date
However, at runtime, this gets triggered: https://github.com/facebookincubator/fizz/blob/master/fizz/crypto/signature/Signature.cpp#L25
Linking with openssl 1.1.0 resolves this issue. Perhaps this could be documented (especially since 1.0.2r is the default homebrew install)?
cc @udippant
Sounds like you need to initialize OpenSSL? In 1.1.0 this is no longer necessary and isn't done by default. Have you tried calling OpenSSL_add_all_algorithms()
during your app's startup?
You need to call fizz::CryptoUtils::init() like https://github.com/facebookincubator/mvfst/blob/master/quic/samples/echo/main.cpp#L33
You won't get this specific error if using openssl 1.1.0 with the default configuration, however some parts of initialization may not be thread safe if it's not explicitly called. I agree this could be better documented.
Yes, calling fizz::CryptoUtils::init()
resolves this.
re: documentation, perhaps explicitly referencing the init()
function in the error would help, e.g. "...Have you initialized openssl with fizz::CryptoUtils::init()?"