pgp.rb 427 B

123456789101112131415
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class SecureMailing::PGP < SecureMailing::Backend
  3. MIN_REQUIRED_GPG_VERSION = '2.2.0'.freeze
  4. def self.active?
  5. Setting.get('pgp_integration') && required_version?
  6. end
  7. def self.required_version?
  8. SecureMailing::PGP::Tool.version >= Gem::Version.new(MIN_REQUIRED_GPG_VERSION)
  9. rescue Errno::ENOENT, Errno::EHWPOISON
  10. false
  11. end
  12. end