summaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-02-11 04:25:44 +0100
committerWerner Koch <wk@gnupg.org>1998-02-11 04:25:44 +0100
commit4c0c155922b70b62793905490e210e9af4e3b18d (patch)
treea0d8d84a89cfd4579817a993715e750917961c3e /g10/keygen.c
parentrelease 0.2.3 (diff)
downloadgnupg2-4c0c155922b70b62793905490e210e9af4e3b18d.tar.xz
gnupg2-4c0c155922b70b62793905490e210e9af4e3b18d.zip
a couple of changes; but some parts are now broken
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index d73573cb1..09d2dc222 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -102,25 +102,19 @@ write_selfsig( KBNODE root, KBNODE pub_root, PKT_secret_cert *skc )
PKT_signature *sig;
PKT_user_id *uid;
int rc=0;
- KBNODE kbctx, node;
+ KBNODE node;
PKT_public_cert *pkc;
if( opt.verbose )
log_info(_("writing self signature\n"));
- /* get the uid packet from the tree */
- for( kbctx=NULL; (node=walk_kbtree( root, &kbctx)) ; ) {
- if( node->pkt->pkttype == PKT_USER_ID )
- break;
- }
+ /* get the uid packet from the list */
+ node = find_kbnode( root, PKT_USER_ID );
if( !node )
BUG(); /* no user id packet in tree */
uid = node->pkt->pkt.user_id;
/* get the pkc packet from the pub_tree */
- for( kbctx=NULL; (node=walk_kbtree( pub_root, &kbctx)) ; ) {
- if( node->pkt->pkttype == PKT_PUBLIC_CERT )
- break;
- }
+ node = find_kbnode( root, PKT_PUBLIC_CERT );
if( !node )
BUG();
pkc = node->pkt->pkt.public_cert;