From nobody Wed Jan 01 21:11:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YNjFL42WGz5jCgL; Wed, 01 Jan 2025 21:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YNjFL3Zdsz4jn5; Wed, 1 Jan 2025 21:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735765894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQVBtDeAsu8YHv6zI961qHEpTnF0DC9FC4ePouNL0eI=; b=SJPOcA8rPI76nHzt/qQ+klu77jCM+eDwy27UWFkdgI73I7kDr6ZYkpQ85c1cXQ7lxZ0db5 YVwD7VD7wJzDZTbcXW6G9p6ug16u6/DPN4KjH0Ng4NAgqgjnLR45k/POmP6ldCnDxl32UQ OJtn9m03ACO3rqqDFbglpo+Q3bZiuQHGE5ivYVF0ERHfJ3LKss3qj6tMxpVhWlfPopwWG6 UcZi/AdykfKfYPpIUIENGRwCex2Uiy8COXZRti4DX2v7vH4f+AUNOW3a9gxU96Kbcs+Tug P/QH2rudxdwEpJR6rQ+sYNAXGdFW1BP/tiTQ01Eth7QdbtgUUZ0CyymcrC3XPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735765894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQVBtDeAsu8YHv6zI961qHEpTnF0DC9FC4ePouNL0eI=; b=dlpSULHNelpZDP2zKbvGuF4hb7bGOL08SzaObXFeEe/YMLOpwJD8bhm6uVe+1TVTcfoNeL JmAXK2ZcUR0JDsAcp5r8+MhRaLDX4VPgtDQLzi9GEix5V37LgiygvrnDYshDBL5a0WFWq/ r/J/kJZVUf205ok5Oae3SOARkgUGJwjPwik6lr1oGwo6YzSMdH0wxo/sQouz7YmehAAg1b AQRveB9ghTPJiJ8mz/MdT+pQdZDkf8zow36vPXY12ojx+9ldyxEr4x0PXJ6427zEpMYzKP Cgtez6tNsCpv87GGS8HPePljBRbKmgpBAO16pnUodtrIIZt/lRekfG7xukSLzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735765894; a=rsa-sha256; cv=none; b=uI8RwuxP/emXqS4PGn/gSXNPxo9txjJJbnlSEvqKZXLAnGAwpVT7Mw9WIMs7A3cRZolnwu Ij7jZeGe1bX5c0tqKpM0wVF8bE2pHmTuMpRVuE2OD04/z7SM6LfJXKhFH7GLwhfi8cXUIR OP0iMMg/iKvD9yDCbnABiIulTu6SgcxaGVF0O1XjlaS4pLO0Y0RFtD016oXiRELklGIJmZ Ypfrv/0w87LSPbJsZh1un1YS8QgIGvzYkYDbbr7No3lAggr9Q6tRQPLzI6MgUQD7UFcBsp Tdo5gfKoiTtM6BgITvIihVO77XqNc05RizukBJ1nPrrGGVpaS18N4P11pSKgxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YNjFL39cdzgGQ; Wed, 1 Jan 2025 21:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 501LBYHJ079829; Wed, 1 Jan 2025 21:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 501LBYYE079826; Wed, 1 Jan 2025 21:11:34 GMT (envelope-from git) Date: Wed, 1 Jan 2025 21:11:34 GMT Message-Id: <202501012111.501LBYYE079826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 35c0a8c449fd - main - Add 'contrib/libder/' from commit '9c40c4de4c33b2ba1124fb752ebea0bebaa6013f' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35c0a8c449fd2b7f75029ebed5e10852240f0865 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=35c0a8c449fd2b7f75029ebed5e10852240f0865 commit 35c0a8c449fd2b7f75029ebed5e10852240f0865 Merge: d11904b35021 9c40c4de4c33 Author: Kyle Evans AuthorDate: 2025-01-01 21:11:02 +0000 Commit: Kyle Evans CommitDate: 2025-01-01 21:11:02 +0000 Add 'contrib/libder/' from commit '9c40c4de4c33b2ba1124fb752ebea0bebaa6013f' git-subtree-dir: contrib/libder git-subtree-mainline: d11904b350214943dedb64c7121d4602799d7afd git-subtree-split: 9c40c4de4c33b2ba1124fb752ebea0bebaa6013f contrib/libder/.cirrus.yml | 16 + contrib/libder/.github/workflows/build.yml | 41 + contrib/libder/.gitignore | 11 + contrib/libder/CMakeLists.txt | 28 + contrib/libder/LICENSE | 22 + contrib/libder/README.md | 28 + contrib/libder/derdump/.gitignore | 1 + contrib/libder/derdump/CMakeLists.txt | 6 + contrib/libder/derdump/derdump.1 | 51 ++ contrib/libder/derdump/derdump.c | 52 ++ contrib/libder/libder/CMakeLists.txt | 12 + contrib/libder/libder/libder.3 | 179 +++++ contrib/libder/libder/libder.c | 119 +++ contrib/libder/libder/libder.h | 181 +++++ contrib/libder/libder/libder_error.c | 76 ++ contrib/libder/libder/libder_obj.3 | 138 ++++ contrib/libder/libder/libder_obj.c | 1192 ++++++++++++++++++++++++++++ contrib/libder/libder/libder_private.h | 178 +++++ contrib/libder/libder/libder_read.3 | 101 +++ contrib/libder/libder/libder_read.c | 864 ++++++++++++++++++++ contrib/libder/libder/libder_type.3 | 71 ++ contrib/libder/libder/libder_type.c | 150 ++++ contrib/libder/libder/libder_write.3 | 54 ++ contrib/libder/libder/libder_write.c | 229 ++++++ contrib/libder/tests/.gitignore | 12 + contrib/libder/tests/CMakeLists.txt | 41 + contrib/libder/tests/fuzz_parallel.c | 111 +++ contrib/libder/tests/fuzz_stream.c | 246 ++++++ contrib/libder/tests/fuzz_write.c | 79 ++ contrib/libder/tests/fuzzers.h | 40 + contrib/libder/tests/make_corpus.c | 137 ++++ contrib/libder/tests/repo.priv | Bin 0 -> 64 bytes contrib/libder/tests/repo.pub | Bin 0 -> 88 bytes contrib/libder/tests/test_common.h | 29 + contrib/libder/tests/test_privkey.c | 175 ++++ contrib/libder/tests/test_pubkey.c | 143 ++++ 36 files changed, 4813 insertions(+) diff --cc contrib/libder/.cirrus.yml index 000000000000,000000000000..a63de71d8bf4 new file mode 100644 --- /dev/null +++ b/contrib/libder/.cirrus.yml @@@ -1,0 -1,0 +1,16 @@@ ++build_task: ++ matrix: ++ - name: FreeBSD 13 ++ freebsd_instance: ++ image: freebsd-13-2-release-amd64 ++ - name: FreeBSD 14 ++ freebsd_instance: ++ image: freebsd-14-0-release-amd64-ufs ++ setup_script: ++ sudo pkg install -y cmake ++ configure_script: ++ - cmake -B build -DCMAKE_BUILD_TYPE=Debug ++ build_script: ++ make -C build ++ test_script: ++ make -C build check diff --cc contrib/libder/.github/workflows/build.yml index 000000000000,a10daa25e38f..a10daa25e38f mode 000000,100644..100644 --- a/contrib/libder/.github/workflows/build.yml +++ b/contrib/libder/.github/workflows/build.yml diff --cc contrib/libder/.gitignore index 000000000000,000000000000..34fb4e06c50b new file mode 100644 --- /dev/null +++ b/contrib/libder/.gitignore @@@ -1,0 -1,0 +1,11 @@@ ++.*.swp ++.depend* ++*.a ++*.so ++*.so.* ++*.o ++*.pico ++*.debug ++*.full ++ ++build/ diff --cc contrib/libder/CMakeLists.txt index 000000000000,cf0d39e32489..cf0d39e32489 mode 000000,100644..100644 --- a/contrib/libder/CMakeLists.txt +++ b/contrib/libder/CMakeLists.txt diff --cc contrib/libder/LICENSE index 000000000000,477af8f22e4c..477af8f22e4c mode 000000,100644..100644 --- a/contrib/libder/LICENSE +++ b/contrib/libder/LICENSE diff --cc contrib/libder/README.md index 000000000000,000000000000..9f700493520d new file mode 100644 --- /dev/null +++ b/contrib/libder/README.md @@@ -1,0 -1,0 +1,28 @@@ ++# libder ++ ++## What is libder? ++ ++libder is a small library for encoding/decoding DER-encoded objects. It is ++expected to be able to decode any BER-encoded buffer, and an attempt to ++re-encode the resulting tree would apply any normalization expected by a DER ++decoder. The author's use is primarily to decode/encode ECC keys for ++interoperability with OpenSSL. ++ ++The authoritative source for this software is located at ++https://git.kevans.dev/kevans/libder, but it's additionally mirrored to ++[GitHub](https://github.com/kevans91/libder) for user-facing interactions. ++Pull requests and issues are open on GitHub. ++ ++## What is libder not? ++ ++libder is not intended to be a general-purpose library for working with DER/BER ++specified objects. It may provide some helpers for building more primitive ++data types, but libder will quickly punt on anything even remotely complex and ++require the library consumer to supply it as a type/payload/size triple that it ++will treat as relatively opaque (modulo some encoding normalization rules that ++can be applied without deeply understanding the data contained within). ++ ++libder also doesn't do strict validation of what it reads in today, for better ++or worse. e.g., a boolean may occupy more than one byte and libder will happily ++present it to the application in that way. It would be normalized on ++re-encoding to 0xff or 0x00 depending on whether any bits are set or not. diff --cc contrib/libder/derdump/.gitignore index 000000000000,a35adcc4b71d..a35adcc4b71d mode 000000,100644..100644 --- a/contrib/libder/derdump/.gitignore +++ b/contrib/libder/derdump/.gitignore diff --cc contrib/libder/derdump/CMakeLists.txt index 000000000000,11657426fbc9..11657426fbc9 mode 000000,100644..100644 --- a/contrib/libder/derdump/CMakeLists.txt +++ b/contrib/libder/derdump/CMakeLists.txt diff --cc contrib/libder/derdump/derdump.1 index 000000000000,414799f3055f..414799f3055f mode 000000,100644..100644 --- a/contrib/libder/derdump/derdump.1 +++ b/contrib/libder/derdump/derdump.1 diff --cc contrib/libder/derdump/derdump.c index 000000000000,7ea3768524d8..7ea3768524d8 mode 000000,100644..100644 --- a/contrib/libder/derdump/derdump.c +++ b/contrib/libder/derdump/derdump.c diff --cc contrib/libder/libder/CMakeLists.txt index 000000000000,8e6f3426d649..8e6f3426d649 mode 000000,100644..100644 --- a/contrib/libder/libder/CMakeLists.txt +++ b/contrib/libder/libder/CMakeLists.txt diff --cc contrib/libder/libder/libder.3 index 000000000000,0e06254ef3fb..0e06254ef3fb mode 000000,100644..100644 --- a/contrib/libder/libder/libder.3 +++ b/contrib/libder/libder/libder.3 diff --cc contrib/libder/libder/libder.c index 000000000000,2d52fedd62bd..2d52fedd62bd mode 000000,100644..100644 --- a/contrib/libder/libder/libder.c +++ b/contrib/libder/libder/libder.c diff --cc contrib/libder/libder/libder.h index 000000000000,4d28aa3052ba..4d28aa3052ba mode 000000,100644..100644 --- a/contrib/libder/libder/libder.h +++ b/contrib/libder/libder/libder.h diff --cc contrib/libder/libder/libder_error.c index 000000000000,6ca0acc83e6d..6ca0acc83e6d mode 000000,100644..100644 --- a/contrib/libder/libder/libder_error.c +++ b/contrib/libder/libder/libder_error.c diff --cc contrib/libder/libder/libder_obj.3 index 000000000000,d7e51da1d2fb..d7e51da1d2fb mode 000000,100644..100644 --- a/contrib/libder/libder/libder_obj.3 +++ b/contrib/libder/libder/libder_obj.3 diff --cc contrib/libder/libder/libder_obj.c index 000000000000,21d39e01fc17..21d39e01fc17 mode 000000,100644..100644 --- a/contrib/libder/libder/libder_obj.c +++ b/contrib/libder/libder/libder_obj.c diff --cc contrib/libder/libder/libder_private.h index 000000000000,3324420ef6d8..3324420ef6d8 mode 000000,100644..100644 --- a/contrib/libder/libder/libder_private.h +++ b/contrib/libder/libder/libder_private.h diff --cc contrib/libder/libder/libder_read.3 index 000000000000,69c9ba8d0d2c..69c9ba8d0d2c mode 000000,100644..100644 --- a/contrib/libder/libder/libder_read.3 +++ b/contrib/libder/libder/libder_read.3 diff --cc contrib/libder/libder/libder_read.c index 000000000000,dba56746be21..dba56746be21 mode 000000,100644..100644 --- a/contrib/libder/libder/libder_read.c +++ b/contrib/libder/libder/libder_read.c diff --cc contrib/libder/libder/libder_type.3 index 000000000000,df577a70f406..df577a70f406 mode 000000,100644..100644 --- a/contrib/libder/libder/libder_type.3 +++ b/contrib/libder/libder/libder_type.3 diff --cc contrib/libder/libder/libder_type.c index 000000000000,dec942ce68f9..dec942ce68f9 mode 000000,100644..100644 --- a/contrib/libder/libder/libder_type.c +++ b/contrib/libder/libder/libder_type.c diff --cc contrib/libder/libder/libder_write.3 index 000000000000,8b1a5aa2bbff..8b1a5aa2bbff mode 000000,100644..100644 --- a/contrib/libder/libder/libder_write.3 +++ b/contrib/libder/libder/libder_write.3 diff --cc contrib/libder/libder/libder_write.c index 000000000000,66ccbcfbf21d..66ccbcfbf21d mode 000000,100644..100644 --- a/contrib/libder/libder/libder_write.c +++ b/contrib/libder/libder/libder_write.c diff --cc contrib/libder/tests/.gitignore index 000000000000,075588a81e75..075588a81e75 mode 000000,100644..100644 --- a/contrib/libder/tests/.gitignore +++ b/contrib/libder/tests/.gitignore diff --cc contrib/libder/tests/CMakeLists.txt index 000000000000,fc366ab88ed7..fc366ab88ed7 mode 000000,100644..100644 --- a/contrib/libder/tests/CMakeLists.txt +++ b/contrib/libder/tests/CMakeLists.txt diff --cc contrib/libder/tests/fuzz_parallel.c index 000000000000,afd4425970a2..afd4425970a2 mode 000000,100644..100644 --- a/contrib/libder/tests/fuzz_parallel.c +++ b/contrib/libder/tests/fuzz_parallel.c diff --cc contrib/libder/tests/fuzz_stream.c index 000000000000,0f7cc6167e7e..0f7cc6167e7e mode 000000,100644..100644 --- a/contrib/libder/tests/fuzz_stream.c +++ b/contrib/libder/tests/fuzz_stream.c diff --cc contrib/libder/tests/fuzz_write.c index 000000000000,2ad5b5eb1764..2ad5b5eb1764 mode 000000,100644..100644 --- a/contrib/libder/tests/fuzz_write.c +++ b/contrib/libder/tests/fuzz_write.c diff --cc contrib/libder/tests/fuzzers.h index 000000000000,0f94bc7f25fb..0f94bc7f25fb mode 000000,100644..100644 --- a/contrib/libder/tests/fuzzers.h +++ b/contrib/libder/tests/fuzzers.h diff --cc contrib/libder/tests/make_corpus.c index 000000000000,68554d7c17de..68554d7c17de mode 000000,100644..100644 --- a/contrib/libder/tests/make_corpus.c +++ b/contrib/libder/tests/make_corpus.c diff --cc contrib/libder/tests/repo.priv index 000000000000,74a030b6802c..74a030b6802c mode 000000,100644..100644 Binary files differ diff --cc contrib/libder/tests/repo.pub index 000000000000,bdcb1a20a1c7..bdcb1a20a1c7 mode 000000,100644..100644 Binary files differ diff --cc contrib/libder/tests/test_common.h index 000000000000,76e850f19128..76e850f19128 mode 000000,100644..100644 --- a/contrib/libder/tests/test_common.h +++ b/contrib/libder/tests/test_common.h diff --cc contrib/libder/tests/test_privkey.c index 000000000000,5e7519f5a715..5e7519f5a715 mode 000000,100644..100644 --- a/contrib/libder/tests/test_privkey.c +++ b/contrib/libder/tests/test_privkey.c diff --cc contrib/libder/tests/test_pubkey.c index 000000000000,9fbd070f0e87..9fbd070f0e87 mode 000000,100644..100644 --- a/contrib/libder/tests/test_pubkey.c +++ b/contrib/libder/tests/test_pubkey.c