Exit if gpg-agent is not running.

This commit is contained in:
Daiki Ueno 2006-10-20 06:02:46 +00:00
Родитель cfba9d7c7f
Коммит b9c97b5571
3 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -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)
})