• Adam Langley's avatar
    encoding/asn1: fix explicitly tagged Times. · 1fd042c9
    Adam Langley authored
    https://golang.org/cl/153770043/ tried to fix the case where a
    implicitly tagged Time, that happened to have the same tag as
    GENERALIZEDTIME, shouldn't be parsed as a GENERALIZEDTIME.
    
    It did so, mistakenly, by testing whether params.tag != nil. But
    explicitly tagged values also have a non-nil tag and there the inner
    tag actually does encode the type of the value.
    
    This change instead tests whether the tag class is UNIVERSAL before
    assuming that the tag contains type information.
    
    LGTM=iant
    R=iant
    CC=golang-codereviews
    https://golang.org/cl/152380044
    1fd042c9
asn1.go 25.3 KB