Fix string type

This commit is contained in:
世界
2026-07-25 22:57:06 +08:00
parent ea6965b726
commit f60f3728ce
7 changed files with 9 additions and 123 deletions
+4 -4
View File
@@ -116,7 +116,7 @@ func NewCertificateProvider(ctx context.Context, logger log.ContextLogger, tag s
case option.ACMEKeyTypeRSA4096:
keyType = certmagic.RSA4096
default:
return nil, E.New("unsupported ACME key type: ", options.KeyType)
return nil, E.New("unsupported ACME key type: ", string(options.KeyType))
}
config.KeySource = certmagic.StandardKeyGenerator{KeyType: keyType}
}
@@ -231,13 +231,13 @@ func newDNSSolver(dnsOptions *option.ACMEProviderDNS01ChallengeOptions, logger *
return nil, nil
}
if dnsOptions.TTL < 0 {
return nil, E.New("invalid ACME DNS01 ttl: ", dnsOptions.TTL)
return nil, E.New("invalid ACME DNS01 ttl: ", dnsOptions.TTL.Build())
}
if dnsOptions.PropagationDelay < 0 {
return nil, E.New("invalid ACME DNS01 propagation_delay: ", dnsOptions.PropagationDelay)
return nil, E.New("invalid ACME DNS01 propagation_delay: ", dnsOptions.PropagationDelay.Build())
}
if dnsOptions.PropagationTimeout < -1 {
return nil, E.New("invalid ACME DNS01 propagation_timeout: ", dnsOptions.PropagationTimeout)
return nil, E.New("invalid ACME DNS01 propagation_timeout: ", dnsOptions.PropagationTimeout.Build())
}
solver := &certmagic.DNS01Solver{
DNSManager: certmagic.DNSManager{
+1 -1
View File
@@ -338,7 +338,7 @@ func (s *Service) requestCertificate(ctx context.Context) ([]byte, []byte, *tls.
}
privateKey = ecKey
default:
return nil, nil, nil, nil, E.New("unsupported Cloudflare Origin CA request type: ", s.requestType)
return nil, nil, nil, nil, E.New("unsupported Cloudflare Origin CA request type: ", string(s.requestType))
}
privateKeyDER, err := x509.MarshalPKCS8PrivateKey(privateKey)
if err != nil {