зеркало из https://github.com/github/ruby-gpgme.git
Exit if gpg-agent is not running.
This commit is contained in:
Родитель
cfba9d7c7f
Коммит
b9c97b5571
|
@ -19,6 +19,11 @@ require 'gpgme'
|
|||
# puts
|
||||
# end
|
||||
|
||||
unless ENV['GPG_AGENT_INFO']
|
||||
$stderr.puts("gpg-agent is not running. See the comment in #{$0}.")
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless ENV['GNUPGHOME']
|
||||
$stderr.write('As GNUPGHOME is not set, the generated key pair will be stored into *your* keyring. Really proceed? (y/N) ')
|
||||
$stderr.flush
|
||||
|
|
|
@ -19,6 +19,11 @@ require 'gpgme'
|
|||
# puts
|
||||
# end
|
||||
|
||||
unless ENV['GPG_AGENT_INFO']
|
||||
$stderr.puts("gpg-agent is not running. See the comment in #{$0}.")
|
||||
exit(1)
|
||||
end
|
||||
|
||||
plain = 'test test test'
|
||||
puts("Plaintext:\n#{plain}")
|
||||
|
||||
|
|
|
@ -19,6 +19,11 @@ require 'gpgme'
|
|||
# puts
|
||||
# end
|
||||
|
||||
unless ENV['GPG_AGENT_INFO']
|
||||
$stderr.puts("gpg-agent is not running. See the comment in #{$0}.")
|
||||
exit(1)
|
||||
end
|
||||
|
||||
GPGME::sign('test test test', $stdout, {:mode => GPGME::SIG_MODE_CLEAR,
|
||||
# :passphrase_callback => method(:passfunc)
|
||||
})
|
||||
# :passphrase_callback => method(:passfunc)
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче