aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog12
-rw-r--r--g10/keydb.c2
-rw-r--r--g10/keyring.c5
-rw-r--r--g10/parse-packet.c12
4 files changed, 25 insertions, 6 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index dd2466a68..717e06cd1 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,15 @@
+2003-03-03 David Shaw <[email protected]>
+
+ * 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 <[email protected]>
* seckey-cert.c (do_check): Issue the RSA_OR_IDEA status when
diff --git a/g10/keydb.c b/g10/keydb.c
index d6ecb1957..9dc6d54cb 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -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;
diff --git a/g10/keyring.c b/g10/keyring.c
index 70386eef2..57461a7ba 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -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;
}
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index b802be315..05c882450 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -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]";
}
}
}