Skip to content

Commit bfe8e52

Browse files
check for nil rootCAs
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
1 parent abf55e8 commit bfe8e52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

v2/cli.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ func (f *PluginCli) Kex(modulePath string, certPool *x509.CertPool) (certChain [
106106
if err != nil {
107107
return false, err
108108
}
109-
certPool.AddCert(parsedCert)
109+
if certPool != nil {
110+
certPool.AddCert(parsedCert)
111+
}
110112
certificateChain = append(certificateChain, tls.Certificate{
111113
Certificate: [][]byte{block.Bytes},
112114
Leaf: parsedCert,

0 commit comments

Comments
 (0)