1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Add features packet and fixes MIPS3.

This commit is contained in:
Werner Koch 2000-10-11 17:26:49 +00:00
parent 93fe596356
commit c287a8d05b
12 changed files with 66 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2000-10-11 Werner Koch <wk@gnupg.org>
* packet.h: Add features sig subpacket definition.
* parse-packet.c (dump_sig_subpkt,parse_one_sig_subpkt,
can_handle_critical): Implemented it here.
* build-packet.c (build_sig_subpkt): and here.
* keygen.c (keygen_add_std_prefs): Generate a features packet.
2000-10-09 Werner Koch <wk@gnupg.org>
* keygen.c (do_generate_keypair): Removed the keyblock locking.

View file

@ -702,6 +702,7 @@ build_sig_subpkt( PKT_signature *sig, sigsubpkttype_t type,
case SIGSUBPKT_POLICY:
case SIGSUBPKT_REVOC_REASON:
case SIGSUBPKT_KEY_FLAGS:
case SIGSUBPKT_FEATURES:
hashed = 1; break;
default: hashed = 0; break;
}

View file

@ -148,6 +148,9 @@ keygen_add_std_prefs( PKT_signature *sig, void *opaque )
buf[1] = 1;
build_sig_subpkt( sig, SIGSUBPKT_PREF_COMPR, buf, 2 );
buf[0] = 1; /* supports MDC packets (15 + 16) */
build_sig_subpkt( sig, SIGSUBPKT_FEATURES, buf, 1 );
buf[0] = 0x80; /* no modify - It is reasonable that a key holder
* has the possibility to reject signatures from users
* who are known to sign everything without any

View file

@ -275,6 +275,7 @@ typedef enum {
SIGSUBPKT_KEY_FLAGS =27, /* key flags */
SIGSUBPKT_SIGNERS_UID =28, /* signer's user id */
SIGSUBPKT_REVOC_REASON =29, /* reason for revocation */
SIGSUBPKT_FEATURES =30, /* feature flags */
SIGSUBPKT_PRIV_ADD_SIG =101,/* signatur is also valid for this uid */
SIGSUBPKT_FLAG_CRITICAL=128

View file

@ -843,7 +843,12 @@ dump_sig_subpkt( int hashed, int type, int critical,
printf("%02X", buffer[i] );
}
break;
case SIGSUBPKT_PRIV_ADD_SIG:
case SIGSUBPKT_FEATURES:
fputs ( "features:", stdout );
for( i=0; i < length; i++ )
printf(" %02X", buffer[i] );
break;
case SIGSUBPKT_PRIV_ADD_SIG: /* gnupg private - to be removed */
p = "signs additional user ID";
break;
default: p = "?"; break;
@ -889,6 +894,7 @@ parse_one_sig_subpkt( const byte *buffer, size_t n, int type )
case SIGSUBPKT_PREF_SYM:
case SIGSUBPKT_PREF_HASH:
case SIGSUBPKT_PREF_COMPR:
case SIGSUBPKT_FEATURES:
case SIGSUBPKT_POLICY:
return 0;
case SIGSUBPKT_PRIMARY_UID:
@ -925,6 +931,7 @@ can_handle_critical( const byte *buffer, size_t n, int type )
case SIGSUBPKT_PREF_SYM:
case SIGSUBPKT_PREF_HASH:
case SIGSUBPKT_PREF_COMPR:
case SIGSUBPKT_FEATURES:
case SIGSUBPKT_KEY_FLAGS:
return 1;