[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.0-4-ga172759
by NIIBE Yutaka
cvs at cvs.gnupg.org
Tue Sep 12 14:37:45 CEST 2017
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, STABLE-BRANCH-2-2 has been updated
via a172759b5088ae086c0caa2e7d4d0ea346b28a90 (commit)
via 827abe01a72a50eab1cdcde78985b42a4a8480fb (commit)
from 7089dcc54099a4909ce7d386c07ab87e1398e2eb (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 a172759b5088ae086c0caa2e7d4d0ea346b28a90
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Fri Sep 8 14:21:29 2017 +0900
tests: Fix a test which specifies expiration date.
* tests/openpgp/quick-key-manipulation.scm: Fix expiration time
comparison.
--
This is a bug fix for Amelia Earhart who is probably in UTC-12.
When expiration date is specified, GnuPG interprets it as noon of the
date in local time.
Before this fix, the test compared the value by 2145916800 which is
2038-01-01 00:00:00 in UTC with allowance of 1 day. When the test
was ran in UTC-12 timezone, it failed because of noon in the timezone
is midnight of the next day in UTC.
GnuPG-bug-id: 3393
Reported-by: Daniel Kahn Gillmor
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm
index c21abfe..2023f17 100755
--- a/tests/openpgp/quick-key-manipulation.scm
+++ b/tests/openpgp/quick-key-manipulation.scm
@@ -178,11 +178,11 @@
(lambda (subkey)
(assert (= 1 (:alg subkey)))
(assert (string-contains? (:cap subkey) "s"))
- (assert (time-matches? 2145916800 ;; 2038-01-01
- ;; 4260207600 ;; 2105-01-01
+ (assert (time-matches? 2145960000 ;; UTC 2038-01-01 12:00:00
+ ;; 4260254400 ;; UTC 2105-01-01 12:00:00
(string->number (:expire subkey))
- ;; This is off by 12h, but I guess it just
- ;; choses the middle of the day.
+ ;; GnuPG choses the middle of the day (local time)
+ ;; when no hh:mm:ss is specified
(days->seconds 1))))
(lambda (subkey)
(assert (= 1 (:alg subkey)))
commit 827abe01a72a50eab1cdcde78985b42a4a8480fb
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Aug 29 14:35:47 2017 +0900
scd: Fix for large ECC keys.
* scd/app-openpgp.c (do_decipher): Support larger length.
--
Reported-by: Achim Pietig <achim at pietig.com>
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index f9d07ac..6fcec3e 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -4575,19 +4575,43 @@ do_decipher (app_t app, const char *keyidstr,
}
}
- fixuplen = 7;
+ n = 0;
+ if (indatalen < 128)
+ fixuplen = 7;
+ else
+ fixuplen = 10;
+
fixbuf = xtrymalloc (fixuplen + indatalen);
if (!fixbuf)
return gpg_error_from_syserror ();
/* Build 'Cipher DO' */
- fixbuf[0] = '\xa6';
- fixbuf[1] = (char)(indatalen+5);
- fixbuf[2] = '\x7f';
- fixbuf[3] = '\x49';
- fixbuf[4] = (char)(indatalen+2);
- fixbuf[5] = '\x86';
- fixbuf[6] = (char)indatalen;
+ fixbuf[n++] = '\xa6';
+ if (indatalen < 128)
+ fixbuf[n++] = (char)(indatalen+5);
+ else
+ {
+ fixbuf[n++] = 0x81;
+ fixbuf[n++] = (char)(indatalen+7);
+ }
+ fixbuf[n++] = '\x7f';
+ fixbuf[n++] = '\x49';
+ if (indatalen < 128)
+ fixbuf[n++] = (char)(indatalen+2);
+ else
+ {
+ fixbuf[n++] = 0x81;
+ fixbuf[n++] = (char)(indatalen+3);
+ }
+ fixbuf[n++] = '\x86';
+ if (indatalen < 128)
+ fixbuf[n++] = (char)indatalen;
+ else
+ {
+ fixbuf[n++] = 0x81;
+ fixbuf[n++] = (char)indatalen;
+ }
+
if (old_format_len)
{
memset (fixbuf+fixuplen, 0, 32 - old_format_len);
-----------------------------------------------------------------------
Summary of changes:
scd/app-openpgp.c | 40 +++++++++++++++++++++++++-------
tests/openpgp/quick-key-manipulation.scm | 8 +++----
2 files changed, 36 insertions(+), 12 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list