3 # test loading of pywsman
7 sys.path.insert(0, '../../build/swig/python')
9 from zypp import ZYppFactory, Pathname, KeyRing, PublicKey
12 keyring = ZYppFactory.instance().getZYpp().keyRing()
14 path = Pathname("/suse/aschnell/tmp/repodata/repomd.xml.key")
17 publickey = PublicKey(path)
22 print "is key known/trusted %s %s" % (keyring.isKeyKnown(id), keyring.isKeyTrusted(id))
24 keyring.importKey(publickey, True)
26 print "is key known/trusted %s %s" % (keyring.isKeyKnown(id), keyring.isKeyTrusted(id))
28 print "list of known keys:"
29 for key in keyring.publicKeys():
32 print "list of trusted keys:"
33 for key in keyring.trustedPublicKeys():