Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libfido2 Add build glue



details:   https://anonhg.NetBSD.org/src/rev/fe399a967a7e
branches:  trunk
changeset: 1007864:fe399a967a7e
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 03 00:14:17 2020 +0000

description:
Add build glue

diffstat:

 external/bsd/libfido2/Makefile                  |    7 +
 external/bsd/libfido2/Makefile.inc              |   15 +
 external/bsd/libfido2/bin/Makefile              |    7 +
 external/bsd/libfido2/bin/Makefile.inc          |    8 +
 external/bsd/libfido2/bin/fido2-assert/Makefile |   24 +++
 external/bsd/libfido2/bin/fido2-cred/Makefile   |   24 +++
 external/bsd/libfido2/bin/fido2-token/Makefile  |   22 ++
 external/bsd/libfido2/lib/Makefile              |  105 +++++++++++++
 external/bsd/libfido2/lib/fido2.map             |  186 ++++++++++++++++++++++++
 9 files changed, 398 insertions(+), 0 deletions(-)

diffs (truncated from 434 to 300 lines):

diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/Makefile    Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include <bsd.own.mk>
+
+SUBDIR= lib .WAIT bin
+
+.include <bsd.subdir.mk>
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/Makefile.inc        Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile.inc,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+DIST:=${.PARSEDIR}/dist
+
+VERS_FILE=${DIST}/CMakeLists.txt
+
+.for i in MAJOR MINOR PATCH
+FIDO_${i} != \
+    ${TOOL_SED} -ne '/FIDO_${i}/s/.*"\([0-9]*\)")$$/\1/p' ${VERS_FILE}
+.endfor
+FIDO_VERSION=${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH}
+
+CPPFLAGS+=-D_FIDO_MAJOR=${FIDO_MAJOR} -D_FIDO_MINOR=${FIDO_MINOR}
+CPPFLAGS+=-D_FIDO_PATCH=${FIDO_PATCH}
+CPPFLAGS+=-DHAVE_UNISTD_H
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/bin/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/bin/Makefile        Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,7 @@
+#      $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include <bsd.own.mk>
+
+SUBDIR=        fido2-assert fido2-cred fido2-token
+
+.include <bsd.subdir.mk>
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/bin/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/bin/Makefile.inc    Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: Makefile.inc,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include "${.PARSEDIR}/../Makefile.inc"
+
+.PATH: ${DIST}/tools ${DIST}/man ${DIST}/openbsd-compat
+
+LDADD+=-lfido2 -lcbor -lusbhid -lcrypto 
+DPADD+=${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID} ${LIBCRYPTO}
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/bin/fido2-assert/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/bin/fido2-assert/Makefile   Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,24 @@
+#      $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include <bsd.own.mk>
+
+BINDIR=/usr/bin
+
+PROG=  fido2-assert
+SRCS+=\
+assert_get.c \
+assert_verify.c \
+fido2-assert.c \
+base64.c \
+bio.c \
+credman.c \
+pin.c \
+token.c \
+util.c
+
+SRCS+=\
+explicit_bzero.c \
+readpassphrase.c \
+recallocarray.c
+
+.include <bsd.prog.mk>
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/bin/fido2-cred/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/bin/fido2-cred/Makefile     Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,24 @@
+#      $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include <bsd.own.mk>
+
+BINDIR=/usr/bin
+
+PROG=  fido2-cred
+SRCS+=\
+cred_make.c \
+cred_verify.c \
+base64.c \
+bio.c \
+credman.c \
+fido2-cred.c \
+pin.c \
+token.c \
+util.c
+
+SRCS+=\
+explicit_bzero.c \
+readpassphrase.c \
+recallocarray.c
+
+.include <bsd.prog.mk>
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/bin/fido2-token/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/bin/fido2-token/Makefile    Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,22 @@
+#      $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+.include <bsd.own.mk>
+
+BINDIR=/usr/bin
+
+PROG=  fido2-token
+SRCS+=\
+base64.c \
+bio.c \
+credman.c \
+fido2-token.c \
+pin.c \
+token.c \
+util.c
+
+SRCS+=\
+explicit_bzero.c \
+readpassphrase.c \
+recallocarray.c
+
+.include <bsd.prog.mk>
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/lib/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/lib/Makefile        Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,105 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 00:14:17 christos Exp $
+
+NOLINT=
+.include <bsd.own.mk>
+.include <bsd.init.mk>
+
+.PATH: ${DIST}/src ${DIST}/man ${DIST}/openbsd-compat
+
+CPPFLAGS+= -DHAVE_ARC4RANDOM_BUF -D_FIDO_INTERNAL -I${DIST}/src
+
+LDADD+=-lusbhid -lcbor
+DPADD+=${LIBUSBHID} ${LIBCBOR}
+
+LDFLAGS+=-Wl,--version-script=${.CURDIR}/fido2.map
+
+LIB=    fido2
+
+SRCS+= \
+aes256.c \
+assert.c \
+authkey.c \
+bio.c \
+blob.c \
+buf.c \
+cbor.c \
+cred.c \
+credman.c \
+dev.c \
+ecdh.c \
+eddsa.c \
+err.c \
+es256.c \
+hid.c \
+hid_openbsd.c \
+info.c \
+io.c \
+iso7816.c \
+log.c \
+pin.c \
+reset.c \
+rs256.c \
+u2f.c
+
+SRCS+= \
+explicit_bzero.c \
+recallocarray.c \
+timingsafe_bcmp.c
+
+INCS+= \
+fido.h \
+fido/bio.h \
+fido/credman.h \
+fido/eddsa.h \
+fido/err.h \
+fido/es256.h \
+fido/param.h \
+fido/rs256.h \
+fido/types.h
+
+INCSDIR=/usr/include
+
+MAN+= \
+eddsa_pk_new.3 \
+es256_pk_new.3 \
+fido_assert_allow_cred.3 \
+fido_assert_new.3 \
+fido_assert_set_authdata.3 \
+fido_assert_verify.3 \
+fido_bio_dev_get_info.3 \
+fido_bio_enroll_new.3 \
+fido_bio_info_new.3 \
+fido_bio_template.3 \
+fido_cbor_info_new.3 \
+fido_cred_exclude.3 \
+fido_cred_new.3 \
+fido_cred_set_authdata.3 \
+fido_cred_verify.3 \
+fido_credman_metadata_new.3 \
+fido_dev_get_assert.3 \
+fido_dev_info_manifest.3 \
+fido_dev_make_cred.3 \
+fido_dev_open.3 \
+fido_dev_set_io_functions.3 \
+fido_dev_set_pin.3 \
+fido_init.3 \
+fido_strerr.3 \
+rs256_pk_new.3
+
+SHLIB_MAJOR=2
+SHLIB_MINOR=0
+
+.SUFFIXES: .in
+.in:
+       ${TOOL_SED} \
+               -e s%@CMAKE_INSTALL_PREFIX@%/usr% \
+               -e s%@CMAKE_INSTALL_LIBDIR@%lib% \
+               -e s%@PROJECT_NAME@%libfido2% \
+               -e s%@FIDO_VERSION@%${FIDO_VERSION}% \
+               < ${.ALLSRC} > ${.TARGET}
+
+FILESDIR=/usr/lib/pkgconfig
+FILES+=libfido2.pc
+FILESBUILD_libfido2.pc=yes
+
+.include <bsd.lib.mk>
diff -r 44178905b8ef -r fe399a967a7e external/bsd/libfido2/lib/fido2.map
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libfido2/lib/fido2.map       Tue Mar 03 00:14:17 2020 +0000
@@ -0,0 +1,186 @@
+FIDO_2_0 {
+    global:
+       eddsa_pk_free;
+       eddsa_pk_from_EVP_PKEY;
+       eddsa_pk_from_ptr;
+       eddsa_pk_new;
+       eddsa_pk_to_EVP_PKEY;
+       es256_pk_free;
+       es256_pk_from_EC_KEY;
+       es256_pk_from_ptr;
+       es256_pk_new;
+       es256_pk_to_EVP_PKEY;
+       fido_assert_allow_cred;
+       fido_assert_authdata_len;
+       fido_assert_authdata_ptr;
+       fido_assert_clientdata_hash_len;
+       fido_assert_clientdata_hash_ptr;
+       fido_assert_count;
+       fido_assert_flags;
+       fido_assert_free;
+       fido_assert_hmac_secret_len;
+       fido_assert_hmac_secret_ptr;
+       fido_assert_id_len;
+       fido_assert_id_ptr;
+       fido_assert_new;
+       fido_assert_rp_id;
+       fido_assert_set_authdata;
+       fido_assert_set_authdata_raw;
+       fido_assert_set_clientdata_hash;
+       fido_assert_set_count;
+       fido_assert_set_extensions;
+       fido_assert_set_hmac_salt;
+       fido_assert_set_options;
+       fido_assert_set_rp;
+       fido_assert_set_sig;
+       fido_assert_set_up;
+       fido_assert_set_uv;
+       fido_assert_sigcount;
+       fido_assert_sig_len;
+       fido_assert_sig_ptr;
+       fido_assert_user_display_name;
+       fido_assert_user_icon;
+       fido_assert_user_id_len;
+       fido_assert_user_id_ptr;
+       fido_assert_user_name;
+       fido_assert_verify;
+       fido_bio_dev_enroll_begin;
+       fido_bio_dev_enroll_cancel;
+       fido_bio_dev_enroll_continue;
+       fido_bio_dev_enroll_remove;
+       fido_bio_dev_get_info;
+       fido_bio_dev_get_template_array;



Home | Main Index | Thread Index | Old Index