diff options
-rw-r--r-- | lib/rpmchecksig.c | 1 | ||||
-rw-r--r-- | rpmio/digest.c | 30 | ||||
-rw-r--r-- | rpmio/digest.h | 1 | ||||
-rw-r--r-- | rpmio/rpmio.c | 30 |
4 files changed, 31 insertions, 31 deletions
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index b8660e6e1..1b5fca446 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -16,6 +16,7 @@ #include <rpm/rpmkeyring.h> #include "rpmio/digest.h" +#include "rpmio/rpmio_internal.h" /* fdSetBundle() */ #include "lib/rpmlead.h" #include "lib/signature.h" diff --git a/rpmio/digest.c b/rpmio/digest.c index 48036891a..cc06fda55 100644 --- a/rpmio/digest.c +++ b/rpmio/digest.c @@ -244,33 +244,3 @@ DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, l return 0; } -void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int flags) -{ - if (fd->digests == NULL) { - fd->digests = rpmDigestBundleNew(); - } - fdstat_enter(fd, FDSTAT_DIGEST); - rpmDigestBundleAdd(fd->digests, hashalgo, flags); - fdstat_exit(fd, FDSTAT_DIGEST, (ssize_t) 0); -} - -void fdUpdateDigests(FD_t fd, const unsigned char * buf, size_t buflen) -{ - if (fd && fd->digests) { - fdstat_enter(fd, FDSTAT_DIGEST); - rpmDigestBundleUpdate(fd->digests, buf, buflen); - fdstat_exit(fd, FDSTAT_DIGEST, (ssize_t) buflen); - } -} - -void fdFiniDigest(FD_t fd, pgpHashAlgo hashalgo, - void ** datap, - size_t * lenp, - int asAscii) -{ - if (fd && fd->digests) { - fdstat_enter(fd, FDSTAT_DIGEST); - rpmDigestBundleFinal(fd->digests, hashalgo, datap, lenp, asAscii); - fdstat_exit(fd, FDSTAT_DIGEST, (ssize_t) 0); - } -} diff --git a/rpmio/digest.h b/rpmio/digest.h index e934df88f..0f446198f 100644 --- a/rpmio/digest.h +++ b/rpmio/digest.h @@ -8,7 +8,6 @@ #include <rpm/rpmpgp.h> #include "rpmio/base64.h" -#include "rpmio/rpmio_internal.h" /** \ingroup rpmio diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 08b94c69c..66035fb90 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -2007,3 +2007,33 @@ static const struct FDIO_s fpio_s = { }; static const FDIO_t fpio = &fpio_s ; +void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int flags) +{ + if (fd->digests == NULL) { + fd->digests = rpmDigestBundleNew(); + } + fdstat_enter(fd, FDSTAT_DIGEST); + rpmDigestBundleAdd(fd->digests, hashalgo, flags); + fdstat_exit(fd, FDSTAT_DIGEST, (ssize_t) 0); +} + +void fdUpdateDigests(FD_t fd, const unsigned char * buf, size_t buflen) +{ + if (fd && fd->digests) { + fdstat_enter(fd, FDSTAT_DIGEST); + rpmDigestBundleUpdate(fd->digests, buf, buflen); + fdstat_exit(fd, FDSTAT_DIGEST, (ssize_t) buflen); + } +} + +void fdFiniDigest(FD_t fd, pgpHashAlgo hashalgo, + void ** datap, + size_t * lenp, + int asAscii) +{ + if (fd && fd->digests) { + fdstat_enter(fd, FDSTAT_DIGEST); + rpmDigestBundleFinal(fd->digests, hashalgo, datap, lenp, asAscii); + fdstat_exit(fd, FDSTAT_DIGEST, (ssize_t) 0); + } +} |