ignore SA1019: ac.(*accessController).rootCerts.Subjects has been deprecated

We need to look into this; can we remove it, or is there a replacement?

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ebe9d67446)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-05-09 13:19:48 +02:00
parent 0a98a00d17
commit b800af4409
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 6 additions and 7 deletions

View file

@ -527,7 +527,7 @@ func TestNewAccessControllerPemBlock(t *testing.T) {
t.Fatal(err)
}
if len(ac.(*accessController).rootCerts.Subjects()) != 2 {
if len(ac.(*accessController).rootCerts.Subjects()) != 2 { //nolint:staticcheck // FIXME(thaJeztah): ignore SA1019: ac.(*accessController).rootCerts.Subjects has been deprecated since Go 1.18: if s was returned by SystemCertPool, Subjects will not include the system roots. (staticcheck)
t.Fatal("accessController has the wrong number of certificates")
}
}

View file

@ -239,7 +239,6 @@ func (registry *Registry) ListenAndServe() error {
ClientAuth: tls.NoClientCert,
NextProtos: nextProtos(config),
MinVersion: tlsMinVersion,
PreferServerCipherSuites: true,
CipherSuites: tlsCipherSuites,
}
@ -282,7 +281,7 @@ func (registry *Registry) ListenAndServe() error {
}
}
for _, subj := range pool.Subjects() {
for _, subj := range pool.Subjects() { //nolint:staticcheck // FIXME(thaJeztah): ignore SA1019: ac.(*accessController).rootCerts.Subjects has been deprecated since Go 1.18: if s was returned by SystemCertPool, Subjects will not include the system roots. (staticcheck)
dcontext.GetLogger(registry.app).Debugf("CA Subject: %s", string(subj))
}