mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-24 22:09:57 +01:00
* apdu.c (apdu_send_le, apdu_send_direct), keylist.c
(status_one_subpacket, print_one_subpacket): Fix some compiler warnings. * g10.c (main): Fix --compression-algo to take a string argument like --compress-algo. * trustdb.c (uid_trust_string_fixed): For safety, check for a pk.
This commit is contained in:
parent
b120400413
commit
7a388529a3
@ -1,3 +1,14 @@
|
||||
2004-12-15 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* apdu.c (apdu_send_le, apdu_send_direct), keylist.c
|
||||
(status_one_subpacket, print_one_subpacket): Fix some compiler
|
||||
warnings.
|
||||
|
||||
* g10.c (main): Fix --compression-algo to take a string argument
|
||||
like --compress-algo.
|
||||
|
||||
* trustdb.c (uid_trust_string_fixed): For safety, check for a pk.
|
||||
|
||||
2004-12-14 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keyedit.c (keyedit_menu): Re-remove the N_() markers.
|
||||
|
12
g10/apdu.c
12
g10/apdu.c
@ -2717,7 +2717,8 @@ apdu_send_le(int slot, int class, int ins, int p0, int p1,
|
||||
resultlen -= 2;
|
||||
if (DBG_CARD_IO)
|
||||
{
|
||||
log_debug (" response: sw=%04X datalen=%d\n", sw, resultlen);
|
||||
log_debug (" response: sw=%04X datalen=%u\n",
|
||||
sw, (unsigned int)resultlen);
|
||||
if ( !retbuf && (sw == SW_SUCCESS || (sw & 0xff00) == SW_MORE_DATA))
|
||||
log_printhex (" dump: ", result, resultlen);
|
||||
}
|
||||
@ -2783,7 +2784,8 @@ apdu_send_le(int slot, int class, int ins, int p0, int p1,
|
||||
resultlen -= 2;
|
||||
if (DBG_CARD_IO)
|
||||
{
|
||||
log_debug (" more: sw=%04X datalen=%d\n", sw, resultlen);
|
||||
log_debug (" more: sw=%04X datalen=%u\n",
|
||||
sw, (unsigned int)resultlen);
|
||||
if (!retbuf && (sw==SW_SUCCESS || (sw&0xff00)==SW_MORE_DATA))
|
||||
log_printhex (" dump: ", result, resultlen);
|
||||
}
|
||||
@ -2916,7 +2918,8 @@ apdu_send_direct (int slot, const unsigned char *apdudata, size_t apdudatalen,
|
||||
resultlen -= 2;
|
||||
if (DBG_CARD_IO)
|
||||
{
|
||||
log_debug (" response: sw=%04X datalen=%d\n", sw, resultlen);
|
||||
log_debug (" response: sw=%04X datalen=%u\n",
|
||||
sw, (unsigned int)resultlen);
|
||||
if ( !retbuf && (sw == SW_SUCCESS || (sw & 0xff00) == SW_MORE_DATA))
|
||||
log_printhex (" dump: ", result, resultlen);
|
||||
}
|
||||
@ -2968,7 +2971,8 @@ apdu_send_direct (int slot, const unsigned char *apdudata, size_t apdudatalen,
|
||||
resultlen -= 2;
|
||||
if (DBG_CARD_IO)
|
||||
{
|
||||
log_debug (" more: sw=%04X datalen=%d\n", sw, resultlen);
|
||||
log_debug (" more: sw=%04X datalen=%u\n",
|
||||
sw, (unsigned int)resultlen);
|
||||
if (!retbuf && (sw==SW_SUCCESS || (sw&0xff00)==SW_MORE_DATA))
|
||||
log_printhex (" dump: ", result, resultlen);
|
||||
}
|
||||
|
@ -517,6 +517,7 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ oDigestAlgo, "digest-algo", 2, "@"},
|
||||
{ oCertDigestAlgo, "cert-digest-algo", 2 , "@" },
|
||||
{ oCompressAlgo,"compress-algo", 2, "@"},
|
||||
{ oCompressAlgo, "compression-algo", 2, "@"}, /* Alias */
|
||||
{ oThrowKeyids, "throw-keyid", 0, "@"},
|
||||
{ oThrowKeyids, "throw-keyids", 0, "@"},
|
||||
{ oNoThrowKeyids, "no-throw-keyid", 0, "@" },
|
||||
@ -542,7 +543,6 @@ static ARGPARSE_OPTS opts[] = {
|
||||
|
||||
/* hidden options */
|
||||
{ aListOwnerTrust, "list-ownertrust", 256, "@"}, /* deprecated */
|
||||
{ oCompressAlgo, "compression-algo", 1, "@"}, /* alias */
|
||||
{ aPrintMDs, "print-mds" , 256, "@"}, /* old */
|
||||
{ aListTrustDB, "list-trustdb",0 , "@"},
|
||||
/* Not yet used */
|
||||
|
@ -168,7 +168,7 @@ status_one_subpacket(sigsubpkttype_t type,size_t len,int flags,const byte *buf)
|
||||
if(len>256)
|
||||
return;
|
||||
|
||||
sprintf(status,"%d %u %u ",type,flags,len);
|
||||
sprintf(status,"%d %u %u ",type,flags,(unsigned int)len);
|
||||
|
||||
write_status_text_and_buffer(STATUS_SIG_SUBPACKET,status,buf,len,0);
|
||||
}
|
||||
@ -580,7 +580,7 @@ print_one_subpacket(sigsubpkttype_t type,size_t len,int flags,const byte *buf)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
printf("spk:%d:%u:%u:",type,flags,len);
|
||||
printf("spk:%d:%u:%u:",type,flags,(unsigned int)len);
|
||||
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
|
@ -502,11 +502,11 @@ uid_trust_string_fixed(PKT_public_key *key,PKT_user_id *uid)
|
||||
{
|
||||
if(!key && !uid)
|
||||
return _("10 translator see trustdb.c:uid_trust_string_fixed");
|
||||
else if(uid->is_revoked || key->is_revoked)
|
||||
else if(uid->is_revoked || (key && key->is_revoked))
|
||||
return _("[ revoked]");
|
||||
else if(uid->is_expired)
|
||||
return _("[ expired]");
|
||||
else
|
||||
else if(key)
|
||||
switch(get_validity(key,uid)&TRUST_MASK)
|
||||
{
|
||||
case TRUST_UNKNOWN: return _("[ unknown]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user