[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] [PATCH] Fix typo and implement Subkey::isSecret() in
From:       Stefan Gehn <mETz81 () web ! de>
Date:       2006-05-24 18:14:38
Message-ID: 200605242014.39032.mETz81 () web ! de
[Download RAW message or body]

Update,

found another bug :/
UserID::Signature::status() was returning wrong values because gpgme_error_t 
was not split up into gpgme_err_code and gpgme_err_source.
This patch now makes status() return sensible values and incorporates the 
first one as well.

Bye, Stefan aka mETz

["gpgmepp.patch" (text/x-diff)]

Index: key.cpp
===================================================================
--- key.cpp	(Revision 544390)
+++ key.cpp	(Arbeitskopie)
@@ -1,5 +1,5 @@
 /* key.cpp - wraps a gpgme key
-   Copyright (C) 2003 Klarälvdalens Datakonsult AB
+   Copyright (C) 2003 Klarälvdalens Datakonsult AB
 
    This file is part of GPGME++.
  
@@ -379,11 +379,15 @@
   bool Subkey::canCertify() const {
     return d->subkey && d->subkey->can_certify;
   }
-  
+
   bool Subkey::canAuthenticate() const {
     return d->subkey && d->subkey->can_authenticate;
   }
 
+  bool Subkey::isSecret() const {
+    return d->subkey && d->subkey->secret;
+  }
+
   unsigned int Subkey::length() const {
     return d->subkey ? d->subkey->length : 0 ;
   }
@@ -732,7 +736,8 @@
   UserID::Signature::Status UserID::Signature::status() const {
     if ( !d->sig )
       return GeneralError;
-    switch ( d->sig->status ) {
+
+    switch ( gpgme_err_code(d->sig->status) ) {
     case GPG_ERR_NO_ERROR:      return NoError;
     case GPG_ERR_SIG_EXPIRED:   return SigExpired;
     case GPG_ERR_KEY_EXPIRED:   return KeyExpired;
Index: key.h
===================================================================
--- key.h	(Revision 544390)
+++ key.h	(Arbeitskopie)
@@ -1,5 +1,5 @@
 /* key.h - wraps a gpgme key
-   Copyright (C) 2003 Klarälvdalens Datakonsult AB
+   Copyright (C) 2003 Klarälvdalens Datakonsult AB
 
    This file is part of GPGME++.
  
@@ -142,7 +142,7 @@
     bool canCertify() const;
     bool canAuthenticate() const;
 
-    bool isSecred() const;
+    bool isSecret() const;
 
     unsigned int publicKeyAlgorithm() const;
     const char * publicKeyAlgorithmAsString() const;


_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic