diff options
author | Arvin Schnell <aschnell@suse.de> | 2007-08-28 18:34:49 +0000 |
---|---|---|
committer | Arvin Schnell <aschnell@suse.de> | 2007-08-28 18:34:49 +0000 |
commit | 56f4fe74e0199ff4d4bef75637e4a5eedecaa58a (patch) | |
tree | 2d02d19c7edd1a30035cb7608a3ee062fe82af1a /examples | |
parent | 3f67560e1d7c8e5f35862c1fea2de2005a258e65 (diff) | |
download | libzypp-bindings-56f4fe74e0199ff4d4bef75637e4a5eedecaa58a.tar.gz libzypp-bindings-56f4fe74e0199ff4d4bef75637e4a5eedecaa58a.tar.bz2 libzypp-bindings-56f4fe74e0199ff4d4bef75637e4a5eedecaa58a.zip |
- work on keyring and publickey classes
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ruby/keyring.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/ruby/keyring.rb b/examples/ruby/keyring.rb new file mode 100644 index 0000000..79426ad --- /dev/null +++ b/examples/ruby/keyring.rb @@ -0,0 +1,21 @@ + +require 'zypp' +include Zypp + + +keyring = ZYppFactory::instance.get_zypp.key_ring + +# FIXME +path = Pathname.new("/suse/aschnell/tmp/repodata/repomd.xml.key") +publickey = PublicKey.new(path) + +id = publickey.id() + +puts "known #{keyring.is_key_known(id)}" +puts "trusted #{keyring.is_key_trusted(id)}" + +keyring.import_key(publickey, true) + +puts "known #{keyring.is_key_known(id)}" +puts "trusted #{keyring.is_key_trusted(id)}" + |