• Adam Langley's avatar
    crypto/x509: parse CSRs with a critical flag in the requested extensions. · e78e654c
    Adam Langley authored
    The format for a CSR is horribly underspecified and we had a mistake.
    The code was parsing the attributes from the CSR as a
    pkix.AttributeTypeAndValueSET, which is only almost correct: it works so
    long as the requested extensions don't contain the optional “critical”
    flag.
    
    Unfortunately this mistake is exported somewhat in the API and the
    Attributes field of a CSR actually has the wrong type. I've moved this
    field to the bottom of the structure and updated the comment to reflect
    this.
    
    The Extensions and other fields of the CSR structure can be saved
    however and this change does that.
    
    Fixes #11897.
    
    Change-Id: If8e2f5c21934800b72b041e38691efc3e897ecf1
    Reviewed-on: https://go-review.googlesource.com/12717Reviewed-by: 's avatarRob Pike <r@golang.org>
    e78e654c
Name
Last commit
Last update
..
aes Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
md5 Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
x509 Loading commit data...
crypto.go Loading commit data...