1
0
mirror of https://github.com/golang/go synced 2024-11-14 21:00:28 -07:00
go/src/crypto
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
..
aes crypto/aes: dedicated asm version of AES-GCM 2015-08-29 21:02:38 +00:00
cipher crypto/aes: dedicated asm version of AES-GCM 2015-08-29 21:02:38 +00:00
des
dsa
ecdsa all: fix some vet-caught formatting errors, mostly but not only in tests 2015-08-21 05:37:36 +00:00
elliptic crypto/elliptic: call IsOnCurve via the interface. 2015-07-22 17:37:36 +00:00
hmac
md5
rand crypt/rand: update docs for Linux 2015-07-26 02:57:16 +00:00
rc4
rsa all: fix some vet-caught formatting errors, mostly but not only in tests 2015-08-21 05:37:36 +00:00
sha1
sha256
sha512 crypto: add SHA-512/224 and SHA-512/256 as described in FIPS 180-4 2015-07-14 19:45:21 +00:00
subtle
tls crypto/tls: better error messages when PEM inputs are switched. 2015-09-30 00:27:46 +00:00
x509 crypto/x509: parse CSRs with a critical flag in the requested extensions. 2015-09-30 00:59:15 +00:00
crypto.go crypto: add SHA-512/224 and SHA-512/256 as described in FIPS 180-4 2015-07-14 19:45:21 +00:00