mirror of
https://github.com/golang/go
synced 2024-11-19 12:14:42 -07:00
crypto/x509: correct default X.509 version.
The default version of an X.509 certificate is v1, which is encoded on the wire as a zero. Fixes #13382. Change-Id: I5fd725c3fc8b08fd978ab694a3e2d6d2a495918b Reviewed-on: https://go-review.googlesource.com/20548 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
1c2bdfb7d9
commit
1b8d4caddb
@ -126,7 +126,7 @@ type certificate struct {
|
||||
|
||||
type tbsCertificate struct {
|
||||
Raw asn1.RawContent
|
||||
Version int `asn1:"optional,explicit,default:1,tag:0"`
|
||||
Version int `asn1:"optional,explicit,default:0,tag:0"`
|
||||
SerialNumber *big.Int
|
||||
SignatureAlgorithm pkix.AlgorithmIdentifier
|
||||
Issuer asn1.RawValue
|
||||
|
Loading…
Reference in New Issue
Block a user