Re: [PATCH] Fix build with LibreSSL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Dec 11, 2018, at 07:04, Andrey Utkin <andrey_utkin@xxxxxxxxxx> wrote:
> 
> When using LibreSSL instead of Openss, linkage of hostapd executable
> fails with error
> 
>    ../src/crypto/tls_openssl.o: In function `tls_verify_cb':
>    tls_openssl.c:(.text+0x1273): undefined reference to `ASN1_STRING_get0_data'
>    ../src/crypto/tls_openssl.o: In function `tls_connection_peer_serial_num':
>    tls_openssl.c:(.text+0x3023): undefined reference to `ASN1_STRING_get0_data'
>    collect2: error: ld returned 1 exit status
>    make: *** [Makefile:1278: hostapd] Error 1
> 
> ASN1_STRING_get0_data is present in recent OpenSSL, but absent in
> LibreSSL (confirmed for version 2.6.5), so
2.7.0 should have it though. You can use change the ifdef to match on LIBRESSL_VERSION_NUMBER.
> fallback needs to be defined
> in this case, just like for old OpenSSL.
> 
> This patch was inspired by similar patches to other projects, such as
> spice-gtk, pjsip.
> 
> Link: https://bugs.gentoo.org/672834
> Signed-off-by: Andrey Utkin <andrey_utkin@xxxxxxxxxx>
> ---
> src/crypto/tls_openssl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
> index 0d5ebda69..7234045d7 100644
> --- a/src/crypto/tls_openssl.c
> +++ b/src/crypto/tls_openssl.c
> @@ -104,7 +104,7 @@ static size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
> 
> #endif
> 
> -#if OPENSSL_VERSION_NUMBER < 0x10100000L
> +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> #ifdef CONFIG_SUITEB
> static int RSA_bits(const RSA *r)
> {
> -- 
> 2.16.4
> 
> 
> _______________________________________________
> Hostap mailing list
> Hostap@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/hostap

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux