]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: cleanup signature generation
authorFilippo Valsorda <filippo@golang.org>
Thu, 16 May 2024 10:40:31 +0000 (12:40 +0200)
committerGopher Robot <gobot@golang.org>
Wed, 22 May 2024 09:20:15 +0000 (09:20 +0000)
commitc96159c25217c84a252be5d74d48861af715ecf8
tree3ff56052754e37ff9ee70af9e37405be3ff0ea52
parentbf0bbd5360bb4d3ecb03b274fbb8419c69e54c28
crypto/x509: cleanup signature generation

Centralizing some repetitive code, which would have prevented #45990.

This also fixes the deprecated Certificate.CreateCRL for RSA-PSS, not
that anyone cared, probably.

This has two other minor observable behavior changes: MD2 is now treated
as a completely unknown algorithm (why did we even have that!? removing
lets us treat hash == 0 as always meaning no prehash); and we now do the
signature verification self-check for all signing operations.

Change-Id: I3b34fe0c3b6eb6181d2145b0704834225cd45a27
Reviewed-on: https://go-review.googlesource.com/c/go/+/586015
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
doc/next/6-stdlib/99-minor/crypto/x509/45990.md [new file with mode: 0644]
src/crypto/x509/x509.go
src/crypto/x509/x509_test.go