From 58e3820999f1670dd76dd5fd81d8bae449d6c75d Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 6 Feb 2024 22:48:00 +0000 Subject: [PATCH] jose: update to version 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: Release version 12 Clean up some FreeBSD conditions (#98) (5a81837) Add ES256K support (#90) (e6a7ae7) Meson changes (#135) (c1569b7) Update CI (#8) (#129) (253549a) lib/openssl/rsaes.c: Fix issue where jose_hook_alg_find failed to find the … …existance of RSA_OAEP algorithm (58112df) Increase test program/scripts timeout values (#131) (45367dd) Fix test compilation warnings (#127) (aee1096) Adapt alg_comp test to different zlib (#142) (4878253) Use checkout v3 Github action to avoid warnings (#137) (6a639e2) Alternative fix for fedora:rawide (#138) (55b11f5) lib/openssl/hmac.c: rename hmac function to jhmac (#130) (33b9e0b) jose: build library only as shared (#119) (b72f8ca) meson: add option to disable building manpages (#118) (786b426) Add a more descriptive error when jwk gen fails (#105) (cdb1030) Use "command -v" instead of "which" (deprecated) (#125) (e1d66f1) Test for jq existing (used in jose-jwe-enc test) (#124) (ddc0d2a) Correct jose_jws.3 man page example (#122) (ad08d70) lib/hsh.c: rename hsh local variable (#111) (3d5b287) Avoid master word when possible (#120) (5bc6a92) Fix github action CI by setting appropriate centos (a091f56) Fix format of jose-jwe-enc man page (76924de) Meson Fixes (320336b) ci: make ubuntu:devel and fedora:rawhide not to fail the pipeline (1d15950) ci: retry when installing the deps in debian/ubuntu (bfdbb6e) ci: remove travis-ci (05d8e70) --- textproc/jose/Makefile | 5 +- textproc/jose/distinfo | 8 +-- textproc/jose/patches/patch-lib_hsh.c | 63 ------------------- .../jose/patches/patch-lib_openssl_hmac.c | 33 ---------- 4 files changed, 6 insertions(+), 103 deletions(-) delete mode 100644 textproc/jose/patches/patch-lib_hsh.c delete mode 100644 textproc/jose/patches/patch-lib_openssl_hmac.c diff --git a/textproc/jose/Makefile b/textproc/jose/Makefile index 61700aa6abb2..323cb543cf5a 100644 --- a/textproc/jose/Makefile +++ b/textproc/jose/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2023/10/24 22:11:18 wiz Exp $ +# $NetBSD: Makefile,v 1.4 2024/02/06 22:48:00 nikita Exp $ -DISTNAME= jose-11 -PKGREVISION= 1 +DISTNAME= jose-12 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_GITHUB:=latchset/} GITHUB_TAG= v${PKGVERSION_NOREV} diff --git a/textproc/jose/distinfo b/textproc/jose/distinfo index 2a15e31e6f5f..e32ecf397fa4 100644 --- a/textproc/jose/distinfo +++ b/textproc/jose/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.2 2023/05/24 15:23:33 nikita Exp $ +$NetBSD: distinfo,v 1.3 2024/02/06 22:48:00 nikita Exp $ -BLAKE2s (jose-11.tar.gz) = c6762bd2eabd26c513b2fdd1a31739c348acfdaffbdd7e11e785dceb0b4b687a -SHA512 (jose-11.tar.gz) = ffe09000837f79cefa549734d13c5d5d51042a42a055867241777ccbff3a127bac86a6155638fdf5ee52aad3598829e19724fd4e7de541117ed9b1c77c2ce457 -Size (jose-11.tar.gz) = 841374 bytes +BLAKE2s (jose-12.tar.gz) = 957e53dd5a1c2f67e67556fae9618da8f95999707a45c0c08995db883fd13919 +SHA512 (jose-12.tar.gz) = 31b7fc9354c3579f5bf904be0efd3631fe35fbbcc85455b2d414664ff2b4dbb3253b9c954229d87ca2a2e3ec382c5316bcb3f2ee424572ed25946a99fe885ada +Size (jose-12.tar.gz) = 841206 bytes SHA1 (patch-lib_hsh.c) = 42675868fb2070202f4b17d74a3ca4a1f3e0a74e SHA1 (patch-lib_openssl_hmac.c) = 09cc79373b7881c01abf06b367e3ec96c3042c65 diff --git a/textproc/jose/patches/patch-lib_hsh.c b/textproc/jose/patches/patch-lib_hsh.c deleted file mode 100644 index 3c3b9bd5648a..000000000000 --- a/textproc/jose/patches/patch-lib_hsh.c +++ /dev/null @@ -1,63 +0,0 @@ -$NetBSD: patch-lib_hsh.c,v 1.1 2023/05/24 15:23:19 nikita Exp $ - -Upstream commit 3d5b287243f87ce0243b23abd690d86c41fc499c - -lib/hsh.c: rename hsh local variable (#111) - -The hsh local variable name conflicts with the function prototype of -hsh() in hsh.h, causing the following build issues with old compilers -(gcc 4.7): - -hsh.c: In function 'hsh': -hsh.c:28:21: error: declaration of 'hsh' shadows a global declaration [-Werror=shadow] -hsh.c:26:1: error: shadowed declaration is here [-Werror=shadow] -hsh.c: In function 'hsh_buf': -hsh.c:60:21: error: declaration of 'hsh' shadows a global declaration [-Werror=shadow] -hsh.c:26:1: error: shadowed declaration is here [-Werror=shadow] - -Therefore, we rename this local variable to _hsh. - -diff --git a/lib/hsh.c b/lib/hsh.c -index c59a95f..a2a891b 100644 ---- lib/hsh.c.orig -+++ lib/hsh.c -@@ -25,7 +25,7 @@ - json_t * - hsh(jose_cfg_t *cfg, const char *alg, const void *data, size_t dlen) - { -- jose_io_auto_t *hsh = NULL; -+ jose_io_auto_t *_hsh = NULL; - jose_io_auto_t *enc = NULL; - jose_io_auto_t *buf = NULL; - char b[1024] = {}; -@@ -33,8 +33,8 @@ hsh(jose_cfg_t *cfg, const char *alg, const void *data, size_t dlen) - - buf = jose_io_buffer(cfg, b, &l); - enc = jose_b64_enc_io(buf); -- hsh = hsh_io(cfg, alg, enc); -- if (!buf || !enc || !hsh || !hsh->feed(hsh, data, dlen) || !hsh->done(hsh)) -+ _hsh = hsh_io(cfg, alg, enc); -+ if (!buf || !enc || !_hsh || !_hsh->feed(_hsh, data, dlen) || !_hsh->done(_hsh)) - return NULL; - - return json_stringn(b, l); -@@ -57,7 +57,7 @@ hsh_buf(jose_cfg_t *cfg, const char *alg, - const void *data, size_t dlen, void *hash, size_t hlen) - { - const jose_hook_alg_t *a = NULL; -- jose_io_auto_t *hsh = NULL; -+ jose_io_auto_t *_hsh = NULL; - jose_io_auto_t *buf = NULL; - - a = jose_hook_alg_find(JOSE_HOOK_ALG_KIND_HASH, alg); -@@ -71,8 +71,8 @@ hsh_buf(jose_cfg_t *cfg, const char *alg, - return SIZE_MAX; - - buf = jose_io_buffer(cfg, hash, &hlen); -- hsh = a->hash.hsh(a, cfg, buf); -- if (!buf || !hsh || !hsh->feed(hsh, data, dlen) || !hsh->done(hsh)) -+ _hsh = a->hash.hsh(a, cfg, buf); -+ if (!buf || !_hsh || !_hsh->feed(_hsh, data, dlen) || !_hsh->done(_hsh)) - return SIZE_MAX; - - return hlen; diff --git a/textproc/jose/patches/patch-lib_openssl_hmac.c b/textproc/jose/patches/patch-lib_openssl_hmac.c deleted file mode 100644 index 94245a97f696..000000000000 --- a/textproc/jose/patches/patch-lib_openssl_hmac.c +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-lib_openssl_hmac.c,v 1.1 2023/01/30 19:38:06 nikita Exp $ - -The function hmac in hmac.c conflicts with hmac from stdlib on NetBSD. - ---- lib/openssl/hmac.c.orig 2022-06-20 21:21:38.997255017 +0200 -+++ lib/openssl/hmac.c 2022-06-20 21:22:08.635313366 +0200 -@@ -95,7 +95,7 @@ - } - - static HMAC_CTX * --hmac(const jose_hook_alg_t *alg, jose_cfg_t *cfg, -+jhmac(const jose_hook_alg_t *alg, jose_cfg_t *cfg, - const json_t *sig, const json_t *jwk) - { - uint8_t key[KEYMAX] = {}; -@@ -251,7 +251,7 @@ - - i->obj = json_incref(jws); - i->sig = json_incref(sig); -- i->hctx = hmac(alg, cfg, sig, jwk); -+ i->hctx = jhmac(alg, cfg, sig, jwk); - if (!i->obj || !i->sig || !i->hctx) - return NULL; - -@@ -275,7 +275,7 @@ - io->free = io_free; - - i->sig = json_incref((json_t *) sig); -- i->hctx = hmac(alg, cfg, sig, jwk); -+ i->hctx = jhmac(alg, cfg, sig, jwk); - if (!i->sig || !i->hctx) - return NULL; -