RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 03-Dec-2007 22:11:54
Branch: HEAD Handle: 2007120321115103
Added files:
rpm/rpmio rpmbeecrypt.h
Modified files:
rpm CHANGES
rpm/build build.c files.c pack.c parsePreamble.c parseSpec.c
rpm/lib depends.c psm.c rpmchecksig.c rpmts.c tar.c
rpm/rpmdb pkgio.h signature.c
rpm/rpmio Makefile.am rpmio.h rpmio_internal.h rpmpgp.h
Log:
- rpm.org: Split digest-stuff out of rpmio_internal to separate
header.
Summary:
Revision Changes Path
1.1927 +1 -0 rpm/CHANGES
2.120 +1 -1 rpm/build/build.c
1.301 +1 -1 rpm/build/files.c
2.266 +1 -1 rpm/build/pack.c
2.153 +1 -1 rpm/build/parsePreamble.c
2.120 +1 -1 rpm/build/parseSpec.c
1.369 +1 -1 rpm/lib/depends.c
2.273 +1 -1 rpm/lib/psm.c
1.204 +1 -1 rpm/lib/rpmchecksig.c
2.128 +3 -1 rpm/lib/rpmts.c
1.7 +1 -1 rpm/lib/tar.c
1.13 +2 -0 rpm/rpmdb/pkgio.h
1.36 +3 -1 rpm/rpmdb/signature.c
1.111 +1 -1 rpm/rpmio/Makefile.am
2.1 +123 -0 rpm/rpmio/rpmbeecrypt.h
1.65 +0 -8 rpm/rpmio/rpmio.h
2.94 +1 -105 rpm/rpmio/rpmio_internal.h
2.58 +8 -0 rpm/rpmio/rpmpgp.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1926 -r1.1927 CHANGES
--- rpm/CHANGES 3 Dec 2007 20:13:13 -0000 1.1926
+++ rpm/CHANGES 3 Dec 2007 21:11:51 -0000 1.1927
@@ -1,4 +1,5 @@
5.0a4 -> 5.0b1:
+ - rpm.org: Split digest-stuff out of rpmio_internal to separate header.
- rpm.org: Eliminate copy-paste fd digest stealing, stuff into rpmio_internal.
- rpm.org: Add doxygen grouping to rpmte methods.
- rpm.org: Add doxygen grouping to rpmds methods.
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/build.c
============================================================================
$ cvs diff -u -r2.119 -r2.120 build.c
--- rpm/build/build.c 19 Nov 2007 17:07:46 -0000 2.119
+++ rpm/build/build.c 3 Dec 2007 21:11:52 -0000 2.120
@@ -5,7 +5,7 @@
#include "system.h"
-#include <rpmio_internal.h>
+#include <rpmio_internal.h> /* XXX fdGetFp */
#include <rpmbuild.h>
#include "signature.h" /* XXX rpmTempFile */
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/files.c
============================================================================
$ cvs diff -u -r1.300 -r1.301 files.c
--- rpm/build/files.c 3 Dec 2007 18:11:08 -0000 1.300
+++ rpm/build/files.c 3 Dec 2007 21:11:52 -0000 1.301
@@ -14,7 +14,7 @@
#include <regex.h>
#endif
-#include <rpmio_internal.h>
+#include <rpmio_internal.h> /* XXX fdGetFp */
#include <fts.h>
#define _RPMFI_INTERNAL
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/pack.c
============================================================================
$ cvs diff -u -r2.265 -r2.266 pack.c
--- rpm/build/pack.c 3 Dec 2007 18:11:08 -0000 2.265
+++ rpm/build/pack.c 3 Dec 2007 21:11:52 -0000 2.266
@@ -5,7 +5,7 @@
#include "system.h"
-#include <rpmio_internal.h>
+#include <rpmio_internal.h> /* XXX fdGetFp, fdInitDigest, fdFiniDigest */
#define _RPMFI_INTERNAL /* XXX fi->fsm */
#define _RPMEVR_INTERNAL /* XXX RPMSENSE_ANY */
#include <rpmbuild.h>
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/parsePreamble.c
============================================================================
$ cvs diff -u -r2.152 -r2.153 parsePreamble.c
--- rpm/build/parsePreamble.c 3 Dec 2007 15:12:09 -0000 2.152
+++ rpm/build/parsePreamble.c 3 Dec 2007 21:11:52 -0000 2.153
@@ -5,7 +5,7 @@
#include "system.h"
-#include <rpmio_internal.h>
+#include <rpmio.h>
#define _RPMEVR_INTERNAL
#define _RPMTAG_INTERNAL /* XXX rpmTags->aTags */
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/parseSpec.c
============================================================================
$ cvs diff -u -r2.119 -r2.120 parseSpec.c
--- rpm/build/parseSpec.c 30 Nov 2007 04:51:30 -0000 2.119
+++ rpm/build/parseSpec.c 3 Dec 2007 21:11:52 -0000 2.120
@@ -5,7 +5,7 @@
#include "system.h"
-#include <rpmio_internal.h>
+#include <rpmio_internal.h> /* XXX fdGetFp */
#include <rpmbuild.h>
#include "rpmds.h"
#include "rpmts.h"
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/depends.c
============================================================================
$ cvs diff -u -r1.368 -r1.369 depends.c
--- rpm/lib/depends.c 3 Dec 2007 17:37:23 -0000 1.368
+++ rpm/lib/depends.c 3 Dec 2007 21:11:53 -0000 1.369
@@ -4,7 +4,7 @@
#include "system.h"
-#include "rpmio_internal.h" /* XXX PGPHASHALGO_MD5 */
+#include <rpmio.h>
#define _RPMTE_INTERNAL
#define _RPMTS_INTERNAL
#include <rpmcli.h> /* XXX rpmcliPackagesTotal */
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.272 -r2.273 psm.c
--- rpm/lib/psm.c 3 Dec 2007 18:11:09 -0000 2.272
+++ rpm/lib/psm.c 3 Dec 2007 21:11:53 -0000 2.273
@@ -5,7 +5,7 @@
#include "system.h"
-#include <rpmio_internal.h>
+#include <rpmio_internal.h> /* XXX FDSTAT_READ */
#include <rpmcb.h> /* XXX fnpyKey */
#include <rpmmacro.h>
#include <rpmurl.h>
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmchecksig.c
============================================================================
$ cvs diff -u -r1.203 -r1.204 rpmchecksig.c
--- rpm/lib/rpmchecksig.c 3 Dec 2007 20:13:13 -0000 1.203
+++ rpm/lib/rpmchecksig.c 3 Dec 2007 21:11:53 -0000 1.204
@@ -5,7 +5,7 @@
#include "system.h"
-#include "rpmio_internal.h"
+#include <rpmio_internal.h>
#include <rpmtag.h>
#include <rpmcli.h>
#define _RPMEVR_INTERNAL /* XXX RPMSENSE_KEYRING */
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmts.c
============================================================================
$ cvs diff -u -r2.127 -r2.128 rpmts.c
--- rpm/lib/rpmts.c 26 Nov 2007 05:16:50 -0000 2.127
+++ rpm/lib/rpmts.c 3 Dec 2007 21:11:53 -0000 2.128
@@ -4,7 +4,9 @@
*/
#include "system.h"
-#include "rpmio_internal.h" /* XXX for pgp and beecrypt */
+#include <rpmio.h>
+#include <rpmurl.h>
+#include <rpmpgp.h>
#include <rpmcb.h> /* XXX fnpyKey */
#include <rpmmacro.h> /* XXX rpmtsOpenDB() needs rpmGetPath */
#include <rpmlib.h>
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/tar.c
============================================================================
$ cvs diff -u -r1.6 -r1.7 tar.c
--- rpm/lib/tar.c 19 Nov 2007 17:07:47 -0000 1.6
+++ rpm/lib/tar.c 3 Dec 2007 21:11:53 -0000 1.7
@@ -5,7 +5,7 @@
#include "system.h"
-#include <rpmio_internal.h>
+#include <rpmio.h>
#include <rpmlib.h>
#include "tar.h"
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/pkgio.h
============================================================================
$ cvs diff -u -r1.12 -r1.13 pkgio.h
--- rpm/rpmdb/pkgio.h 21 Nov 2007 21:58:47 -0000 1.12
+++ rpm/rpmdb/pkgio.h 3 Dec 2007 21:11:53 -0000 1.13
@@ -6,6 +6,8 @@
* Methods to handle package elements.
*/
+#include <rpmpgp.h> /* XXX pgpDig typedef */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/signature.c
============================================================================
$ cvs diff -u -r1.35 -r1.36 signature.c
--- rpm/rpmdb/signature.c 26 Nov 2007 21:05:57 -0000 1.35
+++ rpm/rpmdb/signature.c 3 Dec 2007 21:11:53 -0000 1.36
@@ -7,7 +7,9 @@
#include <keyutils.h>
#endif
-#include "rpmio_internal.h"
+#include <rpmio.h>
+#include <rpmurl.h>
+#include <rpmbeecrypt.h>
#include <rpmcb.h> /* XXX rpmIsVerbose() */
#include <rpmtag.h>
#include <rpmmacro.h> /* XXX for rpmGetPath() */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/Makefile.am
============================================================================
$ cvs diff -u -r1.110 -r1.111 Makefile.am
--- rpm/rpmio/Makefile.am 21 Nov 2007 15:28:03 -0000 1.110
+++ rpm/rpmio/Makefile.am 3 Dec 2007 21:11:54 -0000 1.111
@@ -32,7 +32,7 @@
pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
pkginc_HEADERS = \
- argv.h envvar.h fts.h mire.h rpmcb.h rpmdav.h rpmhash.h \
+ argv.h envvar.h fts.h mire.h rpmbeecrypt.h rpmcb.h rpmdav.h rpmhash.h \
rpmio.h rpmio-stub.h rpmlog.h rpmmacro.h rpmmg.h rpmpgp.h \
rpmsq.h rpmsw.h rpmurl.h rpmxar.h ugid.h
noinst_HEADERS = \
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmbeecrypt.h
============================================================================
$ cvs diff -u -r0 -r2.1 rpmbeecrypt.h
--- /dev/null 2007-12-03 22:11:00 +0100
+++ rpmbeecrypt.h 2007-12-03 22:11:54 +0100
@@ -0,0 +1,123 @@
+#ifndef H_RPMBEECRYPT
+#define H_RPMBEECRYPT
+
+/** \ingroup rpmpgp
+ * \file rpmio/rpmbeecrypt.h
+ */
+
+#ifdef HAVE_BEECRYPT_API_H
+#include <beecrypt/api.h>
+#endif
+
+#include <rpmpgp.h>
+#include <rpmsw.h>
+
+/* Drag in the beecrypt includes. */
+#include <beecrypt/beecrypt.h>
+#include <beecrypt/base64.h>
+#include <beecrypt/dsa.h>
+#include <beecrypt/endianness.h>
+#include <beecrypt/md5.h>
+#include <beecrypt/mp.h>
+#include <beecrypt/rsa.h>
+#include <beecrypt/rsapk.h>
+#include <beecrypt/sha1.h>
+#include <beecrypt/sha256.h>
+#include <beecrypt/sha384.h>
+#include <beecrypt/sha512.h>
+
+/** \ingroup rpmpgp
+ * Values parsed from OpenPGP signature/pubkey packet(s).
+ */
+struct pgpDigParams_s {
+/*@only@*/ /*@null@*/
+ const char * userid;
+/*@only@*/ /*@null@*/
+ const byte * hash;
+ const char * params[4];
+ byte tag;
+
+ byte version; /*!< version number. */
+ byte time[4]; /*!< time that the key was created. */
+ byte pubkey_algo; /*!< public key algorithm. */
+
+ byte hash_algo;
+ byte sigtype;
+ byte hashlen;
+ byte signhash16[2];
+ byte signid[8];
+ byte saved;
+#define PGPDIG_SAVED_TIME (1 << 0)
+#define PGPDIG_SAVED_ID (1 << 1)
+
+};
+
+/** \ingroup rpmpgp
+ * Container for values parsed from an OpenPGP signature and public key.
+ */
+struct pgpDig_s {
+ struct pgpDigParams_s signature;
+ struct pgpDigParams_s pubkey;
+
+ uint32_t sigtag; /*!< Package signature tag. */
+ uint32_t sigtype; /*!< Package signature data type. */
+/*@relnull@*/
+ const void * sig; /*!< Package signature. */
+ uint32_t siglen; /*!< Package signature length. */
+
+ pgpVSFlags vsflags; /*!< Digest/signature operation disablers. */
+ struct rpmop_s dops; /*!< Digest operation statistics. */
+ struct rpmop_s sops; /*!< Signature operation statistics. */
+
+ int (*findPubkey) (void * _ts, /*@null@*/ void * _dig)
+ /*@modifies *_ts, *_dig @*/;/*!< Find pubkey, i.e. rpmtsFindPubkey(). */
+/*@null@*/
+ void * _ts; /*!< Find pubkey argument, i.e. rpmts. */
+/*@refs@*/
+ int nrefs; /*!< Reference count. */
+
+ byte ** ppkts;
+ int npkts;
+ size_t nbytes; /*!< No. bytes of plain text. */
+
+/*@only@*/ /*@null@*/
+ DIGEST_CTX sha1ctx; /*!< (dsa) sha1 hash context. */
+/*@only@*/ /*@null@*/
+ DIGEST_CTX hdrsha1ctx; /*!< (dsa) header sha1 hash context. */
+/*@only@*/ /*@null@*/
+ void * sha1; /*!< (dsa) V3 signature hash. */
+ size_t sha1len; /*!< (dsa) V3 signature hash length. */
+
+/*@only@*/ /*@null@*/
+ DIGEST_CTX md5ctx; /*!< (rsa) md5 hash context. */
+/*@only@*/ /*@null@*/
+ DIGEST_CTX hdrmd5ctx; /*!< (rsa) header md5 hash context. */
+/*@only@*/ /*@null@*/
+ void * md5; /*!< (rsa) V3 signature hash. */
+ size_t md5len; /*!< (rsa) V3 signature hash length. */
+
+ /* DSA parameters. */
+ mpbarrett p;
+ mpbarrett q;
+ mpnumber g;
+ mpnumber y;
+ mpnumber hm;
+ mpnumber r;
+ mpnumber s;
+
+ /* RSA parameters. */
+ rsapk rsa_pk;
+ mpnumber m;
+ mpnumber c;
+ mpnumber rsahm;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_RPMBEECRYPT */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmio.h
============================================================================
$ cvs diff -u -r1.64 -r1.65 rpmio.h
--- rpm/rpmio/rpmio.h 23 Nov 2007 07:06:01 -0000 1.64
+++ rpm/rpmio/rpmio.h 3 Dec 2007 21:11:54 -0000 1.65
@@ -16,14 +16,6 @@
#include <stdlib.h>
#include <unistd.h>
-/**
- */
-typedef /*@abstract@*/ /*@refcounted@*/ struct pgpDig_s * pgpDig;
-
-/**
- */
-typedef /*@abstract@*/ struct pgpDigParams_s * pgpDigParams;
-
/** \ingroup rpmio
* Hide libio API lossage.
* The libio interface changed after glibc-2.1.3 to pass the seek offset
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmio_internal.h
============================================================================
$ cvs diff -u -r2.93 -r2.94 rpmio_internal.h
--- rpm/rpmio/rpmio_internal.h 3 Dec 2007 20:13:13 -0000 2.93
+++ rpm/rpmio/rpmio_internal.h 3 Dec 2007 21:11:54 -0000 2.94
@@ -5,118 +5,14 @@
* \file rpmio/rpmio_internal.h
*/
-
#include <rpmio.h>
#include <rpmurl.h>
-#ifdef HAVE_BEECRYPT_API_H
-#include <beecrypt/api.h>
-#endif
+#include <rpmbeecrypt.h>
-#include <rpmpgp.h>
#include <rpmsw.h>
#include <rpmxar.h>
-/* Drag in the beecrypt includes. */
-#include <beecrypt/beecrypt.h>
-#include <beecrypt/base64.h>
-#include <beecrypt/dsa.h>
-#include <beecrypt/endianness.h>
-#include <beecrypt/md5.h>
-#include <beecrypt/mp.h>
-#include <beecrypt/rsa.h>
-#include <beecrypt/rsapk.h>
-#include <beecrypt/sha1.h>
-#include <beecrypt/sha256.h>
-#include <beecrypt/sha384.h>
-#include <beecrypt/sha512.h>
-
-/** \ingroup rpmio
- * Values parsed from OpenPGP signature/pubkey packet(s).
- */
-struct pgpDigParams_s {
-/*@only@*/ /*@null@*/
- const char * userid;
-/*@only@*/ /*@null@*/
- const byte * hash;
- const char * params[4];
- byte tag;
-
- byte version; /*!< version number. */
- byte time[4]; /*!< time that the key was created. */
- byte pubkey_algo; /*!< public key algorithm. */
-
- byte hash_algo;
- byte sigtype;
- byte hashlen;
- byte signhash16[2];
- byte signid[8];
- byte saved;
-#define PGPDIG_SAVED_TIME (1 << 0)
-#define PGPDIG_SAVED_ID (1 << 1)
-
-};
-
-/** \ingroup rpmio
- * Container for values parsed from an OpenPGP signature and public key.
- */
-struct pgpDig_s {
- struct pgpDigParams_s signature;
- struct pgpDigParams_s pubkey;
-
- uint32_t sigtag; /*!< Package signature tag. */
- uint32_t sigtype; /*!< Package signature data type. */
-/*@relnull@*/
- const void * sig; /*!< Package signature. */
- uint32_t siglen; /*!< Package signature length. */
-
- pgpVSFlags vsflags; /*!< Digest/signature operation disablers. */
- struct rpmop_s dops; /*!< Digest operation statistics. */
- struct rpmop_s sops; /*!< Signature operation statistics. */
-
- int (*findPubkey) (void * _ts, /*@null@*/ void * _dig)
- /*@modifies *_ts, *_dig @*/;/*!< Find pubkey, i.e. rpmtsFindPubkey(). */
-/*@null@*/
- void * _ts; /*!< Find pubkey argument, i.e. rpmts. */
-/*@refs@*/
- int nrefs; /*!< Reference count. */
-
- byte ** ppkts;
- int npkts;
- size_t nbytes; /*!< No. bytes of plain text. */
-
-/*@only@*/ /*@null@*/
- DIGEST_CTX sha1ctx; /*!< (dsa) sha1 hash context. */
-/*@only@*/ /*@null@*/
- DIGEST_CTX hdrsha1ctx; /*!< (dsa) header sha1 hash context. */
-/*@only@*/ /*@null@*/
- void * sha1; /*!< (dsa) V3 signature hash. */
- size_t sha1len; /*!< (dsa) V3 signature hash length. */
-
-/*@only@*/ /*@null@*/
- DIGEST_CTX md5ctx; /*!< (rsa) md5 hash context. */
-/*@only@*/ /*@null@*/
- DIGEST_CTX hdrmd5ctx; /*!< (rsa) header md5 hash context. */
-/*@only@*/ /*@null@*/
- void * md5; /*!< (rsa) V3 signature hash. */
- size_t md5len; /*!< (rsa) V3 signature hash length. */
-
- /* DSA parameters. */
- mpbarrett p;
- mpbarrett q;
- mpnumber g;
- mpnumber y;
- mpnumber hm;
- mpnumber r;
- mpnumber s;
-
- /* RSA parameters. */
- rsapk rsa_pk;
- mpnumber m;
- mpnumber c;
- mpnumber rsahm;
-};
-
/** \ingroup rpmio
*/
typedef struct _FDSTACK_s {
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmpgp.h
============================================================================
$ cvs diff -u -r2.57 -r2.58 rpmpgp.h
--- rpm/rpmio/rpmpgp.h 3 Dec 2007 18:51:57 -0000 2.57
+++ rpm/rpmio/rpmpgp.h 3 Dec 2007 21:11:54 -0000 2.58
@@ -31,6 +31,14 @@
/**
*/
+typedef /*@abstract@*/ /*@refcounted@*/ struct pgpDig_s * pgpDig;
+
+/**
+ */
+typedef /*@abstract@*/ struct pgpDigParams_s * pgpDigParams;
+
+/**
+ */
typedef const struct pgpValTbl_s {
int val;
/*@observer@*/ const char * str;
@@ .
Received on Mon Dec 3 22:11:54 2007