[git] GnuPG - branch, master, updated. gnupg-2.1.16-65-gdec2ae3

by Justus Winter cvs at cvs.gnupg.org
Wed Dec 7 15:13:43 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  dec2ae31a46a0f41886c7ad228865cc573f2dea9 (commit)
       via  92df40a3a2ae471fbba00d6d7040230404931fd4 (commit)
      from  8636ad5023a1bdc527add40a5508f8c5b7c35221 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dec2ae31a46a0f41886c7ad228865cc573f2dea9
Author: Justus Winter <justus at g10code.com>
Date:   Wed Dec 7 15:12:19 2016 +0100

    tests: Add test for '--quick-set-expire'.
    
    * tests/openpgp/quick-key-manipulation.scm: Test '--quick-set-expire'.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm
index 4f0eec2..d6bdde0 100755
--- a/tests/openpgp/quick-key-manipulation.scm
+++ b/tests/openpgp/quick-key-manipulation.scm
@@ -49,6 +49,9 @@
 
 (assert (= 1 (count-uids-of-secret-key alpha)))
 
+(define fpr (list-ref (assoc "fpr" (gpg-with-colons `(-k ,(exact alpha))))
+		      9))
+
 (info "Checking that we can add a user ID...")
 
 ;; Make sure the key capabilities don't change when we add a user id.
@@ -75,3 +78,22 @@
 (call-check `(, at GPG --quick-revuid ,(exact bravo) ,alpha))
 
 (assert (= 1 (count-uids-of-secret-key bravo)))
+
+(info "Checking that we can change the expiration time.")
+
+(define (expiration-time id)
+  (list-ref (assoc "pub" (gpg-with-colons `(-k ,id)))
+	    6))
+
+;; XXX This assumes that by default keys are created without
+;; expiration date.  See issue2701.
+(assert (equal? "" (expiration-time fpr)))
+
+;; Make the key expire in one year.
+(call-check `(, at gpg --quick-set-expire ,fpr "1y"))
+;; XXX It'd be nice to check that the value is right.
+(assert (not (equal? "" (expiration-time fpr))))
+
+;; And remove the expiration date.
+(call-check `(, at gpg --quick-set-expire ,fpr "0"))
+(assert (equal? "" (expiration-time fpr)))

commit 92df40a3a2ae471fbba00d6d7040230404931fd4
Author: Justus Winter <justus at g10code.com>
Date:   Wed Dec 7 14:49:49 2016 +0100

    tests: Improve quick key manipulation test.
    
    * tests/openpgp/quick-key-manipulation.scm: Do not update the trust
    database, rather be more specific when filtering the user ids.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm
index 4579081..4f0eec2 100755
--- a/tests/openpgp/quick-key-manipulation.scm
+++ b/tests/openpgp/quick-key-manipulation.scm
@@ -29,7 +29,7 @@
 
 (define (count-uids-of-secret-key id)
   (length (filter (lambda (x) (and (string=? "uid" (car x))
-				   (string=? "u" (cadr x))))
+				   (not (string=? "r" (cadr x)))))
 		  (gpg-with-colons
 		   `(--with-fingerprint
 		     --list-secret-keys ,(exact id))))))
@@ -47,8 +47,6 @@
 (info "Checking quick key generation...")
 (call-check `(, at GPG --quick-gen-key ,alpha))
 
-(call-check `(, at GPG --check-trustdb)) ; XXX why?
-
 (assert (= 1 (count-uids-of-secret-key alpha)))
 
 (info "Checking that we can add a user ID...")
@@ -70,14 +68,10 @@
 	(newline)
 	(exit 1))))
 
-(call-check `(, at GPG --check-trustdb)) ; XXX why?
-
 (assert (= 2 (count-uids-of-secret-key alpha)))
 (assert (= 2 (count-uids-of-secret-key bravo)))
 
 (info "Checking that we can revoke a user ID...")
 (call-check `(, at GPG --quick-revuid ,(exact bravo) ,alpha))
 
-(call-check `(, at GPG --check-trustdb)) ; XXX why?
-
 (assert (= 1 (count-uids-of-secret-key bravo)))

-----------------------------------------------------------------------

Summary of changes:
 tests/openpgp/quick-key-manipulation.scm | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list