[svn] GnuPG - r5291 - in branches/STABLE-BRANCH-2-0: common g10
svn author wk
cvs at cvs.gnupg.org
Fri Mar 12 18:24:07 CET 2010
Author: wk
Date: 2010-03-12 18:24:06 +0100 (Fri, 12 Mar 2010)
New Revision: 5291
Modified:
branches/STABLE-BRANCH-2-0/common/ChangeLog
branches/STABLE-BRANCH-2-0/common/status.h
branches/STABLE-BRANCH-2-0/g10/ChangeLog
branches/STABLE-BRANCH-2-0/g10/gpg.h
branches/STABLE-BRANCH-2-0/g10/keyedit.c
branches/STABLE-BRANCH-2-0/g10/seckey-cert.c
Log:
Return a posiive status message for a successfull passphrase change.
Modified: branches/STABLE-BRANCH-2-0/common/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-2-0/common/ChangeLog 2010-03-11 12:34:11 UTC (rev 5290)
+++ branches/STABLE-BRANCH-2-0/common/ChangeLog 2010-03-12 17:24:06 UTC (rev 5291)
@@ -1,3 +1,7 @@
+2010-03-12 Werner Koch <wk at g10code.com>
+
+ * status.h (STATUS_ENTER): New.
+
2010-02-11 Marcus Brinkmann <marcus at g10code.de>
From trunk 2009-10-16, 2009-11-02, 2009-11-05:
Modified: branches/STABLE-BRANCH-2-0/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-2-0/g10/ChangeLog 2010-03-11 12:34:11 UTC (rev 5290)
+++ branches/STABLE-BRANCH-2-0/g10/ChangeLog 2010-03-12 17:24:06 UTC (rev 5291)
@@ -1,3 +1,10 @@
+2010-03-12 Werner Koch <wk at g10code.com>
+
+ * seckey-cert.c (do_check): Return GPG_ERR_CANCELED.
+ * keyedit.c (change_passphrase): Add arg R_ERR.
+ (keyedit_passwd): Return the correct error or emit a success
+ status message.
+
2010-02-25 Werner Koch <wk at g10code.com>
* sign.c (hash_for): Force SHA1 only for v1 OpenPGP cards. Fixes
Modified: branches/STABLE-BRANCH-2-0/common/status.h
===================================================================
--- branches/STABLE-BRANCH-2-0/common/status.h 2010-03-11 12:34:11 UTC (rev 5290)
+++ branches/STABLE-BRANCH-2-0/common/status.h 2010-03-12 17:24:06 UTC (rev 5291)
@@ -124,7 +124,8 @@
STATUS_PKA_TRUST_GOOD,
STATUS_TRUNCATED,
- STATUS_ERROR
+ STATUS_ERROR,
+ STATUS_SUCCESS
};
Modified: branches/STABLE-BRANCH-2-0/g10/gpg.h
===================================================================
--- branches/STABLE-BRANCH-2-0/g10/gpg.h 2010-03-11 12:34:11 UTC (rev 5290)
+++ branches/STABLE-BRANCH-2-0/g10/gpg.h 2010-03-12 17:24:06 UTC (rev 5291)
@@ -119,5 +119,4 @@
#define G10ERR_UNU_SECKEY GPG_ERR_UNUSABLE_SECKEY
#define G10ERR_WRONG_SECKEY GPG_ERR_WRONG_SECKEY
-
#endif /*GNUPG_G10_GPG_H*/
Modified: branches/STABLE-BRANCH-2-0/g10/keyedit.c
===================================================================
--- branches/STABLE-BRANCH-2-0/g10/keyedit.c 2010-03-11 12:34:11 UTC (rev 5290)
+++ branches/STABLE-BRANCH-2-0/g10/keyedit.c 2010-03-12 17:24:06 UTC (rev 5291)
@@ -1098,7 +1098,7 @@
* We use only one passphrase for all keys.
*/
static int
-change_passphrase( KBNODE keyblock )
+change_passphrase (KBNODE keyblock, int *r_err)
{
int rc = 0;
int changed=0;
@@ -1262,6 +1262,8 @@
leave:
xfree( passphrase );
set_next_passphrase( NULL );
+ if (r_err)
+ *r_err = rc;
return changed && !rc;
}
@@ -2121,7 +2123,7 @@
break;
case cmdPASSWD:
- if( change_passphrase( sec_keyblock ) )
+ if (change_passphrase (sec_keyblock, NULL))
sec_modified = 1;
break;
@@ -2341,11 +2343,8 @@
if (err)
goto leave;
- if (!change_passphrase (keyblock))
- {
- err = gpg_error (GPG_ERR_GENERAL);
- goto leave;
- }
+ if (!change_passphrase (keyblock, &err))
+ goto leave;
err = keydb_update_keyblock (kdh, keyblock);
if (err)
@@ -2362,6 +2361,8 @@
username, gpg_strerror (err));
write_status_error ("keyedit.passwd", gpg_err_code (err));
}
+ else
+ write_status_text (STATUS_SUCCESS, "keyedit.passwd");
}
Modified: branches/STABLE-BRANCH-2-0/g10/seckey-cert.c
===================================================================
--- branches/STABLE-BRANCH-2-0/g10/seckey-cert.c 2010-03-11 12:34:11 UTC (rev 5290)
+++ branches/STABLE-BRANCH-2-0/g10/seckey-cert.c 2010-03-12 17:24:06 UTC (rev 5291)
@@ -83,7 +83,7 @@
&sk->protect.s2k, mode,
tryagain_text, canceled );
if (!dek && canceled && *canceled)
- return G10ERR_GENERAL;
+ return GPG_ERR_CANCELED;
err = openpgp_cipher_open (&cipher_hd, sk->protect.algo,
More information about the Gnupg-commits
mailing list