)]}'
{
  "commit": "8fe61c3d560df9f3e2f67aada7c96046f94f6329",
  "tree": "8d79e18ffde2be2b6db41705a9a2cf4b6d063e7a",
  "parents": [
    "336efd412e4533ab3461e0cd9cc193c964f59388"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Sat Aug 30 16:02:08 2025 -0400"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Sep 15 16:49:04 2025 -0700"
  },
  "message": "Rewrite the X509_NAME parser\n\nThe old parser was a mess. It has to deal with X509_NAME using a\nslightly different in-memory represtation than tasn_dec expects, and it\nhas to populate cached fields. On top of that, the handling of the cache\nwas not thread-safe.\n\nIt previously worked by first using the tasn_dec machinery to parse a\nSTACK_OF(STACK_OF(X509_NAME_ENTRY)), and then flattening it. Then it\nmakes a *new* STACK_OF(STACK_OF(X509_NAME_ENTRY)) with canonicalized\nfields. Then it re-encodes that with tasn_enc to save the canonicalized\nform.\n\nInstead of all that, parse with CBS so we don\u0027t need an allocated\nintermediate representation. We can just write it out into the\nX509_NAME representation as we parse it.\n\nFor the two cached fields, fix the thread-safety issue by wrapping it in\na struct and managing it with an atomic pointer. I had vaguely hoped we\ncould avoid this, but that seems too complicated with the API we\u0027ve got.\nWhen computing the cached encodings, rather than making a new allocated\nintermediate representation, we can just write a canonicalized encoder\nand write it straight into a single CBB, so we only have one growable\narray\u0027s worth of buffer.\n\nIt\u0027s faster too!\n\nBefore:\nDid 1319499 Parse X.509 certificate operations in 5001015us (263846.2 ops/sec)\nAfter:\nDid 1794529 Parse X.509 certificate operations in 5000632us (358860.4 ops/sec)\n\nSubsequent CLs will make the API const-correct, test threading, and\nembed the X509_NAMEs into the X509 struct.\n\nOne nuisance: it\u0027s hard for an infallible x509_name_init to initialize\na STACK_OF(X509_NAME_ENTRY). For now I just made the zero state legal\nand the add function materializes the STACK_OF on demand. We don\u0027t\nexpose the underlying object, so it doesn\u0027t matter much. Really we\nshould stop believing in fallible mallocs.\n\nBug: 42290417, 42290269\nChange-Id: I0081c75dc06c76c3863eb9418e61262953c9179f\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/81891\nAuto-Submit: David Benjamin \u003cdavidben@google.com\u003e\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "de888f182493301533bac4b1b13abf4b5c1f2a1d",
      "old_mode": 33188,
      "old_path": "crypto/asn1/a_type.cc",
      "new_id": "b714340fa6919cc2759a505d8cb0b4aa745491f1",
      "new_mode": 33188,
      "new_path": "crypto/asn1/a_type.cc"
    },
    {
      "type": "modify",
      "old_id": "2ddabc87e780f406b4d5f04ccb6fbf0850bca932",
      "old_mode": 33188,
      "old_path": "crypto/asn1/internal.h",
      "new_id": "1ab7fa57ce09e43f6c5dd708da32c56727ca9f1b",
      "new_mode": 33188,
      "new_path": "crypto/asn1/internal.h"
    },
    {
      "type": "modify",
      "old_id": "b4d48ca8298747ca5c67ea649a45671299423ab1",
      "old_mode": 33188,
      "old_path": "crypto/x509/internal.h",
      "new_id": "3bee7cde230f98b95429b781699bda6d6cbb1309",
      "new_mode": 33188,
      "new_path": "crypto/x509/internal.h"
    },
    {
      "type": "modify",
      "old_id": "7661ea84031329d66c663c72d2adce80a4cd3abf",
      "old_mode": 33188,
      "old_path": "crypto/x509/v3_ncons.cc",
      "new_id": "c94bb20922446eae679083929f190742f8ae080a",
      "new_mode": 33188,
      "new_path": "crypto/x509/v3_ncons.cc"
    },
    {
      "type": "modify",
      "old_id": "be08ec880932d5d76d29b76871f3a3fb81a3d4a4",
      "old_mode": 33188,
      "old_path": "crypto/x509/x509_cmp.cc",
      "new_id": "3e5a784d8d8b520b6b59c5ef037b1f27d5252d00",
      "new_mode": 33188,
      "new_path": "crypto/x509/x509_cmp.cc"
    },
    {
      "type": "modify",
      "old_id": "6eb5df998679c973eed2f906113c8781afc0fed9",
      "old_mode": 33188,
      "old_path": "crypto/x509/x509_obj.cc",
      "new_id": "66ef386ad4bd02678945be50887783d674c41635",
      "new_mode": 33188,
      "new_path": "crypto/x509/x509_obj.cc"
    },
    {
      "type": "modify",
      "old_id": "8f9792c51750e947a812d1ebbaf3ae2f577b3385",
      "old_mode": 33188,
      "old_path": "crypto/x509/x509name.cc",
      "new_id": "72c88834b5ddd50d7ab38015931b3a7573db7583",
      "new_mode": 33188,
      "new_path": "crypto/x509/x509name.cc"
    },
    {
      "type": "modify",
      "old_id": "7ec83f6954e7d3639521cb8bc7b911dc461c4f7c",
      "old_mode": 33188,
      "old_path": "crypto/x509/x_name.cc",
      "new_id": "0e80ab420522c3f3c67ac6e5c06ee554bda610b7",
      "new_mode": 33188,
      "new_path": "crypto/x509/x_name.cc"
    },
    {
      "type": "modify",
      "old_id": "667eede5cb5d252372b4dd1c33a041dead7eb6fd",
      "old_mode": 33188,
      "old_path": "include/openssl/x509.h",
      "new_id": "e490931504b10204f6f1daa33663a9e499063406",
      "new_mode": 33188,
      "new_path": "include/openssl/x509.h"
    }
  ]
}
