mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-04 20:38:50 +01:00
Fixed some bugs in the selection code
This commit is contained in:
parent
2af87f8829
commit
4c316cb9b5
@ -1,5 +1,12 @@
|
|||||||
2001-02-08 Werner Koch <wk@gnupg.org>
|
2001-02-08 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* getkey.c (key_byname): I can happe that we have both, sk and pk
|
||||||
|
NULL, fix for that.
|
||||||
|
|
||||||
|
* parse-packet.c (parse_one_sig_subpkt): Add support for
|
||||||
|
primary_uid and key_flags.
|
||||||
|
(can_handle_critical): Ditto
|
||||||
|
|
||||||
* parse-packet.c (parse_encrypted): Fixed listing of pktlen for
|
* parse-packet.c (parse_encrypted): Fixed listing of pktlen for
|
||||||
MDC packets.
|
MDC packets.
|
||||||
|
|
||||||
|
@ -857,8 +857,10 @@ key_byname( GETKEY_CTX *retctx, STRLIST namelist,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ctx->req_algo = pk->req_algo;
|
if (pk) {
|
||||||
ctx->req_usage = pk->req_usage;
|
ctx->req_algo = pk->req_algo;
|
||||||
|
ctx->req_usage = pk->req_usage;
|
||||||
|
}
|
||||||
rc = lookup( ctx, ret_kb, 0 );
|
rc = lookup( ctx, ret_kb, 0 );
|
||||||
if ( !rc && pk ) {
|
if ( !rc && pk ) {
|
||||||
pk_from_block ( ctx, pk, *ret_kb, NULL /* FIXME need to get the namehash*/ );
|
pk_from_block ( ctx, pk, *ret_kb, NULL /* FIXME need to get the namehash*/ );
|
||||||
|
@ -873,6 +873,8 @@ parse_one_sig_subpkt( const byte *buffer, size_t n, int type )
|
|||||||
if( n < 4 )
|
if( n < 4 )
|
||||||
break;
|
break;
|
||||||
return 0;
|
return 0;
|
||||||
|
case SIGSUBPKT_KEY_FLAGS:
|
||||||
|
return 0;
|
||||||
case SIGSUBPKT_EXPORTABLE:
|
case SIGSUBPKT_EXPORTABLE:
|
||||||
if( !n )
|
if( !n )
|
||||||
break;
|
break;
|
||||||
@ -894,6 +896,10 @@ parse_one_sig_subpkt( const byte *buffer, size_t n, int type )
|
|||||||
case SIGSUBPKT_PREF_COMPR:
|
case SIGSUBPKT_PREF_COMPR:
|
||||||
case SIGSUBPKT_POLICY:
|
case SIGSUBPKT_POLICY:
|
||||||
return 0;
|
return 0;
|
||||||
|
case SIGSUBPKT_PRIMARY_UID:
|
||||||
|
if ( n != 1 )
|
||||||
|
break;
|
||||||
|
return 0;
|
||||||
case SIGSUBPKT_PRIV_ADD_SIG:
|
case SIGSUBPKT_PRIV_ADD_SIG:
|
||||||
/* because we use private data, we check the GNUPG marker */
|
/* because we use private data, we check the GNUPG marker */
|
||||||
if( n < 24 )
|
if( n < 24 )
|
||||||
@ -924,6 +930,8 @@ can_handle_critical( const byte *buffer, size_t n, int type )
|
|||||||
case SIGSUBPKT_PREF_SYM:
|
case SIGSUBPKT_PREF_SYM:
|
||||||
case SIGSUBPKT_PREF_HASH:
|
case SIGSUBPKT_PREF_HASH:
|
||||||
case SIGSUBPKT_PREF_COMPR:
|
case SIGSUBPKT_PREF_COMPR:
|
||||||
|
case SIGSUBPKT_KEY_FLAGS:
|
||||||
|
case SIGSUBPKT_PRIMARY_UID:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case SIGSUBPKT_POLICY: /* Is it enough to show the policy? */
|
case SIGSUBPKT_POLICY: /* Is it enough to show the policy? */
|
||||||
|
Loading…
Reference in New Issue
Block a user