Created attachment 167764 [details]
git diff for contrib/wpa
LibreSSL defines the OpenSSL version as 0x2000000L but was forked from OpenSSL 1.0.1g with version 0x1000107fL. This causes many OPENSSL_VERSION_NUMBER comparisons to result in probrems if it tests for 1.0.2 (0x10002000L) or 1.1.0 (0x10010000L). The wpa_supplicant code is littered with OPENSSL_VERSION_NUMBER checks.
Replacing instances of
> #if OPENSSL_VERSION_NUMBER >= 0x10002000L
> #if OPENSSL_VERSION_NUMBER < 0x10010000L
> #if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
> #if OPENSSL_VERSION_NUMBER < 0x10010000L || defined(LIBRESSL_VERSION_NUMBER)
fixes these issues.
Noticed that you commit most often to contrib/wpa.
Could you please take a look at this patch?
CC'ing cy@, who recently updated wpa_supplicant to 2.6. We have libressl patches (some submitted by brnrd@, even. =)) in the ports tree that could be ported to the base system if there's adequate interest.
I'll take this PR.
Comparing the attached patch with r466153 in ports and specifically files/patch-src_crypto_crypto__openssl.c and files/patch-src_crypto_tls__openssl.c in the port, there are two differences: there is no patch for crypto/crypto_openssl.c and the attached patch is different from the one you provided me for the port. Should we apply the two patches from the port here?