Created
February 25, 2014 12:48
-
-
Save woods/9208176 to your computer and use it in GitHub Desktop.
Example of using GPGME to access a keyring in a nonstandard location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read source here: https://github.com/ueno/ruby-gpgme | |
require 'gpgme' | |
# The given directory must contain pubring.gpg | |
GPGME::Engine.home_dir = 'spec/fixtures/gnupg' | |
GPGME::Key.find(:public) # => An array of public key objects | |
# Print ascii-armored public key to stdout | |
GPGME::Key.export("[email protected]", output: $stdout, armor: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment