git: 2ccfa855b2fc - main - libfido2: update to 1.13.0

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Tue, 19 Sep 2023 17:07:58 UTC
The branch main has been updated by emaste:

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

commit 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e
Merge: 1843dfb05ed8 00db45a65823
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-09-19 17:06:12 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-09-19 17:06:12 +0000

    libfido2: update to 1.13.0
    
    Some highlights from NEWS entries:
    
     ** Improved OpenSSL 3.0 compatibility.
     ** Support for hidraw(4) on FreeBSD; gh#597.
     ** Improved support for FIDO 2.1 authenticators.
    
    PR:             273596
    Relnotes:       Yes
    Sponsored by:   The FreeBSD Foundation

 contrib/libfido2/CMakeLists.txt                  | 142 ++++++--
 contrib/libfido2/LICENSE                         |   4 +-
 contrib/libfido2/NEWS                            |  41 +++
 contrib/libfido2/README.adoc                     | 114 +++++--
 contrib/libfido2/examples/CMakeLists.txt         |  12 +-
 contrib/libfido2/examples/README.adoc            |  17 +-
 contrib/libfido2/examples/assert.c               |  33 +-
 contrib/libfido2/examples/cred.c                 |  29 +-
 contrib/libfido2/examples/extern.h               |   8 +-
 contrib/libfido2/examples/info.c                 | 101 +++++-
 contrib/libfido2/examples/manifest.c             |   1 +
 contrib/libfido2/examples/reset.c                |   1 +
 contrib/libfido2/examples/retries.c              |   3 +-
 contrib/libfido2/examples/select.c               |   5 +-
 contrib/libfido2/examples/setpin.c               |   3 +-
 contrib/libfido2/examples/util.c                 |  65 +++-
 contrib/libfido2/fuzz/CMakeLists.txt             |  55 ++-
 contrib/libfido2/fuzz/Dockerfile                 |  22 +-
 contrib/libfido2/fuzz/Makefile                   |  35 +-
 contrib/libfido2/fuzz/README                     |  22 +-
 contrib/libfido2/fuzz/build-coverage             |   7 +-
 contrib/libfido2/fuzz/clock.c                    |   1 +
 contrib/libfido2/fuzz/dummy.h                    |   5 +-
 contrib/libfido2/fuzz/export.gnu                 |  32 +-
 contrib/libfido2/fuzz/functions.txt              | 404 ++++++++++++++---------
 contrib/libfido2/fuzz/fuzz_assert.c              |  43 ++-
 contrib/libfido2/fuzz/fuzz_bio.c                 |   5 +-
 contrib/libfido2/fuzz/fuzz_cred.c                |  10 +-
 contrib/libfido2/fuzz/fuzz_credman.c             |   5 +-
 contrib/libfido2/fuzz/fuzz_hid.c                 |   5 +-
 contrib/libfido2/fuzz/fuzz_largeblob.c           |   5 +-
 contrib/libfido2/fuzz/fuzz_mgmt.c                |  34 +-
 contrib/libfido2/fuzz/fuzz_netlink.c             |   5 +-
 contrib/libfido2/fuzz/fuzz_pcsc.c                | 269 +++++++++++++++
 contrib/libfido2/fuzz/libfuzzer.c                |  61 +++-
 contrib/libfido2/fuzz/mutator_aux.c              |  21 +-
 contrib/libfido2/fuzz/mutator_aux.h              |  22 +-
 contrib/libfido2/fuzz/pcsc.c                     | 153 +++++++++
 contrib/libfido2/fuzz/preload-fuzz.c             |   1 +
 contrib/libfido2/fuzz/preload-snoop.c            |   1 +
 contrib/libfido2/fuzz/report.tgz                 | Bin 323706 -> 357005 bytes
 contrib/libfido2/fuzz/summary.txt                |  77 +++--
 contrib/libfido2/fuzz/udev.c                     |   3 +-
 contrib/libfido2/fuzz/wiredata_fido2.h           |  77 ++++-
 contrib/libfido2/fuzz/wiredata_u2f.h             |   1 +
 contrib/libfido2/fuzz/wrap.c                     |  67 +++-
 contrib/libfido2/fuzz/wrapped.sym                |  10 +
 contrib/libfido2/man/CMakeLists.txt              |  53 ++-
 contrib/libfido2/man/check.sh                    |   1 +
 contrib/libfido2/man/eddsa_pk_new.3              |  32 +-
 contrib/libfido2/man/es256_pk_new.3              |  32 +-
 contrib/libfido2/man/es384_pk_new.3              | 164 +++++++++
 contrib/libfido2/man/fido2-assert.1              |  27 +-
 contrib/libfido2/man/fido2-cred.1                |  27 +-
 contrib/libfido2/man/fido2-token.1               |  51 ++-
 contrib/libfido2/man/fido_assert_allow_cred.3    |  45 ++-
 contrib/libfido2/man/fido_assert_new.3           |  37 ++-
 contrib/libfido2/man/fido_assert_set_authdata.3  |  33 +-
 contrib/libfido2/man/fido_assert_verify.3        |  33 +-
 contrib/libfido2/man/fido_bio_dev_get_info.3     |  27 +-
 contrib/libfido2/man/fido_bio_enroll_new.3       |  27 +-
 contrib/libfido2/man/fido_bio_info_new.3         |  27 +-
 contrib/libfido2/man/fido_bio_template.3         |  27 +-
 contrib/libfido2/man/fido_cbor_info_new.3        | 169 +++++++++-
 contrib/libfido2/man/fido_cred_exclude.3         |  45 ++-
 contrib/libfido2/man/fido_cred_new.3             |  29 +-
 contrib/libfido2/man/fido_cred_set_authdata.3    |  46 ++-
 contrib/libfido2/man/fido_cred_verify.3          |  27 +-
 contrib/libfido2/man/fido_credman_metadata_new.3 |  27 +-
 contrib/libfido2/man/fido_dev_enable_entattest.3 |  38 ++-
 contrib/libfido2/man/fido_dev_get_assert.3       |  27 +-
 contrib/libfido2/man/fido_dev_get_touch_begin.3  |  27 +-
 contrib/libfido2/man/fido_dev_info_manifest.3    |  31 +-
 contrib/libfido2/man/fido_dev_largeblob_get.3    |  34 +-
 contrib/libfido2/man/fido_dev_make_cred.3        |  27 +-
 contrib/libfido2/man/fido_dev_open.3             |  27 +-
 contrib/libfido2/man/fido_dev_set_io_functions.3 |  27 +-
 contrib/libfido2/man/fido_dev_set_pin.3          |  29 +-
 contrib/libfido2/man/fido_init.3                 |  27 +-
 contrib/libfido2/man/fido_strerr.3               |  27 +-
 contrib/libfido2/man/rs256_pk_new.3              |  32 +-
 contrib/libfido2/openbsd-compat/bsd-asprintf.c   |  88 +++++
 contrib/libfido2/openbsd-compat/clock_gettime.c  |   1 +
 contrib/libfido2/openbsd-compat/endian_win32.c   |   1 +
 contrib/libfido2/openbsd-compat/openbsd-compat.h |   5 +
 contrib/libfido2/regress/CMakeLists.txt          |  57 +++-
 contrib/libfido2/regress/assert.c                |  14 +-
 contrib/libfido2/regress/compress.c              | 268 +++++++++++++++
 contrib/libfido2/regress/cred.c                  |  15 +-
 contrib/libfido2/regress/dev.c                   |  43 ++-
 contrib/libfido2/regress/eddsa.c                 | 159 +++++++++
 contrib/libfido2/regress/es256.c                 | 199 +++++++++++
 contrib/libfido2/regress/es384.c                 | 213 ++++++++++++
 contrib/libfido2/regress/rs256.c                 | 201 +++++++++++
 contrib/libfido2/src/CMakeLists.txt              |  31 +-
 contrib/libfido2/src/aes256.c                    |   1 +
 contrib/libfido2/src/assert.c                    | 206 ++++++++----
 contrib/libfido2/src/authkey.c                   |  26 +-
 contrib/libfido2/src/bio.c                       | 116 ++++---
 contrib/libfido2/src/blob.c                      |   1 +
 contrib/libfido2/src/blob.h                      |   1 +
 contrib/libfido2/src/buf.c                       |   1 +
 contrib/libfido2/src/cbor.c                      |  52 ++-
 contrib/libfido2/src/compress.c                  | 145 +++++++-
 contrib/libfido2/src/config.c                    |  28 +-
 contrib/libfido2/src/cred.c                      |  45 ++-
 contrib/libfido2/src/credman.c                   | 162 +++++----
 contrib/libfido2/src/dev.c                       | 229 +++----------
 contrib/libfido2/src/diff_exports.sh             |   1 +
 contrib/libfido2/src/ecdh.c                      |   1 +
 contrib/libfido2/src/eddsa.c                     |  14 +-
 contrib/libfido2/src/err.c                       |   1 +
 contrib/libfido2/src/es256.c                     |  66 ++--
 contrib/libfido2/src/es384.c                     | 296 +++++++++++++++++
 contrib/libfido2/src/export.gnu                  |  22 +-
 contrib/libfido2/src/export.llvm                 |  22 +-
 contrib/libfido2/src/export.msvc                 |  22 +-
 contrib/libfido2/src/extern.h                    |  30 +-
 contrib/libfido2/src/fallthrough.h               |  21 ++
 contrib/libfido2/src/fido.h                      |  46 ++-
 contrib/libfido2/src/fido/bio.h                  |  26 +-
 contrib/libfido2/src/fido/config.h               |  26 +-
 contrib/libfido2/src/fido/credman.h              |  26 +-
 contrib/libfido2/src/fido/eddsa.h                |  28 +-
 contrib/libfido2/src/fido/err.h                  |  26 +-
 contrib/libfido2/src/fido/es256.h                |  26 +-
 contrib/libfido2/src/fido/es384.h                |  59 ++++
 contrib/libfido2/src/fido/param.h                |  57 +++-
 contrib/libfido2/src/fido/rs256.h                |  26 +-
 contrib/libfido2/src/fido/types.h                |  78 ++++-
 contrib/libfido2/src/hid.c                       |   1 +
 contrib/libfido2/src/hid_freebsd.c               |   1 +
 contrib/libfido2/src/hid_hidapi.c                |  13 +-
 contrib/libfido2/src/hid_linux.c                 |  50 ++-
 contrib/libfido2/src/hid_netbsd.c                |   1 +
 contrib/libfido2/src/hid_openbsd.c               | 101 +++---
 contrib/libfido2/src/hid_osx.c                   |  26 +-
 contrib/libfido2/src/hid_unix.c                  |   1 +
 contrib/libfido2/src/hid_win.c                   |   5 +-
 contrib/libfido2/src/info.c                      | 171 +++++++++-
 contrib/libfido2/src/io.c                        |  26 +-
 contrib/libfido2/src/iso7816.c                   |   1 +
 contrib/libfido2/src/iso7816.h                   |   1 +
 contrib/libfido2/src/largeblob.c                 |  34 +-
 contrib/libfido2/src/log.c                       |   1 +
 contrib/libfido2/src/netlink.c                   |   1 +
 contrib/libfido2/src/netlink.h                   |   1 +
 contrib/libfido2/src/nfc.c                       | 350 ++++++++++++++++++++
 contrib/libfido2/src/nfc_linux.c                 | 387 +++-------------------
 contrib/libfido2/src/packed.h                    |   1 +
 contrib/libfido2/src/pcsc.c                      | 394 ++++++++++++++++++++++
 contrib/libfido2/src/pin.c                       |  77 +++--
 contrib/libfido2/src/random.c                    |   1 +
 contrib/libfido2/src/reset.c                     |   1 +
 contrib/libfido2/src/rs1.c                       |   3 +-
 contrib/libfido2/src/rs256.c                     |  29 +-
 contrib/libfido2/src/time.c                      |   1 +
 contrib/libfido2/src/touch.c                     | 109 ++++++
 contrib/libfido2/src/tpm.c                       |   3 +-
 contrib/libfido2/src/types.c                     |  17 +-
 contrib/libfido2/src/u2f.c                       |  93 ++++--
 contrib/libfido2/src/util.c                      |  31 ++
 contrib/libfido2/src/webauthn.h                  |  75 ++++-
 contrib/libfido2/src/winhello.c                  | 122 +++++--
 contrib/libfido2/tools/CMakeLists.txt            |  12 +-
 contrib/libfido2/tools/assert_get.c              |   7 +-
 contrib/libfido2/tools/assert_verify.c           |  30 +-
 contrib/libfido2/tools/base64.c                  |   1 +
 contrib/libfido2/tools/bio.c                     |   1 +
 contrib/libfido2/tools/config.c                  |   1 +
 contrib/libfido2/tools/cred_make.c               |   7 +-
 contrib/libfido2/tools/cred_verify.c             |   1 +
 contrib/libfido2/tools/credman.c                 |   1 +
 contrib/libfido2/tools/extern.h                  |   4 +-
 contrib/libfido2/tools/fido2-assert.c            |   1 +
 contrib/libfido2/tools/fido2-attach.sh           |   1 +
 contrib/libfido2/tools/fido2-cred.c              |   1 +
 contrib/libfido2/tools/fido2-detach.sh           |   1 +
 contrib/libfido2/tools/fido2-token.c             |   1 +
 contrib/libfido2/tools/fido2-unprot.sh           |   1 +
 contrib/libfido2/tools/include_check.sh          |   1 +
 contrib/libfido2/tools/largeblob.c               |  59 +++-
 contrib/libfido2/tools/pin.c                     |  26 +-
 contrib/libfido2/tools/test.sh                   |  46 +--
 contrib/libfido2/tools/token.c                   | 159 ++++++++-
 contrib/libfido2/tools/util.c                    |  70 +++-
 contrib/libfido2/udev/70-u2f.rules               |  39 ++-
 contrib/libfido2/udev/CMakeLists.txt             |   1 +
 contrib/libfido2/udev/check.sh                   |   1 +
 contrib/libfido2/udev/fidodevs                   |   3 +
 contrib/libfido2/udev/genrules.awk               |  32 +-
 contrib/libfido2/windows/build.ps1               |  32 +-
 contrib/libfido2/windows/const.ps1               |  14 +-
 contrib/libfido2/windows/cygwin.ps1              |   2 +
 contrib/libfido2/windows/release.ps1             |  30 +-
 lib/libfido2/Makefile                            |   6 +-
 196 files changed, 7592 insertions(+), 1733 deletions(-)

diff --cc contrib/libfido2/fuzz/fuzz_pcsc.c
index 000000000000,cf6210b71be5..cf6210b71be5
mode 000000,100644..100644
--- a/contrib/libfido2/fuzz/fuzz_pcsc.c
+++ b/contrib/libfido2/fuzz/fuzz_pcsc.c
diff --cc contrib/libfido2/fuzz/pcsc.c
index 000000000000,f6a3e9bdd773..f6a3e9bdd773
mode 000000,100644..100644
--- a/contrib/libfido2/fuzz/pcsc.c
+++ b/contrib/libfido2/fuzz/pcsc.c
diff --cc contrib/libfido2/fuzz/report.tgz
index d78f4628de59,e984ee9dc765..e984ee9dc765
Binary files differ
diff --cc contrib/libfido2/man/es384_pk_new.3
index 000000000000,e865913b7807..e865913b7807
mode 000000,100644..100644
--- a/contrib/libfido2/man/es384_pk_new.3
+++ b/contrib/libfido2/man/es384_pk_new.3
diff --cc contrib/libfido2/openbsd-compat/bsd-asprintf.c
index 000000000000,fbcb8679258f..fbcb8679258f
mode 000000,100644..100644
--- a/contrib/libfido2/openbsd-compat/bsd-asprintf.c
+++ b/contrib/libfido2/openbsd-compat/bsd-asprintf.c
diff --cc contrib/libfido2/regress/compress.c
index 000000000000,7afc8bb339a7..7afc8bb339a7
mode 000000,100644..100644
--- a/contrib/libfido2/regress/compress.c
+++ b/contrib/libfido2/regress/compress.c
diff --cc contrib/libfido2/regress/eddsa.c
index 000000000000,06236987ed17..06236987ed17
mode 000000,100644..100644
--- a/contrib/libfido2/regress/eddsa.c
+++ b/contrib/libfido2/regress/eddsa.c
diff --cc contrib/libfido2/regress/es256.c
index 000000000000,3a62a415977e..3a62a415977e
mode 000000,100644..100644
--- a/contrib/libfido2/regress/es256.c
+++ b/contrib/libfido2/regress/es256.c
diff --cc contrib/libfido2/regress/es384.c
index 000000000000,b55ce015e17a..b55ce015e17a
mode 000000,100644..100644
--- a/contrib/libfido2/regress/es384.c
+++ b/contrib/libfido2/regress/es384.c
diff --cc contrib/libfido2/regress/rs256.c
index 000000000000,799396f07a02..799396f07a02
mode 000000,100644..100644
--- a/contrib/libfido2/regress/rs256.c
+++ b/contrib/libfido2/regress/rs256.c
diff --cc contrib/libfido2/src/es384.c
index 000000000000,013d285ef7f0..013d285ef7f0
mode 000000,100644..100644
--- a/contrib/libfido2/src/es384.c
+++ b/contrib/libfido2/src/es384.c
diff --cc contrib/libfido2/src/fallthrough.h
index 000000000000,bdfd30fd63eb..bdfd30fd63eb
mode 000000,100644..100644
--- a/contrib/libfido2/src/fallthrough.h
+++ b/contrib/libfido2/src/fallthrough.h
diff --cc contrib/libfido2/src/fido/es384.h
index 000000000000,b4b4ca71ccbe..b4b4ca71ccbe
mode 000000,100644..100644
--- a/contrib/libfido2/src/fido/es384.h
+++ b/contrib/libfido2/src/fido/es384.h
diff --cc contrib/libfido2/src/nfc.c
index 000000000000,2e97d5fc50da..2e97d5fc50da
mode 000000,100644..100644
--- a/contrib/libfido2/src/nfc.c
+++ b/contrib/libfido2/src/nfc.c
diff --cc contrib/libfido2/src/pcsc.c
index 000000000000,d7bd6c65ed60..d7bd6c65ed60
mode 000000,100644..100644
--- a/contrib/libfido2/src/pcsc.c
+++ b/contrib/libfido2/src/pcsc.c
diff --cc contrib/libfido2/src/touch.c
index 000000000000,6844e2c2dbc0..6844e2c2dbc0
mode 000000,100644..100644
--- a/contrib/libfido2/src/touch.c
+++ b/contrib/libfido2/src/touch.c
diff --cc contrib/libfido2/src/util.c
index 000000000000,25281bb51b28..25281bb51b28
mode 000000,100644..100644
--- a/contrib/libfido2/src/util.c
+++ b/contrib/libfido2/src/util.c
diff --cc lib/libfido2/Makefile
index 86ac1153f384,000000000000..dc985e2797ed
mode 100644,000000..100644
--- a/lib/libfido2/Makefile
+++ b/lib/libfido2/Makefile
@@@ -1,78 -1,0 +1,82 @@@
 +PACKAGE=ssh
 +LIB=	fido2
 +PRIVATELIB=
 +DIST=	${SRCTOP}/contrib/libfido2
 +
 +.PATH:	${DIST}/src ${DIST}
 +
 +SRCS+=	aes256.c
 +SRCS+=	assert.c
 +SRCS+=	authkey.c
 +SRCS+=	bio.c
 +SRCS+=	blob.c
 +SRCS+=	buf.c
 +SRCS+=	cbor.c
 +SRCS+=	compress.c
 +SRCS+=	config.c
 +SRCS+=	cred.c
 +SRCS+=	credman.c
 +SRCS+=	dev.c
 +SRCS+=	ecdh.c
 +SRCS+=	eddsa.c
 +SRCS+=	err.c
 +SRCS+=	es256.c
++SRCS+=	es384.c
 +SRCS+=	hid_freebsd.c
 +SRCS+=	hid_unix.c
 +SRCS+=	hid.c
 +SRCS+=	info.c
 +SRCS+=	io.c
 +SRCS+=	iso7816.c
 +SRCS+=	largeblob.c
 +SRCS+=	log.c
 +SRCS+=	pin.c
 +SRCS+=	random.c
 +SRCS+=	reset.c
 +SRCS+=	rs1.c
 +SRCS+=	rs256.c
 +SRCS+=	time.c
++SRCS+=	touch.c
 +SRCS+=	tpm.c
 +SRCS+=	types.c
 +SRCS+=	u2f.c
++SRCS+=	util.c
 +
 +SRCS+=	openbsd-compat/freezero.c
 +SRCS+=	openbsd-compat/recallocarray.c
 +
 +CFLAGS+= -I ${DIST}/src -I${SRCTOP}/contrib/libcbor/src -I${.CURDIR}/../libcbor
 +CFLAGS+= -D_FIDO_INTERNAL
 +CFLAGS+= -DHAVE_ARC4RANDOM_BUF
++CFLAGS+= -DHAVE_ASPRINTF
 +CFLAGS+= -DHAVE_CLOCK_GETTIME
 +CFLAGS+= -DHAVE_DEV_URANDOM
 +CFLAGS+= -DHAVE_ERR_H
 +CFLAGS+= -DHAVE_EXPLICIT_BZERO
 +CFLAGS+= -DHAVE_GETLINE
 +CFLAGS+= -DHAVE_GETOPT
 +CFLAGS+= -DHAVE_GETPAGESIZE
 +CFLAGS+= -DHAVE_GETRANDOM
 +CFLAGS+= -DHAVE_OPENSSLV_H
 +CFLAGS+= -DHAVE_READPASSPHRASE
 +CFLAGS+= -DHAVE_SIGNAL_H
 +CFLAGS+= -DHAVE_STRLCAT
 +CFLAGS+= -DHAVE_STRLCPY
 +CFLAGS+= -DHAVE_STRSEP
 +CFLAGS+= -DHAVE_SYSCONF
 +CFLAGS+= -DHAVE_SYS_RANDOM_H
 +CFLAGS+= -DHAVE_TIMESPECSUB
 +CFLAGS+= -DHAVE_TIMINGSAFE_BCMP
 +CFLAGS+= -DHAVE_UNISTD_H
 +CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L
 +CFLAGS+= -DTLS=__thread
 +CFLAGS+= -D_FIDO_MAJOR=1
- CFLAGS+= -D_FIDO_MINOR=10
++CFLAGS+= -D_FIDO_MINOR=13
 +CFLAGS+= -D_FIDO_PATCH=0
 +
 +LIBADD=	crypto z
 +
 +WARNS=2
 +MAN=
 +
 +.include <bsd.lib.mk>