]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/x509: allow setting MaxPathLen to -1 without IsCA
authorKatie Hockman <katie@golang.org>
Tue, 26 May 2020 19:36:58 +0000 (15:36 -0400)
committerKatie Hockman <katie@golang.org>
Tue, 26 May 2020 21:29:55 +0000 (21:29 +0000)
commitb5bf2f068251355538b66d36cc787cf59ced55be
tree72d9c5da4ee391ffd663e3ad019008a7f1ecc297
parente5a6a94aeb98fbfd2a046bd75042cbcbc2a529d4
crypto/x509: allow setting MaxPathLen to -1 without IsCA

This fixes a bug in CL 228777 which disallowed
a MaxPathLen of -1 without IsCA, even though the
x509.Certificate documentation indicates that
MaxPathLen of -1 is considered "unset".

Updates #38216

Change-Id: Ib7240e00408d060f27567be8b820d0eee239256f
Reviewed-on: https://go-review.googlesource.com/c/go/+/235280
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/crypto/x509/x509.go
src/crypto/x509/x509_test.go