[U-Boot] tools/mxsimage: Support building with LibreSSL

Marek Vasut marex at denx.de
Sat Mar 17 14:47:22 UTC 2018


On 03/17/2018 01:23 PM, Hauke Mehrtens wrote:
> The mxsimage utility fails to compile against LibreSSL because LibreSSL
> says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1
> interface.

The mxsimage does support OpenSSL 1.1 , the commit message is confusing.
Can you elaborate on that and reword the last part ?

> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
>  tools/mxsimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/mxsimage.c b/tools/mxsimage.c
> index 32a7978cae..0cbf007dff 100644
> --- a/tools/mxsimage.c
> +++ b/tools/mxsimage.c
> @@ -26,7 +26,7 @@
>   * OpenSSL 1.1.0 and newer compatibility functions:
>   * https://wiki.openssl.org/index.php/1.1_API_Changes
>   */
> -#if OPENSSL_VERSION_NUMBER < 0x10100000L
> +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)

This should check for the libressl version number value too I think?

>  static void *OPENSSL_zalloc(size_t num)
>  {
>  	void *ret = OPENSSL_malloc(num);
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list