mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
* keyring.c (keyring_rebuild_cache): Lock the keyring while rebuilding the
signature caches to prevent another gpg from tampering with the temporary copy. * keydb.c: Double the maximum number of keyrings to 40. * parse-packet.c (dump_sig_subpkt): Show the notation names for not-human-readable notations. Fix cosmetic off-by-one length counter.
This commit is contained in:
parent
16c925f68a
commit
208509950c
@ -1,3 +1,15 @@
|
||||
2003-03-03 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keyring.c (keyring_rebuild_cache): Lock the keyring while
|
||||
rebuilding the signature caches to prevent another gpg from
|
||||
tampering with the temporary copy.
|
||||
|
||||
* keydb.c: Double the maximum number of keyrings to 40.
|
||||
|
||||
* parse-packet.c (dump_sig_subpkt): Show the notation names for
|
||||
not-human-readable notations. Fix cosmetic off-by-one length
|
||||
counter.
|
||||
|
||||
2003-03-02 Timo Schulz <twoaday@freakmail.de>
|
||||
|
||||
* seckey-cert.c (do_check): Issue the RSA_OR_IDEA status when
|
||||
|
@ -42,7 +42,7 @@ typedef enum {
|
||||
KEYDB_RESOURCE_TYPE_NONE = 0,
|
||||
KEYDB_RESOURCE_TYPE_KEYRING
|
||||
} KeydbResourceType;
|
||||
#define MAX_KEYDB_RESOURCES 20
|
||||
#define MAX_KEYDB_RESOURCES 40
|
||||
|
||||
struct resource_item {
|
||||
KeydbResourceType type;
|
||||
|
@ -1316,6 +1316,10 @@ keyring_rebuild_cache (void *token)
|
||||
memset (&desc, 0, sizeof desc);
|
||||
desc.mode = KEYDB_SEARCH_MODE_FIRST;
|
||||
|
||||
rc=keyring_lock (hd, 1);
|
||||
if(rc)
|
||||
goto leave;
|
||||
|
||||
while ( !(rc = keyring_search (hd, &desc, 1)) )
|
||||
{
|
||||
desc.mode = KEYDB_SEARCH_MODE_NEXT;
|
||||
@ -1410,6 +1414,7 @@ keyring_rebuild_cache (void *token)
|
||||
m_free (tmpfilename);
|
||||
m_free (bakfilename);
|
||||
release_kbnode (keyblock);
|
||||
keyring_lock (hd, 0);
|
||||
keyring_release (hd);
|
||||
return rc;
|
||||
}
|
||||
|
@ -752,12 +752,12 @@ dump_sig_subpkt( int hashed, int type, int critical,
|
||||
type, (unsigned)length );
|
||||
}
|
||||
|
||||
buffer++;
|
||||
length--;
|
||||
|
||||
printf("\t%s%ssubpkt %d len %u (", /*)*/
|
||||
critical ? "critical ":"",
|
||||
hashed ? "hashed ":"", type, (unsigned)length );
|
||||
buffer++;
|
||||
length--;
|
||||
if( length > buflen ) {
|
||||
printf("too short: buffer is only %u)\n", (unsigned)buflen );
|
||||
return;
|
||||
@ -823,8 +823,6 @@ dump_sig_subpkt( int hashed, int type, int critical,
|
||||
fputs("notation: ", stdout );
|
||||
if( length < 8 )
|
||||
p = "[too short]";
|
||||
else if( !(*buffer & 0x80) )
|
||||
p = "[not human readable]";
|
||||
else {
|
||||
const byte *s = buffer;
|
||||
size_t n1, n2;
|
||||
@ -837,7 +835,11 @@ dump_sig_subpkt( int hashed, int type, int critical,
|
||||
else {
|
||||
print_string( stdout, s, n1, ')' );
|
||||
putc( '=', stdout );
|
||||
print_string( stdout, s+n1, n2, ')' );
|
||||
|
||||
if( *buffer & 0x80 )
|
||||
print_string( stdout, s+n1, n2, ')' );
|
||||
else
|
||||
p = "[not human readable]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user