mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
last local commit
This commit is contained in:
parent
8477407e79
commit
e81e0970f7
49 changed files with 1253 additions and 545 deletions
22
g10/export.c
22
g10/export.c
|
@ -124,24 +124,10 @@ do_export( STRLIST users, int secret )
|
|||
|
||||
/* and write it */
|
||||
for( kbctx=NULL; (node = walk_kbnode( keyblock, &kbctx, 0 )); ) {
|
||||
if( opt.do_not_export_rsa ) {
|
||||
int algo;
|
||||
switch( node->pkt->pkttype ) {
|
||||
/* note: we can´ do this for subkeys here */
|
||||
case PKT_PUBLIC_KEY:
|
||||
algo = node->pkt->pkt.public_key->pubkey_algo;
|
||||
break;
|
||||
case PKT_SECRET_KEY:
|
||||
algo = node->pkt->pkt.secret_key->pubkey_algo;
|
||||
break;
|
||||
case PKT_SIGNATURE:
|
||||
algo = node->pkt->pkt.signature->pubkey_algo;
|
||||
break;
|
||||
default: algo = 0;
|
||||
}
|
||||
if( is_RSA(algo) )
|
||||
continue;
|
||||
}
|
||||
/* don't export any comment packets but those in the
|
||||
* secret keyring */
|
||||
if( !secret && node->pkt->pkttype == PKT_COMMENT )
|
||||
continue;
|
||||
if( (rc = build_packet( out, node->pkt )) ) {
|
||||
log_error("build_packet(%d) failed: %s\n",
|
||||
node->pkt->pkttype, g10_errstr(rc) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue