git: a618be80fee9 - stable/15 - openssl: fix engine defines to match upstream

From: Gordon Tetlow <gordon_at_FreeBSD.org>
Date: Mon, 16 Nov 2026 06:33:21 UTC
The branch stable/15 has been updated by gordon:

URL: https://cgit.FreeBSD.org/src/commit/?id=a618be80fee9cb48f12faf85c269f59fa12d35f2

commit a618be80fee9cb48f12faf85c269f59fa12d35f2
Author:     Gordon Tetlow <gordon@FreeBSD.org>
AuthorDate: 2026-11-09 05:35:10 +0000
Commit:     Gordon Tetlow <gordon@FreeBSD.org>
CommitDate: 2026-11-16 06:22:19 +0000

    openssl: fix engine defines to match upstream
    
    Two engine Makefiles define different macros from upstream's
    engines/build.info:
    
    - padlock: engines/e_padlock.c builds the engine only when PADLOCK_ASM
      is defined.  Upstream defines it on x86 and x86_64, but our Makefile
      never did, so padlock.so has been a stub whose bind_engine() returns
      0 and the e_padlock-x86*.S code it links was never called.  Define
      PADLOCK_ASM on amd64 and i386, where that asm is built.
    
    - loader_attic: upstream defines OPENSSL_NO_PROVIDER_CODE; the Makefile
      had OPENSSL_NO_PROVIDER_CORE.  No source tests either name, so the
      build does not change; this only follows upstream.
    
    Found by comparing per-file compile flags against an upstream 3.5.9
    build.  Checked by preprocessing e_padlock.c for amd64 and i386:
    COMPILE_PADLOCKENG is now defined.
    
    Reviewed by:            ngie
    Event:                  FreeBSD Vendor Summit 2026
    Differential Revision:  https://reviews.freebsd.org/D61271
    
    (cherry picked from commit 56741ec70e548d9360982e3d7c48c0c6946bc16e)
---
 secure/lib/libcrypto/engines/loader_attic/Makefile | 2 +-
 secure/lib/libcrypto/engines/padlock/Makefile      | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/secure/lib/libcrypto/engines/loader_attic/Makefile b/secure/lib/libcrypto/engines/loader_attic/Makefile
index cee699eaccf6..a5fac66a8651 100644
--- a/secure/lib/libcrypto/engines/loader_attic/Makefile
+++ b/secure/lib/libcrypto/engines/loader_attic/Makefile
@@ -2,7 +2,7 @@ SHLIB_NAME?=	loader_attic.so
 
 SRCS=	e_loader_attic.c pvkfmt.c
 
-CFLAGS+=	-DOPENSSL_NO_PROVIDER_CORE
+CFLAGS+=	-DOPENSSL_NO_PROVIDER_CODE
 
 LCRYPTO_SRC=	${SRCTOP}/crypto/openssl
 
diff --git a/secure/lib/libcrypto/engines/padlock/Makefile b/secure/lib/libcrypto/engines/padlock/Makefile
index 60dfa9c77c20..e904387732d8 100644
--- a/secure/lib/libcrypto/engines/padlock/Makefile
+++ b/secure/lib/libcrypto/engines/padlock/Makefile
@@ -3,8 +3,10 @@ SHLIB_NAME?=	padlock.so
 SRCS=	e_padlock.c
 .if ${MACHINE_CPUARCH} == "amd64"
 SRCS+=	e_padlock-x86_64.S
+CFLAGS+=	-DPADLOCK_ASM
 .elif ${MACHINE_CPUARCH} == "i386"
 SRCS+=	e_padlock-x86.S
+CFLAGS+=	-DPADLOCK_ASM
 .endif
 
 LDFLAGS.bfd+=	-Wl,-znoexecstack