]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: include OID in duplicate extension error message
authorTechassi <git@techassi.dev>
Mon, 6 May 2024 07:35:48 +0000 (07:35 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 6 May 2024 17:39:08 +0000 (17:39 +0000)
commit9050ce9b334419066c364e747499a2faf4425dad
tree9cdf45a4f9cc17a10e7defc1a6500aa588979d28
parent3c72dd513c30df60c0624360e98a77c4ae7ca7c8
crypto/x509: include OID in duplicate extension error message

Include the OID in the error message when parsing X.509
certificates. This should ease fixing such issues, because
users can clearly identify the duplicate extension via the
reported error. Previously, this wasn't possible and
required either manually adjusting the standard library or
inspecting the certificate with various debugging tools.

Fixes #66880

Change-Id: I8c22f3a9f9c648ccff66073840830208832a3f85
GitHub-Last-Rev: b855a161d46f208e57f19c87e01140cc77865422
GitHub-Pull-Request: golang/go#67157
Reviewed-on: https://go-review.googlesource.com/c/go/+/583096
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/crypto/x509/parser.go