WIP: rebase fork onto upstream/main (v1.103.0) #15

Closed
codinget wants to merge 670 commits from webnet into save/webnet-2026-07-29
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 71b90de0d4 - Show all commits
+4 -4
View File
@@ -23,6 +23,7 @@ import (
"os"
"path/filepath"
"regexp"
"slices"
"time"
"golang.org/x/crypto/acme"
@@ -158,10 +159,9 @@ func (m *manualCertManager) getCertificate(hi *tls.ClientHelloInfo) (*tls.Certif
// Return a shallow copy of the cert with a capacity-clamped chain
// so callers can never mutate the manager's long-lived certificate.
certCopy := new(tls.Certificate)
*certCopy = *m.cert
certCopy.Certificate = certCopy.Certificate[:len(certCopy.Certificate):len(certCopy.Certificate)]
return certCopy, nil
certCopy := *m.cert
certCopy.Certificate = slices.Clip(certCopy.Certificate)
return &certCopy, nil
}
func (m *manualCertManager) HTTPHandler(fallback http.Handler) http.Handler {
+1 -2
View File
@@ -744,8 +744,7 @@ func (s *Server) ModifyTLSConfigToAddMetaCert(c *tls.Config) {
// cached value. Return a shallow copy with the meta cert
// appended to a freshly allocated chain slice.
certCopy := *cert
chain := cert.Certificate
certCopy.Certificate = append(chain[:len(chain):len(chain)], s.MetaCert())
certCopy.Certificate = append(slices.Clip(cert.Certificate), s.MetaCert())
return &certCopy, nil
}
}