Skip to content
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
@marcintao

Description

@marcintao

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

  1. build example plugin for windows
cd examples/snap-plugin-collector-rand
GOOS=windows GOARCH=386 go build
  1. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions