]> Gentwo Git Trees - linux/.git/commit
bpftool: Allow bpftool to build with openssl < 3
authorAlan Maguire <alan.maguire@oracle.com>
Thu, 20 Nov 2025 08:47:53 +0000 (08:47 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 24 Nov 2025 18:00:16 +0000 (10:00 -0800)
commit90ae54b4c7eca42d5ce006dd0a8cb0b5bfbf80d0
tree62d21b22ffe92673e3379bf909997e65b1ae9c3f
parentacf8726466a6254617ade092bb3eded8c04947f7
bpftool: Allow bpftool to build with openssl < 3

ERR_get_error_all()[1] is a openssl v3 API, so to make code
compatible with openssl v1 utilize ERR_get_err_line_data
instead.  Since openssl is already a build requirement for
the kernel (minimum requirement openssl 1.0.0), this will
allow bpftool to compile where opensslv3 is not available.
Signing-related BPF selftests pass with openssl v1.

[1] https://docs.openssl.org/3.4/man3/ERR_get_error/

Fixes: 40863f4d6ef2 ("bpftool: Add support for signing BPF programs")
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Song Liu <song@kernel.org>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/r/20251120084754.640405-2-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/sign.c