mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
some import functionality
This commit is contained in:
parent
f477447d9a
commit
82464369f6
45 changed files with 1299 additions and 324 deletions
14
g10/getkey.c
14
g10/getkey.c
|
@ -460,6 +460,7 @@ static int
|
|||
scan_keyring( PKT_public_cert *pkc, u32 *keyid,
|
||||
const char *name, const char *filename )
|
||||
{
|
||||
compress_filter_context_t cfx;
|
||||
int rc=0;
|
||||
int found = 0;
|
||||
IOBUF a;
|
||||
|
@ -499,6 +500,19 @@ scan_keyring( PKT_public_cert *pkc, u32 *keyid,
|
|||
log_error("Hmmm, pubkey without an user id in '%s'\n", filename);
|
||||
goto leave;
|
||||
}
|
||||
else if( pkt.pkttype == PKT_COMPRESSED ) {
|
||||
memset( &cfx, 0, sizeof cfx );
|
||||
if( pkt.pkt.compressed->algorithm == 1 )
|
||||
cfx.pgpmode = 1;
|
||||
else if( pkt.pkt.compressed->algorithm != 2 ){
|
||||
rc = G10ERR_COMPR_ALGO;
|
||||
log_error("compressed keyring: %s\n", g10_errstr(rc) );
|
||||
break;
|
||||
}
|
||||
|
||||
pkt.pkt.compressed->buf = NULL;
|
||||
iobuf_push_filter( a, compress_filter, &cfx );
|
||||
}
|
||||
else if( keyid && pkt.pkttype == PKT_PUBLIC_CERT ) {
|
||||
switch( pkt.pkt.public_cert->pubkey_algo ) {
|
||||
case PUBKEY_ALGO_ELGAMAL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue