Skip to content

Commit 6f7eda5

Browse files
misc: added log
1 parent cda3ac3 commit 6f7eda5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/proxy/proxy.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,19 @@ func (p *Proxy) setupTLSServer() error {
255255
certChain := [][]byte{serverCertBlock.Bytes}
256256
certChain = append(certChain, chainCerts...)
257257

258+
// Debug: log the complete certificate chain as PEM
259+
var chainPEM strings.Builder
260+
for i, certBytes := range certChain {
261+
chainPEM.WriteString(fmt.Sprintf("--- Certificate %d ---\n", i+1))
262+
certPEM := pem.EncodeToMemory(&pem.Block{
263+
Type: "CERTIFICATE",
264+
Bytes: certBytes,
265+
})
266+
chainPEM.Write(certPEM)
267+
chainPEM.WriteString("\n")
268+
}
269+
log.Printf("Complete certificate chain PEM:\n%s", chainPEM.String())
270+
258271
// Create TLS config
259272
p.tlsConfig = &tls.Config{
260273
Certificates: []tls.Certificate{

0 commit comments

Comments
 (0)