Author: lslezak
Date: Thu Jan 10 16:04:00 2008
New Revision: 43536
URL: http://svn.opensuse.org/viewcvs/yast?rev=43536&view=rev
Log:
- added Pkg::CheckGPGKeyFile() function - check whether the file
contains a valid GPG key
Modified:
trunk/pkg-bindings/package/yast2-pkg-bindings.changes
trunk/pkg-bindings/src/Keyring.cc
trunk/pkg-bindings/src/PkgFunctions.h
Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=43536&r1=43535&r2=43536&view=diff
==============================================================================
--- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original)
+++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Thu Jan 10 16:04:00 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Jan 10 16:02:50 CET 2008 - lslezak@suse.cz
+
+- added Pkg::CheckGPGKeyFile() function - check whether the file
+ contains a valid GPG key
+
+-------------------------------------------------------------------
Mon Jan 7 16:40:35 CET 2008 - lslezak@suse.cz
- added missing "log.h" file in Makefile.am
Modified: trunk/pkg-bindings/src/Keyring.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Keyring.cc?rev=43536&r1=43535&r2=43536&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Keyring.cc (original)
+++ trunk/pkg-bindings/src/Keyring.cc Thu Jan 10 16:04:00 2008
@@ -67,6 +67,30 @@
return YCPVoid();
}
+class GPGMap
+{
+ public:
+
+ GPGMap(const zypp::PublicKey &key, bool trusted)
+ {
+ gpg_map->add(YCPString("id"), YCPString(key.id()));
+ gpg_map->add(YCPString("name"), YCPString(key.name()));
+ gpg_map->add(YCPString("fingerprint"), YCPString(key.fingerprint()));
+
+ // is the key trusted?
+ gpg_map->add(YCPString("trusted"), YCPBoolean(trusted));
+ }
+
+ YCPMap getMap() const
+ {
+ return gpg_map;
+ }
+
+ private:
+
+ YCPMap gpg_map;
+};
+
// A helper class
// converts PublicKey to YCPMap and adds it to an YCPList
class PublicKeyAdder : public std::unary_function