)]}'
{
  "commit": "b9ee7b143135e6e070e4d6582ac7d8121978f53a",
  "tree": "0b00c6528da1c0305ae8d50682739affce2d9028",
  "parents": [
    "1b2db8c7c4abba4bd8d820421fc911c1a5317cbe"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Mon Aug 09 22:58:03 2021 -0400"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Aug 11 21:21:37 2021 +0000"
  },
  "message": "Fix negative ENUMERATED values in multi-strings.\n\nI noticed this while I was reading through the encoder. OpenSSL\u0027s ASN.1\nlibrary is very sloppy when it comes to reusing enums. It has...\n\n- Universal tag numbers. These are just tag numbers from ASN.1\n\n- utype. These are used in the ASN1_TYPE type field, as well as the\n  ASN1_ITEM utype fields They are the same as universal tag numbers,\n  except non-universal types map to V_ASN1_OTHER. I believe ASN1_TYPE\n  types and ASN1_ITEM utypes are the same, but I am not positive.\n\n- ASN1_STRING types. These are the same as utypes, except V_ASN1_OTHER\n  appears to only be possible when embedded inside ASN1_TYPE, and\n  negative INTEGER and ENUMERATED values get mapped to\n  V_ASN1_NEG_INTEGER and V_ASN1_NEG_ENUMERATED. Additionally, some\n  values like V_ASN1_OBJECT are possible in a utype but not possible in\n  an ASN1_STRING (and will cause lots of problems if ever placed in\n  one).\n\n- Sometimes one of these enums is augmented with V_ASN1_UNDEF and/or\n  V_ASN1_APP_CHOOSE for extra behaviors.\n\n- Probably others I\u0027m missing.\n\nThese get mixed up all the time. asn1_ex_i2c\u0027s MSTRING path converts\nfrom ASN1_STRING type to utype and forgets to normalize V_ASN1_NEG_*.\nThis means that negative INTEGERs and ENUMERATEDs in MSTRINGs do not get\nencoded right.\n\nThe negative INTEGER case is unreachable (unless the caller passes\nthe wrong ASN1_STRING to an MSTRING i2d function, but mismatching i2d\nfunctions generally does wrong things), but the negative ENUMERATED case\nis reachable. Fix this and add a test.\n\nChange-Id: I762d482e72ebf03fd64bba291e751ab0b51af2a9\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/48805\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6fa3f951d2b552148af120db89ee544dee54c758",
      "old_mode": 33188,
      "old_path": "crypto/asn1/asn1_test.cc",
      "new_id": "e6847c8459cf6e8c5b4c0e566d05738d6ee9a2b6",
      "new_mode": 33188,
      "new_path": "crypto/asn1/asn1_test.cc"
    },
    {
      "type": "modify",
      "old_id": "95d86111e1622b1eb01088806ac3921dc9f6d8f3",
      "old_mode": 33188,
      "old_path": "crypto/asn1/tasn_enc.c",
      "new_id": "142de6d33831ec678803aabf9f47029ab32f3ef7",
      "new_mode": 33188,
      "new_path": "crypto/asn1/tasn_enc.c"
    }
  ]
}
