[Buildroot] [PATCH 1/1] package/libkrb5: disable with libressl

Yann E. MORIN yann.morin.1998 at free.fr
Tue Aug 17 21:02:13 UTC 2021


Fabrice, All,

On 2021-08-16 08:54 +0200, Fabrice Fontaine spake thusly:
> libkrb5 does not build with libressl since commit
> b7a5b9d06d484700fc4fcbd354f2c15e0422688c and upstream is not interested
> in fixing this issue as a PR is opened for more than 4 years
> (https://github.com/krb5/krb5/pull/607):
> 
> pkinit_crypto_openssl.c: In function 'cms_signeddata_verify':
> pkinit_crypto_openssl.c:1700:22: error: implicit declaration of function 'OBJ_get0_data'; did you mean 'BIO_get_data'? [-Werror=implicit-function-declaration]
>  1700 |         print_buffer(OBJ_get0_data(etype), OBJ_length(etype));
>       |                      ^~~~~~~~~~~~~
>       |                      BIO_get_data
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/e623f4e1d6b6004e98815b8b7da3938238890bd8
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> ---
>  package/libkrb5/libkrb5.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/libkrb5/libkrb5.mk b/package/libkrb5/libkrb5.mk
> index 89f219d913..5b30fbba2c 100644
> --- a/package/libkrb5/libkrb5.mk
> +++ b/package/libkrb5/libkrb5.mk
> @@ -41,7 +41,7 @@ else
>  LIBKRB5_CONF_OPTS += --without-ldap
>  endif
>  
> -ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)

Don't forget that an openssl provider can be provided by a br2-external
tree. If we force the condition to BR2_PACKAGE_LIBOPENSSL, then it
prevents any such provider to be used.

So, I think the best solution is to exclude libressl, rather than limit
to libopenssl. I've tried to come up with a simple conditional block:

    # An openssl provider is needed, but libressl is no match.
    # A provider from a br2-external is supposed to match.
    ifeq ($(BR2_PACKAGE_OPENSSL),y)
    ifeq ($(BR2_PACKAGE_LIBRESSL),)
    LIBKRB5_SSL = y
    endif
    endif
    ifeq ($(LIBKRB5_SSL),y)
    LIBKRB5_DEPENDENCIES += openssl
    LIBKRB5_CONF_OPTS += \
        --enable-pkinit \
        ...
    endif

Regards,
Yann E. MORIN.

>  LIBKRB5_CONF_OPTS += \
>  	--enable-pkinit \
>  	--with-crypto-impl=openssl \
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list