)]}'
{
  "commit": "abfd5ebc87ddca0fab9fca067c9d7edbc355eae8",
  "tree": "121237a14408ca5821853b0c43660c0e63aca4e7",
  "parents": [
    "8cacbd93b8788cfb46f6a4d7e11b99c29b3752bd"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Wed Apr 12 16:30:01 2023 -0400"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Apr 12 23:17:03 2023 +0000"
  },
  "message": "Restore some default cases in tasn_dec.c and tasn_enc.c\n\nThis reverts a small portion of\n8c8629bfd89436e5019b6bd3c65cff4bf1a76b76. The parsers for ANY remain\nunchanged, but we inadvertently changed a corner case of ASN1_PRINTABLE\nMSTRINGs. This is a huge mess.\n\nutype in these switch cases is usually the type of the ASN1_ITEM, but,\nwith ANY and MSTRING, it is the tag of the value we found. (An MSTRING\nor \"multi-string\" is a CHOICE of string-like types.)\n\nWhen parsing ANY, this is moot because the is_supported_universal_type\nlogic ensures we\u0027ll never pass in an invalid type. When encoding ANY,\nthis only happens if you manually construct such an ASN1_TYPE.\n\nMSTRINGs *should* be similar because of the bitmask they apply on tag\ntypes. However, there is one MSTRING type whose bitmask,\nB_ASN1_PRINTABLE, includes B_ASN1_UNKNOWN. ASN1_tag2bit, arbitrarily\nmaps eight unsupported tags to B_ASN1_UNKNOWN and instead of zero. These\nare:\n\n- ObjectDescriptor\n- EXTERNAL\n- REAL\n- EMBEDDED PDV\n- RELATIVE-OID\n- TIME (note this is not the same as the X.509 Time CHOICE type)\n- [UNIVERSAL 15], which is not even a defined type!\n- CHARACTER STRING\n\n(ENUMERATED is also mapped to B_ASN1_UNKNOWN, but it\u0027s supported.)\n\nThese eight tags were previously accepted in d2i_X509_NAME but\n8c8629bfd89436e5019b6bd3c65cff4bf1a76b76 inadvertently started rejecting\nthem. For now, restore the default in the switch/case so that we accept\nthem again. Per https://crbug.com/boringssl/412, attribute values are\nANY DEFINED BY types, so we actually should be accepting *all* types. We\ndo not, because B_ASN1_PRINTABLE is completely incoherent. But because\nANY is the correct type, going from the original incoherent set, to\nthis new, smaller incoherent set is arguably a regression.\n\nThis is a minimal fix. Long-term, we should handle that ANY correctly,\nand avoid unexpected ASN1_STRING type values, by mapping all unsupported\ntypes to V_ASN1_OTHER. This would allow us to support all types\ncorrectly. A follow-up change will do that.\n\nUpdate-Note: The X.509 name parser will go back to accepting a handful\nof universal tag types that were inadvertently rejected in\n8c8629bfd89436e5019b6bd3c65cff4bf1a76b76. It is extremely unlikely that\nanyone uses these as they\u0027re unsupported, obscure types. This CL also\nmakes our ASN1_TYPE encoder slightly more permissive again, if the\ncaller manually constructs an legacy in-memory representation of an\nunsupported tag. But the follow-up change will restore the stricter\nbehavior.\n\nBug: 412, 561\nChange-Id: Ia44a270f12f3021154761a1cd285707416d8787e\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/58705\nAuto-Submit: David Benjamin \u003cdavidben@google.com\u003e\nCommit-Queue: Bob Beck \u003cbbe@google.com\u003e\nReviewed-by: Bob Beck \u003cbbe@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5c437937097b6a8823e8de03566127cc17d4e796",
      "old_mode": 33188,
      "old_path": "crypto/asn1/asn1_test.cc",
      "new_id": "849cfe90c499d4cdb21415f35c00518e03278a88",
      "new_mode": 33188,
      "new_path": "crypto/asn1/asn1_test.cc"
    },
    {
      "type": "modify",
      "old_id": "622ed458a482882b9b000f54a2cce27bf0d0854f",
      "old_mode": 33188,
      "old_path": "crypto/asn1/tasn_dec.c",
      "new_id": "24ab04f2704e0aba0bcd38e35d9384f4659bfa57",
      "new_mode": 33188,
      "new_path": "crypto/asn1/tasn_dec.c"
    },
    {
      "type": "modify",
      "old_id": "b0d72ce86e4afe3ccbcde6e854dda05555710f9e",
      "old_mode": 33188,
      "old_path": "crypto/asn1/tasn_enc.c",
      "new_id": "e85400b2c8c4790d0582b4229c8ee80e8cc2eee9",
      "new_mode": 33188,
      "new_path": "crypto/asn1/tasn_enc.c"
    },
    {
      "type": "modify",
      "old_id": "056d56a4b356aefbf4ad55e2968db857b1b3d22b",
      "old_mode": 33188,
      "old_path": "crypto/x509/x509_test.cc",
      "new_id": "530c24d5cc361d2f3e64df2c78c0f2a8bae5936b",
      "new_mode": 33188,
      "new_path": "crypto/x509/x509_test.cc"
    }
  ]
}
