Skip to content

Commit 906c997

Browse files
committed
Add a "nopkcs11" build tag
This allows opting out of PKCS11 (to avoid needing libltdl), but with CGO still enabled so certstore is usable ~ CGO_ENABLED=1 go build -tags "nopkcs11 certstore" ~ otool -L ./ghostunnel ./ghostunnel: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1570.15.0) /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.251.4) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
1 parent f2ffa57 commit 906c997

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ before_install:
3535
install:
3636
# Compile with CGO on/off for testing
3737
- CGO_ENABLED=0 go build -o ghostunnel-${TRAVIS_TAG}-linux-amd64-without-pkcs11 .
38+
- CGO_ENABLED=1 go build -tags nopkcs11 -o ghostunnel-${TRAVIS_TAG}-linux-amd64-without-pkcs11-but-with-cgo .
3839
- CGO_ENABLED=1 go build -o ghostunnel-${TRAVIS_TAG}-linux-amd64-with-pkcs11 .
3940
# Build Docker container
4041
- make docker-build

certloader/pkcs11_disabled.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !cgo
1+
// +build !cgo nopkcs11
22

33
/*-
44
* Copyright 2018 Square Inc.

certloader/pkcs11_enabled.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build cgo
1+
// +build cgo,!nopkcs11
22

33
/*-
44
* Copyright 2018 Square Inc.

0 commit comments

Comments
 (0)