diff options
author | Werner Koch <wk@gnupg.org> | 1998-02-09 18:43:42 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-02-09 18:43:42 +0100 |
commit | d6fa02add60c1d9ef6c7c576de3beb0a5debfade (patch) | |
tree | 4d33ad9fa6f8013b274ecb0dfe36cab7b15b47eb /g10/keygen.c | |
parent | removed aclocal (diff) | |
download | gnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.tar.xz gnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.zip |
release 0.2.3
Diffstat (limited to 'g10/keygen.c')
-rw-r--r-- | g10/keygen.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index a817463db..d73573cb1 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -145,13 +145,15 @@ gen_elg(unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek, PKT_secret_cert **ret_skc ) { int rc; + int i; PACKET *pkt; PKT_secret_cert *skc; PKT_public_cert *pkc; ELG_public_key pk; ELG_secret_key sk; + MPI *factors; - elg_generate( &pk, &sk, nbits ); + elg_generate( &pk, &sk, nbits, &factors ); skc = m_alloc_clear( sizeof *skc ); pkc = m_alloc_clear( sizeof *pkc ); @@ -190,10 +192,15 @@ gen_elg(unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek, pkt->pkt.public_cert = pkc; add_kbnode(pub_root, new_kbnode( pkt )); + /* don't know wether it make sense to have the factors, so for now + * we store them in the secret keyring (but they are of secret) */ pkt = m_alloc_clear(sizeof *pkt); pkt->pkttype = PKT_SECRET_CERT; pkt->pkt.secret_cert = skc; add_kbnode(sec_root, new_kbnode( pkt )); + for(i=0; factors[i]; i++ ) + add_kbnode( sec_root, + make_mpi_comment_node("#:ELG_factor:", factors[i] )); return 0; } |