git: 65d8491719bb - main - secure: Adapt Makefile to ssh-sk-client everywhere

From: Jose Luis Duran <jlduran_at_FreeBSD.org>
Date: Thu, 17 Apr 2025 19:19:51 UTC
The branch main has been updated by jlduran:

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

commit 65d8491719bbc88ed45637d2381931c2d29cfe87
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2025-04-17 19:08:02 +0000
Commit:     Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2025-04-17 19:12:39 +0000

    secure: Adapt Makefile to ssh-sk-client everywhere
    
    Upstream commit 7b47b40b1 ("adapt Makefile to ssh-sk-client everywhere")
    adapted the Makefiles to ssh-sk-client.  Do the same here.
    
    Reviewed by:    emaste
    Approved by:    emaste (mentor)
    Differential Revision:  https://reviews.freebsd.org/D49795
---
 secure/lib/libssh/Makefile                | 1 -
 secure/libexec/ssh-keysign/Makefile       | 2 +-
 secure/libexec/ssh-pkcs11-helper/Makefile | 2 +-
 secure/libexec/sshd-session/Makefile      | 2 +-
 secure/ssh.mk                             | 1 +
 secure/usr.bin/ssh-add/Makefile           | 2 +-
 secure/usr.bin/ssh-agent/Makefile         | 2 +-
 secure/usr.bin/ssh-keygen/Makefile        | 3 +--
 secure/usr.bin/ssh-keyscan/Makefile       | 2 +-
 secure/usr.bin/ssh/Makefile               | 2 +-
 secure/usr.sbin/sshd/Makefile             | 3 ++-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile
index f4c60c02c9eb..39083d007675 100644
--- a/secure/lib/libssh/Makefile
+++ b/secure/lib/libssh/Makefile
@@ -38,7 +38,6 @@ SRCS=	${LIBOPENSSH_SRCS} \
 	kexsntrup761x25519.c kexmlkem768x25519.c sntrup761.c kexgen.c \
 	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
 	sshbuf-io.c
-SRCS+=	ssh-sk-client.c
 
 PACKAGE=	ssh
 
diff --git a/secure/libexec/ssh-keysign/Makefile b/secure/libexec/ssh-keysign/Makefile
index e66ed527affd..0ec54697aa81 100644
--- a/secure/libexec/ssh-keysign/Makefile
+++ b/secure/libexec/ssh-keysign/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	ssh-keysign
-SRCS=	ssh-keysign.c readconf.c uidswap.c
+SRCS=	ssh-keysign.c readconf.c uidswap.c $(SKSRCS)
 MAN=	ssh-keysign.8
 BINMODE=4555
 
diff --git a/secure/libexec/ssh-pkcs11-helper/Makefile b/secure/libexec/ssh-pkcs11-helper/Makefile
index 90b15eef26d8..9c276ef266f9 100644
--- a/secure/libexec/ssh-pkcs11-helper/Makefile
+++ b/secure/libexec/ssh-pkcs11-helper/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	ssh-pkcs11-helper
-SRCS=	ssh-pkcs11-helper.c ssh-pkcs11.c
+SRCS=	ssh-pkcs11-helper.c ssh-pkcs11.c $(SKSRCS)
 MAN=	ssh-pkcs11-helper.8
 
 LIBADD=	crypto ssh
diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile
index 81e481559189..e9e106fe90bd 100644
--- a/secure/libexec/sshd-session/Makefile
+++ b/secure/libexec/sshd-session/Makefile
@@ -15,7 +15,7 @@ SRCS=	sshd-session.c auth-rhosts.c auth-passwd.c \
 	sftp-server.c sftp-common.c \
 	sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c \
 	sandbox-seccomp-filter.c sandbox-capsicum.c sandbox-pledge.c \
-	sandbox-solaris.c uidswap.c
+	sandbox-solaris.c uidswap.c $(SKSRCS)
 PACKAGE=	ssh
 
 # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
diff --git a/secure/ssh.mk b/secure/ssh.mk
index 641343ac993a..84d9a7f57032 100644
--- a/secure/ssh.mk
+++ b/secure/ssh.mk
@@ -5,6 +5,7 @@
 SSHDIR=		${SRCTOP}/crypto/openssh
 
 SFTP_CLIENT_SRCS=sftp-common.c sftp-client.c sftp-glob.c
+SKSRCS=	ssh-sk-client.c
 
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
 
diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile
index 8de508bd6c12..c908881ca2e9 100644
--- a/secure/usr.bin/ssh-add/Makefile
+++ b/secure/usr.bin/ssh-add/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	ssh-add
-SRCS=	ssh-add.c ssh-sk-client.c
+SRCS=	ssh-add.c $(SKSRCS)
 PACKAGE=	ssh
 
 LIBADD=	ssh
diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile
index 06abc627fcd5..49d5fe77e943 100644
--- a/secure/usr.bin/ssh-agent/Makefile
+++ b/secure/usr.bin/ssh-agent/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	ssh-agent
-SRCS=	ssh-agent.c ssh-pkcs11-client.c
+SRCS=	ssh-agent.c ssh-pkcs11-client.c $(SKSRCS)
 PACKAGE=	ssh
 
 LIBADD=	crypto ssh
diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile
index 89e61e68ee55..c9205e71d219 100644
--- a/secure/usr.bin/ssh-keygen/Makefile
+++ b/secure/usr.bin/ssh-keygen/Makefile
@@ -2,8 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	ssh-keygen
-# XXX ssh-sk-client.c in libssh maybe?
-SRCS=	ssh-keygen.c sshsig.c ssh-sk-client.c
+SRCS=	ssh-keygen.c sshsig.c $(SKSRCS)
 PACKAGE=	ssh
 
 LIBADD=	crypto ssh
diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile
index baa7f54b048d..522e47411011 100644
--- a/secure/usr.bin/ssh-keyscan/Makefile
+++ b/secure/usr.bin/ssh-keyscan/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	ssh-keyscan
-SRCS=	ssh-keyscan.c
+SRCS=	ssh-keyscan.c $(SKSRCS)
 PACKAGE=	ssh
 
 LIBADD=	ssh
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index df85f47d5975..acb1fd4eaa25 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -10,7 +10,7 @@ MLINKS=	ssh.1 slogin.1
 PACKAGE=	ssh
 
 SRCS=	ssh.c readconf.c clientloop.c sshtty.c \
-	sshconnect.c sshconnect2.c mux.c
+	sshconnect.c sshconnect2.c mux.c $(SKSRCS)
 
 # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile
 SRCS+=	gss-genr.c
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index 935badfda561..e6913cd9d0d6 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -7,7 +7,8 @@ PROG=	sshd
 SRCS=	sshd.c \
 	platform-listen.c \
 	servconf.c sshpty.c srclimit.c groupaccess.c auth2-methods.c \
-	dns.c fatal.c compat.c utf8.c authfd.c canohost.c
+	dns.c fatal.c compat.c utf8.c authfd.c canohost.c \
+	$(SKSRCS)
 PACKAGE=	ssh
 
 MAN=	sshd.8 sshd_config.5