• David Benjamin's avatar
    Make net::der::Tag match BoringSSL's in-memory representation. · 836f838e
    David Benjamin authored
    To parse some Android structure, CBS will need to grow support for tag
    numbers above 31. In preparation for that, BoringSSL will need to make
    the CBS/CBB tag representation not quite match the DER encoded form.
    See https://boringssl-review.googlesource.com/c/boringssl/+/23304.
    
    https://chromium-review.googlesource.com/783254 attempted to prepare for
    this by leaving net::der::Tag as-is and translating between the two tag
    representations. But the NormalizeName code takes a Tag and passes it
    into a CBB function.
    
    To avoid needlessly translating things there, this CL takes the opposite
    tack. It instead defines that net::der::Tag matches the BoringSSL
    representation. This fixes the NormalizeName test with the BoringSSL
    change re-landed. It does mean we'll need to replace
    ParserTest.TagNumbersAboveThirtyUnsupported with
    ParserTest.TagNumbersAboveThirtySupported concurrently with the
    BoringSSL roll, but we can manage that one.
    
    This CL should be no-op as-is, but will no longer be a no-op when the
    BoringSSL change is relanded.
    
    Bug: 
    Change-Id: I4e8fc1607eb3691733f998a24648f330e65137e6
    Reviewed-on: https://chromium-review.googlesource.com/828385Reviewed-by: default avatarMatt Mueller <mattm@chromium.org>
    Commit-Queue: David Benjamin <davidben@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#524491}
    836f838e
parser.cc 3.22 KB