[PATCH 1/1] lib/ecdsa: Fix LibreSSL before v2.7.0

Simon Glass sjg at chromium.org
Sat Jul 31 18:59:34 CEST 2021


Hi,

On Wed, 28 Jul 2021 at 23:13, Jonathan Gray <jsg at jsg.id.au> wrote:
>
> On Wed, Jul 28, 2021 at 09:04:33PM +0300, Artem Panfilov wrote:
> > Fix LibreSSL compilation for versions before v2.7.0.
>
> Why 2.7.0?  I had to disable CONFIG_FIT_SIGNATURE to get the qemu
> targets to build on OpenBSD-current (3.4.0) as there is no
> BN_bn2binpad().  2.7.0 is also over three years old at this point.

I think it is reasonable to support older libraries but I'm not sure
what is reasonable. I am sure there are people using 3 or 4 year-old
distributions which might have older libraries?

Assuming that is true:

Reviewed-by: Simon Glass <sjg at chromium.org>

>
> >
> > Fix following compilation issue when CONFIG_TOOLS_LIBCRYPTO is enabled:
> > tools/lib/ecdsa/ecdsa-libcrypto.o: In function `prepare_ctx':
> > ecdsa-libcrypto.c:(.text+0x94): undefined reference to
> > `OPENSSL_init_ssl'
> > ecdsa-libcrypto.c:(.text+0x148): undefined reference to
> > `EC_GROUP_order_bits'
> > tools/lib/ecdsa/ecdsa-libcrypto.o: In function
> > `ecdsa_check_signature.isra.0':
> > ecdsa-libcrypto.c:(.text+0x32c): undefined reference to `ECDSA_SIG_set0'
> > tools/lib/ecdsa/ecdsa-libcrypto.o: In function `ecdsa_sign':
> > ecdsa-libcrypto.c:(.text+0x42c): undefined reference to `ECDSA_SIG_get0'
> > ecdsa-libcrypto.c:(.text+0x443): undefined reference to `BN_bn2binpad'
> > ecdsa-libcrypto.c:(.text+0x455): undefined reference to `BN_bn2binpad'
> > tools/lib/ecdsa/ecdsa-libcrypto.o: In function `ecdsa_add_verify_data':
> > ecdsa-libcrypto.c:(.text+0x5fa): undefined reference to
> > `EC_GROUP_order_bits'
> > ecdsa-libcrypto.c:(.text+0x642): undefined reference to
> > `EC_POINT_get_affine_coordinates'
> >
> > Signed-off-by: Artem Panfilov <panfilov.artyom at gmail.com>
> > ---
> >  lib/ecdsa/ecdsa-libcrypto.c | 80 ++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 79 insertions(+), 1 deletion(-)
> >

[..]


More information about the U-Boot mailing list