Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Dockerfile-test
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM golang:${GO_VERSION}

# Install build dependencies
RUN apt-get update && \
apt-get install -y build-essential python3-minimal netcat-traditional softhsm2 rsyslog git python3-distutils </dev/null && \
apt-get install -y build-essential python3-minimal netcat-traditional softhsm2 rsyslog git </dev/null && \
mkdir -p /etc/softhsm /var/lib/softhsm/tokens /go/src/github.com/ghostunnel/ghostunnel && \
go install github.com/wadey/gocovmerge@latest && \
go install golang.org/x/tools/cmd/cover@latest
Expand Down
21 changes: 21 additions & 0 deletions certstore/certstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"crypto/sha256"
"crypto/sha512"
"crypto/x509"
"runtime"
"testing"

"github.com/github/smimesign/fakeca"
Expand All @@ -27,6 +28,11 @@ func TestImportDeleteECDSA(t *testing.T) {

// ImportDeleteHelper is an abstraction for testing identity Import()/Delete().
func ImportDeleteHelper(t *testing.T, i *fakeca.Identity) {
if runtime.GOOS == "windows" {
t.Skip("FIXME: Windows runners in Github fail this test due to issues with their OpenSSL installation")
return
}

withStore(t, func(store Store) {
// Import an identity
if err := store.Import(i.PFX("asdf"), "asdf"); err != nil {
Expand Down Expand Up @@ -93,6 +99,11 @@ func ImportDeleteHelper(t *testing.T, i *fakeca.Identity) {
}

func TestSignerRSA(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("FIXME: Windows runners in Github fail this test due to issues with their OpenSSL installation")
return
}

rsaPriv, ok := leafRSA.PrivateKey.(*rsa.PrivateKey)
if !ok {
t.Fatal("expected priv to be an RSA private key")
Expand Down Expand Up @@ -223,6 +234,11 @@ func TestSignerRSA(t *testing.T) {
}

func TestSignerECDSA(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("FIXME: Windows runners in Github fail this test due to issues with their OpenSSL installation")
return
}

ecPriv, ok := leafEC.PrivateKey.(*ecdsa.PrivateKey)
if !ok {
t.Fatal("expected priv to be an ECDSA private key")
Expand Down Expand Up @@ -305,6 +321,11 @@ func TestCertificateEC(t *testing.T) {
}

func CertificateHelper(t *testing.T, leaf *fakeca.Identity) {
if runtime.GOOS == "windows" {
t.Skip("FIXME: Windows runners in Github fail this test due to issues with their OpenSSL installation")
return
}

withIdentity(t, root, func(caIdent Identity) {
withIdentity(t, intermediate, func(interIdent Identity) {
withIdentity(t, leaf, func(leafIdent Identity) {
Expand Down
104 changes: 57 additions & 47 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,73 @@ module github.com/ghostunnel/ghostunnel
require (
github.com/Microsoft/go-winio v0.6.2
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/caddyserver/certmagic v0.23.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/caddyserver/certmagic v0.25.0
github.com/coreos/go-systemd/v22 v22.6.0
github.com/cyberdelia/go-metrics-graphite v0.0.0-20161219230853-39f87cc3b432
github.com/deathowl/go-metrics-prometheus v0.0.0-20221009205350-f2a1482ba35b
github.com/github/smimesign v0.2.0
github.com/go-jose/go-jose/v4 v4.1.1
github.com/go-jose/go-jose/v4 v4.1.3
github.com/hashicorp/go-syslog v1.0.0
github.com/kavu/go_reuseport v1.5.0
github.com/landlock-lsm/go-landlock v0.0.0-20250303204525-1544bccde3a3
github.com/landlock-lsm/go-landlock v0.0.0-20251103212306-430f8e5cd97c
github.com/letsencrypt/pkcs11key/v4 v4.0.0
github.com/mholt/acmez v1.2.0
github.com/open-policy-agent/opa v1.6.0
github.com/open-policy-agent/opa v1.11.0
github.com/pires/go-proxyproto v0.8.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.22.0
github.com/prometheus/client_golang v1.23.2
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9
github.com/spiffe/go-spiffe/v2 v2.5.0
github.com/square/certigo v1.16.1-0.20220921173659-75f2ec06b4a5
github.com/spiffe/go-spiffe/v2 v2.6.0
github.com/square/certigo v1.17.1
github.com/square/go-sq-metrics v0.0.0-20170531223841-ae72f332d0d9
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
github.com/wrouesnel/go.connect-proxy-scheme v0.0.0-20240822095422-f6d0c8f327b9
golang.org/x/net v0.42.0
golang.org/x/sync v0.16.0
google.golang.org/grpc v1.73.0
google.golang.org/protobuf v1.36.6
golang.org/x/net v0.47.0
golang.org/x/sync v0.18.0
google.golang.org/grpc v1.77.0
google.golang.org/protobuf v1.36.10
)

require (
dario.cat/mergo v1.0.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/agnivade/levenshtein v1.2.1 // indirect
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/caddyserver/zerossl v0.1.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/dsnet/compress v0.0.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/frankban/quicktest v1.14.6 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/certificate-transparency-go v1.3.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/integralist/go-findroot v0.0.0-20160518114804-ac90681525dc // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/libdns/libdns v1.1.0 // indirect
github.com/lestrrat-go/blackmagic v1.0.4 // indirect
github.com/lestrrat-go/dsig v1.0.0 // indirect
github.com/lestrrat-go/dsig-secp256k1 v1.0.0 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc/v3 v3.0.1 // indirect
github.com/lestrrat-go/jwx/v3 v3.0.12 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/lestrrat-go/option/v2 v2.0.0 // indirect
github.com/libdns/libdns v1.1.1 // indirect
github.com/magefile/mage v1.15.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mholt/acmez/v3 v3.1.2 // indirect
github.com/mholt/acmez/v3 v3.1.4 // indirect
github.com/mholt/archiver v3.1.1+incompatible // indirect
github.com/miekg/dns v1.1.67 // indirect
github.com/miekg/dns v1.1.68 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand All @@ -70,44 +79,45 @@ require (
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/prometheus/common v0.67.4 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/segmentio/asm v1.2.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/tchap/go-patricia/v2 v2.3.3 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/vektah/gqlparser/v2 v2.5.30 // indirect
github.com/weppos/publicsuffix-go v0.40.3-0.20250708083804-25ff8f86d8b3 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
github.com/vektah/gqlparser/v2 v2.5.31 // indirect
github.com/weppos/publicsuffix-go v0.50.1 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
github.com/zeebo/errs v1.4.0 // indirect
github.com/zmap/zcrypto v0.0.0-20250129210703-03c45d0bae98 // indirect
github.com/zmap/zlint/v3 v3.6.6 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
github.com/zmap/zlint/v3 v3.6.8 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.uber.org/zap v1.27.1 // indirect
go.uber.org/zap/exp v0.3.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/crypto v0.40.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/mod v0.26.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/tools v0.35.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
golang.org/x/mod v0.30.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/tools v0.39.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
kernel.org/pub/linux/libs/security/libcap/psx v1.2.76 // indirect
sigs.k8s.io/yaml v1.5.0 // indirect
software.sslmate.com/src/go-pkcs12 v0.5.0 // indirect
kernel.org/pub/linux/libs/security/libcap/psx v1.2.77 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
software.sslmate.com/src/go-pkcs12 v0.6.0 // indirect
)

go 1.24

toolchain go1.24.2
go 1.24.6
Loading
Loading