h2o / picotls

TLS 1.3 implementation in C (master supports RFC8446 as well as draft-26, -27, -28)
536 stars 140 forks source link

Open SSL version not recognized on MacOS Ventura 13.2 #461

Closed huitema closed 8 months ago

huitema commented 1 year ago

Getting the following error during CMake:

-- Found OpenSSL: /opt/homebrew/Cellar/openssl@1.1/1.1.1n/lib/libcrypto.dylib   
CMake Warning at CMakeLists.txt:153 (MESSAGE):
  Disabling OpenSSL support (requires 1.0.1 or newer)
huitema commented 1 year ago

Checking the version:

christianhuitema@Christians-iMac picotls % openssl version
LibreSSL 3.3.6
huitema commented 1 year ago

@kazuho This is still happening with MacOS Ventura 13.4. Is there a workaround?

huitema commented 8 months ago

Investigating. I added a logging message to the CMakeList, and got:

CMake Warning at CMakeLists.txt:177 (MESSAGE):
  Disabling OpenSSL support (requires 1.0.1 or newer)

CMake Warning at CMakeLists.txt:178 (MESSAGE):
  OpenSSL DIR: /opt/homebrew/Cellar/openssl@3/3.1.1_1/include

I had installed openssl using brew, and the version is:

% openssl version
OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)

... but the OPENSSL_VERSION variable is not set.

huitema commented 8 months ago

The "brew" install was part of an upgrade of the python code. Python 3.10 requires openssl 3.0...

huitema commented 8 months ago

Notice the weirdness: OpenSSL version is 3.2.0_1, but the OpenSSL DIR variable points to a non existent folder, 3.1.1_1.

huitema commented 8 months ago

Fixed by removing CMakeCache.txt. It included the phantom of an old openssl version, which caused make to fail.