1
0
mirror of https://github.com/golang/go synced 2024-10-05 07:11:22 -06:00
go/src/crypto/x509
Adam Langley e78e654c1d crypto/x509: parse CSRs with a critical flag in the requested extensions.
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/12717
Reviewed-by: Rob Pike <r@golang.org>
2015-09-30 00:59:15 +00:00
..
pkix crypto/x509: emit PKIX names in a more standard order. 2015-08-30 15:34:48 +00:00
cert_pool.go all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
example_test.go
pem_decrypt_test.go crypto/x509: don't panic when decrypting invalid PEM data. 2015-06-26 16:16:51 +00:00
pem_decrypt.go crypto/x509: don't panic when decrypting invalid PEM data. 2015-06-26 16:16:51 +00:00
pkcs1.go
pkcs8_test.go
pkcs8.go
root_bsd.go crypto/x509: split certFiles definition by GOOS 2015-01-05 05:41:27 +00:00
root_cgo_darwin.go crypto/x509: iOS build tag 2015-07-16 19:10:11 +00:00
root_darwin_arm_gen.go crypto/x509: mark root_darwin_armx.go as cgo-only 2015-07-30 15:47:16 +00:00
root_darwin_armx.go crypto/x509: mark root_darwin_armx.go as cgo-only 2015-07-30 15:47:16 +00:00
root_darwin_test.go crypto/x509: skip arm64 tests limited by iOS 2015-04-13 11:55:32 +00:00
root_darwin.go crypto/x509: build the builtin root certs also for darwin/arm64 2015-04-16 16:50:30 +00:00
root_linux.go crypto/x509: split certFiles definition by GOOS 2015-01-05 05:41:27 +00:00
root_nacl.go crypto/x509: fix nacl build 2015-01-05 06:31:49 +00:00
root_nocgo_darwin.go
root_plan9.go
root_solaris.go crypto/x509: add /etc/ssl/cacert.pem to OmniOS cert search list 2015-07-15 04:31:06 +00:00
root_unix.go crypto/x509: split certFiles definition by GOOS 2015-01-05 05:41:27 +00:00
root_windows.go
root.go
sec1_test.go
sec1.go crypto/ecdsa, crypto/x509: update SEC1 ECC link in comments 2015-06-26 16:08:22 +00:00
sha2_windows_test.go crypto/x509: use syscall.GetVersion instead of internal/syscall/windows.GetVersion 2015-03-31 08:11:24 +00:00
verify_test.go crypto/x509: disable sha2 test with system APIs 2015-07-22 17:33:27 +00:00
verify.go crypto/x509: make verification of an empty certificate consistent across platforms. 2015-09-30 00:51:51 +00:00
x509_test_import.go
x509_test.go crypto/x509: parse CSRs with a critical flag in the requested extensions. 2015-09-30 00:59:15 +00:00
x509.go crypto/x509: parse CSRs with a critical flag in the requested extensions. 2015-09-30 00:59:15 +00:00