mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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@fsij.org>
This commit is contained in:
parent
cb6337329d
commit
9bf39ed75d
@ -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
|
/* Fixme: This is a kludge. A better solution is not to use
|
||||||
SHA1 as default but use an autodetection. However this
|
SHA1 as default but use an autodetection. However this
|
||||||
needs changes in all app-*.c */
|
needs changes in all app-*.c */
|
||||||
hashalgo = GCRY_MD_SHA256;
|
|
||||||
datalen = indatalen;
|
datalen = indatalen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -752,7 +752,6 @@ parse_keyusage_flags (const unsigned char *der, size_t derlen,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bits &= ~mask;
|
bits &= ~mask;
|
||||||
mask = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (class != CLASS_UNIVERSAL || tag != TAG_SEQUENCE)
|
||||||
{
|
{
|
||||||
errstr = "unsupported reference type";
|
errstr = "unsupported reference type";
|
||||||
continue;
|
goto parse_error;
|
||||||
}
|
}
|
||||||
nn = objlen;
|
nn = objlen;
|
||||||
|
|
||||||
@ -1801,7 +1800,6 @@ read_ef_aodf (app_t app, unsigned short fid, aodf_object_t *result)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bits &= ~mask;
|
bits &= ~mask;
|
||||||
mask = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((bits & 0x80))
|
if ((bits & 0x80))
|
||||||
|
@ -414,7 +414,6 @@ parse_keyusage_flags (const unsigned char *der, size_t derlen,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bits &= ~mask;
|
bits &= ~mask;
|
||||||
mask = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -827,7 +826,6 @@ read_ef_prkd (app_t app, unsigned short fid, prkdf_object_t *prkdresult,
|
|||||||
if (prkdf->usageflags.non_repudiation)
|
if (prkdf->usageflags.non_repudiation)
|
||||||
{
|
{
|
||||||
log_printf ("%snon_repudiation", s);
|
log_printf ("%snon_repudiation", s);
|
||||||
s = ",";
|
|
||||||
}
|
}
|
||||||
log_printf ("\n");
|
log_printf ("\n");
|
||||||
|
|
||||||
@ -891,7 +889,8 @@ read_ef_prkd (app_t app, unsigned short fid, prkdf_object_t *prkdresult,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prkdf->next = *prkdresult;
|
if (prkdf)
|
||||||
|
prkdf->next = *prkdresult;
|
||||||
*prkdresult = prkdf;
|
*prkdresult = prkdf;
|
||||||
if (cdf)
|
if (cdf)
|
||||||
{
|
{
|
||||||
@ -1112,7 +1111,8 @@ read_ef_cd (app_t app, unsigned short fid, cdf_object_t *result)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cdf->next = *result;
|
if (cdf)
|
||||||
|
cdf->next = *result;
|
||||||
*result = cdf;
|
*result = cdf;
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user