no-crypto.go 412 B

123456789101112131415161718
  1. //go:build !cgo || nocrypto
  2. // +build !cgo nocrypto
  3. package main
  4. import (
  5. "errors"
  6. )
  7. func NewCryptoHelper(bridge *Bridge) Crypto {
  8. if !bridge.Config.Bridge.Encryption.Allow {
  9. bridge.Log.Warnln("Bridge built without end-to-bridge encryption, but encryption is enabled in config")
  10. }
  11. bridge.Log.Debugln("Bridge built without end-to-bridge encryption")
  12. return nil
  13. }
  14. var NoSessionFound = errors.New("nil")