[Pkg-gnupg-commit] [gnupg2] 19/124: scd: More cleanup of old code.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 5 15:55:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 9bf39ed75ddbd35908bcd0996f55325ff801619a
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Mon Mar 6 14:59:02 2017 +0900
scd: More cleanup of old code.
* scd/app-dinsig.c (do_sign): Remove assignment to HASHALGO.
* scd/app-p15.c (parse_keyusage_flags): Remove assign to MASK.
(read_ef_aodf): Likewise.
(read_ef_cdf): Change the control to parse_error.
* scd/app-sc-hsm.c (parse_keyusage_flags): Remove assign to MASK.
(read_ef_prkd): Remove assign to S.
(read_ef_prkd): Check if PRKDF is not null.
(read_ef_cd): Likewise for CDF.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
scd/app-dinsig.c | 1 -
scd/app-p15.c | 4 +---
scd/app-sc-hsm.c | 8 ++++----
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/scd/app-dinsig.c b/scd/app-dinsig.c
index 5d65845..f7ecc4b 100644
--- a/scd/app-dinsig.c
+++ b/scd/app-dinsig.c
@@ -456,7 +456,6 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
/* Fixme: This is a kludge. A better solution is not to use
SHA1 as default but use an autodetection. However this
needs changes in all app-*.c */
- hashalgo = GCRY_MD_SHA256;
datalen = indatalen;
}
else
diff --git a/scd/app-p15.c b/scd/app-p15.c
index db8c38e..4072fb7 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -752,7 +752,6 @@ parse_keyusage_flags (const unsigned char *der, size_t derlen,
else
{
bits &= ~mask;
- mask = 0;
}
}
else
@@ -1388,7 +1387,7 @@ read_ef_cdf (app_t app, unsigned short fid, cdf_object_t *result)
if (class != CLASS_UNIVERSAL || tag != TAG_SEQUENCE)
{
errstr = "unsupported reference type";
- continue;
+ goto parse_error;
}
nn = objlen;
@@ -1801,7 +1800,6 @@ read_ef_aodf (app_t app, unsigned short fid, aodf_object_t *result)
else
{
bits &= ~mask;
- mask = 0;
}
}
if ((bits & 0x80))
diff --git a/scd/app-sc-hsm.c b/scd/app-sc-hsm.c
index c582734..dddc8dc 100644
--- a/scd/app-sc-hsm.c
+++ b/scd/app-sc-hsm.c
@@ -414,7 +414,6 @@ parse_keyusage_flags (const unsigned char *der, size_t derlen,
else
{
bits &= ~mask;
- mask = 0;
}
}
else
@@ -827,7 +826,6 @@ read_ef_prkd (app_t app, unsigned short fid, prkdf_object_t *prkdresult,
if (prkdf->usageflags.non_repudiation)
{
log_printf ("%snon_repudiation", s);
- s = ",";
}
log_printf ("\n");
@@ -891,7 +889,8 @@ read_ef_prkd (app_t app, unsigned short fid, prkdf_object_t *prkdresult,
}
else
{
- prkdf->next = *prkdresult;
+ if (prkdf)
+ prkdf->next = *prkdresult;
*prkdresult = prkdf;
if (cdf)
{
@@ -1112,7 +1111,8 @@ read_ef_cd (app_t app, unsigned short fid, cdf_object_t *result)
}
else
{
- cdf->next = *result;
+ if (cdf)
+ cdf->next = *result;
*result = cdf;
}
return err;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list