summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-14 15:59:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-10-14 15:59:39 +0300
commitfa0337c9b64d69b3a4e50d810ec63c7798cad6c6 (patch)
tree9885aedd6ab67aeb9f1bf5b4e8c61f183af490d2
parentc716382ee899759b522b1b63e8a2acde9ca33f65 (diff)
downloadlibrpm-tizen-fa0337c9b64d69b3a4e50d810ec63c7798cad6c6.tar.gz
librpm-tizen-fa0337c9b64d69b3a4e50d810ec63c7798cad6c6.tar.bz2
librpm-tizen-fa0337c9b64d69b3a4e50d810ec63c7798cad6c6.zip
Move fdDigest*() to rpmio.c where they better belong
-rw-r--r--lib/rpmchecksig.c1
-rw-r--r--rpmio/digest.c30
-rw-r--r--rpmio/digest.h1
-rw-r--r--rpmio/rpmio.c30
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);
+ }
+}