diff options
author | jbj <devnull@localhost> | 2002-03-06 23:17:31 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-03-06 23:17:31 +0000 |
commit | c6449e9c4439b7f2cf6c620a78d464b10a6c75b1 (patch) | |
tree | edf6be712b9caa5fd00671f1798dec7399746b78 /rpmio/rpmpgp.c | |
parent | 2e2d1cad39b9bf8af73ec7b2c584236aabcdad14 (diff) | |
download | rpm-c6449e9c4439b7f2cf6c620a78d464b10a6c75b1.tar.gz rpm-c6449e9c4439b7f2cf6c620a78d464b10a6c75b1.tar.bz2 rpm-c6449e9c4439b7f2cf6c620a78d464b10a6c75b1.zip |
- add header DSA signature.
CVS patchset: 5345
CVS date: 2002/03/06 23:17:31
Diffstat (limited to 'rpmio/rpmpgp.c')
-rw-r--r-- | rpmio/rpmpgp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c index 634e5432f..a91cad624 100644 --- a/rpmio/rpmpgp.c +++ b/rpmio/rpmpgp.c @@ -560,12 +560,12 @@ int pgpPrtSig(pgpTag tag, const byte *h, unsigned int hlen) if (_debug && _print) fprintf(stderr, " hash[%u] -- %s\n", plen, pgpHexStr(p, plen)); - /*@-mods@*/ +/*@-mods@*/ if (_digp && _digp->pubkey_algo == 0) { - _digp->hashlen = plen; - _digp->hash = memcpy(xmalloc(plen), p, plen); + _digp->hashlen = sizeof(*v) + plen; + _digp->hash = memcpy(xmalloc(_digp->hashlen), v, _digp->hashlen); } - /*@=mods@*/ +/*@=mods@*/ (void) pgpPrtSubType(p, plen); p += plen; @@ -1016,6 +1016,12 @@ struct pgpDig_s * pgpFreeDig(/*@only@*/ /*@null@*/ struct pgpDig_s * dig) dig->md5 = _free(dig->md5); /*@-branchstate@*/ + if (dig->hdrsha1ctx != NULL) + (void) rpmDigestFinal(dig->hdrsha1ctx, NULL, NULL, 0); + /*@=branchstate@*/ + dig->hdrsha1ctx = NULL; + + /*@-branchstate@*/ if (dig->sha1ctx != NULL) (void) rpmDigestFinal(dig->sha1ctx, NULL, NULL, 0); /*@=branchstate@*/ |