* [PATCH] extract-cert: detect and warn if libssl is missing
@ 2017-11-20 2:55 Jesse Chan
0 siblings, 0 replies; only message in thread
From: Jesse Chan @ 2017-11-20 2:55 UTC (permalink / raw)
Cc: Jesse Chan, Greg Kroah-Hartman, Jonathan Corbet, Thomas Gleixner,
Kate Stewart, Mauro Carvalho Chehab, linux-kernel
With CONFIG_SYSTEM_TRUSTED_KEYRING enabled, if the host system doesn't have
a development version of libssl installed, the build fails with
errors like:
extract-cert.c: fatal error: openssl/bio.h: No such file or directory
In this case, prompt to install libssl-dev(el).
Signed-off-by: Jesse Chan <jc@linux.com>
---
scripts/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/Makefile b/scripts/Makefile
index 25ab143cbe14..6c75a32aae12 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -35,6 +35,14 @@ PHONY += build_unifdef
build_unifdef: $(obj)/unifdef
@:
+ifdef CONFIG_SYSTEM_TRUSTED_KEYRING
+ has_libssl := $(call try-run,\
+ echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lssl -,1,0)
+ ifneq ($(has_libssl),1)
+ $(error "Cannot use CONFIG_SYSTEM_TRUSTED_KEYRING=y, please install libssl-dev or libssl-devel")
+ endif
+endif
+
subdir-$(CONFIG_MODVERSIONS) += genksyms
subdir-y += mod
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
--
2.14.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-20 2:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 2:55 [PATCH] extract-cert: detect and warn if libssl is missing Jesse Chan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).