Skip to content

Commit 9b9074b

Browse files
authored
Add explicit hsm build tag (#942)
Using an implicit CGO tag means that the PKCS#11 build must succeed on musl (which it likely won't); move it to an explicit tag and let the build fail with a rather cryptic error if CGO is not specified but the hsm build tag is: ==> Building bao... # github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2 ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:55:22: undefined: pkcs11.Ctx ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:278:53: undefined: pkcs11.SessionHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:278:79: undefined: pkcs11.ObjectHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:309:54: undefined: pkcs11.SessionHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:309:80: undefined: pkcs11.ObjectHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:364:53: undefined: pkcs11.SessionHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:364:79: undefined: pkcs11.ObjectHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:381:54: undefined: pkcs11.SessionHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:381:80: undefined: pkcs11.ObjectHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:442:45: undefined: pkcs11.SessionHandle ../../../go/pkg/mod/github.com/openbao/go-kms-wrapping/wrappers/pkcs11/v2@v2.0.0-20250114185509-3fa7a3d31521/pkcs11_client.go:442:45: too many errors Signed-off-by: Alexander Scheel <ascheel@gitlab.com>
1 parent d4a1c72 commit 9b9074b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internalshared/configutil/no_pkcs11.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !cgo || !linux
1+
//go:build !hsm || !linux
22

33
package configutil
44

internalshared/configutil/pkcs11.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build cgo && linux
1+
//go:build hsm && linux
22

33
package configutil
44

0 commit comments

Comments
 (0)