git: 925f15731e34 - main - loader: Make pkcs5v2 unconditionally available

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 22 Sep 2024 07:36:45 UTC
The branch main has been updated by cperciva:

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

commit 925f15731e3480fe80f580a2f7463cb5210a95c8
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-09-18 11:02:08 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-09-22 07:35:47 +0000

    loader: Make pkcs5v2 unconditionally available
    
    This was previously only available if GELI support was included, but I
    want to use it for processing entropy from EFI
    
    Reviewed by:    imp
    MFC after:      1 week
    Sponsored by:   Amazon
    Differential Revision:  https://reviews.freebsd.org/D46634
---
 stand/libsa/Makefile          | 4 ++++
 stand/libsa/geli/Makefile.inc | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index c5de2c9b8e13..dda3bfcea88f 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -164,6 +164,10 @@ CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2  -DBZ_NO_STDIO -DBZ_NO_COMPRESS
 .PATH: ${SYSDIR}/libkern
 SRCS+=  explicit_bzero.c crc32_libkern.c
 
+# Bits from GELI which are reused elsewhere
+.PATH: ${SYSDIR}/geom/eli
+SRCS+=	g_eli_hmac.c pkcs5v2.c
+
 # Maybe GELI
 .if ${MK_LOADER_GELI} == "yes"
 .include "${SASRC}/geli/Makefile.inc"
diff --git a/stand/libsa/geli/Makefile.inc b/stand/libsa/geli/Makefile.inc
index 07600d5287bd..8300359a465a 100644
--- a/stand/libsa/geli/Makefile.inc
+++ b/stand/libsa/geli/Makefile.inc
@@ -21,10 +21,8 @@ SRCS+=		${i}
 .endfor
 SRCS+=		geliboot.c \
 		geliboot_crypto.c \
-		g_eli_hmac.c \
 		g_eli_key.c \
 		g_eli_key_cache.c \
-		pkcs5v2.c \
 
 # aes
 .PATH:		${SYSDIR}/opencrypto