aboutsummaryrefslogtreecommitdiff
path: root/kerberos5/lib/libroken/Makefile
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-12-06 15:30:05 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2024-03-28 03:14:44 +0000
commitaaf2c7fdb81a1dd9de9fc77c9313f4e60e68fa76 (patch)
treee1c20cd8719e74ab86c83b5987fc8d24824c2f5c /kerberos5/lib/libroken/Makefile
parent711422d54795fb4fbef16fd1f1afcee6ed4510f4 (diff)
downloadsrc-aaf2c7fdb81a1dd9de9fc77c9313f4e60e68fa76.tar.gz
src-aaf2c7fdb81a1dd9de9fc77c9313f4e60e68fa76.zip
kerberos: Fix numerous segfaults when using weak crypto
Weak crypto is provided by the openssl legacy provider which is not load by default. Load the legacy providers as needed. When the legacy provider is loaded into the default context the default provider will no longer be automatically loaded. Without the default provider the various kerberos applicaions and functions will abort(). This is the second attempt at this patch. Instead of linking secure/lib/libcrypto at build time we now link it at runtime, avoiding buildworld failures under Linux and MacOS. This is because TARGET_ENDIANNESS is undefined at pre-build time. PR: 272835 Tested by: netchild Joerg Pulz <Joerg.Pulz@frm2.tum.de> (previous version) Approved by: so Security: FreeBSD-EN-24:08.kerberos (cherry picked from commit 476d63e091c2e663b51d18acf6acb282e1f22bbc) (cherry picked from commit c7db2e15e4045e1daba939bb151fc5878f791c7b)
Diffstat (limited to 'kerberos5/lib/libroken/Makefile')
-rw-r--r--kerberos5/lib/libroken/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile
index 0c46ba6c4cb5..ca6d090e64f0 100644
--- a/kerberos5/lib/libroken/Makefile
+++ b/kerberos5/lib/libroken/Makefile
@@ -74,9 +74,13 @@ SRCS= base64.c \
vis.c \
warnerr.c \
write_pid.c \
- xfree.c
+ xfree.c \
+ fbsd_ossl_provider_load.c
-CFLAGS+=-I${KRB5DIR}/lib/roken -I.
+CFLAGS+=-I${KRB5DIR}/lib/roken \
+ -I${SRCTOP}/kerberos5/include \
+ -I${KRB5DIR}/lib/krb5 \
+ -I${SRCTOP}/crypto/openssl/include -I.
CLEANFILES= roken.h