diff options
author | Jeremy Stott <jeremy@stott.co.nz> | 2024-10-19 01:10:52 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-11-28 17:15:49 +0100 |
commit | ca0697a90e5720ba4d76cb0ae9d5572b5260a16c (patch) | |
tree | 63265622e117c921db998b0f81231ff7e005b3e0 /Makefile.in | |
parent | mdoc2man: balance nested square brackets (diff) | |
download | openssh-ca0697a90e5720ba4d76cb0ae9d5572b5260a16c.tar.xz openssh-ca0697a90e5720ba4d76cb0ae9d5572b5260a16c.zip |
Add make target for standalone sk-libfido2
Add a Makefile target for sk-libfido2, the standalone fido2 security
key shared library, suitable for use with the SecurityKeyProvider
option.
Add a new configure option `--with-security-key-standalone` that
optionally sets the shared library target sk-libfido2$(SHLIBEXT), and
adds it to $(TARGETS).
misc.h is required when SK_STANDALONE is defined, because of the use
of `monotime_tv` in `sk_select_by_touch`.
Sets the shared library extension for sk-libfido2 is by setting
`SHLIBEXT` depending on the platform in configure.ac.
Add the shared library to the CI builds in the `sk` target config to
make sure it can compile under the same conditions as
`--with-security-key-builtin`.
Add a libssh-pic.a static library that compiles with `-fPIC` reusing
.c.lo method in sk-dummy.so for use in the shared library sk-libfido2.
Note, a separate static library libssh-pic.a is needed, since defining
-DSK_STANDALONE excludes some symbols needed in sshkey.lo.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 43cc2c385..389e5d9cb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,6 +33,7 @@ SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ STRIP_OPT=@STRIP_OPT@ TEST_SHELL=@TEST_SHELL@ BUILDDIR=@abs_top_builddir@ +SK_STANDALONE=@SK_STANDALONE@ PATHS= -DSSHDIR=\"$(sysconfdir)\" \ -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ @@ -73,7 +74,7 @@ MKDIR_P=@MKDIR_P@ .SUFFIXES: .lo -TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) sshd-auth$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT) +TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) sshd-auth$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT) $(SK_STANDALONE) XMSS_OBJS=\ ssh-xmss.o \ @@ -272,6 +273,16 @@ sftp$(EXEEXT): $(LIBCOMPAT) libssh.a $(SFTP_OBJS) logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) +# compile libssh objects with -fPIC for use in the sk_libfido2 shared library +LIBSSH_PIC_OBJS=$(LIBSSH_OBJS:.o=.lo) +libssh-pic.a: $(LIBSSH_PIC_OBJS) + $(AR) rv $@ $(LIBSSH_PIC_OBJS) + $(RANLIB) $@ + +$(SK_STANDALONE): sk-usbhid.c $(LIBCOMPAT) libssh-pic.a + $(CC) -o $@ -shared $(CFLAGS_NOPIE) $(CPPFLAGS) -DSK_STANDALONE $(PICFLAG) sk-usbhid.c \ + libssh-pic.a $(LDFLAGS_NOPIE) -lopenbsd-compat $(LIBS) $(LIBFIDO2) $(CHANNELLIBS) + $(MANPAGES): $(MANPAGES_IN) if test "$(MANTYPE)" = "cat"; then \ manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \ |