Skip to content

Instantly share code, notes, and snippets.

@ripienaar
Created September 6, 2019 11:30
Show Gist options
  • Save ripienaar/ff715e2375a617af3ec217c79b0bb7e3 to your computer and use it in GitHub Desktop.
Save ripienaar/ff715e2375a617af3ec217c79b0bb7e3 to your computer and use it in GitHub Desktop.
// +build cgo
package choria
import (
"github.com/choria-io/go-security/pkcs11sec"
)
func (fw *Framework) setupPKCS11() (err error) {
fw.security, err = pkcs11sec.New(pkcs11sec.WithChoriaConfig(fw.Config), pkcs11sec.WithLog(fw.Logger("security")))
return err
}
// +build !cgo
package choria
import (
"fmt"
)
func (fw *Framework) setupPKCS11() (err error) {
return fmt.Errorf("pkcs11 is not supported in this build")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment