Add build tags for disabling crypto independently of cgo
This commit is contained in:
11
no-crypto.go
Normal file
11
no-crypto.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// +build !cgo nocrypto
|
||||
|
||||
package main
|
||||
|
||||
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")
|
||||
}
|
||||
bridge.Log.Debugln("Bridge built without end-to-bridge encryption")
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user