)]}'
{
  "commit": "567808adb4d859323424c3a6bc183e13a1ac59e8",
  "tree": "9bcb37b100aba48a209f65ac458bac7434211c84",
  "parents": [
    "07c8f27cab7df87b1c77dde416b23800d23f0819"
  ],
  "author": {
    "name": "Dylan Pulver",
    "email": "35541198+dylanpulver@users.noreply.github.com",
    "time": "Tue Sep 08 17:40:46 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Sep 08 17:40:46 2026"
  },
  "message": "Fix segfault in X509.set_serial_number for negative serials (#1534)\n\n* Fix segfault in X509.set_serial_number for negative serials\n\nhex(serial) renders negative values as \"-0x...\", so slicing off the\nfirst two characters left a stray \"x\" and BN_hex2bn failed to parse it.\nThe failure went undetected because the guard compared BN_hex2bn\u0027s int\nreturn value against _ffi.NULL, which is always unequal, so the NULL\nBIGNUM was passed straight to BN_to_ASN1_INTEGER and dereferenced.\n\nFormat the hex digits directly, which BN_hex2bn accepts with a leading\n\"-\", and check its return value against 0 as documented.\nX509.get_serial_number already round-trips negative values.\n\nCo-authored-by: Claude \u003cnoreply@anthropic.com\u003e\n\n* Reject negative serial numbers instead of accepting them\n\nRFC 5280 section 4.1.2.2 requires the serial number to be a positive\ninteger, so set_serial_number now raises ValueError rather than encoding\na value the standard does not permit.\n\nMoves the changelog entry to the backward-incompatible section: a\nnegative serial previously crashed the interpreter, and callers relying\non that value being stored will now see an exception.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\nClaude-Session: https://claude.ai/code/session_011M5uTyCU4WcNTsPvGrErDo\n\n---------\n\nCo-authored-by: Dylan Pulver \u003cdylanpulver@users.noreply.github.com\u003e\nCo-authored-by: Claude \u003cnoreply@anthropic.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6175dcd361b550555df628f7d588a8aad9a25e9a",
      "old_mode": 33188,
      "old_path": "CHANGELOG.rst",
      "new_id": "a5d78efeaa473725166b7b98f281c5e370da93a1",
      "new_mode": 33188,
      "new_path": "CHANGELOG.rst"
    },
    {
      "type": "modify",
      "old_id": "a7e8de6925981a59818d16f0c9758aa8a873f3ec",
      "old_mode": 33188,
      "old_path": "src/OpenSSL/crypto.py",
      "new_id": "c4cfff3b579eb6a3fcfa7c3030ba25b8f0d9c036",
      "new_mode": 33188,
      "new_path": "src/OpenSSL/crypto.py"
    },
    {
      "type": "modify",
      "old_id": "7508d1d0fba67e43771271294196cf921b912d94",
      "old_mode": 33188,
      "old_path": "tests/test_crypto.py",
      "new_id": "5db934275ad2f9fdd02b1ec3f782636b3bf83696",
      "new_mode": 33188,
      "new_path": "tests/test_crypto.py"
    }
  ]
}
