diff options
author | Werner Koch <[email protected]> | 2010-10-01 20:33:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-10-01 20:33:53 +0000 |
commit | bfbd80feb95fba36292cd9dab43016f17b1e6972 (patch) | |
tree | 9afbfd29e8aeb78fa34a1a49d8b8071554d4f593 /g10/build-packet.c | |
parent | * options.skel: Make the example for force-v3-sigs match reality (it (diff) | |
download | gnupg-bfbd80feb95fba36292cd9dab43016f17b1e6972.tar.gz gnupg-bfbd80feb95fba36292cd9dab43016f17b1e6972.zip |
Exporting secret keys via gpg-agent is now basically supported.
A couple of forward ported changes.
Doc updates.
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r-- | g10/build-packet.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c index 354afece7..83d6c7a73 100644 --- a/g10/build-packet.c +++ b/g10/build-packet.c @@ -26,10 +26,10 @@ #include <ctype.h> #include "gpg.h" +#include "util.h" #include "packet.h" #include "status.h" #include "iobuf.h" -#include "util.h" #include "cipher.h" #include "i18n.h" #include "options.h" @@ -71,8 +71,16 @@ build_packet( IOBUF out, PACKET *pkt ) log_debug("build_packet() type=%d\n", pkt->pkttype ); assert( pkt->pkt.generic ); - switch( (pkttype = pkt->pkttype) ) + switch ((pkttype = pkt->pkttype)) { + case PKT_PUBLIC_KEY: + if (pkt->pkt.public_key->seckey_info) + pkttype = PKT_SECRET_KEY; + break; + case PKT_PUBLIC_SUBKEY: + if (pkt->pkt.public_key->seckey_info) + pkttype = PKT_SECRET_SUBKEY; + break; case PKT_PLAINTEXT: new_ctb = pkt->pkt.plaintext->new_ctb; break; case PKT_ENCRYPTED: case PKT_ENCRYPTED_MDC: new_ctb = pkt->pkt.encrypted->new_ctb; break; |