• 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
..
pkix Loading commit data...
cert_pool.go Loading commit data...
example_test.go Loading commit data...
pem_decrypt.go Loading commit data...
pem_decrypt_test.go Loading commit data...
pkcs1.go Loading commit data...
pkcs8.go Loading commit data...
pkcs8_test.go Loading commit data...
root.go Loading commit data...
root_bsd.go Loading commit data...
root_cgo_darwin.go Loading commit data...
root_darwin.go Loading commit data...
root_darwin_arm_gen.go Loading commit data...
root_darwin_armx.go Loading commit data...
root_darwin_test.go Loading commit data...
root_linux.go Loading commit data...
root_nacl.go Loading commit data...
root_nocgo_darwin.go Loading commit data...
root_plan9.go Loading commit data...
root_solaris.go Loading commit data...
root_unix.go Loading commit data...
root_windows.go Loading commit data...
sec1.go Loading commit data...
sec1_test.go Loading commit data...
sha2_windows_test.go Loading commit data...
verify.go Loading commit data...
verify_test.go Loading commit data...
x509.go Loading commit data...
x509_test.go Loading commit data...
x509_test_import.go Loading commit data...