aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-05-25 17:56:15 +0000
committerWerner Koch <[email protected]>1999-05-25 17:56:15 +0000
commit9a2ce9b3910750a217fdda34a8fb5613fbcda905 (patch)
treeb61a49c4c7c736fa919bc18dfc34dd5dade86d8d /g10/parse-packet.c
parentSee ChangeLog: Sun May 23 20:25:57 CEST 1999 Werner Koch (diff)
downloadgnupg-9a2ce9b3910750a217fdda34a8fb5613fbcda905.tar.gz
gnupg-9a2ce9b3910750a217fdda34a8fb5613fbcda905.zip
See ChangeLog: Tue May 25 19:50:32 CEST 1999 Werner Koch
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r--g10/parse-packet.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 47d28e396..7d5958adf 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -745,7 +745,28 @@ dump_sig_subpkt( int hashed, int type, int critical,
(ulong)buffer_to_u32(buffer+4) );
break;
case SIGSUBPKT_NOTATION:
- p = "notation data";
+ {
+ 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;
+
+ n1 = (s[4] << 8) | s[5];
+ n2 = (s[6] << 8) | s[7];
+ s += 8;
+ if( 8+n1+n2 != length )
+ p = "[error]";
+ else {
+ print_string( stdout, s, n1, 0 );
+ putc( '=', stdout );
+ print_string( stdout, s+n1, n2, 0 );
+ }
+ }
+ }
break;
case SIGSUBPKT_PREF_HASH:
fputs("pref-hash-algos:", stdout );
@@ -808,6 +829,10 @@ parse_one_sig_subpkt( const byte *buffer, size_t n, int type )
if( n < 8 )
break;
return 0;
+ case SIGSUBPKT_NOTATION:
+ if( n < 8 ) /* minimum length needed */
+ break;
+ return 0;
case SIGSUBPKT_PREF_SYM:
case SIGSUBPKT_PREF_HASH:
case SIGSUBPKT_PREF_COMPR: