)]}'
{
  "commit": "2d4f1b85f270fe6fc15dfd39a40015f52972ea2e",
  "tree": "513845885b7b094dd664ae9c5224339833a0534b",
  "parents": [
    "1530333b25589ee4d4d52b10e78ee55dd82f6dcd"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Mon May 23 14:56:15 2022 -0400"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed May 25 16:48:39 2022 +0000"
  },
  "message": "Use the correct function types in X509V3_EXT_METHODs.\n\nWhile C allows function pointer casts, it is UB to call a function with\na different type than its actual type signature. That is, even though\n`void f(int *)` and `void g(void *)` have the same ABI, it is UB to\ncast `f` to a `void(*)(void *)` and then call it through that pointer.\nClang CFI will try to enforce this rule.\n\nThe recent CL to call X509_print in tests revealed that all the i2? and\n?2i callbacks in X509V3_EXT_METHODs were implemented with functions of\nthe wrong type, out of some combination of missing consts and void*\nturned into T*.\n\nThis CL fixes this. Where the function wasn\u0027t exported, or had no\ncallers, I just fixed the function itself. Where it had extension\ncallers, I added a wrapper function with a void* type.\n\nI\u0027m not positive whether the wrappers are the right call. On the one\nhand, keeping the exported functions as-is is more type-safe and more\nOpenSSL-compatible. However, most (but not all) uses of these are in\nother code defining X509V3_EXT_METHODs themselves, so the void*\nsignature is more correct for them too. And the functions have a type\nsignature meant for X509V3_EXT_METHOD, complete with method pointer.\n\nI\u0027ve gone with leaving the exported ones as-is for now. Probably the\nright answer anyway is to migrate the external callers, of either type\nsignature.\n\nChange-Id: Ib8f2995cbd890221eaa9ac864a7e553cb6711901\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/52686\nCommit-Queue: Bob Beck \u003cbbe@google.com\u003e\nReviewed-by: Bob Beck \u003cbbe@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e64e99fea12a7c464af447de854a01f2819dc6b0",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_akey.c",
      "new_id": "ca581d91aa1ad35aadac9107c2edb9f88d29c3c1",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_akey.c"
    },
    {
      "type": "modify",
      "old_id": "eb9c9757aa42f0ed16f4aa7df5ceffbd6b17eec1",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_alt.c",
      "new_id": "c057da1a1d3856fe0fe2759f754cccb2505d1348",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_alt.c"
    },
    {
      "type": "modify",
      "old_id": "aefefdff772b1982dcaf09aebb81ef91478b6655",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_bcons.c",
      "new_id": "4edf27b8a9f2f231cb21743c3d1fba3f487d329c",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_bcons.c"
    },
    {
      "type": "modify",
      "old_id": "871b77617448439c82810935e70ff2d144fdf18f",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_bitst.c",
      "new_id": "3420b126bebae0a24ba369f4e24a1c9f49f80b23",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_bitst.c"
    },
    {
      "type": "modify",
      "old_id": "6e3eb141987c3840f2fddc181e56f305d824184b",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_cpols.c",
      "new_id": "9290556b63c0639438faf58ab70c0d9ed5201c38",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_cpols.c"
    },
    {
      "type": "modify",
      "old_id": "9b222bbd4bb9860b2fb81368db09ff58627b016c",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_enum.c",
      "new_id": "5c9585853a623856a34b162b350c0a5e04271d97",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_enum.c"
    },
    {
      "type": "modify",
      "old_id": "700200c52cf03fb589a2d16b51672a59a489ee67",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_ia5.c",
      "new_id": "6f5ce1d7f16754fae6e5cf5096c90ce29931983f",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_ia5.c"
    },
    {
      "type": "modify",
      "old_id": "3615c71d51c71d4298dd71bdba99bc6ca5cd0eeb",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_info.c",
      "new_id": "e314019f16396418b91115419d59ed52db34e017",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_info.c"
    },
    {
      "type": "modify",
      "old_id": "7bde446c281d2cbdff056f7e529b23efb31ab90e",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_int.c",
      "new_id": "8b96796a690ce55e06d24e1c95e353953be2d20d",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_int.c"
    },
    {
      "type": "modify",
      "old_id": "57b64ef7eefc735e257a22c44b0efcc42ab19588",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_pci.c",
      "new_id": "b6ff148cb101c226049888643e04e54f61c44478",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_pci.c"
    },
    {
      "type": "modify",
      "old_id": "1cae7e187152fe7fb8cc1e48ab4e5b2d3db3e2c6",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_skey.c",
      "new_id": "926eecd1070f1a2b25fa469fc5aad3024ebb3055",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_skey.c"
    },
    {
      "type": "modify",
      "old_id": "960c407a14addae9541d16c9edeb90fa99abbac0",
      "old_mode": 33188,
      "old_path": "crypto/x509v3/v3_utl.c",
      "new_id": "064e71b9fa99e24dd9985e2035381c8d15eca8d3",
      "new_mode": 33188,
      "new_path": "crypto/x509v3/v3_utl.c"
    },
    {
      "type": "modify",
      "old_id": "c67dde6a3d2346cd4eb13c4d376976056206fa1e",
      "old_mode": 33188,
      "old_path": "include/openssl/x509v3.h",
      "new_id": "afaf172f8730d15f6651fb36ccd0011a6a8bb01c",
      "new_mode": 33188,
      "new_path": "include/openssl/x509v3.h"
    }
  ]
}
