Merge pull request #1114 from enj/enj/i/fips_init_log
Use klog to make sure FIPS init log is emitted
This commit is contained in:
commit
6af1aaeb20
@ -18,8 +18,7 @@ import (
|
|||||||
_ "crypto/tls/fipsonly" // restricts all TLS configuration to FIPS-approved settings.
|
_ "crypto/tls/fipsonly" // restricts all TLS configuration to FIPS-approved settings.
|
||||||
|
|
||||||
"k8s.io/apiserver/pkg/server/options"
|
"k8s.io/apiserver/pkg/server/options"
|
||||||
|
"k8s.io/klog/v2"
|
||||||
"go.pinniped.dev/internal/plog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Always use TLS 1.2 for FIPs
|
// Always use TLS 1.2 for FIPs
|
||||||
@ -27,7 +26,11 @@ const secureServingOptionsMinTLSVersion = "VersionTLS12"
|
|||||||
const SecureTLSConfigMinTLSVersion = tls.VersionTLS12
|
const SecureTLSConfigMinTLSVersion = tls.VersionTLS12
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
plog.Debug("using boring crypto in fips only mode", "go version", runtime.Version())
|
// this init runs before we have parsed our config to determine our log level
|
||||||
|
// thus we must use a log statement that will always print instead of conditionally print
|
||||||
|
// for plog, that is only error and warning logs, neither of which seem appropriate here
|
||||||
|
// therefore, just use klog directly with no V level requirement
|
||||||
|
klog.InfoS("using boring crypto in fips only mode", "go version", runtime.Version())
|
||||||
}
|
}
|
||||||
|
|
||||||
func Default(rootCAs *x509.CertPool) *tls.Config {
|
func Default(rootCAs *x509.CertPool) *tls.Config {
|
||||||
|
Loading…
Reference in New Issue
Block a user