aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solve_tls.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/solve_tls.go b/solve_tls.go
index 876a39a..2017cd7 100644
--- a/solve_tls.go
+++ b/solve_tls.go
@@ -14,11 +14,6 @@ import (
"time"
)
-const (
- tlsKeySize = 2048
- tlsSuffix = ".acme.invalid"
-)
-
type tlsSolver struct {
http.Server
}
@@ -37,7 +32,7 @@ func newCert(domain string) (tls.Certificate, error) {
fail := func(err error) (tls.Certificate, error) {
return tls.Certificate{}, err
}
- key, err := rsa.GenerateKey(rand.Reader, tlsKeySize)
+ key, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
return fail(err)
}
@@ -72,7 +67,7 @@ func newCert(domain string) (tls.Certificate, error) {
func sniName(keyAuth string) string {
hash := sha256.Sum256([]byte(keyAuth))
z := hex.EncodeToString(hash[:])
- return z[:32] + "." + z[32:] + tlsSuffix
+ return z[:32] + "." + z[32:] + ".acme.invalid"
}
func (s *tlsSolver) Solve(_, keyAuth string) error {