This repository was archived by the owner on Nov 8, 2022. It is now read-only.
Unable to test plugins with TLS channel on Windows #82
Closed
Description
Description
When starting an example plugin (rand
) on Windows with TLS enabled, error prevents plugin from working. Plugin complains that system root certificates are unavailable on Windows.
Steps to reproduce
- build example plugin for windows
cd examples/snap-plugin-collector-rand
GOOS=windows GOARCH=386 go build
- launch example plugin with TLS enabled
snap-plugin-collector-rand.exe "{\"CertPath\":\"libtest-srv.crt\",\"KeyPath\":\"libtest-srv.key\"}
Observed outcome
Plugin throws an error:
panic: unable to read root CAs: crypto/x509: system root pool is not available on Windows
Expected outcome
Plugin starts without issues.
Remarks
I understand that golang doesn't have complete support for root certificates on Windows, according to issue golang/go#16736.
It would be better to add support for explicitly specified root certificates for all plugins based on this library, e.g.: RootCertPaths: \"libtest-CA.crt;clients-use-this.crt\"
.
Metadata
Metadata
Assignees
Labels
No labels