From 168a6ff93f8cd92f166a222efa5d3103fc610f2b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 9 May 2020 20:25:48 +0300 Subject: [PATCH] Fix static build --- crypto.go | 2 +- database/cryptostore.go | 2 ++ no-cgo.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto.go b/crypto.go index 286b600..5e1f0d9 100644 --- a/crypto.go +++ b/crypto.go @@ -49,7 +49,7 @@ type CryptoHelper struct { baseLog maulogger.Logger } -func NewCryptoHelper(bridge *Bridge) *CryptoHelper { +func NewCryptoHelper(bridge *Bridge) Crypto { if !bridge.Config.Bridge.Encryption.Allow { bridge.Log.Debugln("Bridge built with end-to-bridge encryption, but disabled in config") return nil diff --git a/database/cryptostore.go b/database/cryptostore.go index 0f780b2..f044002 100644 --- a/database/cryptostore.go +++ b/database/cryptostore.go @@ -14,6 +14,8 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +build cgo + package database import ( diff --git a/no-cgo.go b/no-cgo.go index 961bf5c..88b359a 100644 --- a/no-cgo.go +++ b/no-cgo.go @@ -25,7 +25,7 @@ import ( "golang.org/x/image/webp" ) -func (bridge *Bridge) initCrypto() error { +func NewCryptoHelper(bridge *Bridge) Crypto { if !bridge.Config.Bridge.Encryption.Allow { bridge.Log.Warnln("Bridge built without end-to-bridge encryption, but encryption is enabled in config") }