Test the PKCS#11 build against SoftHSM in CI and warn once where the build has no driver

This commit is contained in:
Viktor Liu
2026-10-02 12:44:17 +02:00
parent 07cf08230c
commit 0ed3eb6139
7 changed files with 100 additions and 5 deletions
+5
View File
@@ -121,6 +121,11 @@ type module struct {
cSign func(session ulong, data *byte, dataLen ulong, signature *byte, signatureLen *ulong) ulong
}
// Supported reports whether this build can load PKCS#11 modules.
func Supported() bool {
return true
}
func load(path string) (driver, error) {
lib, err := purego.Dlopen(path, purego.RTLD_NOW|purego.RTLD_LOCAL)
if err != nil {