Commit Graph

2 Commits

Author SHA1 Message Date
Doug Fawley fbff2abb0f
*: update `interface{}` to `any` and `go.mod` version to `go 1.19` (#6544) 2023-08-14 09:04:46 -07:00
Gregory Cooke 1d20f1b500
security/advancedtls: swap from deprecated pkix.CertificateList to x509.RevocationList (#6054)
Swap from deprecated pkix.CertificateList to x509.RevocationList

pkix.CertificateList is deprecated.
We have an internal wrapper around this for representing CRLs. This PR updates that wrapper to use the preferred x509.RevocationList.

This also replaces x509.ParseCRL (deprecated) with x509.ParseRevocationList. The former supported PEM input, while the latter requires DER, so I added a utility function parseRevocationList that does the PEM -> DER conversion if needed, taken from the x509.ParseCRL implementation.

The one issue here is that x509.RevocationList was introduced in golang 1.19. We are still supporting 1.18. To solve this, I've put build restrictions on crl.go and crl_test.go to only build on 1.19+. Also, I also added the files crl_deprecated.go and crl_deprecated_test.go, which are identical copies to the crl.go and crl_test.go files before this PR. They have the build restriction of <go1.19, so they will be used in the 1.18 build. This change is luckily very isolated and these are the only 2 files that needed the build restrictions.
2023-03-23 13:34:01 -04:00