Skip to content

Commit 5f324fe

Browse files
committed
stupidgcm: make build tags consistent
This makes building with just CGO_ENABLED=0 work.
1 parent 677bd8e commit 5f324fe

File tree

12 files changed

+11
-22
lines changed

12 files changed

+11
-22
lines changed

internal/stupidgcm/chacha.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/chacha_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/common.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/common_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build cgo && !without_openssl
2-
// +build cgo,!without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/gcm.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/gcm_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
// We compare against Go's built-in GCM implementation. Since stupidgcm only
54
// supports 128-bit IVs and Go only supports that from 1.5 onward, we cannot

internal/stupidgcm/locking.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/openssl.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build !without_openssl
2-
// +build !without_openssl
1+
//go:build cgo && !without_openssl
32

43
package stupidgcm
54

internal/stupidgcm/openssl_aead.c

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

33
#include "openssl_aead.h"
44
#include <openssl/evp.h>

internal/stupidgcm/without_openssl.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build without_openssl
2-
// +build without_openssl
1+
//go:build !cgo || without_openssl
32

43
package stupidgcm
54

0 commit comments

Comments
 (0)