tool.rb 442 B

1234567891011121314
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class SecureMailing::PGP::Tool
  3. include SecureMailing::PGP::Tool::Key
  4. include SecureMailing::PGP::Tool::Data
  5. include SecureMailing::PGP::Tool::Parse
  6. def self.version
  7. stdout, stderr, status = Open3.capture3({ 'LC_ALL' => 'C' }, 'gpg', '--version')
  8. raise Errno::EHWPOISON, stderr if !status.success?
  9. stdout.split("\n").first.split.last
  10. end
  11. end