go-pulse/crypto
Jeremy Schlatter b5e5b3567c crypto: fix build when CGO_ENABLED=0 (#19121)
Package crypto works with or without cgo, which is great. However, to make it
work without cgo required setting the build tag `nocgo`. It's common to disable
cgo by instead just setting the environment variable `CGO_ENABLED=0`. Setting
this environment variable does _not_ implicitly set the build tag `nocgo`. So
projects that try to build the crypto package with `CGO_ENABLED=0` will fail. I
have done this myself several times. Until today, I had just assumed that this
meant that this package requires cgo.

But a small build tag change will make this case work. Instead of using `nocgo`
and `!nocgo`, we can use `!cgo` and `cgo`, respectively. The `cgo` build tag is
automatically set if cgo is enabled, and unset if it is disabled.
2019-02-19 12:18:37 +01:00
..
bn256 crypto/bn256: add missing license file, release wrapper in BSD-3 2018-08-20 18:05:06 +03:00
ecies crypto/ecies: remove unused function (#19096) 2019-02-18 14:09:07 +02:00
secp256k1 crypto/secp256k1: Fix invalid document link (#18297) 2018-12-13 10:25:13 +01:00
crypto_test.go crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932) 2018-06-12 15:26:08 +02:00
crypto.go vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
signature_cgo.go crypto: fix build when CGO_ENABLED=0 (#19121) 2019-02-19 12:18:37 +01:00
signature_nocgo.go crypto: fix build when CGO_ENABLED=0 (#19121) 2019-02-19 12:18:37 +01:00
signature_test.go crypto: ensure that VerifySignature rejects malleable signatures (#15708) 2017-12-20 14:30:00 +02:00