diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-02-01 14:14:12 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-02-01 14:14:12 -0200 |
commit | e98d98fd889d897f0e6809a01d91be9385f01941 (patch) | |
tree | a1129e870ee8df56b793679f56ee6183a6c8a0f9 /lib/keyringer | |
parent | ec02fa7e647d7cd2b8b93a779fd16c655abf38ab (diff) | |
download | keyringer-e98d98fd889d897f0e6809a01d91be9385f01941.tar.gz keyringer-e98d98fd889d897f0e6809a01d91be9385f01941.tar.bz2 |
Moving the hard work of decrypting from keyringer to keyring
Diffstat (limited to 'lib/keyringer')
-rw-r--r-- | lib/keyringer/actions/decrypt.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/keyringer/actions/decrypt.rb b/lib/keyringer/actions/decrypt.rb index 33f01c2..bac4785 100644 --- a/lib/keyringer/actions/decrypt.rb +++ b/lib/keyringer/actions/decrypt.rb @@ -22,10 +22,9 @@ module Keyringer module Actions class Decrypt def execute - path = Keyring::UserConfig.instance.path - filename = path + '/keys/' + $args[0] + '.asc' - crypt = Keyring::Crypt.new - crypt.decrypt(filename) + raise "Missing key argument" if $args[0].nil? + crypt = Keyring::Crypt.new + crypt.decryptKey($args[0]) end end end |