summaryrefslogtreecommitdiffstats
path: root/g10/keyid.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-02-09 18:43:42 +0100
committerWerner Koch <wk@gnupg.org>1998-02-09 18:43:42 +0100
commitd6fa02add60c1d9ef6c7c576de3beb0a5debfade (patch)
tree4d33ad9fa6f8013b274ecb0dfe36cab7b15b47eb /g10/keyid.c
parentremoved aclocal (diff)
downloadgnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.tar.xz
gnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.zip
release 0.2.3
Diffstat (limited to 'g10/keyid.c')
-rw-r--r--g10/keyid.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/g10/keyid.c b/g10/keyid.c
index 5d5a043c5..6e7b120e6 100644
--- a/g10/keyid.c
+++ b/g10/keyid.c
@@ -59,14 +59,18 @@ v3_elg_fingerprint_md( PKT_public_cert *pkc )
byte *buf1, *buf2, *buf3;
byte *p1, *p2, *p3;
unsigned n1, n2, n3;
+ unsigned nb1, nb2, nb3;
unsigned n;
+ nb1 = mpi_get_nbits(pkc->d.elg.p);
p1 = buf1 = mpi_get_buffer( pkc->d.elg.p, &n1, NULL );
for( ; !*p1 && n1; p1++, n1-- ) /* skip leading null bytes */
;
+ nb2 = mpi_get_nbits(pkc->d.elg.g);
p2 = buf2 = mpi_get_buffer( pkc->d.elg.g, &n2, NULL );
for( ; !*p2 && n2; p2++, n2-- ) /* skip leading null bytes */
;
+ nb3 = mpi_get_nbits(pkc->d.elg.y);
p3 = buf3 = mpi_get_buffer( pkc->d.elg.y, &n3, NULL );
for( ; !*p3 && n3; p3++, n3-- ) /* skip leading null bytes */
;
@@ -90,9 +94,9 @@ v3_elg_fingerprint_md( PKT_public_cert *pkc )
md_putc( md, a );
}
md_putc( md, pkc->pubkey_algo );
- md_putc( md, n1>>8); md_putc( md, n1 ); md_write( md, p1, n1 );
- md_putc( md, n2>>8); md_putc( md, n2 ); md_write( md, p2, n2 );
- md_putc( md, n3>>8); md_putc( md, n3 ); md_write( md, p3, n3 );
+ md_putc( md, nb1>>8); md_putc( md, nb1 ); md_write( md, p1, n1 );
+ md_putc( md, nb2>>8); md_putc( md, nb2 ); md_write( md, p2, n2 );
+ md_putc( md, nb3>>8); md_putc( md, nb3 ); md_write( md, p3, n3 );
m_free(buf1);
m_free(buf2);
m_free(buf3);