)]}'
{
  "log": [
    {
      "commit": "94db31c59065c747b6952ea62fba870a4a1588ea",
      "tree": "61100cbe4ac8eec8a4355b02216b2497256d5ae6",
      "parents": [
        "d0d40636150a5263edd491f7ba845387ca0b18e1",
        "255287a40dac2e88f39a16243146f42444972c11"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Dec 04 09:18:42 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Dec 04 09:18:42 2026 -0500"
      },
      "message": "Merge pull request #409 from benmcollins/407-es-curve-binding\n\njwt: bind each ES* algorithm to its curve"
    },
    {
      "commit": "d0d40636150a5263edd491f7ba845387ca0b18e1",
      "tree": "ae48ad16779ed49b86a3a1908a3d9b5c426f935d",
      "parents": [
        "00e284e4040700b48a753e543907bde5759b724b",
        "3054cfe4d4b519867d3552a08b92526eff5e0104"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Dec 04 09:18:38 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Dec 04 09:18:38 2026 -0500"
      },
      "message": "Merge pull request #408 from benmcollins/406-pss-verify-saltlen\n\nopenssl: require salt length \u003d hash length when verifying PS256/384/512"
    },
    {
      "commit": "255287a40dac2e88f39a16243146f42444972c11",
      "tree": "d8c6b067ee470a651e67b84d7dd4aebb12a4146d",
      "parents": [
        "00e284e4040700b48a753e543907bde5759b724b"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Dec 04 00:36:03 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Dec 04 00:36:03 2026 -0500"
      },
      "message": "jwt: bind each ES* algorithm to its curve\n\nES256/ES256K/ES384/ES512 were only checked against the key\u0027s size, and the\nsize does not pin the curve: ES256 accepted a secp256k1 (or, on OpenSSL, a\nbrainpoolP256r1) key, ES256K a P-256 key, and ES384 a brainpoolP384r1 key.\n\n- jwt.c: after the bit check, require the key\u0027s \"crv\" to be exactly the\n  alg\u0027s curve (P-256, secp256k1, P-384, P-521), on both the sign and the\n  verify path (setkey, keyring, JWS JSON, callbacks all go through it).\n- OpenSSL JWK parser: accept only P-256, P-384, P-521 and secp256k1, as the\n  other backends do; brainpool curves and OpenSSL aliases such as\n  \"prime256v1\" no longer load. GnuTLS no longer loads an OKP curve\n  (e.g. \"Ed25519\") under kty \"EC\". All three report\n  \"Unsupported EC curve [...]\".\n- OpenSSL key2jwk: map the EC curve from the named group, not the bit size,\n  so a brainpool (or P-224, ...) PEM is no longer exported as a P-256/P-384\n  JWK with foreign coordinates, or as an EC JWK with no \"crv\".\n- key2jwk, all backends: a key that parses but is on a curve with no JWK\n  form (brainpool on OpenSSL and MbedTLS, P-192/P-224 on OpenSSL and\n  GnuTLS) is now JWK_EXPORT_UNSUPPORTED: an error from jwks_load_fromkey*()\n  (\"Unsupported key type or curve\") even with JWK_KEY_TRY_HMAC, never an\n  \"oct\" key made of the PEM text. Before, MbedTLS turned a brainpool PEM\n  into such an \"oct\" key under key2jwk\u0027s default HMAC fallback.\n- JWK load: an EC JWK whose \"alg\" is an ES* algorithm on another curve is\n  in error (RFC 8812 section 3.2). Non-ES algs such as ECDH-ES are left\n  alone.\n- jwks_generate(): refuse an ES* alg with a different curve instead of\n  stamping it on the key, and use the alg\u0027s curve when none is given.\n\nTests: new brainpool and P-224 PEM fixtures in tests/keys/pem-unsupported/.\nWhether a backend parsed such a key is read from its error without the HMAC\nfallback, and every backend must parse (and refuse) at least one of them,\nso the no-\"oct\" guarantee is held on each backend.\n\nNo new symbols.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "3054cfe4d4b519867d3552a08b92526eff5e0104",
      "tree": "ae48ad16779ed49b86a3a1908a3d9b5c426f935d",
      "parents": [
        "00e284e4040700b48a753e543907bde5759b724b"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Dec 04 00:36:03 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Dec 04 00:36:03 2026 -0500"
      },
      "message": "openssl: require salt length \u003d hash length when verifying PS256/384/512\n\nThe OpenSSL backend verified RSASSA-PSS signatures with\nRSA_PSS_SALTLEN_AUTO, so a PS256/PS384/PS512 token was accepted with any\nsalt length (0 through the maximum for the key). RFC 7518 3.5 fixes the\nsalt at the hash output size, the OpenSSL signing path already uses\nRSA_PSS_SALTLEN_DIGEST, and the GnuTLS and MbedTLS backends already\nreject other salt lengths, so OpenSSL was the only backend that was\nlenient and verification results differed by backend.\n\nVerify with RSA_PSS_SALTLEN_DIGEST instead. Also treat a 0 return from\nEVP_PKEY_CTX_set_rsa_padding() / EVP_PKEY_CTX_set_rsa_pss_saltlen() as\nfailure (OpenSSL reports failure as 0 or negative) in both the sign and\nverify paths.\n\nTests (tests/jwt_rsa.c, every backend): fixed PS256/PS384/PS512 tokens\nsigned outside libjwt with the OpenSSL CLI at salt 0, hash length and\nthe maximum. The hash-length tokens must verify (control); salt 0 and\nmax must fail. The same is checked for the 4096-bit plain RSA key with\nno \"alg\" pinned to PS256 by the checker.\n\nNo API or ABI change.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "00e284e4040700b48a753e543907bde5759b724b",
      "tree": "dd03e1558f73ab8f614a73fa6cc42272a46b156b",
      "parents": [
        "8b952e8aff29a153f0b87b85429e46dbf4949658",
        "055698f877ff46f093d553dc8cb8f765b9144d3e"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 16:41:23 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 16:41:23 2026 -0500"
      },
      "message": "Merge pull request #405 from benmcollins/release-3.8.0\n\nRelease v3.8.0"
    },
    {
      "commit": "055698f877ff46f093d553dc8cb8f765b9144d3e",
      "tree": "dd03e1558f73ab8f614a73fa6cc42272a46b156b",
      "parents": [
        "8b952e8aff29a153f0b87b85429e46dbf4949658"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 15:47:58 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 15:47:58 2026 -0500"
      },
      "message": "Release v3.8.0\n\nBump LIBJWT_VERSION_SET 3 7 0 -\u003e 3 8 0.\n\nSONAME: 18:5:4 -\u003e 19:0:5 (current++, revision\u003d0, age++). The changes\nsince v3.7.0 add three exported symbols and remove or change none: the\njwt*/jwk*/jwe* symbol set grows from 155 to 158 with\njwt_checker_setmaxsize(), jwt_checker_verified_jwt() and\njwt_checker_sig_header_get(), each tagged @since 3.8.0 in\ninclude/jwt.h. Per the libtool rules an interface addition bumps\ncurrent and age and resets revision. The SONAME major (current - age)\nstays 14.\n\nmake check passes.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "8b952e8aff29a153f0b87b85429e46dbf4949658",
      "tree": "025a7ccbca2c293e5aeb267f6afbb7252d3478af",
      "parents": [
        "919b2a53ad70631c3b75840825d3b04914935ed8",
        "1760016901adf8f98406ae23696fc67c1a8a3dc8"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 15:46:43 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 15:46:43 2026 -0500"
      },
      "message": "Merge pull request #404 from benmcollins/378-checker-max-size\n\nchecker: add a configurable maximum token size"
    },
    {
      "commit": "919b2a53ad70631c3b75840825d3b04914935ed8",
      "tree": "078554506fc92e66147277a27cba4b6de398293c",
      "parents": [
        "5c68aa78a650d8854cf4b28a529cce9587db2eb3",
        "4203959e07da087b9b233c10a290adde738f4d52"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 15:46:36 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 15:46:36 2026 -0500"
      },
      "message": "Merge pull request #402 from benmcollins/361-builder-setkey-node\n\nbuilder: give jwt_builder_setkey() a signer node of its own"
    },
    {
      "commit": "1760016901adf8f98406ae23696fc67c1a8a3dc8",
      "tree": "54a02fe40f250abc2c6eecdf6870ca5047fdfc7b",
      "parents": [
        "5c68aa78a650d8854cf4b28a529cce9587db2eb3"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:16:35 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 14:55:10 2026 -0500"
      },
      "message": "checker: add a configurable maximum token size\n\nA checker accepted a token of any length short of INT_MAX and copied,\ndecoded and parsed all of it. A service that verifies tokens from the\nnetwork gains from turning an oversized one away up front, with a bound\nit can tune to its own tokens.\n\nAdd jwt_checker_setmaxsize(). A new checker allows 1 MiB (1048576\nbytes), far more than any real token needs. jwt_checker_verify() and\njwt_checker_verify_detached() now reject a longer token with \"Token too\nlarge\" before parsing it, reading no more than the limit plus one byte\nof it. The setter accepts 1 to INT_MAX - 1; anything else is refused\nwith an error and the old limit is kept. The INT_MAX check that guarded\nthe int lengths on the parse paths stays as the backstop.\n\nFor a detached payload the limit applies to the token as given and to\nthe token rebuilt with the payload attached, which is what gets\nverified, so the payload counts toward it; a payload that alone exceeds\nthe limit is refused before it is encoded.\n\nThis changes behavior: a token over 1 MiB that verified before now\nfails unless the limit is raised. The jwt-verify(1) page notes that a\ncommand-line token is held to the default limit (its stdin lines were\nalready capped at 1 MiB).\n\nThe limit is for tokens only. JWK and JWKS input is deliberately not\nlimited: key sets come from the application, not from the token sender.\n\nCloses #378\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "4203959e07da087b9b233c10a290adde738f4d52",
      "tree": "078554506fc92e66147277a27cba4b6de398293c",
      "parents": [
        "5c68aa78a650d8854cf4b28a529cce9587db2eb3"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:29:52 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 14:54:58 2026 -0500"
      },
      "message": "builder: give jwt_builder_setkey() a signer node of its own\n\njwt_builder_setkey() stored its alg/key in whichever signature node was\nfirst in the list, adding one only when the list was empty. Called after\njwt_builder_add_signature(), it therefore re-keyed that signer: the\nhandle kept its protected/unprotected headers (e.g. its \"kid\") but now\nsigned with the setkey() key, and the add_signature() signer was lost\nwithout an error. setkey(JWT_ALG_NONE, NULL) after a lone\nadd_signature() turned that node into an unsigned one, so a Compact\ntoken went out unsigned.\n\nsetkey() now owns exactly one signer node. The first call with a key\ncreates it, placed first in the list; later calls update it; and\nsetkey(JWT_ALG_NONE, NULL) removes it. It never modifies a node created\nby add_signature(). Creating it beside an add_signature() signer makes\ntwo signers and selects the General serialization, as a second\nadd_signature() already does. Compact keeps the v3.6.2 rule: it carries\nonly the setkey() signer, and generation fails rather than emit a\ntoken without an add_signature() signer (so add_signature() followed\nby setkey(JWT_ALG_NONE, NULL) never yields an unsigned Compact token).\n\nThe builder callback\u0027s config-\u003ekey/config-\u003ealg sign the setkey()\nsigner\u0027s signature in every format; the JSON serializations used to\nignore them and sign with the stored node instead. When setkey() was\nnot called, a key the callback supplies acts as the setkey() signer\n(one more signature, ahead of the add_signature() ones). A callback\nthat supplies a key with JWT_ALG_NONE now signs with the key\u0027s own\n\"alg\" in the Compact form too, as the JSON forms and\nsetkey(JWT_ALG_NONE, key) do, instead of emitting \"alg\":\"none\".\n\nThe JSON encoder\u0027s per-signature work moves into encode_one_sig() so\nthe setkey() signer can be signed with the callback\u0027s alg/key, and the\nnow-unused jwt_signature_first_or_add() is replaced by\njwt_signature_prepend().\n\nDocument the semantics on jwt_builder_setkey(),\njwt_builder_add_signature(), jwt_builder_set_format() and\njwt_builder_setcb(), and in the README. Tests cover every call order\nin each format with the format set before and after the signer calls\n(each signature verifying with its own key only and carrying its own\n\"kid\"), the callback-key matrix with and without setkey(), a key that\ncannot sign, and the updated test_edges (c3).\n\nCloses #361\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "5c68aa78a650d8854cf4b28a529cce9587db2eb3",
      "tree": "cc640bfb8e5babbbc8d87f76bcccc02faee56414",
      "parents": [
        "5f40d646b4c6c53cda31e13adee7c0eb4ce25cfa",
        "89b18090e4f48679f3dd8754dc2fa986fdf98f8b"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 14:54:29 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 14:54:29 2026 -0500"
      },
      "message": "Merge pull request #399 from benmcollins/362-checker-verified-jwt\n\nchecker: expose the accepted token after jwt_checker_verify()"
    },
    {
      "commit": "5f40d646b4c6c53cda31e13adee7c0eb4ce25cfa",
      "tree": "eec3ec1fb44de29cd44346eb70f72f13c754d648",
      "parents": [
        "5ff861289fede3f32a756a8c332eb704a792ddae",
        "1f79a4b6826ae2f0241c0dcfba3afee0e23f7c80"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 14:54:22 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 14:54:22 2026 -0500"
      },
      "message": "Merge pull request #398 from benmcollins/355-compact-keyring-direct\n\nchecker: verify Compact tokens against a keyring without JSON"
    },
    {
      "commit": "5ff861289fede3f32a756a8c332eb704a792ddae",
      "tree": "fbab2b78531437c6a2eca91f5adf9af7e1f7313a",
      "parents": [
        "3d468853c06a6fae877f1e3e753dec50885c98ad",
        "1606c5feda65c380659ba3de0f181966da38a94a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 14:54:14 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 14:54:14 2026 -0500"
      },
      "message": "Merge pull request #397 from benmcollins/356-keyring-scan-linear\n\nchecker: scan a keyring in one pass for a token without \"kid\""
    },
    {
      "commit": "3d468853c06a6fae877f1e3e753dec50885c98ad",
      "tree": "cdaf603ebbfe6ad4c34c4763d3c4ec116e474703",
      "parents": [
        "23fd21c0eef1c09522de8f9fae094da2d4662087",
        "0d17c5d7e023371238693c2d029590fcd4d2468c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 14:02:59 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 14:02:59 2026 -0500"
      },
      "message": "Merge pull request #403 from benmcollins/357-jsonc-null-member\n\njson: read a JSON null member as present with json-c"
    },
    {
      "commit": "23fd21c0eef1c09522de8f9fae094da2d4662087",
      "tree": "5f1637d8dc6b30f4f4277c05d82833073cafc560",
      "parents": [
        "20b9568683935bbacc20787cf6e46e077beeb9b0",
        "dde9222ba05f52128605c2554ca6a5bb83dea173"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 14:02:54 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 14:02:54 2026 -0500"
      },
      "message": "Merge pull request #401 from benmcollins/369-ecdh-es-cbc-hs\n\njwe: derive ECDH-ES keys longer than 32 octets with the full Concat KDF"
    },
    {
      "commit": "20b9568683935bbacc20787cf6e46e077beeb9b0",
      "tree": "7a27f7562774cde77062e59bc7fa8f9410416119",
      "parents": [
        "1ec7775e53454ba752b2db860dbff0a43bf1ba1a",
        "0ddc95757cbc0f61585db4f4ac0082e75c3355e9"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 14:02:50 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 14:02:50 2026 -0500"
      },
      "message": "Merge pull request #400 from benmcollins/365-alg-msg-paren\n\ntools: fix unknown --algorithm error message formatting"
    },
    {
      "commit": "89b18090e4f48679f3dd8754dc2fa986fdf98f8b",
      "tree": "3447e9b6e01c3add4d847cdf6e3924f1aa75d437",
      "parents": [
        "1f79a4b6826ae2f0241c0dcfba3afee0e23f7c80"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:50:16 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 14:02:20 2026 -0500"
      },
      "message": "checker: expose the accepted token after jwt_checker_verify()\n\nOnce jwt_checker_verify() or jwt_checker_verify_detached() returned 0,\nan application could not read the token it had accepted: its claims,\nits protected header, or the algorithm that verified it when the key\nhas no \"alg\". The jwt_t holding them was freed before the call\nreturned, and the callbacks that do see it run while the token may\nstill be rejected.\n\nTwo checker getters now expose it:\n\n- jwt_checker_verified_jwt() returns the jwt_t the last verify\n  accepted, owned by the checker until its next verify call (even one\n  that fails at once) or jwt_checker_free(). It holds the claims (an\n  empty set for an unencoded \"b64\":false payload) and, for a Compact or\n  Flattened token, the protected header, with jwt_get_alg() giving the\n  verified algorithm. A General JWS JSON token has a header per\n  signature, so its jwt_t has an empty header and JWT_ALG_INVAL.\n\n- jwt_checker_sig_header_get() reads a protected-header member of one\n  signature, by index, as jwt_header_get() does, but only for a\n  signature that verified in an accepted token.\n\nNeither returns a signature\u0027s unprotected \"header\", which is not\nintegrity protected. Each verify releases the previous token before it\ndoes anything else, so nothing is readable after any failed verify\n(even where jwt_checker_sig_verified() reports 1, e.g. an expired token\nor JWT_VERIFY_POLICY_ALL not met), and a verify or jti callback calling\neither getter gets nothing.\n\nThe accepted Compact token is the jwt_t the single-key path already\nbuilt; on the keyring and JSON paths the transient jwt_t is kept and\nthe one signature\u0027s decoded protected header moves into it, so nothing\nis copied.\n\nThe jwt_t accessor docs no longer refer to a jwt_create() that does not\nexist: they say where a jwt_t comes from. The verify, jti and cnf docs\npoint at the new getters.\n\nCloses #362\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "1f79a4b6826ae2f0241c0dcfba3afee0e23f7c80",
      "tree": "03bd3a524d988b38ce9b8a7c7dea554483020e9e",
      "parents": [
        "1606c5feda65c380659ba3de0f181966da38a94a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:36:42 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 14:02:20 2026 -0500"
      },
      "message": "checker: verify Compact tokens against a keyring without JSON\n\nA checker with a keyring verified a Compact token by rebuilding it as a\nFlattened JWS JSON document, serializing that, and parsing it again,\nthen building each signature\u0027s signing input in a new buffer. On a\nlarge token that cost more than twice the memory and time of\njwt_checker_setkey(), and with Jansson a token whose unencoded\n(\"b64\":false) payload was not valid UTF-8 could not be verified at all.\n\nThe Compact token is now split once at its first and last \u0027.\u0027, its\nprotected header goes through the same per-signature checks a JSON\nsignature gets (\"alg\", \"none\" refused, \"b64\", \"crit\"), the payload is\ndecoded once, and the signature is checked over the token\u0027s own bytes\nup to the last \u0027.\u0027, passed with its length. compact_to_flattened() is\ngone. A JWS JSON Serialization still parses its JSON and then runs the\nsame per-signature code.\n\nverify_entry() and try_candidate() now take the signing input and its\nlength, so each candidate key costs only its gates and the signature\ncheck: no strlen() over the input, and a non-HMAC signature is\nbase64url-decoded once per signature rather than once per key.\n\nBehavior is otherwise unchanged: kid binding without fallback, the\nscan, the \"use\"/\"key_ops\" filter, the typ/alg policy, the callback,\nclaims, required claims, jti, both policies and the introspection calls.\n\nThe one intended change: with Jansson, a Compact token with a non-UTF-8\nunencoded payload (attached or detached) now verifies against a\nkeyring, as it already did with json-c and with jwt_checker_setkey().\nA side effect, also with Jansson only: a Compact token that is not valid\nUTF-8 in its header, signature or encoded payload is still rejected\nagainst a keyring, but with the error from the check it fails (e.g. \"JWS\nprotected header is not valid JSON\" or \"Error decoding signature\")\nrather than \"Token is not valid UTF-8\", which the conversion used to\nreport before anything else was checked.\n\nA keyring of one key now allocates about 0.85x what\njwt_checker_setkey() does on a 350 KB token under Jansson, down from\nabout 2.5x. The jwt.h notes on the old cost and the UTF-8 limit become\nhistory notes.\n\nCloses #355\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "1606c5feda65c380659ba3de0f181966da38a94a",
      "tree": "6644b88ea268f5bb1b9e408afadc42bfa8493a3f",
      "parents": [
        "1ec7775e53454ba752b2db860dbff0a43bf1ba1a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 14:02:20 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 14:02:20 2026 -0500"
      },
      "message": "checker: scan a keyring in one pass for a token without \"kid\"\n\nA keyring signature without a \"kid\" is tried against every compatible\nring key. verify_entry() fetched each key with jwks_item_get(ring, i),\nwhich walks the key list from its head, so one scan visited n(n+1)/2\nlist nodes for a ring of n keys. A token that verifies with none of the\nkeys always paid the full scan: about 0.4 s against a ring of 10,000\nkeys, and once more for each kid-less signature in a General token.\n\nWalk the ring\u0027s list directly with list_for_each_entry(), as\nring_find_kid() already does, and drop the jwks_item_count() call. The\nkeys are visited in the same order and the scan still stops at the\nfirst key that verifies, so jwt_checker_sig_key() reports the same key\nas before. No API or ABI change.\n\nDocument in jwt_checker_setkeyring() that the scan runs in ring order\nand stops at the first key that verifies, and what a kid-less\nsignature costs.\n\nAdd a test with a generated ring of 10,000 HS256 oct keys and a token\nwithout \"kid\": it fails with every key tried when its key is absent,\nfails with no key tried when no ring key has the token\u0027s alg, verifies\nwith the key reported when that key is appended last, and still\nreports that key when a second copy follows it. The test checks\nbehavior only, not the scan\u0027s complexity: the old quadratic scan passes\nit too. A timeout cannot tell the two apart, since the linear scan under\nvalgrind is slower than the quadratic one run natively. It runs in its\nown test case with a longer timeout; under valgrind it takes about 16 s\nfor all three backends.\n\nCloses #356\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "0d17c5d7e023371238693c2d029590fcd4d2468c",
      "tree": "9bb5eda0477ad9bb895a919dcf48a8144caadb89",
      "parents": [
        "1ec7775e53454ba752b2db860dbff0a43bf1ba1a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:43:00 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:43:00 2026 -0500"
      },
      "message": "json: read a JSON null member as present with json-c\n\nWith json-c, jwt_json_obj_get() returns NULL both for a missing member\nand for one whose value is JSON null, while Jansson returns the null.\nMany sites tested presence with jwt_json_obj_get(), so the two JSON\nbackends disagreed about the same token, key or call. They now ask\njwt_json_obj_has() (or a lookup that reports a null), and json-c gives\nJansson\u0027s results:\n\n - Getters (jwt_claim_get(), jwt_header_get() and the builder\u0027s): a\n   null member is JWT_VALUE_ERR_TYPE, not JWT_VALUE_ERR_NOEXIST. A\n   JWT_VALUE_JSON getter of a named member that is not an object or an\n   array is JWT_VALUE_ERR_TYPE with both backends (Jansson gave\n   JWT_VALUE_ERR_INVALID, json-c the JSON text of the scalar).\n - Checker: a null \"exp\" or \"nbf\" fails the claims check, a null claim\n   is present for jwt_checker_require(), and a protected JWS parameter\n   that is null overlaps the same name in the unprotected header.\n - Builder: setting a member that is null without replace gives\n   JWT_VALUE_ERR_EXIST, \"crit\" may name a null header parameter, an\n   application\u0027s null \"typ\" is kept (Compact and JSON), and a null\n   protected parameter overlaps a signature\u0027s unprotected one.\n - JWE checker: a null protected \"crit\" or \"zip\", and a null\n   \"protected\", \"unprotected\", \"recipients\", \"header\", \"aad\" or\n   \"encrypted_key\" member, are of the wrong type. A null header\n   parameter counts for the disjointness rule, and one in the shared or\n   per-recipient header is merged into the effective header (json-c\n   failed it with \"Error allocating memory\").\n - JWKS: a \"keys\" member that is not an array (null included) fails the\n   set with \"Invalid JWKS: \\\"keys\\\" is not an array\", where it gave an\n   empty set without an error (and json-c read a null one as a single\n   JWK). \"alg\":null and \"x5c\":null put the key in error with both\n   backends; since 3.6.3 both had read them as absent. A private member\n   (RSA d, p, q, dp, dq, qi; EC and OKP d; AKP priv) that is present but\n   not a string puts the key in error before any crypto backend reads\n   it, with \"Invalid JWK: \\\"\u003cname\u003e\\\" is not a string\", so every JSON and\n   crypto backend gives one result (GnuTLS and MbedTLS used to load the\n   public part of such an EC or OKP key, and OpenSSL failed it with a\n   message of its own). Only the backend is skipped: such a key still\n   gets its \"kid\", \"alg\", \"use\" and \"key_ops\", as any other key that\n   fails to load, so it can still be found and named.\n\njwt_json_is_null() has no caller left and is removed. The LCOV_EXCL\nmarkers come off the exp/nbf failure lines, json-c\u0027s jwt_json_is_int()\nNULL check and OpenSSL\u0027s \"Error parsing component d\", \"Error parsing\nprivate key\" and \"Error parsing pub key\" lines: input reaches them (an\nundecodable \"d\" or \"x\" reaches the OpenSSL ones), and tests now do. The\nJSON getter\u0027s serialize failure and the JWE merge failure are\nallocation failures only and keep theirs.\n\nTests, under both JSON backends and every crypto backend:\ntests/jwt_security.c (json_parity: exp/nbf, require, getters from a\nverify callback, JWS overlap), tests/jwt_builder.c (getters, setters,\noverlap, crit, typ), tests/jwe_json_neg.c (crit/zip, null JSON members,\nGeneral and Flattened members together, disjointness, a null unprotected\nmember that decrypts), tests/jwt_jwks_errors.c (\"keys\", \"alg\"/\"x5c\",\nnull and non-string private members and the kid/alg such a key keeps,\nundecodable members), and test_json_null_members in\ntests/jwt_key_error.c now expects the key in error. Docs in jwt.h: the\ngetter and setter groups, jwt_checker_require(), the exp/nbf note,\njwt_builder_setcrit(), jwt_builder_generate(),\njwt_signature_add_header_json(), jwe_checker_decrypt(),\njwe_checker_decrypt_all(), jwks_load() and jwks_item_error().\n\nCloses #357\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "dde9222ba05f52128605c2554ca6a5bb83dea173",
      "tree": "5e0bf05f349ce29e027b8a635460439c48bb93e4",
      "parents": [
        "1ec7775e53454ba752b2db860dbff0a43bf1ba1a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:16:38 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:16:38 2026 -0500"
      },
      "message": "jwe: derive ECDH-ES keys longer than 32 octets with the full Concat KDF\n\nECDH-ES in Direct Key Agreement mode uses the Concat KDF output as the\nCEK, so its length is whatever \"enc\" requires: 48 octets for\nA192CBC-HS384 and 64 for A256CBC-HS512. Each crypto backend carried its\nown copy of the KDF, and all three ran a single SHA-256 round and\nrefused any keydatalen above 32 octets. Encrypting or decrypting\nECDH-ES with either of those two content algorithms therefore failed\nwith \"ECDH-ES key agreement failed\" on every backend, including valid\ntokens from other implementations.\n\nReplace the three copies with one shared jwe_concat_kdf() in jwe.c that\nimplements RFC 7518 section 4.6.2 / NIST SP 800-56A in full: it hashes\ncounter || Z || OtherInfo for counter \u003d 1 .. ceil(keydatalen / 32),\nwith the counter as a 32-bit big-endian integer, and concatenates and\ntruncates the results. Each backend\u0027s ecdh_derive passes its own ops,\nso the SHA-256 still comes from the backend\u0027s native digest. Output for\nkeys of 32 octets or less (the AES-GCM CEKs and the ECDH-ES+A*KW KEKs)\nis unchanged.\n\nTests cover ECDH-ES round trips with all six enc values on P-256,\nP-384, P-521, X25519 and X448 under every compiled backend; the\nWycheproof json_web_encryption_test.json \"jwe_ec\" vectors tcId 78-81\n(including the A192CBC-HS384 and A256CBC-HS512 cases tcId 80 and 81);\nand a two-round KDF known answer with apu/apv over the RFC 7518\nAppendix C keys whose CEKs were computed independently with Python\u0027s\nhashlib.\n\nCloses #369\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "0ddc95757cbc0f61585db4f4ac0082e75c3355e9",
      "tree": "7a27f7562774cde77062e59bc7fa8f9410416119",
      "parents": [
        "1ec7775e53454ba752b2db860dbff0a43bf1ba1a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:11:22 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 12:11:22 2026 -0500"
      },
      "message": "tools: fix unknown --algorithm error message formatting\n\njwt-verify printed \"Use -l to see a list of supported algorithms)\" for\nan unknown -a/--algorithm value, with a closing parenthesis that had no\nopening one. Drop the stray \u0027)\u0027.\n\njwt-generate passed a message ending in a newline to usage(), which\nalready appends a blank line after the error, so two blank lines came\nbefore the usage text where every other error gets one. Drop the\ntrailing newline from the message.\n\nTighten the jwt-verify bats check to match both lines of the message\nexactly, and add a jwt-generate check that the error line is followed\nby exactly one blank line and then the usage text.\n\nCloses #365\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "1ec7775e53454ba752b2db860dbff0a43bf1ba1a",
      "tree": "de16912985ba6dd72c874e91feb4bad3e7decb7f",
      "parents": [
        "e2a0379a4a4b1f1f777d27f895ea615c1d711e87",
        "52a3792edf6442c83b7e83d9402cd03bf54f5c04"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 11:47:52 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 11:47:52 2026 -0500"
      },
      "message": "Merge pull request #394 from benmcollins/release-3.7.0\n\nRelease v3.7.0"
    },
    {
      "commit": "e2a0379a4a4b1f1f777d27f895ea615c1d711e87",
      "tree": "fd33cb225481e063ca240883de0968c48b1dc2a9",
      "parents": [
        "a163b24f71de6cb6f58388affb10fea62d7f7406",
        "ab43b8c0beb1e0e3befd62f56e4271248b710b18"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 11:47:48 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 11:47:48 2026 -0500"
      },
      "message": "Merge pull request #396 from benmcollins/395-jwt-verify-man-alg-none\n\njwt-verify(1): document the unsigned-token default and -a none"
    },
    {
      "commit": "ab43b8c0beb1e0e3befd62f56e4271248b710b18",
      "tree": "fd33cb225481e063ca240883de0968c48b1dc2a9",
      "parents": [
        "a163b24f71de6cb6f58388affb10fea62d7f7406"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 11:13:19 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 11:13:19 2026 -0500"
      },
      "message": "jwt-verify(1): document the unsigned-token default and -a none\n\n#352 made jwt-verify reject an unsigned (\"alg\":\"none\") token unless\n\"-a none\" is given with neither -k nor -r, and updated --help, but the\nman page still said that with neither option an unsigned token is only\ndecoded (exit 0), and never mentioned \"-a none\".\n\nSay so in DESCRIPTION, add the opt-in to the -a entry, and rewrite\nEXIT STATUS 0 to match. jwt-verify.1 is regenerated with pandoc. No code\nchange.\n\nCloses #395\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "52a3792edf6442c83b7e83d9402cd03bf54f5c04",
      "tree": "b6cba8576e1824dd1e53af053274c72c687bb8ae",
      "parents": [
        "a163b24f71de6cb6f58388affb10fea62d7f7406"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 11:01:04 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 11:01:04 2026 -0500"
      },
      "message": "Release v3.7.0\n\nBump LIBJWT_VERSION_SET 3 6 4 -\u003e 3 7 0.\n\nSONAME: 18:4:4 -\u003e 18:5:4 (revision++, current/age untouched). The\nchanges since v3.6.4 tighten verification and input handling (unsigned\ntokens are rejected unless JWT_ALG_NONE is allowed, an EC private key\nwhose d does not match (x, y) is rejected, json-c parsing is stricter,\nkeyring/JWS JSON failures report the specific reason) and fix the CLI\ntools, but add no exported symbol: the jwt*/jwk*/jwe* symbol set is\nidentical to v3.6.4 (155 symbols), and include/jwt.h changes only in\ndoc comments, so no Doxygen @since tag is added. Per the libtool rules\nonly the SONAME revision advances. The SONAME major (current - age)\nstays 14.\n\nmake check passes.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "a163b24f71de6cb6f58388affb10fea62d7f7406",
      "tree": "eaa5be6f4245c2003408009f2ade6928bf89bb1b",
      "parents": [
        "838342de6f26600d70d82f533976fac40ec45ede",
        "1c2a508af166495d15ac3e2511f4e2c319cc4084"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 10:28:49 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 10:28:49 2026 -0500"
      },
      "message": "Merge pull request #391 from benmcollins/373-stdin-reader-speed\n\njwt-verify: read stdin with one lock per line, not per byte"
    },
    {
      "commit": "838342de6f26600d70d82f533976fac40ec45ede",
      "tree": "75a2d21077c7739ba17b27d6a1cf203a3f7b9a10",
      "parents": [
        "ec628ee90266764ec18484c71ea4d0606fab7e34",
        "15e5c97e607eaaedaab4ff30fdb1df7248164814"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 10:28:46 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 10:28:46 2026 -0500"
      },
      "message": "Merge pull request #387 from benmcollins/354-verify-msg-unify\n\njwt: surface the specific reason on JWS JSON/keyring verify failure"
    },
    {
      "commit": "1c2a508af166495d15ac3e2511f4e2c319cc4084",
      "tree": "b771054738f95ca2b9b6d7873159335c091035fe",
      "parents": [
        "ec628ee90266764ec18484c71ea4d0606fab7e34"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:07:33 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 09:50:11 2026 -0500"
      },
      "message": "jwt-verify: read stdin with one lock per line, not per byte (#373)\n\nread_line() reads stdin one byte at a time so it can look at every byte and\nfail a whole line that has a NUL byte or does not fit (GHSA-g7xw-4cjw-2247).\nfgetc() takes the stdin lock on every call, and on macOS that per-byte\nlock/unlock is most of the run time on bulk input: an -O2 build here reads\n64 MiB of non-token lines in ~0.92 s and 64 MiB of alg \"none\" tokens in\n~1.57 s.\n\nTake the lock once per line with flockfile()/funlockfile() and read with\ngetc_unlocked() inside it. The loop body is unchanged, so the bytes read --\nand therefore every result: the too-long-line and NUL-byte handling, the\nfinal line with no newline, a CR or a blank kept, an empty line not skipped,\nand a read error -- stay byte-for-byte identical (confirmed by diffing the\noutput of both readers over NUL, over-long, CR/blank and no-newline inputs).\nThe same inputs now take ~0.13 s and ~0.79 s here (85% and 50% less),\nmatching the issue\u0027s measurements.\n\ngetc_unlocked(), flockfile() and funlockfile() are POSIX and are not declared\nby mingw-w64, so the plain fgetc() loop is kept under _WIN32; the Windows\nbuild does not have the per-byte lock cost anyway.\n\nA new bats case reads a bulk stream of a few thousand lines mixing valid\ntokens, an over-long line, a NUL-byte line and a final line with no newline,\nand checks that each line is still scored as one token -- a reader that split\na long line or stopped at a NUL byte (the pre-fix fgets() behaviour) miscounts\nit. Tools-only; no exported symbol changes.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "ec628ee90266764ec18484c71ea4d0606fab7e34",
      "tree": "f2058be542f7d39f03452ac50c4cff77f126e40d",
      "parents": [
        "f8869555eef5e0c0e3730adca7d061085b9f0c9d",
        "43196ab3564daa0225b647bed90e18bc7efc1162"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 09:49:42 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 09:49:42 2026 -0500"
      },
      "message": "Merge pull request #390 from benmcollins/372-clustered-h-l\n\njwt-verify: make clustered -h/-l (-hv, -lq) a usage error"
    },
    {
      "commit": "f8869555eef5e0c0e3730adca7d061085b9f0c9d",
      "tree": "164b0433977b0d9c3f2e086f2a9bb87e099cadd5",
      "parents": [
        "8908437a714a222234e3dc903703081c58cc495a",
        "892f90f1ccf090c330686842f6fa1b7368eb3626"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 09:49:38 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 09:49:38 2026 -0500"
      },
      "message": "Merge pull request #393 from benmcollins/375-jwe-decrypt-stdin\n\njwe-decrypt: read one whole token from stdin and only one argument"
    },
    {
      "commit": "8908437a714a222234e3dc903703081c58cc495a",
      "tree": "865ec6adbf0aadb797e8b57787df455e715a1960",
      "parents": [
        "0acc2fd0a4cc5d1c0520426bd90188cd89cc5926",
        "d410caac660b0c38fc44b9452e8bbca250ed9d39"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 09:49:34 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 09:49:34 2026 -0500"
      },
      "message": "Merge pull request #392 from benmcollins/374-jwk2key-exit\n\njwk2key: fail on unwritten keys and guard a NULL PEM"
    },
    {
      "commit": "0acc2fd0a4cc5d1c0520426bd90188cd89cc5926",
      "tree": "dbbb91df667365618738d313405760a46a35636f",
      "parents": [
        "66efacbc78c144efd27f4f84ebcdb1ce44024126",
        "a37af0d166962f292e1d9183f48628b2474f1306"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 09:49:31 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 09:49:31 2026 -0500"
      },
      "message": "Merge pull request #389 from benmcollins/371-print-sigpipe\n\ntools: don\u0027t die on SIGPIPE when a --print command stops reading"
    },
    {
      "commit": "66efacbc78c144efd27f4f84ebcdb1ce44024126",
      "tree": "aaeec3326e92848aa1fff697bf3c10cb80a5e3b5",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22",
        "7deabd49e25c81d40fd998d8aca45e210d42d1dc"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Fri Nov 20 09:49:27 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 09:49:27 2026 -0500"
      },
      "message": "Merge pull request #388 from benmcollins/367-jwt-cli-nested-build\n\ntests: make jwt_cli pass in a nested build dir and before make all"
    },
    {
      "commit": "15e5c97e607eaaedaab4ff30fdb1df7248164814",
      "tree": "f55a1bdab8c1553bb32990c0ab2ba7b5272eb63b",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:29:49 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Fri Nov 20 09:49:03 2026 -0500"
      },
      "message": "jwt: surface the specific reason on JWS JSON/keyring verify failure\n\nA JWS JSON Serialization or keyring verify failure reported only the\ngeneric \"Signature policy not met (N of M verified)\", dropping the\nper-signature cause the single-key Compact path already gives (a bad\nsignature, a key whose type or \"alg\" cannot carry the token\u0027s, a\n\"typ\"/algorithm policy rejection, a rejecting callback). #353 made the\nverdicts agree; this makes the message agree too.\n\nRecord why each signature did not verify in struct jwt_signature:\n\n- try_candidate() keeps a failed candidate\u0027s error instead of clearing\n  it, and distinguishes a key-type from a key-\"alg\" mismatch;\n- verify_entry() records the \"typ\"/algorithm policy rejection, a\n  rejecting callback, a pinned-alg mismatch, a \"kid\" that names no usable\n  ring key, a scan with no compatible key (\"No keyring key can verify\n  \\\"RS256\\\"\"), and a scan where several candidates were tried.\n\njwt_verify_json() then reports, for a one-signature token (Compact or\nFlattened), that signature\u0027s own reason -- so a Compact token gives the\nsame specific reason whether checked with jwt_checker_setkey() or against\na keyring -- and for several signatures keeps the policy summary and\nappends the first unverified signature\u0027s index and reason, clipped to the\nerror buffer.\n\nThe message text changes: tests/jws_json.c and the keyring-failure\nassertions in jwt_key_error.c / jwt_x509.c / jwt_xbackend.c are updated, a\nnew test_msg_unify and a bats case assert the unified reason under both\nJSON backends, and no exported symbol changes (struct jwt_signature is\nprivate, reached only through the opaque jwt_signature_t).\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "892f90f1ccf090c330686842f6fa1b7368eb3626",
      "tree": "6e7bc37f5b9c45cfaf17ad0675217180c9c5f687",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:10:15 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 22:34:24 2026 -0500"
      },
      "message": "jwe-decrypt: read one whole token from stdin and only one argument\n\njwe-decrypt (#375) read stdin a byte at a time, dropped every CR and LF\nwherever they fell, and used the result as a C string. So the first NUL\nbyte ended the token (a valid token followed by a NUL and anything else,\neven a second token, decrypted with exit 0), all lines were joined into\none token (a token split over two lines decrypted; two tokens on two\nlines became one malformed token), and a read error was taken for end of\ninput. A token given on the command line used only argv[optind]; extra\ntoken arguments were silently ignored, also with exit 0.\n\nRead the whole of stdin into one buffer and reject it as a unit:\n\n  * A NUL byte anywhere, or a token longer than the 1 MiB buffer, is an\n    error and nothing is decrypted.\n  * One trailing line end (LF, CRLF or a lone CR) is dropped, so a token\n    with or without a trailing newline both decrypt. The serialization is\n    detected as the library does it (first non-space byte): a Compact\n    token is one line, so any CR or LF left in it -- a second token, or a\n    token split over lines -- is an error rather than being joined, while\n    a JSON token may span lines (the parser already rejects anything that\n    follows it, under both JSON backends).\n  * Empty stdin and a read error are told apart (\"No token read from\n    stdin\" vs \"Could not read stdin: \u003cerrno\u003e\"); there was no ferror()\n    check before.\n\nMore than one token argument is now a usage error instead of decrypting\nthe first and ignoring the rest. The usage text and jwe-decrypt(1) (the\n.md and the regenerated .1) describe how stdin is read and that the token\nis the one argument.\n\nThe reader uses a fixed buffer rather than malloc/realloc, so the former\nexit()-on-OOM paths that leaked it (noted in #364) are gone. Tools-only:\nno exported jwt/jwk/jwe symbol is added, removed or changed, so there is\nno ABI/SONAME impact.\n\nTests (bats, both JSON backends): a NUL byte after, inside and before a\ntoken; two tokens and a split Compact token on two lines; trailing-newline\nand no-newline tokens; jq-pretty Flattened and General JSON tokens; two\ntoken arguments; and empty vs unreadable stdin. The discriminating cases\nfail without the fix.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "d410caac660b0c38fc44b9452e8bbca250ed9d39",
      "tree": "4bc2f55809296b842cc800d7cb4f3e4e9e1ac52f",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:21:38 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 22:34:24 2026 -0500"
      },
      "message": "jwk2key: fail on unwritten keys and guard a NULL PEM\n\njwk2key exited 0 even when it wrote nothing. A missing or unparseable\ninput file, a key that did not load, a skipped key, a missing or\nunwritable output directory, an existing output file and a failed write\nall left the exit status 0. A key that did not load was dropped without a\nword; a failed write left behind the empty file fopen() had created, which\nthen blocked the next run with \"File exists\". Worst of all, a key whose\nactive backend has no PEM form (MbedTLS exports no PEM for an OKP/Ed25519\nkey) reached fputs(NULL): \"(null)\" written into the key file on macOS, a\nSIGSEGV on glibc after the empty file was already created.\n\nmain() now tracks a status and returns 1 if any input file could not be\nread or parsed or held no keys, or if any key was skipped, did not load,\nor could not be created or fully written. The keys that do convert are\nstill written whatever the status, and the usage text and jwk2key.1\ndocument it. Each file is loaded into its own set (jwks_load_from*(NULL,\n...)) so a failed file\u0027s set-level error no longer taints the report of\nthe file after it, and the per-iteration jwk_set_auto_t frees the set\n(no exit() in the processing path, cf #364).\n\nwrite_key_file() now returns 0/1 and names every key it does not write by\ninput file and index (and \"kid\" when present): a key that did not load is\nreported with jwks_item_error_msg(), as jwt-verify does. jwks_item_pem()\n\u003d\u003d NULL is one such failure and is never passed to fputs(). A write error\nis detected (ferror()/fclose()) and the partial file is removed so it does\nnot block a later run. check_directory() now uses S_ISDIR() instead of\n\"st_mode \u0026 S_IFDIR\" (a socket\u0027s mode ANDs to that bit) and requires W_OK;\na bad -d directory is reported before any input is read.\n\nTested with bats cases (tests/jwt-cli.bats) for each failure -- a missing\ninput, a non-JSON input, bad_keys.json, a good+bad pair, an empty set, a\nmissing / non-directory / read-only output directory, an existing output\nfile, an unsafe kid, a missing-then-good pair (only the missing one is\nreported), and a failed write via `ulimit -f 0` with SIGXFSZ ignored --\neach of which fails without this change, plus a stdin (\"-\") and an ML-DSA\nconversion so every key-type and read path is exercised. Under\nJWT_CRYPTO\u003dmbedtls an Ed25519 key exits 1 without crashing and leaves no\nfile, and an ML-DSA key exits 1 with its error (skipped when MbedTLS is\nnot built in). The glibc fputs(NULL) SIGSEGV could not be reproduced on\nthe macOS dev host (its libc prints \"(null)\" rather than crashing); the\nguard is a code fix verified by the no-file/exit-1 assertion.\n\nTools-only: no exported jwt*/jwk*/jwe* symbol is added, removed or\nchanged, so there is no ABI impact and no SONAME/version bump.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "a37af0d166962f292e1d9183f48628b2474f1306",
      "tree": "8856566ce8afd8b87daf26d1ce21dd963cd034c0",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:19:57 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:19:57 2026 -0500"
      },
      "message": "tools: don\u0027t die on SIGPIPE when a --print command stops reading\n\njwt-verify and jwt-generate pipe each token\u0027s header and payload JSON to\nthe --print command\u0027s stdin. When that command stopped reading before a\nheader or payload larger than the pipe buffer had been written, write()\nblocked and the default SIGPIPE killed the tool (shell status 141) in the\nmiddle of the run: the tokens after that one were never processed and any\noutput still buffered for a pipe or a file was lost. That breaks the 0/1\nexit status jwt-verify(1) and jwt-generate(1) promise.\n\nwrite_json() now ignores SIGPIPE only while writing to the command. The\nignore is installed with sigaction() in the parent after fork(), so the\ncommand itself does not start with SIG_IGN (which would outlive its\nexecvp()), and the previous disposition is restored once the write is\ndone. The write runs in a loop over short writes and EINTR and stops at\nEPIPE, so a command that stops reading no longer kills the tool and its\nexit status alone decides the token, at any payload size, exactly as it\nalready did for a payload that fit the pipe buffer.\n\nwrite_json() no longer calls exit(): any other write error, a failing\nfork() (previously unchecked, which then wrote to a pipe with no reader),\nand a failing pipe() now fail just that token, so the run always goes on\nto the next token and flushes its output. The Windows path no longer\nfails the token on a broken-pipe short write either, matching the same\nrule. jwt-verify(1)/jwt-generate(1) now say a command need not read all\nof its input.\n\nThe untestable defensive branches (EINTR retry, a non-EPIPE write error,\na failing fork()/pipe()) are marked LCOV_EXCL. A new bats case drives a\n70000-byte claim (payload past the 64 KiB pipe buffer) through true,\nfalse and stdin for both tools, with a good token before and after the\nbig one; it fails (status 141) without the fix.\n\nFixes #371.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "7deabd49e25c81d40fd998d8aca45e210d42d1dc",
      "tree": "aaeec3326e92848aa1fff697bf3c10cb80a5e3b5",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:03:23 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:03:23 2026 -0500"
      },
      "message": "tests: make jwt_cli pass in a nested build dir and before make all\n\nThe jwt_cli bats suite only passed when the build directory was a direct\nchild of the source root and the CLI tools had already been built, so a\nnested build (e.g. build/rel) or a plain `make check` in a fresh tree\nfailed. CI never hit this: every job builds a depth-1 tree and runs\n`make all` before the tests.\n\nTwo causes, both fixed here (issue #367):\n\n- Eleven key fixtures were loaded through a build-dir-relative\n  ../tests/keys path, which only resolves from a direct child of the\n  source root. Resolve them through ${SRCDIR} (which ctest already\n  exports and the rest of the suite already uses), so the keys are found\n  wherever the build directory sits. A new guard test fails if any\n  top-level key variable regresses to such a relative path -- which a\n  depth-1 CI build would not otherwise catch.\n\n- jwt_add_tool() appended each tool to TOOLS without handing it back to\n  the directory scope, so ${TOOLS} was empty in the dependency lists of\n  the `check` and `check-code-coverage` targets and the tools were not\n  built before the CLI test ran. Propagate it with\n  set(TOOLS ${TOOLS} PARENT_SCOPE).\n\nVerified: `make check` now passes in a fresh build/rel two levels below\nthe source root without a prior `make all`, under both the jansson and\njson-c backends.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "43196ab3564daa0225b647bed90e18bc7efc1162",
      "tree": "317a6ab16ef55dafa3ab2cd6cd940f15f1cc20b0",
      "parents": [
        "e4df48a301ed36acf108af2a4d05ee4992fccb22"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:01:14 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 21:01:14 2026 -0500"
      },
      "message": "jwt-verify: make clustered -h/-l (-hv, -lq) a usage error\n\nThe GHSA-g7xw-4cjw-2247 hardening made -h/-l print and exit 0 only as the\nsole argument, but the check counted arguments (argc !\u003d 2), not options.\ngetopt_long() reads -hv as -h -v, so a single argument could still hold\nseveral options: -hv, -lq, -vh, -ql, -hl, -hh, -hk\u003cfile\u003e, -hr\u003cfile\u003e,\n-laHS256, -hpfalse and the like left argc at 2 and so printed the help or\nthe algorithm list and exited 0, while -h -v (two arguments) exited 1.\nThat disagrees with jwt-verify(1) and the usage text, which state the rule\nper option (\"given alone they exit 0, given with anything else -- a token,\na key, another option -- they are a usage error\"). Nothing went unverified\nin these forms (no token is on the command line; a token cannot be\nclustered after -h/-l, as eyJ and { are not options), so only the exit\nstatus was wrong -- but a script trusting exit 0 should not see it from a\ncommand that verified nothing.\n\nFix in the code, not the man page: the man page and usage text already\nstate the intended rule, and -hv means -h -v to getopt_long() everywhere\nelse, so a carve-out would document an accident. Count the options\ngetopt_long() returns (nopts) and require nopts \u003d\u003d 1 in addition to\nargc \u003d\u003d 2. argc !\u003d 2 still catches a separate argument (a token, or\n-h -v); nopts !\u003d 1 catches options clustered into the one argument. -h,\n-l, --help, --list and a unique prefix such as --he alone still exit 0;\nevery clustered or accompanied form is now the same usage error as -h -v\n(exit 1, \"--help and --list take no other arguments\").\n\njwt-generate is unaffected and deliberately untouched: it has no\nsole-argument rule (its -h/-l generate nothing, so no token can go\nunverified) and handles them inline in the option switch.\n\nTools-only; no exported jwt*/jwk*/jwe* symbol changes. Tests: the existing\nbats case now also checks -hv, -vh, -lq, -ql, -hk\u003cfile\u003e, -laHS256 and -hl\nexit 1 with \"take no other arguments\", and that --help/--list/--he alone\nstill exit 0; it fails against the pre-fix binary.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "e4df48a301ed36acf108af2a4d05ee4992fccb22",
      "tree": "6d7a3126c7867d4480c10c943dd5c5e0a8ab6ff2",
      "parents": [
        "6e2fc9a08db6533701be462a3cc4d2353618f4c2",
        "c430b5c383e0c0a64a69676d5ae2106912908171"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 20:28:50 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 20:28:50 2026 -0500"
      },
      "message": "Merge pull request #386 from benmcollins/366-memcheck-error-exitcode\n\nci: fail memcheck when valgrind finds a definite leak"
    },
    {
      "commit": "6e2fc9a08db6533701be462a3cc4d2353618f4c2",
      "tree": "2b4a9fbaa590627ceb088891f0b4c29969ab5339",
      "parents": [
        "b09c59e963b6a517f67832c5247c9829399b3725",
        "c1ced0e85c435b7abff18779744453eaf100ce74"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 20:28:30 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 20:28:30 2026 -0500"
      },
      "message": "Merge pull request #385 from benmcollins/352-reject-unsigned-default\n\njwt: reject unsigned tokens unless JWT_ALG_NONE is allowed"
    },
    {
      "commit": "c1ced0e85c435b7abff18779744453eaf100ce74",
      "tree": "2b4a9fbaa590627ceb088891f0b4c29969ab5339",
      "parents": [
        "b09c59e963b6a517f67832c5247c9829399b3725"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 17:09:44 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 19:26:51 2026 -0500"
      },
      "message": "jwt: reject unsigned tokens unless JWT_ALG_NONE is allowed\n\nA jwt_checker_t with no key, no keyring and no embedded-JWK verification\naccepted an unsigned (\"alg\":\"none\") Compact token by default. That is\neasy to hit by accident: a keyless checker whose verify callback picks the\nkey by \"kid\" leaves config-\u003ekey NULL on a miss and returns 0, and a forged\nunsigned token then verifies (the keyed/keyring variants were closed by\nGHSA-mhc9-xvg5-qg29; the keyless default remained).\n\nPer RFC 8725 §3.2 (\"Do not trust received claims ... SHOULD NOT accept\n\u0027none\u0027\") accept an unsigned token only when the application asks for it.\njwt_typ_alg_ok() already enforces jwt_checker_setalgs(): a non-empty\nallowlist that lists JWT_ALG_NONE accepts a none token and one that omits\nit rejects it. The only gap was the empty-allowlist default, which\naccepted any alg. It now accepts any signed algorithm but rejects\njwt-\u003ealg \u003d\u003d JWT_ALG_NONE, with a specific \"Unsigned tokens are not\nallowed\" message. Listing JWT_ALG_NONE via jwt_checker_setalgs() is the\nsingle, supported opt-in; no new exported symbol is added, so this stays a\nrevision-only ABI change.\n\nKeyed, keyring and embedded-JWK checkers are unchanged (a none token to\nthem stays rejected). The JSON-serialization path is unaffected:\nbuild_sig_entry() already refuses \"alg\":\"none\" there, so the new default\nnever fires on it.\n\njwt-verify(1) followed the old library default; it now opts in explicitly\nwith \"-a none\" (wired to jwt_checker_setalgs()), and rejects an unsigned\ntoken without it. Docs (jwt_builder_setkey() table note, jwt_checker_setkey(),\njwt_checker_setalgs() and the verify-callback warning) and the tests\n(check + bats, both JSON backends) are updated for the new default.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "c430b5c383e0c0a64a69676d5ae2106912908171",
      "tree": "49be50ba80fe6e92be65578b2522ae0f12a8032d",
      "parents": [
        "b09c59e963b6a517f67832c5247c9829399b3725"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 16:54:26 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 16:54:26 2026 -0500"
      },
      "message": "ci: fail memcheck when valgrind finds a definite leak\n\nThe \"Combo / all\" job runs `ctest -T memcheck` to catch leaks before a\nmerge, but valgrind findings never failed it. MEMORYCHECK_COMMAND_OPTIONS\nhad no --error-exitcode, so a leaking test process still exits 0; ctest\nthen lists the defects after the run and exits 0 itself, and the workflow\nstep only sees ctest\u0027s exit status. The jwe_gcm leak fixed in v3.6.2\n(#347) went through CI this way. The jwt_cli count is unreliable for a\nsecond reason: ctest gives valgrind one --log-file with no %p, so every\nchild started under --trace-children truncates it.\n\nFail the test when valgrind finds an error, which works per process and\nso does not depend on the shared log:\n\n  * Add --error-exitcode\u003d1 --errors-for-leak-kinds\u003ddefinite to\n    MEMORYCHECK_COMMAND_OPTIONS. valgrind now exits non-zero on a\n    definite leak (not the noisier \"possible\" kind), failing that test.\n\n  * Add tests/valgrind-bats.supp and point MEMORYCHECK_SUPPRESSIONS_FILE\n    at it. The bats CLI test runs bash, mktemp, jq and other /usr/bin\n    programs under --trace-children, and those leak definitely in the CI\n    image; without the suppression jwt_cli would fail before any case\n    runs. The suppression is scoped to obj:/usr/bin/* so it can only\n    match the system programs installed there. libjwt\u0027s library, tools\n    and test binaries live in the build tree, never under /usr/bin, so a\n    leak in libjwt\u0027s own code can never match it and is still reported.\n\nThe suppressions path is seeded as a cache entry because include(CTest)\ndeclares MEMORYCHECK_SUPPRESSIONS_FILE with an empty default; a plain\nvariable is dropped when CTest.cmake creates the cache entry and the\nfield would configure out empty.\n\nVerified in the CI image (issue #366): with these options v3.6.1 jwe_gcm\nfails on each backend with \"Early exit with return value 1\" and ctest\nexits non-zero, v3.6.2 passes all unit-test suites, and jwt_cli passes\nonly with the suppressions file. CMake wiring confirmed locally under\nboth JSON backends (the generated DartConfiguration.tcl carries the new\noptions and the absolute suppressions path); valgrind itself cannot run\non the local macOS host, so the memcheck run is left to CI.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "b09c59e963b6a517f67832c5247c9829399b3725",
      "tree": "b2cd3beaf6f8b39adab5a444a92c42e8ba3660b0",
      "parents": [
        "469e25827bab39af0b70394cb949c8bb91211b10",
        "85d4afe3dc5effe2945103fe596e363cb40f79d7"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 16:42:58 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 16:42:58 2026 -0500"
      },
      "message": "Merge pull request #383 from benmcollins/360-jsonc-strict-parse\n\njson-c: reject non-JSON input and align bare scalar handling"
    },
    {
      "commit": "85d4afe3dc5effe2945103fe596e363cb40f79d7",
      "tree": "b2cd3beaf6f8b39adab5a444a92c42e8ba3660b0",
      "parents": [
        "39932880fcbad0405565686e62f2e1a2c7cfdf7d"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:42:12 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 16:11:21 2026 -0500"
      },
      "message": "json-c: accept a bare number or boolean, refuse a bare null\n\nThe five header setters (jwt_signature_add_protected_json,\njwt_signature_add_header_json, jwe_builder_add_protected_json,\njwe_builder_add_unprotected_json, jwe_recipient_add_header_json) parse the\nvalue with jwt_json_parse(..., JWT_JSON_DECODE_ANY, ...). With json-c a\nbare number or literal has no closing delimiter, so json-c cannot tell it\nhas ended and reports json_tokener_continue, which the wrapper took for a\nparse error: 1, -1, 1.5, true and false were refused, though Jansson (and\nthe documented contract of these setters) accepts them.\n\nGive json-c the end of the input it needs: jwt_json_parse() parses a C\nstring with slen + 1 so the terminating NUL is included, and\njwt_json_parse_buf(), whose buffer is not NUL-terminated, ends its input\nwith a second json_tokener_parse_ex() call on a lone NUL when the first\nreturns json_tokener_continue. That second call restarts json-c\u0027s\nparse-end counter, so validate_parsed() now takes the parse end from the\nfirst call rather than reading it from the tokener.\n\nA bare JSON null is refused by both backends: json-c has no object to\nstore one (it represents a null as a C NULL, which every caller reads as\nabsent), so the Jansson parser is made to refuse a top-level null too,\nrather than silently accept one the json-c backend cannot. Only a\nDECODE_ANY caller can reach that path; the default mode already rejects a\ntop-level non-array/object. The documented accepted-types list for\njwe_builder_add_protected_json() notes that null is refused.\n\nTested under both JSON backends for all five setters: numbers and\nbooleans are accepted and emitted as JSON scalars, a bare null and\ntrailing data (1 2, {} x) are refused.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "39932880fcbad0405565686e62f2e1a2c7cfdf7d",
      "tree": "2f78682ffcd6f2d00f46d5ddf4c42e3fa3b68078",
      "parents": [
        "469e25827bab39af0b70394cb949c8bb91211b10"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:41:09 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 16:11:21 2026 -0500"
      },
      "message": "json-c: reject raw control characters and other non-JSON\n\nThe json-c backend created its tokener with no flags, so json-c parsed in\nits lenient default mode. That mode accepts a raw control character\n(U+0000 to U+001F) inside a string, which RFC 8259 forbids, as well as\nsingle-quoted strings and /-comments; Jansson\u0027s parser rejects them all.\nA token, claim or key that one backend took as valid and the other\nrefused is a json-c/Jansson disagreement about what a valid JWT, value or\nkey is.\n\nReplace the escaped-NUL-only pre-parse check (has_nul_escape) with a\nstring-aware scan (scan_json) that rejects, as Jansson\u0027s parser would, a\nraw control character inside a string, a \"\\u0000\" escape, and the\nsingle-quoted strings and /-comments json-c would otherwise honour (which\nmust be rejected to keep the double-quote tracking in step). Valid\nnon-ASCII UTF-8 and a raw DEL (0x7F), which RFC 8259 allows, still pass.\nThe forms deliberately left to json-c (trailing commas, NaN/Infinity,\ncase-insensitive literals, leading zeros, lone surrogate escapes and\ninvalid UTF-8) are documented at the scanner.\n\njwt_json_parse_fp() NUL-terminated the file buffer and parsed it as a C\nstring, so a NUL embedded in a JWKS file truncated the input and whatever\nfollowed it escaped the trailing-data check. Parse the file by its\nlength, as the buffer parser already does, so the trailing bytes are\nrefused.\n\nTested under both JSON backends (control characters in a Compact token\u0027s\npayload and the outer object of a JWS JSON token; in a JWK/JWKS from a\nstring, buffer, FILE and file; a NUL-and-junk JWKS file; the lenient\nextensions; and that valid UTF-8, a DEL and an escape still load), plus\nthe CLI repro from the issue.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "469e25827bab39af0b70394cb949c8bb91211b10",
      "tree": "4dd5caee39ff06034ababd9b671e46074cf974cd",
      "parents": [
        "fc2847b7f112eff988ad9b899340d1ea1e58a3b9",
        "66edb24db2e4b14ef2530e16f563f5609e675ec5"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 16:07:14 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 16:07:14 2026 -0500"
      },
      "message": "Merge pull request #382 from benmcollins/359-jsonc-nonstring-jwk-members\n\njson-c: reject non-string JWK members"
    },
    {
      "commit": "fc2847b7f112eff988ad9b899340d1ea1e58a3b9",
      "tree": "1a87f96cdf1dd64f6df3eee5d729b9a6b238f967",
      "parents": [
        "16b52339d80b1a4017625486b505de41b487b8e6",
        "ccd7c6bcd7add4d07c7831225cbba1cec8b2d8c1"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 16:06:45 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 16:06:45 2026 -0500"
      },
      "message": "Merge pull request #380 from benmcollins/368-ec-private-d\n\njwks: reject an EC private key whose d does not match (x, y)"
    },
    {
      "commit": "16b52339d80b1a4017625486b505de41b487b8e6",
      "tree": "325e430f68d5cf24894d265ea7dcae6845d1a91c",
      "parents": [
        "d274e61cb06428a59a16960fd0af24e9799d93af",
        "14ad1de711585f5a3a849d7b00cce694e3761fbb"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 16:06:15 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 16:06:15 2026 -0500"
      },
      "message": "Merge pull request #381 from benmcollins/353-json-alg-none-callback-pin\n\njwt: enforce a callback\u0027s JWT_ALG_NONE alg pin on the JWS JSON path"
    },
    {
      "commit": "d274e61cb06428a59a16960fd0af24e9799d93af",
      "tree": "71c1e137873071a044f994814e721dbf6397909e",
      "parents": [
        "0081a8dbac62663087b5b9979c23f4b04175721c",
        "0ffab8962b4d204484470f1a5a0c715895599d5c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 16:05:30 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 16:05:30 2026 -0500"
      },
      "message": "Merge pull request #384 from benmcollins/363-sanitizer-builds\n\nSanitizer builds: fix the gcc-15 warning and CLI tool leaks"
    },
    {
      "commit": "0ffab8962b4d204484470f1a5a0c715895599d5c",
      "tree": "71c1e137873071a044f994814e721dbf6397909e",
      "parents": [
        "c30f094fcf1c52674c1a4ed911efd7d560266f3d"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 13:26:57 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 15:07:28 2026 -0500"
      },
      "message": "tools: clean the remaining exit() paths and make error tests leak-aware\n\nFollow-up to the #364 work on this branch, addressing review:\n\n- jwt-verify: allocate the checker only after option parsing (as the\n  jwe-* tools do), so the usage()/option-error exits above it leave\n  nothing outstanding; return (not exit()) from every error path once\n  the checker, jwk_set or keyring is allocated.\n- jwt-generate: likewise allocate the builder only after option parsing\n  -- the -c claim specs are stashed during getopt and applied once the\n  builder exists -- and route every post-allocation error through a\n  single out: cleanup label. (Its success path was already fixed in\n  v3.6.2.)\n- jwe-encrypt: free on the empty-key-set and builder-alloc paths too,\n  matching jwe-decrypt.\n- jwe-decrypt: free on the checker-alloc path too.\n- tests: add a refute_sanitizer helper and call it from the error-exit\n  cases, so a leak (which also exits non-zero, with its report captured\n  in $output rather than flushed) fails the test instead of passing it;\n  add the missing error-exit cases for jwe-encrypt, jwt-verify and\n  jwt-generate; make \"Generate JWKS from PEM Files\" fail rather than\n  skip when key2jwk itself fails.\n- ci: grant the sanitizer container SYS_PTRACE and an unconfined seccomp\n  profile so LeakSanitizer\u0027s stop-the-world is not blocked.\n\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "c30f094fcf1c52674c1a4ed911efd7d560266f3d",
      "tree": "e0f7707c38cd2b0ce920e2cbb410fdb18e8fdde2",
      "parents": [
        "7825b28d15b88e5b649bd4d3b53f3f10329b5629"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:32:03 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:32:03 2026 -0500"
      },
      "message": "ci: add a sanitizer row (ASan + UBSan + LSan)\n\nBuild the whole project - library, tools and tests - at -O2 under\nAddressSanitizer and UndefinedBehaviorSanitizer with the project\u0027s\n-Werror, then run the full suite under LeakSanitizer, in the forky CI\nimage (gcc 15.2).\n\nThe build is the guard for the gcc 15 -Wstringop-truncation that -O2 +\n-fsanitize revives and -Werror makes fatal; the run is the guard for a\nCLI tool that leaks under LeakSanitizer. All three backends plus\nWITH_ML_DSA so every tool path the suite drives - the JWE round-trips\nand the ML-DSA key2jwk conversion among them - runs instrumented. UBSan\nis left non-fatal at runtime: the build is the compile-time guard and\nLSan is the leak guard.\n\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "7825b28d15b88e5b649bd4d3b53f3f10329b5629",
      "tree": "02f7b0f6bf127ca8b28d2170c6e8094bb8b6298b",
      "parents": [
        "338260ceb22e25f3e7525f53d78d3ac617625a88"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:31:53 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:31:53 2026 -0500"
      },
      "message": "tools: free what they allocate on every exit path\n\nThe CLI tools left main() through exit(), which skips the\n__attribute__((cleanup)) handlers behind jwk_set_auto_t,\njwe_checker_auto_t, jwe_builder_auto_t and jwt_checker_auto_t, and some\nheld plain pointers they never freed. At -O2 the compiler need not keep\nthose pointers live at the exit() call, so LeakSanitizer reports them;\njwe-decrypt and key2jwk failed this way (and with them the bats tests\nthat run them), while the other tools were latent.\n\nReturn from main() (or jump to one cleanup label) instead of exit(), so\nthe auto_t cleanups run, and free a builder or checker before the key\nset it borrows:\n\n  - jwe-decrypt, key2jwk: the reported leaks. A single out: label frees\n    the local buffers and the borrowed-key holder, then returns.\n  - key2jwk also lost the set built so far when a *later* file failed to\n    load: jwks_load_fromkey_file() returns NULL without freeing its\n    input, so assign through a temp and keep jwk_set on the good set for\n    cleanup.\n  - jwe-encrypt, jwt-verify, jwk2key: the same pattern on their terminal\n    paths, fixed defensively so the sanitizer run is robust.\n\nError messages and exit statuses are unchanged. Add bats cases for the\nkey-load error exits (a missing key file for jwe-encrypt and jwe-decrypt,\nan empty key set, a missing later file for key2jwk, and a non-key file\nwith --disable-hmac) so the new paths are covered and run leak-clean.\n\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "338260ceb22e25f3e7525f53d78d3ac617625a88",
      "tree": "1f0a5c42a9d6a3a7fb62380e1780a91e2b1512cd",
      "parents": [
        "0081a8dbac62663087b5b9979c23f4b04175721c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:31:41 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:31:41 2026 -0500"
      },
      "message": "jwt: base jwt_copy_error() on snprintf, not strncpy\n\nAt -O2 with -fsanitize\u003daddress or -fsanitize\u003dundefined, gcc 15\u0027s\ninlining and value-range analysis sees that jwt_copy_error()\u0027s source is\na fixed char[JWT_ERR_LEN] array and that the strncpy() bound is its size\nminus one, and warns:\n\n  \u0027strncpy\u0027 output may be truncated copying 255 bytes from a string of\n  length 255 [-Wstringop-truncation]\n\nWith -Wall -Werror that is fatal, so hardened and sanitizer builds fail\nat all nine sites that expand the macro. A plain -O2 build does not show\nit, and the explicit terminator on the next line does not suppress it:\nthe warning is about the strncpy call, not about NUL-termination.\n\nCopy with snprintf(\"%s\") bounded to the destination size instead, which\ngcc can see is bounded and always NUL-terminated. This mirrors the\nadjacent jwt_write_error() macro and drops the separate terminator line.\nThe observable result is identical: every error_msg is a short C string\nbuilt via jwt_write_error(), and both forms truncate at JWT_ERR_LEN-1.\n\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "14ad1de711585f5a3a849d7b00cce694e3761fbb",
      "tree": "b805d440e9d69ed8aa3d639d3e558838a05045e5",
      "parents": [
        "0081a8dbac62663087b5b9979c23f4b04175721c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:13:12 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:13:12 2026 -0500"
      },
      "message": "jwt: enforce a callback\u0027s JWT_ALG_NONE alg pin on the JWS JSON path\n\nA verify callback may set config-\u003ealg to pin the algorithm a signature\nmust use. Setting it to JWT_ALG_NONE means \"the key\u0027s own alg\": the\nCompact path resolves that in __setkey_check() (jwt-common.c), so a key\nthat declares an \"alg\" pins it and a key without one verifies nothing.\n\nThe JWS JSON Serialization path in verify_entry() did not. It applied\nthe exact-alg pin only when config.alg !\u003d JWT_ALG_NONE, and otherwise\nleft only the key-type gate (for an alg-less explicit key) or the\nper-key declared-alg check in the ring scan (for an alg-less ring key).\nSo a callback that reset the pin to JWT_ALG_NONE on a checker keyed with\nan alg-less key let any algorithm of the key\u0027s type verify (for example\nRS512 or PS256 after jwt_checker_setkey(c, JWT_ALG_RS256, key)), while\nthe Compact path rejected the same token. Compact tokens checked against\na keyring take the JSON path, so they inherited the bypass too. This is\nan algorithm-pinning (RFC 8725 section 3.1) conformance bug, not a\nforgery: the signature still had to verify and the key-type gate still\nheld.\n\nResolve a JWT_ALG_NONE pin on the JSON path exactly as the Compact path\ndoes:\n\n  - For an explicit key (a single key, a kid-named ring key, or one the\n    callback supplied), resolve config.alg to the key\u0027s own \"alg\" before\n    the exact-alg pin; a key with no \"alg\" of its own verifies nothing.\n\n  - In the kid-less ring scan, skip an alg-less candidate when the pin\n    is JWT_ALG_NONE, matching the explicit-key rule. A candidate that\n    declares an \"alg\" is still pinned to it by the existing check.\n\nThe seed for config.alg is never JWT_ALG_NONE (a JSON signature cannot\ncarry \"alg\":\"none\"), so only a callback reaches this; no callback, or\none that sets a concrete alg, is unaffected. The change is contained in\nthe static verify_entry(); no API or ABI change.\n\nAdd test_json_alg_none_cb to tests/jws_json.c, covering the single-key,\nkeyring-scan and kid-named cases across Compact, Flattened and General,\nunder both JSON backends and every crypto backend, and clarify the\njwt_checker_setkey/setkeyring/setcb docs to state that a JWT_ALG_NONE\npin verifies nothing with a key that has no \"alg\" of its own.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "66edb24db2e4b14ef2530e16f563f5609e675ec5",
      "tree": "2b7c3fb9fec85569947a4567fbc8911ac630d4ae",
      "parents": [
        "0081a8dbac62663087b5b9979c23f4b04175721c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:12:45 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:12:45 2026 -0500"
      },
      "message": "json-c: return NULL from jwt_json_str_val for a non-string\n\nThe json-c backend\u0027s jwt_json_str_val() returned json_object_get_string()\nfor any value, and json-c serializes a non-string to its JSON text: the\nint 12345678 becomes \"12345678\", a valid base64url string that decodes to\nsix bytes. Jansson\u0027s json_string_value() returns NULL for anything but a\nstring, so the two JSON backends diverged.\n\nThe OpenSSL asymmetric-key parser reads a JWK component with that result\nbehind only a NULL check (set_one_bn(), set_one_octet()), so under json-c\na numeric or boolean component was base64url-decoded as key material:\n\n  {\"kty\":\"RSA\",\"n\":12345678,\"e\":\"AQAB\"}   loaded a bogus 48-bit RSA key\n  a P-256 public key plus \"d\":\u003cnumber\u003e    materialized a private key\n\nboth of which Jansson rejects. The GnuTLS and MbedTLS parsers already\ntype-check their members (decode_member()), and jwks.c guards the oct \"k\"\nand the EC crv/x/y, so set_one_bn()/set_one_octet() were the only\nconsumers reading a component without a type check.\n\nFix it in the wrapper, as CLAUDE.md prescribes (\"type-check in the\njson-c wrapper\"): jwt_json_str_val() returns NULL for a non-string,\nmatching Jansson for every caller rather than only the OpenSSL parser. No\nchange to the parser is needed; set_one_bn()/set_one_octet() already fail\non a NULL string, so the item fails to load with the same errors Jansson\nproduces.\n\nAdd test_jwks_member_type_confusion to tests/jwt_security.c, a loop test\nover every crypto backend covering the RSA/EC/OKP cases from the issue,\nwith both a corrupt public component and a non-string private \"d\". The\ninvariant on every backend is that no private key is forged from a\nnon-string; where the corrupt member is a required public one, no key\nloads at all. It runs under both JSON backends and fails without this fix\n(json-c loads the keys).\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "ccd7c6bcd7add4d07c7831225cbba1cec8b2d8c1",
      "tree": "90d1166223dc96a3d8b9e45f555eff6c5624a852",
      "parents": [
        "0081a8dbac62663087b5b9979c23f4b04175721c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:11:40 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 12:11:40 2026 -0500"
      },
      "message": "jwks: reject an EC private key whose d does not match (x, y)\n\nAn EC private JWK loaded even when its \"d\" was not the private key for\nthe JWK\u0027s public point (x, y). Each backend imported the private scalar\nand the public coordinates independently and never checked that d is in\nrange and d*G \u003d\u003d (x, y) (RFC 7518 6.2.2.1), so a token could be built\nwith a key the JWK does not actually describe. The OKP path already\nmakes the analogous check; EC now matches it.\n\nOne check per backend, before the item is populated, failing with\n\"EC private key does not match its public key\":\n\n- OpenSSL: pctx_to_pem() grows a \"check\" flag that openssl_process_ec()\n  sets for a private key; it runs EVP_PKEY_pairwise_check() on the made\n  key. RSA/OKP/ML-DSA pass check\u003d0 and are unchanged.\n- GnuTLS: gnutls_process_ec() calls gnutls_privkey_verify_params() after\n  importing d with the claimed (x, y). The import already rejects d \u003d 0;\n  verify_params rejects an in-range or oversized d whose d*G is not the\n  public point.\n- MbedTLS: mbedtls_process_ec() exports the public key PSA derives from\n  the imported scalar and compares it to the JWK\u0027s 0x04 || X || Y. The\n  scalar import already rejects d \u003d 0 and d \u003e\u003d n.\n\nThe GnuTLS and MbedTLS import-failure branches are now reached by a\nzero / out-of-range d, so their LCOV_EXCL markers are dropped. No\npublic API, exported symbol, or ABI change: the three process_ec\nfunctions and the new OpenSSL helper are internal. Scope is EC only;\nRSA/OKP private-member disagreement is a separate follow-up.\n\nFour SET_OPS() loop tests in tests/jwt_security.c load P-256 (and one\nP-521) keys that reuse a real public point with a tampered d (0, the\ngroup order n, and 1), asserting the error flag on every backend.\n\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "0081a8dbac62663087b5b9979c23f4b04175721c",
      "tree": "2d88e46d146c4d8d645438ff85d61eca357775af",
      "parents": [
        "fe6b30d2d373150b88eb66edd9ee513d64eba1e5",
        "669822fde4a011966904f528d918246e399a57cf"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 08:57:03 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 08:57:03 2026 -0500"
      },
      "message": "Merge pull request #379 from benmcollins/release-3.6.4\n\nRelease v3.6.4"
    },
    {
      "commit": "669822fde4a011966904f528d918246e399a57cf",
      "tree": "2d88e46d146c4d8d645438ff85d61eca357775af",
      "parents": [
        "fe6b30d2d373150b88eb66edd9ee513d64eba1e5"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 08:23:53 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 08:23:53 2026 -0500"
      },
      "message": "Release v3.6.4\n\nBump LIBJWT_VERSION_SET 3 6 3 -\u003e 3 6 4.\n\nSONAME: 18:3:4 -\u003e 18:4:4 (revision++, current/age untouched). The change\nsince v3.6.3 adds input-length guards on the verify path (it rejects a\ntoken of INT_MAX bytes or more before parsing). It changes behavior but\nno exported symbol: the jwt*/jwk*/jwe* symbol set is identical to v3.6.3\n(155 symbols), and with comments stripped include/jwt.h is unchanged, so\nno Doxygen @since tag is added. Per the libtool rules only the SONAME\nrevision advances. The SONAME major (current - age) stays 14.\n\nmake check passes.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "fe6b30d2d373150b88eb66edd9ee513d64eba1e5",
      "tree": "9cba8e586c71b47c7ce94299d183cc706a27e9dc",
      "parents": [
        "bbb94c2e4e628de5feda374f415f3f4503331db3",
        "521af8f1645062103135db07b495f579745667e5"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Tue Nov 17 08:06:30 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 08:06:30 2026 -0500"
      },
      "message": "Merge commit from fork\n\njwt: reject a token of INT_MAX bytes or more before parsing"
    },
    {
      "commit": "521af8f1645062103135db07b495f579745667e5",
      "tree": "9cba8e586c71b47c7ce94299d183cc706a27e9dc",
      "parents": [
        "bbb94c2e4e628de5feda374f415f3f4503331db3"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 17:00:46 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Tue Nov 17 07:56:37 2026 -0500"
      },
      "message": "jwt: reject a token of INT_MAX bytes or more before parsing\n\nThe verify path copies the token and slices it into header, payload and\nsignature, each measured with a length held in int: jwt_parse() and\njwt_base64uri_decode() on the Compact path, and verify_entry() on the\nJWS JSON Serialization path. A length of INT_MAX or more does not fit\nthe int it is measured with, so a token that long cannot be handled\ncorrectly and is rejected up front rather than parsed.\n\nReject a token whose length is INT_MAX or more, with \"Token too large\",\nat both public verify entries:\n\n  - __verify() (jwt_checker_verify()), right after the empty-token check.\n    This is the one point every Compact and JWS JSON Serialization path\n    passes through, so it covers the single-key, keyring and embedded-JWK\n    flows.\n\n  - jwt_checker_verify_detached(), which base64-decodes the protected\n    header and parses a raw JSON token before it rebuilds the token and\n    calls jwt_checker_verify(), so it is bounded here first.\n\nNo legitimate token is anywhere near 2 GiB. Neither reject path can be\nreached without allocating a 2 GiB input, so both carry LCOV_EXCL, as\nthe existing len \u003e INT_MAX guards on the encode side do.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "bbb94c2e4e628de5feda374f415f3f4503331db3",
      "tree": "630453fd59e6741e1faab283fe93580d2e8ad95b",
      "parents": [
        "9d811f2cecedd9b8fdb48b5205f531a65d5b3a04",
        "f7f3e03165337d6f852254184686035b2b82a18f"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Mon Nov 16 16:20:15 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 16 16:20:15 2026 -0500"
      },
      "message": "Merge pull request #377 from benmcollins/jansson-error-excerpt\n\njansson: leave the input excerpt out of parse error messages"
    },
    {
      "commit": "9d811f2cecedd9b8fdb48b5205f531a65d5b3a04",
      "tree": "c3c7b7835c25983940878df9edc8caffbc306352",
      "parents": [
        "3a5f02b064f40042c19cc8796f10f2784fd16758",
        "1de5385963966d32d54d7efdfd04bd1df1835e51"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Mon Nov 16 16:20:01 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 16 16:20:01 2026 -0500"
      },
      "message": "Merge pull request #376 from benmcollins/jwt-verify-escape-c1\n\ntools: escape C1 controls and malformed UTF-8 in jwt-verify output"
    },
    {
      "commit": "f7f3e03165337d6f852254184686035b2b82a18f",
      "tree": "167cff45aa4d3d75609a5907d88f025be078ab51",
      "parents": [
        "3a5f02b064f40042c19cc8796f10f2784fd16758"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 12:32:58 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 12:32:58 2026 -0500"
      },
      "message": "jansson: leave the input excerpt out of parse error messages\n\nJansson ends most parse errors with \" near \u0027\u003ctext\u003e\u0027\", which repeats up\nto 20 bytes of the input it was reading, and its \"invalid Unicode\"\nmessages repeat the escape as well. map_error() passed that text on as\nit was, so jwks_error_msg() repeated part of the input, while the\njson-c backend reports fixed descriptions.\n\nCut the text at the first \" near \u0027\", and cut the \"invalid Unicode\"\nmessages at their first single quote. \" near end of file\" and\nJansson\u0027s own quotes, as in \"\u0027]\u0027 expected\", stay. So does \"unable to\nopen \u003cpath\u003e: \u003creason\u003e\", whole, even when the path has \" near \u0027\" in it.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "1de5385963966d32d54d7efdfd04bd1df1835e51",
      "tree": "c3c7b7835c25983940878df9edc8caffbc306352",
      "parents": [
        "3a5f02b064f40042c19cc8796f10f2784fd16758"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 12:32:58 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 12:32:58 2026 -0500"
      },
      "message": "tools: escape C1 controls and malformed UTF-8 in jwt-verify output\n\njwt-verify showed a byte below 0x20 or DEL from a token as \\xNN on its\n[TOK] and [BAD] lines, but every byte from 0x80 up as it was. It printed\nthe --verbose dump of the header and payload with no escaping at all:\ninside a string, Jansson and json-c escape only the controls below 0x20.\n\nMove the escaping into write_escaped() in jwt-util.h and widen it. A\nbyte below 0x20, DEL, both bytes of a C1 control (U+0080 to U+009F,\nencoded C2 80 to C2 9F) and each byte that does not start well-formed\nUTF-8 (RFC 3629) are shown as \\xNN. Printable ASCII and all other\nwell-formed UTF-8 are shown as they are, so non-ASCII text in claims\nstays readable. The [TOK] and [BAD] lines use it, and so does the\n--verbose dump when it is printed rather than given to a --print\ncommand, keeping its line breaks and indentation. jwt-generate\u0027s dump\ngoes through the same code. A --print command still gets the JSON as\nit is.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "3a5f02b064f40042c19cc8796f10f2784fd16758",
      "tree": "e6152aa07867b89348e1e685dfaf4edb0fdbcf07",
      "parents": [
        "0c20e9c5c492ee18775a58f99e4d1eccc94848a4",
        "a01e74b7b854613288812e5e4915bd3262f24c60"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Mon Nov 16 09:35:32 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 16 09:35:32 2026 -0500"
      },
      "message": "Merge pull request #370 from benmcollins/release-3.6.3\n\nRelease v3.6.3"
    },
    {
      "commit": "a01e74b7b854613288812e5e4915bd3262f24c60",
      "tree": "e6152aa07867b89348e1e685dfaf4edb0fdbcf07",
      "parents": [
        "0c20e9c5c492ee18775a58f99e4d1eccc94848a4"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 09:14:24 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 09:14:24 2026 -0500"
      },
      "message": "Release v3.6.3\n\nBump LIBJWT_VERSION_SET 3 6 2 -\u003e 3 6 3.\n\nSONAME: 18:2:4 -\u003e 18:3:4 (revision++, current/age untouched). The changes\nsince v3.6.2 are three security fixes (GHSA-4jp4-6w6j-ff4q,\nGHSA-g7xw-4cjw-2247, GHSA-vmf4-mvgm-7vpv). They change behavior, but no\nexported symbol: the jwt*/jwk*/jwe* symbol set is identical to v3.6.2\n(155 symbols), and with comments stripped include/jwt.h is unchanged, so\nno Doxygen since tag is added. Per the libtool rules only the SONAME revision\nadvances. The SONAME major (current - age) stays 14.\n\nmake check passes.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "0c20e9c5c492ee18775a58f99e4d1eccc94848a4",
      "tree": "f26466931d6b6fbc7b8ed8c2887a3e30fde33113",
      "parents": [
        "5d1a0c8ed626377710791dec00cc72a0df4d1406",
        "a0b0a29cf5ce0799d58c8b4a774e4a6257ee0d88"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Mon Nov 16 09:13:18 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 16 09:13:18 2026 -0500"
      },
      "message": "Merge commit from fork\n\nFix GHSA-g7xw-4cjw-2247: jwt-verify exit status must not wrap to 0"
    },
    {
      "commit": "5d1a0c8ed626377710791dec00cc72a0df4d1406",
      "tree": "966f604ca23ced14313713d6194f4f549f1b1cb0",
      "parents": [
        "ed7ca907509db33690e58975bc7416aaad575120",
        "d927851449d8054353d0faa582aefab52503428b"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Mon Nov 16 09:13:08 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 16 09:13:08 2026 -0500"
      },
      "message": "Merge commit from fork\n\nFix GHSA-4jp4-6w6j-ff4q and GHSA-vmf4-mvgm-7vpv: keys in error, x5c binding, embedded-JWK forgery"
    },
    {
      "commit": "d927851449d8054353d0faa582aefab52503428b",
      "tree": "966f604ca23ced14313713d6194f4f549f1b1cb0",
      "parents": [
        "1329901487036b03964d7fed67b6e1a619f4739e"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sat Nov 14 10:16:18 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 08:52:51 2026 -0500"
      },
      "message": "jwk: do not export private members of a key of unknown type (GHSA-4jp4-6w6j-ff4q)\n\njwks_item_export(item, 0) and jwks_export(set, 0) make the public form of a\nkey by deleting the private members of its key type, which\njwk_priv_members() looked up from item-\u003ekty. A JWK whose \"kty\" LibJWT does\nnot recognise stays in the keyring, in error, with the type\nJWK_KEY_TYPE_NONE, and for that type the list was empty: the whole JWK came\nout as its \"public\" form, private members included. That is any \"kty\" that\nis missing, not a string, misspelt (\"ec\") or of a type the build does not\nsupport. On a build without ML-DSA, which is the default, a private \"AKP\"\nkey was exported with its \"priv\" seed. jwt_builder_setcnf_jwk() embeds the\nsame public form, so in 3.6.2 such a key also went whole into the \"cnf\"\nclaim of the tokens it was set on; since the first commit of this series\nthat function refuses every key in error, which a key of unknown type\nalways is. An application that does not look at jwks_item_error() has no\nsign of this: the key that leaks is one the build cannot use.\n\nThe list had two more gaps:\n - \"oth\" (RFC 7518 section 6.3.2.7, the other primes of a multi-prime RSA\n   key) was missing, so the public form of an RSA key kept it.\n - Only the members of the key\u0027s own type were deleted, and a key in error\n   need not be what its \"kty\" says. The public form of an RSA private key\n   labelled \"EC\" lost \"d\" and kept \"p\", \"q\", \"dp\", \"dq\" and \"qi\"; that of\n   a symmetric key labelled \"RSA\" kept \"k\".\n\nFix:\n - jwk_process_one() recognises \"AKP\" in every build: it keeps the type\n   JWK_KEY_TYPE_AKP (so the public form below applies) and, where no backend\n   can load the key, writes an error and returns, as the process_mldsa \u003d\u003d NULL\n   branch already did. A public \"AKP\" key is then no longer left to the\n   unknown-type branch, which would strip nothing and leak the \"priv\" seed; it\n   keeps its public form (the JWK minus \"priv\"), unusable but not dropped.\n - jwk_strip_private():\n   - A key has a public form only if its type is EC, RSA, OKP, oct or AKP.\n     For any other type the function strips nothing and says so:\n     jwks_item_export() then returns NULL and jwks_export() leaves the key\n     out of the set. A key type added later has no public form until it is\n     listed there.\n   - Every member that is private in some key type is deleted, whatever the\n     type of the key: \"d\", \"p\", \"q\", \"dp\", \"dq\", \"qi\", \"oth\", \"k\" and\n     \"priv\" -- jwk_priv_names[], the list the \"jwk\" header commit of this\n     series shares with it (jwk_json_has_private()). jwk_priv_members() and\n     its per-type lists are gone.\n   - The public form of a key in error also loses any \"x5c\", \"x5t\",\n     \"x5t#S256\" and \"x5u\": the key was flagged over that X.509 binding (or\n     could not load), the accessors read as absent for it, and a relay must\n     not be able to republish the binding from the public form.\n     jwks_item_export() and jwks_export() pass the item, not just its \"kty\".\n\nBehavior change: with priv \u003d\u003d 0, jwks_item_export() returns NULL for a key\nwhose \"kty\" LibJWT does not recognise at all and jwks_export() omits it; both\nused to return the JWK as loaded. An \"AKP\" key is recognised in every build,\nso a public one keeps its public form (as it had in 3.6.2, minus the \"priv\"\nleak). A public form no longer holds \"oth\", nor one of the other eight names\nunder a key type that does not define it, nor the \"x5c\" binding of a key in\nerror -- which is also what jwt_builder_setcnf_jwk() embeds. Exports with\npriv !\u003d 0 are unchanged, and so is the public form of every key in tests/keys\nthat is not in error. No exported symbol changes.\n\nTests in tests/jwt_jwks_pem.c, on every crypto backend and both JSON\nbackends: keys of unknown type (an unknown name, a known one in the wrong\ncase, a \"kty\" that is not a string, none, and a \"keys\" entry that is not an\nobject) through the item, the set and jwt_builder_setcnf_jwk(); an \"AKP\"\nkey with and without ML-DSA; keys in error under a known \"kty\", among them\nan EC private key whose point is not on its curve and private keys under\nthe wrong \"kty\"; an RSA key with \"oth\"; the whole test keyring; a public key\nof a known type that also carries a member private in another type (\"k\"/\"p\"/\n\"priv\" on an EC key), whose \"cnf\" embed holds none of them\n(test_setcnf_jwk_strips_foreign); and a key in error with an \"x5c\", whose\npublic form keeps none of its X.509 binding (test_export_key_in_error_x5c).\ntest_export_akp now expects the \"AKP\" public form in every build. All but\nthe keyring test fail against 3.6.2; the jwt_builder_setcnf_jwk() ones pass\nfrom the first commit of this series on. Docs: jwks_item_export(),\njwks_export(), jwks_item_error(), jwt_builder_setcnf_jwk(), JWK_KEY_TYPE_NONE\nand the README ML-DSA note.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "a0b0a29cf5ce0799d58c8b4a774e4a6257ee0d88",
      "tree": "a07d13304ed1adeb38043e56cd5e7512dec72fd2",
      "parents": [
        "5f44b17c9d460f0a0350018cee2c59f0c03916c8"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 10:38:39 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 08:52:25 2026 -0500"
      },
      "message": "jwt-verify: escape control bytes in printed output (GHSA-g7xw-4cjw-2247)\n\nThe token text on the [TOK] line, and the error message on the [BAD]\nline (which echoes the token\u0027s \"alg\" header), were printed raw. A forged\ntoken whose header \"alg\" carried a carriage return and terminal escape\nsequences could erase its own \"[BAD]\" line and repaint it as a green\n\"[YES] Verified\", or a token argument with an embedded newline could\nprint a whole fake \"[YES]\" line. The exit status stayed 1, but a human\nreading the output, or a script grepping it, was misled.\n\nFix: a helper, print_escaped(), prints a byte below 0x20 or 0x7f as \\xNN\ninstead of sending it to the terminal, and the token and the error\nmessage both go through it. The colour and emoji framing jwt-verify emits\nitself is unchanged, so a verified token still shows its green marker.\n\nBehavior change: control bytes in a token or in the \"alg\" it reports are\nshown escaped. A token of only printable bytes (a real JWT is base64url)\nis printed exactly as before. No exported symbol changes.\n\nTests in tests/jwt-cli.bats: a forged token whose \"alg\" carries CR and\nescape sequences fails (exit 1) and its output cannot be grepped as the\nreal verified marker, as an argument and on stdin, while an honest token\nstill shows that marker. The forged case fails against the previous\ncommit.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "5f44b17c9d460f0a0350018cee2c59f0c03916c8",
      "tree": "cb78de9b357d6a422287ee4fa4e2326387e44531",
      "parents": [
        "df4c5a9214385086ef5c9634ba22c2ff373059ff"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 10:37:27 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 08:52:25 2026 -0500"
      },
      "message": "jwt-verify: make --print require --verbose (GHSA-g7xw-4cjw-2247)\n\nThe callback that runs the --print command is installed only with\n--verbose, so \"-p CMD\" on its own, or with -q (the natural choice for a\nscript), never ran the command: the token passed on its signature alone\nwhile the usage text and man page describe --print as a way to \"validate\"\nit and say a non-0 status fails verification. A script relying on the\nvalidator could have it silently skipped.\n\nFix: --print without --verbose is a usage error (\"--print requires\n--verbose\"), as the man page already implied (\"only makes sense with\n--verbose\"). The usage text and tools/jwt-verify.1.md say --print requires\n--verbose, with the regenerated tools/jwt-verify.1.\n\nBehavior change: \"jwt-verify -p CMD ...\" without -v now exits 1 with a\nusage message instead of verifying without running CMD. No exported symbol\nchanges.\n\nTests in tests/jwt-cli.bats: -p without -v (and with -q) is a usage error,\nand -p with -v runs the validator so a non-zero status fails the token.\nThe first fails against the previous commit.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "df4c5a9214385086ef5c9634ba22c2ff373059ff",
      "tree": "9e6ca2196937fa2b75fc7347688c83c54942b522",
      "parents": [
        "e157cf964ece8786f7f997bbb6ab30f3b261230c"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 10:36:32 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 08:52:25 2026 -0500"
      },
      "message": "jwt-verify: fail a token when the --print command is killed (GHSA-g7xw-4cjw-2247)\n\nWith --verbose, --print pipes the header and the payload of each token\nto a command, and the token fails if that command does not exit 0: the\nusage text offers it to \"validate\" a token with an external program.\nwrite_json() took WEXITSTATUS() of the command without WIFEXITED(). A\ncommand that a signal ended (a crash, an out-of-memory kill, a timeout\nthat sends SIGKILL) has no exit status, and WEXITSTATUS() reads 0 for\nit, so the token was reported verified and jwt-verify exited 0. If\nwaitpid() failed, the status was read uninitialised. On Windows the\ncommand\u0027s status was not read at all: _pclose() was called and its\nreturn value discarded, so a validator that exited non-zero there never\nfailed the token.\n\nFix: a --print command passes only if waitpid() reaps it and it exited\nnormally with status 0. On Windows the token fails unless _pclose()\nreturns 0. jwt-generate uses the same helper and now fails to generate\nin the same case.\n\nBehavior change: a --print command that a signal ends fails the token\n(jwt-verify) or the token\u0027s generation (jwt-generate), as a non-zero\nexit status already did. On Windows a non-zero command status now fails\nthe token as well, matching the POSIX path. No exported symbol changes.\n\nTests in tests/jwt-cli.bats: a --print command that reads its input and\nexits 0 passes, one that exits 3 fails, and one that kills itself with\nSIGKILL fails, with no \"Verified\" printed; jwt-generate fails for the\nlatter. The two SIGKILL cases fail against the previous commit. The\nWindows path is not built here and is covered by reading. Docs:\ntools/jwt-verify.1.md and tools/jwt-generate.1.md, with the regenerated\ntools/jwt-verify.1 and tools/jwt-generate.1.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "e157cf964ece8786f7f997bbb6ab30f3b261230c",
      "tree": "1dd414e6c2831f4d2abb2b85ee326c756ecc2afc",
      "parents": [
        "ed7ca907509db33690e58975bc7416aaad575120"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sat Nov 14 10:31:26 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Mon Nov 16 08:52:24 2026 -0500"
      },
      "message": "jwt-verify: exit 1 when any token fails (GHSA-g7xw-4cjw-2247)\n\njwt-verify ended with exit(err), where err counted the tokens that failed.\nAn exit status keeps only 8 bits of it, so 256 failures, or any multiple of\n256, exited 0 like a run in which every token verified. The stdin reader\nmade that reachable with one token: it used fgets() into a BUFSIZ buffer,\nso a line longer than BUFSIZ - 1 bytes came back in pieces and each piece\nwas verified as a token of its own. A forged token padded to one line of\n256 * (BUFSIZ - 1) - 1 bytes (2096895 with glibc, 261887 on macOS) was 256\nfailing pieces and exit status 0. Scripts use the tool as a verification\ngate and look only at that status.\n\nThe same loop had other ways to exit 0 with nothing verified:\n - a line with a NUL byte was verified up to the NUL and the rest of it\n   was ignored;\n - empty input and a read error (a directory, or a descriptor that cannot\n   be read, as stdin) both ended it with status 0, so the token argument\n   \"-\", also after \"--\", exited 0 when stdin was empty;\n - token arguments after a \"-\" were never looked at.\n\nAn option-like token exited 0 without verifying anything of its own: getopt\npermutes argv, so a token that starts with -h or -l (for example \"-h\",\n\"--help\", \"-lq\", or \"-l\" followed by a forged token), anywhere on the line,\nmade the tool print help or the algorithm list and exit 0 while the real\ntokens went unverified. A key set with no keys crashed: for {\"keys\":[]},\njwks_item_get() returns NULL and jwks_item_error() dereferenced it (SIGSEGV),\nwhere the new EXIT STATUS section promises exit 1.\n\nAll of it came with the rewrite of the tool (372513c) and is in every\nrelease from 3.0.0 to 3.6.2.\n\nFix:\n - The exit status is 0 only if every token verified and 1 (EXIT_FAILURE)\n   otherwise. Failures are kept as a flag (err |\u003d ...), not a count, and\n   the tool ends with exit(err ? EXIT_FAILURE : EXIT_SUCCESS).\n - stdin is read by a bounded reader, read_line(), into a static 1 MiB\n   buffer. A line of 1048576 bytes or more, or one with a NUL byte in it,\n   is read to its end, is never verified in whole or in part, and counts\n   as one failed token: \"[BAD] Line is too long or has a NUL byte\", and\n   nothing with -q.\n - stdin with nothing to verify exits 1: \"ERR: No token(s) read from\n   stdin\" for empty input and \"ERR: Could not read stdin: \u003cerror\u003e\" for a\n   read error, whatever verified before it. A line cut short by a read\n   error is not verified.\n - \"-\" followed by more token arguments is a usage error.\n - -h and -l print and exit 0 only when they are the sole argument; given\n   with a token, a key or any other option they are a usage error (exit 1).\n   A later bad option still fails first. To check a token from an untrusted\n   source, pass it on stdin, or reject one that starts with \"-\", which a\n   real token never does; the usage text and man page say so.\n - A key set with no keys exits 1, \"ERR: No key found in \u003cfile\u003e\", instead of\n   crashing. jwt-generate had the same NULL dereference and is fixed too.\n - On Windows, stdin is read as binary (_setmode(_fileno(stdin),\n   _O_BINARY)), so a 0x1A (Ctrl-Z) byte does not end the input and leave a\n   later line unverified, the same class as the NUL byte.\n\nBehavior change: the exit status is no longer the number of tokens that\nfailed; it is 1 for any number of them. Empty or unreadable stdin exits 1\ninstead of 0, and so does \"- token ...\". A token of up to 1048575 bytes\nnow verifies from stdin, where one longer than BUFSIZ - 2 bytes failed; a\nlonger line and a line with a NUL byte are one failed token each. -h or -l\nwith anything else, and -k on an empty key set, exit 1 where they printed\nhelp or crashed. Unchanged: an empty line is a token that fails, a CRLF line\nfails, the last line needs no newline, and the output for each token is the\nsame. No exported symbol changes.\n\nTests in tests/jwt-cli.bats: 256 failing tokens as arguments and as lines\nof stdin, mixed and all-good tokens, a line at the 1 MiB limit and one a\nbyte shorter, the padded forged token of both lengths, a valid token\nlonger than BUFSIZ with and without a final newline, lines with a NUL\nbyte, no token (no argument, empty stdin, \"-- -\", a directory and a\nwrite-only descriptor as stdin), \"-\" with another token, CRLF, empty\nand blank-padded lines, -h/-l alone and in a token position, and an empty\nkey set for jwt-verify and jwt-generate. All fail against 3.6.2. Docs: the\nusage text, and tools/jwt-verify.1.md with the regenerated\ntools/jwt-verify.1 (the -q option, the rules for stdin, the no-key caveat\non EXIT STATUS 0, the -h/-l rule, and a new EXIT STATUS section).\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "1329901487036b03964d7fed67b6e1a619f4739e",
      "tree": "12e3c518c3d6ddc0f590a04953312a2c3f2f3735",
      "parents": [
        "2143cf3d8a47cb4d547635b190a88911acc12549"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sat Nov 14 10:58:26 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 21:08:32 2026 -0500"
      },
      "message": "jwk: require the \"x5c\" leaf to hold the JWK\u0027s key (GHSA-4jp4-6w6j-ff4q)\n\nRFC 7517 section 4.7 says of the \"x5c\" chain of a JWK that \"the key in the\nfirst certificate MUST match the public key represented by other members\nof the JWK\". jwk_process_x5c() decoded the chain and compared \"x5t#S256\"\nwith its first certificate, and never looked at the key in it. A chain is\npublic, so anyone could put another party\u0027s chain on a key of their own,\nand an application that trusts a JWK because the chain it gets from\njwks_item_x5c() validates then trusted that key. The valid fixture of the\nX.509 tests was such a JWK: the certificate in ec_key_with_x5c.json is for\nanother P-256 key. This is in every release that parses \"x5c\" (3.6.0 to\n3.6.2).\n\nFix, in static functions of libjwt/jwks.c only (no backend code and no\nX.509 library):\n - der_get() takes one DER element from a view of the octets that are left\n   to read: a single-octet tag and a definite length in its shortest form,\n   of at most three octets, that fits in the view. The whole walk goes\n   through it.\n - x5c_cert_spki() walks the leaf to its SubjectPublicKeyInfo: the\n   Certificate, with nothing after it; tbsCertificate, signatureAlgorithm\n   and signatureValue, and nothing more; in the tbsCertificate the optional\n   version and five fields by their tags; then the AlgorithmIdentifier and\n   the BIT STRING of the key, without unused bits and with nothing after\n   them.\n - x5c_spki_matches() compares that with the members of the JWK: RSA \"n\"\n   and \"e\" as unsigned integers, for an rsaEncryption or id-RSASSA-PSS key\n   with any parameters; EC \"x\" and \"y\" as unsigned integers, for\n   id-ecPublicKey with the named curve of \"crv\" and an uncompressed point;\n   OKP \"x\" and AKP \"pub\" octet for octet, for exactly the algorithm of\n   \"crv\" or \"alg\" without parameters and a key of its length.\n - jwk_check_x5c_leaf() runs last in jwk_process_x5c(), and only for an\n   item that is not in error, so every existing message still comes first.\n   It adds:\n     Invalid JWK: \"x5c\" is not valid for an \"oct\" key\n     Invalid JWK: \"x5c\" leaf is not a valid certificate\n     \"x5c\" leaf certificate does not match the JWK\u0027s key\n - The two allocation failures in jwk_process_x5c() returned without an\n   error, which would now leave the leaf unchecked. They set \"Error\n   allocating memory for x5c\".\n\nOnly the key is compared. No signature is verified, no name, date or\nextension is read, and the certificates after the leaf are not looked at:\nvalidating the chain stays with the application. This commit only marks\nthe item in error; that a key in error is never used, and hands out no\nchain, is the first commit of this series. A private OKP or AKP key is\ncompared by \"x\" or \"pub\" like a public one, which says what it should\nbecause those members are known to belong to \"d\" or \"priv\" where a backend\ntakes the key from them: that is the second commit of this series.\n\nBehavior change: a JWK with certificates in \"x5c\" is in error unless the\nfirst one is a DER certificate that holds the JWK\u0027s key. That includes a\nchain in the wrong order, a certificate that was kept when its key was\nreplaced, an \"oct\" key with certificates, and a private OKP or AKP key\nwithout \"x\" or \"pub\", for which there is nothing to compare. Not accepted\neither, whatever key they hold: a leaf with a compressed or hybrid EC\npoint or with explicit curve parameters, and a \"crv\" other than P-256,\nP-384, P-521 and secp256k1 (the OpenSSL backend also loads its own names\nfor curves). An empty \"x5c\" array and a JWK without \"x5c\" are as before.\nNo exported symbol changes.\n\nTests in tests/jwt_x509.c, on every crypto backend and both JSON backends.\nEach case first loads its key without \"x5c\": where a backend cannot load\nthe key, it has to keep that error whatever comes with it.\n - test_x5c_leaf_key: a certificate made with the OpenSSL command line for\n   each kind of key (RSA, an id-RSASSA-PSS key, P-256, P-384, P-521,\n   secp256k1, Ed25519, Ed448, X25519, X448, ML-DSA-44, -65 and -87), with\n   its own key, public and private, and with other keys, curves, parameter\n   sets and kinds of key; private keys without their public member; the\n   certificate that 3.6.2 had in ec_key_with_x5c.json, alone, with its own\n   \"x5t#S256\" and with a wrong one; \"n\", \"e\", \"x\" and \"y\" with leading zero\n   octets; an \"e\" of 1 and of 65537 * 256 with the certificate\u0027s modulus; a\n   curve name and a coordinate that only the OpenSSL backend takes.\n - test_x5c_leaf_der: leaves written in a small DER notation, one for each\n   check of the reader and of the comparison, each next to one that is\n   accepted; among them a SubjectPublicKeyInfo whose length overruns the\n   tbsCertificate into octets that parse as the key, which only der_get()\u0027s\n   \"length fits what is left\" check rejects (it is accepted without it).\n - test_x5c_chain and test_x5c_no_certs: only the leaf is compared; an\n   empty array, a string and entries that cannot be decoded are as before.\n - test_x5c_other_key_unusable: the P-256 test key with the certificate of\n   another key has no chain, no certificate thumbprints and no thumbprint,\n   is refused by jwt_checker_setkey(), jwt_builder_setkey() and JWE, and\n   is skipped by a keyring, which verifies with the next key; with its own\n   certificate the same key does all of it.\n - test_x5c_embedded_jwk: a token whose header \"jwk\" is the pinned (or\n   allow-listed) key with another key\u0027s chain is rejected by embedded-JWK\n   verification; with its own certificate it passes, and\n   jwt_checker_sig_key() has the chain.\ntests/keys/ec_key_with_x5c.json and ec_key_x5c_bad_x5t.json now carry the\ncertificate of their own key. The docs state exactly what is checked -- the\nframing to the key and the key\u0027s identity, not that the leaf is otherwise a\nwell-formed certificate, and of a private JWK only its public members (a\nprivate member is not compared against the leaf) -- and note that an\nid-RSASSA-PSS leaf matches any RSA JWK without restricting its algorithms,\nand that jwks_item_x5c() reads a JWK\u0027s \"x5c\", not a token\u0027s header. Docs:\njwks_item_x5c(), jwks_item_x5c_count(), jwks_item_x5t_s256(),\njwks_item_error(), README and the JAdES recipe of the Application Profiles\npage.\n\nThe files in tests/keys/x5c and the two JSON fixtures were made with\nOpenSSL 3.6.3 and jq; the output is the same on every run:\n\n  K\u003dtests/keys; O\u003d$K/x5c; mkdir $O\n  D\u003d\"-subj /CN\u003dlibjwt-test -not_before 20260101000000Z -not_after 21260101000000Z -sigopt nonce-type:1\"\n  openssl req -x509 -new -config /dev/null -key $K/pem-files/ec_key_prime256v1.pem -set_serial 1 $D -out $O/ec_key_prime256v1.crt\n  leaf() { openssl x509 -new -force_pubkey $2 -CA $O/ec_key_prime256v1.crt -CAkey $K/pem-files/ec_key_prime256v1.pem -set_serial $1 $D -out $O/$3.crt; }\n  leaf 2 $K/pem-files/ec_key_secp384r1_pub.pem ec_key_secp384r1\n  leaf 3 $K/pem-files/ec_key_secp521r1_pub.pem ec_key_secp521r1\n  leaf 4 $K/pem-files/ec_key_secp256k1_pub.pem ec_key_secp256k1\n  leaf 5 $K/pem-files/rsa_key_2048_pub.pem rsa_key_2048\n  leaf 6 $K/pem-files/rsa_pss_key_2048_pub.pem rsa_pss_key_2048\n  leaf 7 $K/pem-files/eddsa_key_ed25519_pub.pem eddsa_key_ed25519\n  leaf 8 $K/pem-files/eddsa_key_ed448_pub.pem eddsa_key_ed448\n  okp() { { printf \"$1\"; printf \u0027%s\u003d\u0027 \"$(jq -r .x $2)\" | tr \u0027_-\u0027 \u0027/+\u0027 | openssl base64 -d -A; } | openssl pkey -pubin -inform DER -out $3; }\n  okp \u0027\\060\\052\\060\\005\\006\\003\\053\\145\\156\\003\\041\\000\u0027 $K/okp_x25519_enc.json x25519.pem\n  okp \u0027\\060\\102\\060\\005\\006\\003\\053\\145\\157\\003\\071\\000\u0027 $K/okp_x448_enc.json x448.pem\n  leaf 9 x25519.pem okp_x25519\n  leaf 10 x448.pem okp_x448\n  leaf 11 $K/mldsa-pem/mldsa_key_44_pub.pem mldsa_key_44\n  leaf 12 $K/mldsa-pem/mldsa_key_65_pub.pem mldsa_key_65\n  leaf 13 $K/mldsa-pem/mldsa_key_87_pub.pem mldsa_key_87\n  { echo \u0027-----BEGIN CERTIFICATE-----\u0027; git show v3.6.2:$K/ec_key_with_x5c.json | jq -r \u0027.x5c[0]\u0027 | fold -w 64; echo \u0027-----END CERTIFICATE-----\u0027; } \u003e $O/ec_other_prime256v1.crt\n  C\u003d$(grep -v \u0027^-\u0027 $O/ec_key_prime256v1.crt | tr -d \u0027\\n\u0027)\n  S\u003d$(openssl x509 -in $O/ec_key_prime256v1.crt -outform DER | openssl dgst -sha256 -binary | openssl base64 -A | tr \u0027+/\u0027 \u0027-_\u0027 | tr -d \u0027\u003d\u0027)\n  jq --indent 2 --arg c \"$C\" --arg s \"$S\" \u0027.x5c \u003d [$c] | .\"x5t#S256\" \u003d $s\u0027 $K/ec_key_with_x5c.json \u003e good.json\n  jq --indent 2 --arg c \"$C\" --arg s \"A${S#?}\" \u0027.x5c \u003d [$c] | .\"x5t#S256\" \u003d $s\u0027 $K/ec_key_x5c_bad_x5t.json \u003e bad.json\n  mv good.json $K/ec_key_with_x5c.json; mv bad.json $K/ec_key_x5c_bad_x5t.json; rm x25519.pem x448.pem\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "2143cf3d8a47cb4d547635b190a88911acc12549",
      "tree": "a7fe30c42bdbfaa99fe713da142c45d7940359f4",
      "parents": [
        "a4b6351fd7d5be6f17beb9df853f60c672680e98"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sat Nov 14 11:07:00 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 21:08:32 2026 -0500"
      },
      "message": "jwt: refuse a private key in the \"jwk\" header (GHSA-vmf4-mvgm-7vpv)\n\nThe \"jwk\" header parameter is the public key of the signer (RFC 7515\nsection 4.1.3). jwt_embedded_jwk_key() loaded whatever JWK the header\nheld, private members and all, confirmed it by its RFC 7638 thumbprint,\nwhich covers the public members only, and handed it to signature\nverification. A header that carried the signer\u0027s private key was accepted\nlike one with the public key, and so was an \"oct\" key, which is the secret\nitself and has the thumbprint of its \"k\". For an OKP or AKP key the object\nthat verified was made from the private member, which is how a header key\nwith somebody else\u0027s public member got past a thumbprint pin (previous\ncommit).\n\nFix: jwt_embedded_jwk_key() looks at the header \"jwk\" JSON before it loads\nany key and gives no key when it is not the public form of a single key:\n - a \"keys\" member makes jwks_create() read it as a JWK set and confirm\n   only keys[0], while the rest are parsed on the attacker\u0027s say-so (a\n   key-load DoS), and a set is not one public key;\n - a member that is private in some key type (\"d\", \"p\", \"q\", \"dp\", \"dq\",\n   \"qi\", \"oth\", \"k\" or \"priv\"), whatever its value, which jwk_json_has_private()\n   (libjwt/jwks.c, JWT_NO_EXPORT) reports from the list the public export\n   strips (jwk_priv_names[], shared with jwk_strip_private()). This refuses\n   a private key, the signer\u0027s own included and for EC and RSA keys, and a\n   symmetric (\"oct\") key by its \"k\", as before, and makes the outcome the same\n   on every backend and both JSON libraries. An \"oct\" with no \"k\" is no public\n   key either; it loads in error and the confirmation below refuses it.\nThe token fails with the existing error \"Embedded JWK is missing or not\nconfirmed\" and no signature is checked.\n\nTesting the JSON itself, rather than the loaded key, is what makes the\ndecision backend-independent: the GnuTLS and MbedTLS parsers leave aside a\nprivate member that is not a string (\"d\": 5), and json-c hands a JSON null\nmember out as absent, so the same header used to load as the public key it\nalso is and be accepted there while OpenSSL put it in error. A refused\nheader also costs no key derivation now.\n\nBehavior change: jwt_checker_enable_embedded_jwk() and\njwt_checker_enable_embedded_jwk_keyring() reject a token whose header \"jwk\"\nloads as a private key, carries any of the private members above (whatever\ntheir value or \"kty\"), is a symmetric key, or is a JWK set. A token with a\npublic header key is verified as before, and the allow-list keyring may\nstill hold private keys: only their thumbprints are used. No exported\nsymbol changes.\n\nTests in tests/jwt_embedded_jwk.c, on every crypto backend and both JSON\nbackends: a proof whose header holds the P-256 key\u0027s own private JWK, one\nwhose header \"d\" is not that key\u0027s, an Ed25519 proof with its own private\nJWK (where the backend signs EdDSA) and an HS256 token with its \"oct\" key\nin the header are all rejected, by pin and by allow-list, with no signature\ncounted; so are a header whose \"d\" is a number, JSON null or empty string\nand one with a \"k\" of true (test_private_member_any_type), and the three\n\"keys\" shapes -- a private JWK with the public one listed, and a set of the\npinned public key followed by a private key or an \"oct\"\n(test_header_jwk_keys_wrapper). The same proofs with the public JWK verify.\nDocs: jwt_checker_enable_embedded_jwk(),\njwt_checker_enable_embedded_jwk_keyring(), jwt_checker_sig_key(), README\nand the OpenID4VCI and DPoP recipes of the Application Profiles page.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "a4b6351fd7d5be6f17beb9df853f60c672680e98",
      "tree": "0028f1aaf39d77fc135c2a3e7097dd5274bb8044",
      "parents": [
        "cd9f46d0432438296ce4f0e440918b1af72d1cb3"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sat Nov 14 11:07:00 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 21:08:32 2026 -0500"
      },
      "message": "jwk: reject a private OKP or AKP key that does not match its public member (GHSA-vmf4-mvgm-7vpv)\n\nA private OKP JWK (Ed25519, Ed448, X25519, X448) carries its public key\n\"x\" next to the private \"d\", and a private AKP JWK (ML-DSA) its \"pub\" next\nto the \"priv\" seed. The OpenSSL and GnuTLS parsers made the key object from\nthe private member alone and never compared it with the public one. OpenSSL\npassed only \"d\" or the seed to EVP_PKEY_fromdata(), which derives the\npublic key. GnuTLS kept the \"x\" it was given, but signs and verifies with\nthe key it re-imports from item-\u003epem, a PKCS#8 that holds \"d\" alone, and it\nbuilds an ML-DSA key from the seed. The rest of the library goes by the\nstated public member: the RFC 7638 thumbprint, jwks_find_bythumbprint(),\nthe public export and jwt_builder_setcnf_jkt(). A JWK with one key\u0027s \"x\"\nand another key\u0027s \"d\" therefore loaded without error, had the first key\u0027s\nthumbprint and verified the second key\u0027s signatures. For X25519 and X448\nunder OpenSSL, what was encrypted to it went to the second key.\n\nEmbedded-JWK verification (jwt_checker_enable_embedded_jwk() and\njwt_checker_enable_embedded_jwk_keyring(), 3.6.0 to 3.6.2) confirms the\nheader \"jwk\" by its thumbprint and then verifies with its key object. A\ntoken signed with any Ed25519 or Ed448 key was accepted for a pinned or\nallow-listed key on the same curve when its header \"jwk\" had that key\u0027s \"x\"\nand the signer\u0027s \"d\", and likewise for ML-DSA in a WITH_ML_DSA build. The\npublic key of the trusted key is all it takes.\n\nEC and RSA keys are not affected: all three backends verify and encrypt\nwith the public members as stated. Nor is MbedTLS: it keeps \"x\" and \"d\"\napart, encrypts to the \"x\" of an X25519 or X448 key and has no EdDSA and no\nML-DSA.\n\nFix:\n - OpenSSL: openssl_process_eddsa() and openssl_process_mldsa() make the\n   EVP_PKEY first (pctx_to_pkey(), split off pctx_to_pem()), read its\n   public key back with EVP_PKEY_get_octet_string_param() and compare it\n   octet for octet with the decoded \"x\" or \"pub\" (pkey_pub_is()), before\n   the item is given the key.\n - GnuTLS: gnutls_process_eddsa() compares \"x\" with the public key of the\n   key that JWS uses, the private key re-imported from its PKCS#8 form\n   (okp_pub_is()). \"d\" is not imported without \"x\" for this, which crashes\n   GnuTLS \u003c 3.8.13. gnutls_process_mldsa() compares \"pub\" with the tail of\n   the SubjectPublicKeyInfo of the key that the seed gives\n   (mldsa_pub_is()).\n - A key that fails is in error with \"OKP private key does not match its\n   public key\" or \"AKP private key does not match its public key\". A public\n   member that is no usable octet string -- not a string, empty, or not\n   base64url -- is told apart from a key that is simply wrong, with \"Invalid\n   OKP x\" / \"Invalid AKP pub\" (GnuTLS still says \"Error decoding OKP x\" for\n   an OKP \"x\" it decodes before the compare); only the wording differs, the\n   key is in error either way. Such a key has no key object and no PEM,\n   reports 0 bits, is not private and has no thumbprint. (The OpenSSL parsers\n   mark the item private before they make the key; for a key that does not\n   load, jwk_process_one() takes that back since the first commit of this\n   series.)\n\nBehavior change: under OpenSSL and GnuTLS a private OKP or AKP JWK whose\n\"x\" or \"pub\" is present, but is not the public key of its \"d\" or \"priv\",\nno longer loads. That includes a public member of another JSON type (JSON\nnull too), one that is not base64url and one of another length, wherever\na parser used to ignore it: OpenSSL in every case, GnuTLS for ML-DSA and\nfor an OKP \"x\" that is not a string. A private key without the public\nmember loads as before, and so do public keys, EC and RSA keys and every\nkey under MbedTLS. No exported symbol changes.\n\nTests in the new tests/jwt_jwks_pair.c, on every crypto backend and both\nJSON backends, with keys put together from the members of the pairs in\ntests/keys: for each OKP curve and each ML-DSA variant the matching pair,\nthe public key and the private member alone load and are the same key; a\npublic member that belongs to another key, differs in its first or its\nlast octets, has another length or another JSON type puts the key in\nerror with nothing left on the item, and neither a builder nor a checker\n(JWS or JWE) takes it; a token signed by another key whose\nheader \"jwk\" has the trusted key\u0027s public member is rejected by pin and by\nallow-list, while the honest token passes; and under MbedTLS what is\nencrypted to a mismatched X25519 or X448 pair can only be read with the\nprivate key of the \"x\" it states. A \"pub\" with extra trailing octets is a\nmismatch GnuTLS tells by the length before the tail compare, and an unusable\n\"x\"/\"pub\" is checked for its own message. Whether a backend signs EdDSA is\nprobed by signing. Several error paths in libjwt/gnutls/jwk-parse.c (the OKP\n\"x\" decode and private-key import, an EC private-key cleanup) and the\nEVP_PKEY_fromdata() failure exit in libjwt/openssl/jwk-parse.c were excluded\nfrom coverage; tests reach them, so they are counted now. Docs: jwks_load(),\njwks_item_thumbprint() and jwks_item_error().\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "cd9f46d0432438296ce4f0e440918b1af72d1cb3",
      "tree": "8bc9171fcb89ac01e978699d53ca51eb3254afaa",
      "parents": [
        "ed7ca907509db33690e58975bc7416aaad575120"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sat Nov 14 10:19:15 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Sun Nov 15 21:08:24 2026 -0500"
      },
      "message": "jwk: never use a key that is in error (GHSA-4jp4-6w6j-ff4q)\n\nA JWK that fails to load stays in its key set, marked in error\n(jwks_item_error()), and so does one that loads and is then flagged: an\n\"alg\" that is not a string, a malformed \"x5c\", or an \"x5t#S256\" that is\nnot that of its \"x5c\" leaf. Nothing on the way to signing, verifying,\nencrypting or decrypting looked at that flag, so such a key was used like\nany other:\n\n - A key flagged after it loaded still has a working key object. It signed\n   and verified tokens (set on a builder or a checker, returned by a\n   callback, or offered by a keyring, where it also shadowed a good key\n   with the same \"kid\") and encrypted and decrypted JWEs, on every backend.\n   For JWE a non-string \"alg\" also hid the key\u0027s \"use\" and \"key_ops\", which\n   are read after it.\n - A key that failed to load has no key object and belongs to no backend,\n   so it is handed to the ACTIVE one. The MbedTLS parsers recorded the key\n   size, and for EC and OKP the private flag, before they validated the\n   key, so the size check in jwt.c passed for it. With the active backend\n   switched to OpenSSL, openssl_sign_sha_pem() and openssl_verify_sha_pem()\n   then gave a NULL EVP_PKEY to EVP_PKEY_id(): a NULL dereference. Through\n   a keyring a junk signature with the right \"alg\" is enough to get there.\n - jwks_item_x5c_count(), jwks_item_x5c(), jwks_item_x5t() and\n   jwks_item_x5t_s256() returned the chain and the stated thumbprints of\n   such a key, and jwt_builder_setcnf_jwk() embedded it.\n\nFix:\n - __setkey_check() refuses a key in error before anything else, with \"Key\n   is in error and cannot be used\". This covers jwt_builder_setkey(),\n   jwt_checker_setkey(), jwt_builder_add_signature() and a key returned by\n   a callback on the Compact path.\n - ring_key_verifies() returns 0 for a key in error, so a keyring skips it\n   as if it were absent, by \"kid\" and in the scan. jwt_checker_setkeyring()\n   still accepts a ring that holds such keys: a provider\u0027s JWKS may well\n   hold keys a build cannot load.\n - A static __check_key_error() runs first in __check_hmac() and\n   __check_key_bits(), which precede every signing and verifying operation:\n   a key that is NULL, in error or without a key object never reaches a\n   backend. It is also what stops a key in error that a callback returns on\n   the JWS JSON path, where that signature is left unverified.\n - jwe_key_usage_check() refuses a key in error with \"Key is in error and\n   cannot be used for JWE\" (jwe_builder_setkey(), jwe_checker_setkey(),\n   jwe_builder_add_recipient()). wrap_recipient() and recover_and_decrypt()\n   check again as a last line; the latter fails with the generic decryption\n   error, and nothing is added inside the RFC 7516 section 11.5 random-CEK\n   branches.\n - A refused key in error does not leave a checker or a builder that has no\n   other key unkeyed (key_required \u003d 2). The checker then rejects every\n   token, an unsigned one included; jwt_builder_generate() then emits no\n   unsigned token, whether jwt_builder_setkey() or\n   jwt_builder_add_signature() refused the key. A setkey that succeeds\n   (with a key, or with JWT_ALG_NONE and a NULL key) or a keyring given to\n   the checker settles it, and a callback can still supply the key. A\n   refused key never replaces the key or keyring already set. A callback\n   that then supplies a key but not the alg still signs or verifies with the\n   alg the refused setkey/add_signature was asked for, as it did before the\n   key was refused: the builder takes the replacement key\u0027s own \"alg\"\n   (FUNC(generate)), the checker keeps that alg pinned (__key_refused() on\n   the JWT_CHECKER side). Without this the builder emitted an \"alg\":\"none\"\n   token and the checker failed every token with \"could not find alg\".\n - Backends: OpenSSL sign and verify take the EVP_PKEY through\n   openssl_item_pkey(), which is NULL unless OpenSSL parsed the item, and\n   fail with \"Key is not compatible\"; the JWE entry points of all three\n   backends use the same kind of accessor. The MbedTLS parsers set bits and\n   is_private_key only once the key is good. jwk_process_one() flags an\n   item that no backend bound a key to, and clears its bits and\n   is_private_key. __check_hmac() also requires provider ANY.\n - The four X.509 accessors read as absent for a key in error, and\n   jwt_builder_setcnf_jwk() refuses one, as jwt_builder_setcnf_jkt() did.\n - A JSON null \"x5c\" or \"alg\" member is treated as absent, the same on both\n   JSON backends (jwt_json_is_null()). Jansson used to flag such a key in\n   error where json-c read the member as absent, so a now-refused key would\n   differ by JSON backend -- a divergence the project forbids.\n - A remote-JWKS refresh (jwks-curl.c cache_apply()) replaces the cache only\n   when the new body has a key that is not in error; a 2xx body whose every\n   key is in error no longer wipes a good cache, as a garbage body already\n   did not.\n - MbedTLS marks an OKP item private only where it decoded \"d\" string\n   material, and refuses a key with no decodable \"x\" or \"d\" (\"d\":5), so such\n   a key is in error rather than an empty \"private\" item.\n\nBehavior change: a key in error is refused where it used to be accepted,\nand a keyring neither verifies with one nor stops at one when a later key\nhas the same \"kid\". After such a refusal, jwt_checker_verify() on a checker\nwith no other key fails where it accepted an unsigned token, and\njwt_builder_generate() on a builder with no other key fails where it\nproduced one. jwks_item_key_bits() and jwks_item_is_private() return 0 for\na key that failed to load (MbedTLS reported a size, and every backend\ncould report the key private). The X.509 accessors return 0 or NULL for a\nkey in error. jwks_find_bykid() is unchanged and can return a key in error.\nNo existing error message changes. No exported symbol changes.\n\nTests, on every crypto backend and both JSON backends: the new\ntests/jwt_key_error.c (setkey, add_signature, callbacks on the Compact and\nthe JSON path, keyrings by \"kid\" and by scan under ANY and ALL, both\nrefusal states and what settles them), tests/jwt_xbackend.c (a key one\nbackend could not load, used under every other, for JWS and JWE),\ntests/jwe_keys.c, tests/jwt_x509.c, tests/jwt_cnf.c,\ntests/jwt_embedded_jwk.c, tests/jwt_jwks.c, and a jwt-cli.bats case with\ntests/keys/oct_key_256_enc_bad_x5c.json. test_jwks_keyring_load no longer\ntells the RSA keys MbedTLS rejects by a size they do not report, and\nunsupported_curve in tests/jwe_ecdh.c expects the refusal where the backend\ncannot load secp256k1. jwt_key_error.c also covers the alg restored to a\ncallback-supplied key (test_errored_cb_alg_less), that only a key in error\nlatches (test_latch_boundary) and the JSON-null members (test_json_null_members);\njwt_jwks.c the OKP member validity; jwt_jwks_cache.c an all-in-error refresh\nbody; jwt_xbackend.c a key in error on every backend. Docs: jwk_item_t,\njwks_item_error(), the setkey, keyring, callback, cnf, JWE key and X.509\naccessor comments, jwks_find_bykid(), jwks_item_key_bits(),\njwks_item_is_private(), jwt_set_crypto_ops() and README.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "ed7ca907509db33690e58975bc7416aaad575120",
      "tree": "ed76da88bbaac3ea5911ce7032d62f1dcb955f8f",
      "parents": [
        "e8c4e1115e2957c640a176a96600f1513b3f8df1",
        "5a578605a9a1712f0fe9fd1eda85e533d0ecf7da"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Thu Nov 12 14:44:21 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 12 14:44:21 2026 -0500"
      },
      "message": "Merge pull request #351 from benmcollins/release-3.6.2\n\nRelease v3.6.2"
    },
    {
      "commit": "5a578605a9a1712f0fe9fd1eda85e533d0ecf7da",
      "tree": "ed76da88bbaac3ea5911ce7032d62f1dcb955f8f",
      "parents": [
        "e8c4e1115e2957c640a176a96600f1513b3f8df1"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 14:21:42 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 14:21:42 2026 -0500"
      },
      "message": "Release v3.6.2\n\nBump LIBJWT_VERSION_SET 3 6 1 -\u003e 3 6 2.\n\nSONAME: 18:1:4 -\u003e 18:2:4 (revision++, current/age untouched). The changes\nsince v3.6.1 are three security fixes (GHSA-6gm4-gxx5-93hq,\nGHSA-mhc9-xvg5-qg29, GHSA-v7q9-pwfj-qmf5) and follow-up hardening in the\nlibrary, the CLI tools, the tests and the docs (#342, #344, #346, #348,\n#350). They change behavior, but no exported symbol: the jwt*/jwk*/jwe*\nsymbol set is identical to v3.6.1 (155 symbols), and with comments\nstripped include/jwt.h is unchanged, so no @since tag is added. Per the\nlibtool rules only the SONAME revision advances. The SONAME major\n(current - age) stays 14.\n\nmake check passes.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "e8c4e1115e2957c640a176a96600f1513b3f8df1",
      "tree": "44c8defb72115b7373ec71bc97e4a365dbe7e0dd",
      "parents": [
        "37820b9208d49b0d03a85930384c1b9ffddced2b",
        "f755da3783cce5dd6bc39b7e551b709a3602323b"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Thu Nov 12 14:21:04 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 12 14:21:04 2026 -0500"
      },
      "message": "Merge pull request #350 from benmcollins/349-checker-callback-docs\n\ndoc: checker callbacks, signature introspection and opaque payload limits"
    },
    {
      "commit": "37820b9208d49b0d03a85930384c1b9ffddced2b",
      "tree": "ecc94a30642f766abb0bb2e8270ed27785add97a",
      "parents": [
        "dea07a4e9527d29d021351feb0bb5e5b84885e55",
        "53643576c777bd2bd767e7e9c1464d697f3a5933"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Thu Nov 12 14:20:52 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 12 14:20:52 2026 -0500"
      },
      "message": "Merge pull request #348 from benmcollins/347-cli-keyring-output-leaks\n\ntools, tests: jwt-verify -a and --keyring output, jwt-generate and jwe_gcm leaks, jwt_checker timeouts"
    },
    {
      "commit": "dea07a4e9527d29d021351feb0bb5e5b84885e55",
      "tree": "387764aa4715fbd3f9a95a7b5c2ea95a3c5503c7",
      "parents": [
        "7665d130eb2fcb6161ff7ebd611c026cdc12d260",
        "39b0cc67f48938cc4847941b853798a2331e9b29"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Thu Nov 12 14:20:41 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 12 14:20:41 2026 -0500"
      },
      "message": "Merge pull request #346 from benmcollins/345-builder-crit-compact-signer\n\njwt: validate a signature\u0027s own \"crit\", and refuse a Compact token without its add_signature() signer"
    },
    {
      "commit": "7665d130eb2fcb6161ff7ebd611c026cdc12d260",
      "tree": "b5f30cfa6b602d47acbda0a227d3ff18fc2d456d",
      "parents": [
        "687ff7e8099813cc6a804d1ce1b1b306504c037f",
        "c01eabefc7c342f7237ae8a0c734984a092ceb51"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Thu Nov 12 14:20:30 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 12 14:20:30 2026 -0500"
      },
      "message": "Merge pull request #344 from benmcollins/343-json-c-jansson-parity\n\njson-c: match Jansson on non-object merges, escaped NUL and JSON null"
    },
    {
      "commit": "687ff7e8099813cc6a804d1ce1b1b306504c037f",
      "tree": "50cc8fd91d8eb44370a8e36558c8ca184754e3c2",
      "parents": [
        "d2f402501edac725db5f31ffa8bf80e173fb1ca2",
        "f095ac1b3c501272610ee74653e46b1ba8a3279a"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "benmcollins13@gmail.com",
        "time": "Thu Nov 12 14:17:18 2026 -0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 12 14:17:18 2026 -0500"
      },
      "message": "Merge pull request #342 from benmcollins/341-jws-json-alg-kid-keys\n\njwt-verify: pin the algorithm, require a string \"kid\" and offer only signature keys on the JWS JSON path"
    },
    {
      "commit": "f755da3783cce5dd6bc39b7e551b709a3602323b",
      "tree": "73d78d96bb2d0314ff070ec0e179bd8fa93e2322",
      "parents": [
        "9cc368a1c0c6fd6d78ff74efaa46304143c25024"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 11:36:04 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: README on keyring candidates and the Compact signer\n\nSay which keys a keyring offers (only keys meant for signatures), that a\n\"kid\" must be a string, and that a Compact token carries only the\njwt_builder_setkey() signer.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "9cc368a1c0c6fd6d78ff74efaa46304143c25024",
      "tree": "55d76b8005801659ba3bdd5584dc6bb26f127a05",
      "parents": [
        "3217a1599be56b908e0c2d5acd97898c7934a4cd"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 11:08:50 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: a JSON-path verify callback\u0027s config-\u003ealg pins the algorithm\n\nFor a JWS JSON Serialization, the jwt_checker_setcb() text said that\nconfig-\u003ealg is the signature\u0027s own \"alg\" and that setting it has no\neffect. Since \"jwt-verify: pin the algorithm on the JWS JSON path\" that\nno longer holds: the callback sees the algorithm given to\njwt_checker_setkey(), if any, or else the signature\u0027s own, and a\nsignature whose \"alg\" is not the one in config-\u003ealg when the callback\nreturns does not verify (with JWT_ALG_NONE, the key\u0027s \"alg\", if it has\none, still binds it).\n\nThe keyring bullet now says that config-\u003ekey is the candidate that the\n\"kid\" names, and that a signature without a \"kid\" is tried against\nevery compatible candidate: since \"jwt-verify: offer only signature\nkeys from a keyring\", a ring key that is not meant for signatures is\nneither.\n\nThis describes those two jwt-verify changes, so merge it with or after\nthem.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "3217a1599be56b908e0c2d5acd97898c7934a4cd",
      "tree": "d8b3dfa670e23a1c4619073f5e2cf238c281cf66",
      "parents": [
        "583c96d5611c1b7a82344e663cc4834f32d7f0cb"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 10:20:01 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: a non-zero signature count does not mean the token was accepted\n\njwt_checker_sig_count() said that the count \"says nothing\" about\nwhether the token was accepted. For a Compact token checked with a\nsingle key it does: the count is 1 only if the token was accepted, as\nthe same paragraph now explains. What holds in every case is that a\nnon-zero count does not mean acceptance, so say that.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "583c96d5611c1b7a82344e663cc4834f32d7f0cb",
      "tree": "bad0fef5443bfa2df3e3c67eb0ea7cfa7d08ec2d",
      "parents": [
        "516210d9526834121f0d49e58d4c3ea791b2d6c6"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 10:19:48 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: only a document with NUL bytes must be base64url-encoded\n\nThe JAdES note said that a binary document can only be signed with the\ndefault base64url encoding. What the unencoded form cannot carry is a\nNUL byte: a binary document without one, even one that is not valid\nUTF-8, is signed unencoded and verified with jwt_checker_setkey() on\nboth JSON backends. Name the limit precisely: a document that contains\nNUL bytes, as most binary formats do.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "516210d9526834121f0d49e58d4c3ea791b2d6c6",
      "tree": "08d3360f4ea947f909ec15065707cd1cfd6e56ca",
      "parents": [
        "546a62cc4cfa12872c1ba7912c59f89ba4655ffc"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 10:19:37 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: a verify callback cannot tell which JSON signature it runs for\n\njwt_checker_setcb() told the reader to trust a header seen in the\ncallback of a JWS JSON Serialization only if jwt_checker_sig_verified()\nreports \"its\" signature as verified. The callback is not told which\nsignature it runs for, though, and a signature that the \"typ\" or\nalgorithm policy skips gets no call, so counting calls does not give\nthe signature\u0027s index. With a skipped first signature, a valid second\none and an invalid third one whose header carries an extra member, the\ntoken is accepted under JWT_VERIFY_POLICY_ANY, the callback sees that\nmember on its second call, and jwt_checker_sig_verified(checker, 1)\nreturns 1: the advice, followed this way, trusts a header that was\nnever verified.\n\nSay instead that under JWT_VERIFY_POLICY_ANY a header the callback saw\nmay belong to a signature that did not verify, that the calls do not\nline up with the jwt_checker_sig_verified() indexes, and that such a\nheader can be relied on only under JWT_VERIFY_POLICY_ALL, where every\nsignature of an accepted token verified. Also say that only the claims\ncan be acted on in a jti callback, since on the JSON path its jwt_t has\nno header.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "546a62cc4cfa12872c1ba7912c59f89ba4655ffc",
      "tree": "598786ca36c8abf72b58756cbd78610250734d29",
      "parents": [
        "d92e2341e53ba47da0cba37fe468241048950619"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:56:31 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: the Jansson UTF-8 limit also applies to detached Compact tokens\n\nA keyring checker verifies a Compact token as the equivalent\none-signature JWS JSON Serialization, so with the Jansson JSON backend\nan unencoded payload that is not valid UTF-8 cannot be carried, and\nthe token fails with \"Token is not valid UTF-8\". The\njwt_checker_setkeyring() documentation notes this, but\njwt_checker_verify_detached(), where such payloads are supplied,\nmentioned the UTF-8 limit only for the JWS JSON Serialization. With\njson-c, or with a single key on either backend, the same detached\ntoken verifies.\n\nAdd that case, and the jwt_checker_setkey() workaround, to\njwt_checker_verify_detached().\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "d92e2341e53ba47da0cba37fe468241048950619",
      "tree": "12afb70c2042c17ae4931564cdd68b4fcbec79d3",
      "parents": [
        "a2c81de4e2bb16b115ca3721a476968725e0e5c6"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:56:00 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: the payload limits for signing and verifying opaque documents\n\nThe JAdES recipe on the profiles page has the reader sign an opaque\ndocument unencoded, and the README suggests the same for any opaque\npayload. An unencoded payload cannot carry a NUL byte, though:\njwt_builder_generate() refuses to sign one and\njwt_checker_verify_detached() rejects one. The obvious fallback, the\ndefault base64url encoding, carries every byte but does not help\nwith verification: the checker reads a base64url payload as a JWT\nclaim set, so a binary document, like any payload that is not a JSON\nobject or array, fails with \"Error parsing payload\", detached or\nattached, with a single key or a keyring, on both JSON backends.\n\nSay so in the JAdES section, in jwt_checker_verify_detached() and in\nthe README: LibJWT can sign a document that contains NUL bytes,\nbase64url-encoded, but cannot verify it.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "a2c81de4e2bb16b115ca3721a476968725e0e5c6",
      "tree": "5f206a378ff4ef72eb1dd797f5c3e85732b1d6e0",
      "parents": [
        "b7e2c52823b474cac398ec31878dcd33e28c1592"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:54:10 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: signature introspection reports the signature check only\n\njwt_checker_sig_verified() and jwt_checker_sig_key() say whether a\nsignature verified, not whether the token was accepted. On the JWS\nJSON path, which a Compact token checked against a keyring also takes,\na token can fail jwt_checker_verify() on its claims (expired, wrong\n\"aud\") or under JWT_VERIFY_POLICY_ALL while a signature still shows as\nverified, with its key. An application that took either as an\nauthorization signal would accept such tokens. Add a warning to\njwt_checker_sig_verified(), and a pointer to it from\njwt_checker_sig_key(), that only the return value of\njwt_checker_verify() decides.\n\njwt_checker_sig_count() said that a Compact token counts 1, but a\nCompact token not checked against a keyring is recorded only when it\nis accepted, so it counts 0 whenever it is rejected. Say so, and that\nall three also report on jwt_checker_verify_detached().\n\nThe key confirmed by embedded-JWK verification, which\njwt_checker_sig_key() can return, is freed by the next\njwt_checker_verify() even when that call fails at once on a NULL or\nempty token. State that the pointer lasts only until the next verify\ncall on the checker, whatever its outcome, or jwt_checker_free().\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "b7e2c52823b474cac398ec31878dcd33e28c1592",
      "tree": "0337b491af26c60827bf5e9322488e71b57c2e25",
      "parents": [
        "b07946c823f9522d27a80c0cf567aa5a5279ca76"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:53:13 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: what verify and jti callbacks see, and when\n\nA verify callback runs before the signature it is about is checked,\nso it cannot rely on anything it reads in the header or claims, but\njwt_checker_setcb() did not say so, and jwt_get_cnf() even called its\ntoken \"verified\" while telling the reader to use it in that callback.\nThe JWS JSON path, which a Compact token checked against a keyring\nalso takes, adds two more things an application has to know:\n\n- The callback runs once for each signature that meets the \"typ\" and\n  algorithm policy, just before that signature is verified, and sees\n  that signature\u0027s protected header (not its unprotected \"header\")\n  with the shared claims. Under JWT_VERIFY_POLICY_ANY a token whose\n  first signature was made with a key outside the keyring and whose\n  second is valid is accepted, after the callback saw the first\n  signature\u0027s header, which never verifies\n  (jwt_checker_sig_verified() then reports that signature as\n  unverified).\n- A non-zero return only leaves that signature unverified: the token\n  is still accepted under JWT_VERIFY_POLICY_ANY if another signature\n  verifies, and rejected under JWT_VERIFY_POLICY_ALL. A Compact token\n  has one signature, so it is rejected either way.\n\nThe jti callback runs once per token, last, after the signature policy\nand every claim check have passed, and a non-zero return rejects the\ntoken under either policy. On the JSON path its jwt_t carries the\nclaims but no header, and jwt_get_alg() returns the last signature\u0027s\nalgorithm whether or not that signature verified.\n\nDocument all of this in jwt_checker_setcb() and jwt_checker_setjti(),\nand say in jwt_get_cnf() that the value is verified only once\njwt_checker_verify() returns 0.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "b07946c823f9522d27a80c0cf567aa5a5279ca76",
      "tree": "de890170a76f07b1557ba285527045b998118427",
      "parents": [
        "d2f402501edac725db5f31ffa8bf80e173fb1ca2"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:51:13 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:50 2026 -0500"
      },
      "message": "doc: a verify callback must not change the jwt_t\n\njwt_checker_setcb() said the callback should only inspect the jwt_t\nand that the checks that follow \"may\" see a change, and the callback\nsection of the examples page went further: \"changes to it do not\naffect verification\". That is wrong. The claim checks run after the\ncallback and read the jwt_t as the callback left it, as do the \"crit\"\nand \"typ\" checks of a Compact token verified with a single key.\nDeleting the \"exp\" claim in the callback lets an expired token pass,\nwhether the token is checked with a single key, against a keyring or\nin the JWS JSON Serialization, and deleting \"crit\" lets a token with\nan unsupported critical header through.\n\nSay that the callback must not change the header or claims, with the\n\"exp\" example, in jwt_checker_setcb(), in the jwt_t group overview and\non the examples page.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "53643576c777bd2bd767e7e9c1464d697f3a5933",
      "tree": "479bea7c6d66d9a3da9c0e45b082c8c41aa0e8cf",
      "parents": [
        "a41b7c1c0a8d8afa109609a2c292418280dcc8b7"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 11:35:33 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:32 2026 -0500"
      },
      "message": "doc: jwt-verify(1) on --keyring and --algorithm\n\nThe man page still described --keyring as for multi-signature JWS JSON\ntokens only, and did not say that --algorithm is refused with it. Say\nthat a keyring verifies Compact tokens too, which keys are candidates,\nand that a key\u0027s own \"alg\" pins the algorithm there. Regenerated\njwt-verify.1 with pandoc.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "a41b7c1c0a8d8afa109609a2c292418280dcc8b7",
      "tree": "ea27f8e5ffbe6d0e62e44de6b25e200893ec5e19",
      "parents": [
        "36d1cba3c509fe181bc7fe7785a0eff8087ac002"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:47:07 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:32 2026 -0500"
      },
      "message": "tests: give the jwt_checker test cases a 30 s timeout\n\nOnly the Detached test case of jwt_checker sets a timeout; the other\neight run with Check\u0027s default of 4 seconds per test. Under valgrind\nin the CI image (amd64, emulated here) their slowest tests already\ntake about 2.8 s, and verify_rsapss384 has been seen to time out\nunder valgrind on a loaded machine. With the budget halved through\nCK_TIMEOUT_MULTIPLIER\u003d0.5, i.e. a runner twice as slow, five of the\nVerify tests time out.\n\nGive each of those test cases a 30 s timeout, as the JWE suites have;\nwith the same halved budget the suite then passes under valgrind. The\ncall goes right after tcase_create(), so adding a test to the end of\na test case does not touch it.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "36d1cba3c509fe181bc7fe7785a0eff8087ac002",
      "tree": "216a900e4d22311620393984aaf836645a29e1c0",
      "parents": [
        "1416df305e780159e79c71017abaf14cba2aa7e5"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:47:07 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:32 2026 -0500"
      },
      "message": "tests: free the first key in jwe_gcm alg_enc_mismatch\n\nalg_enc_mismatch loads oct_dir_256.json to build the token and then\noct_dir_128.json for the checker, but read_json() overwrites g_jwk_set\nwithout freeing it, so the first set leaked once per crypto backend\n(valgrind: \"Memory Leak - 3\"; LeakSanitizer fails the test).\n\nFree it with free_key() before loading the second key, as\nwrong_key_fails already does. The builder only borrows the key and\ndoes not touch it again once the token is generated.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    },
    {
      "commit": "1416df305e780159e79c71017abaf14cba2aa7e5",
      "tree": "dfac1955c4692d46b803c8a204dcf721c6f7e10f",
      "parents": [
        "ae872c87b6cea0499b053ab3792f7ddf8b181319"
      ],
      "author": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 09:46:56 2026 -0500"
      },
      "committer": {
        "name": "Ben Collins",
        "email": "bcollins@libjwt.io",
        "time": "Thu Nov 12 12:45:32 2026 -0500"
      },
      "message": "jwt-generate: free the key sets before returning\n\nEach --key is loaded into its own JWK set with jwks_create_fromfile(),\nbut the sets were never freed: a run that signs with N keys leaks N\nsets and every key in them, backend key objects included.\nLeakSanitizer reports this for every jwt-generate command in\ntests/jwt-cli.bats that passes -k, which fails those tests in an\nASan/LSan build (valgrind reports it the same way).\n\nFree the sets once the token has been printed. The builder borrows\nthe keys, so free it first, with jwt_builder_freep() so that the\nauto-cleanup pointer is left NULL.\n\nThe error paths exit() from main() while the sets are still referenced\nfrom its stack, so they are not leaks and are left as they are.\n\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\nSigned-off-by: Ben Collins \u003cbcollins@libjwt.io\u003e\n"
    }
  ],
  "next": "ae872c87b6cea0499b053ab3792f7ddf8b181319"
}
