Commit Graph

74 Commits

Author SHA1 Message Date
Panu Matilainen 8849e0ecf7 Eliminate now unused rpmNewSignature() and rpmFreeSignature()
These have been exposed in the ABI all along but in public headers
maybe never, or at least so long ago it just doesn't matter.
2016-10-24 11:36:14 +03:00
Panu Matilainen 0cc5ee83f1 Bury the last remains of non-header signatures into lead
Header signatures were the new hot almost exactly twenty years ago, we
haven't supported anything else in a very, very, very, very very long time.
Drop the useless argument to rpmReadSignature() and bury the last remaining
related constant into rpmlead.c which is the only place that "needs" it.
No functional changes.
2016-10-24 08:41:32 +03:00
fin@linux.vnet.ibm.com ca6389b617 Export generateSignature
This patch exports generateSignature under the new name rpmGenerateSignature
so that includeFileSignatures can call it.

[lkardos@redhat.com: fixed indentation]
Signed-off-by: Lubos Kardos <lkardos@redhat.com>
2015-08-12 13:33:47 +02:00
Florian Festi b151b5297b Fix doxygen warnings
Make shure parameter descriptions in doc strings match the functions
2015-02-17 15:31:22 +01:00
Panu Matilainen 974c779db1 Drop now unused parsePGPSig() 2014-10-24 10:27:33 +03:00
Panu Matilainen ff8547a0cf Start consolidating our tribal knowledge on signature tag data
- New internal API to "parse" signature tags, performing various
  sanity checks, classifying the type (digest, actual signature etc)
  and gathering other relevant info.
- Unused as of this commit...
2014-10-24 10:26:08 +03:00
Lubos Kardos 17ad1fb27b Removed now unused internal helper functions.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-05-21 10:46:26 +03:00
Panu Matilainen 338801ec4a Eliminate filename argument from parsePGPSig()
- This is better done centrally in upper level callers...
2014-02-01 17:14:49 +02:00
Panu Matilainen 8cbc1bd929 Return error message instead of logging from parsePGPSig()
- rpmlog() messages might be appropriate for rpm cli, but not
  necessarily for other users/contexts
2014-02-01 17:02:21 +02:00
Panu Matilainen 24eb3257f6 Eliminate uses of pgpDig in package reading & signature checking
- No functional changes, just eliminates pile of unnecessary allocations
  and other calls, simplifying the code a bit.
2011-11-09 13:44:31 +02:00
Panu Matilainen bbf2f63676 Switch to using rpmKeyringVerifySig() internally
- Change rpmVerifySignature() to take just the signature parameters
  instead of the whole dig (this is an internal API so we're free
  to mess with it) from which it only needed the signature params.
- The internal low-level verifySignature() is thus reduced to
  to a call to rpmKeyringVerifySig() and spitting some silly
  strings to msg.
- With this, keyring can now use and reuse the its internally stored
  pgp key parameters instead of having to parse the same PGP packets
  over and over. As a result, signature checking is faster now. Not
  dramatically so but measurably nevertheless.
2011-11-09 13:12:01 +02:00
Panu Matilainen 3a01513c76 Unify the parsePGP() variants from package.c and rpmchecksig.c
- Hide allocation inside the helper, automatically free on failure
- Return pointer to the signature parameters on success to simplify
  life for callers
- Don't bother checking or reporting the signature version: the
  pgp parser errors out if it encounters unsupported version and
  does not scrible anything to the version field in that case,
  mumbling about "V0 signatures" is not particularly helpful.
- Log the bad package names from rpmpkgReadHeader() too
2011-11-07 11:09:08 +02:00
Panu Matilainen 65358a072f Replace remaing rpmSigTag uses with rpmTagVal
- Some of these might actually be "correct" but about one case from
  librpmbuild cascades down here ... just not worth the trouble to
  keep the as rpmSigTags.
2010-10-22 13:23:09 +03:00
Panu Matilainen 7d29077921 And now sighdrPut() can be buried back into signature.c 2010-09-29 16:15:04 +03:00
Panu Matilainen 9f79fc6e1a Make rpmGenSignature() static
- Having it in signature.h is just wrong as it lives in a different
  library now, and nothing outside rpmgensig.c needs it anymore.
  Should've really been in commit 23a9d64ea4.
2010-09-29 13:10:49 +03:00
Panu Matilainen 9c254cd225 Move sighdrPut() to inline function in signature.h
- Avoids having to expose this in the ABI in the next steps
2010-09-29 11:21:07 +03:00
Panu Matilainen 8422a94ca9 Split signature and digest generation to separate functions
- Similar in spirit to commit 825691afb2,
  these have fairly little in common really.
- Change the function names to force breakage on users (these are exported
  in ABI but not in public headers so "users" are internal uses in
  practise): the automatically generated bits in signature header are
  not signatures, but digests (even size is a checksum of sorts) ...
  and fix the couple of internal uses.
2010-09-29 10:55:38 +03:00
Panu Matilainen 1b347d4261 Put the rpmLookupSignature() and rpmGetPassPhrase() out of their misery 2010-09-03 15:12:17 +03:00
Panu Matilainen 64280efc1e Put the PGP foobar signature generation out of its misery
- the last freeware PGP version (6.5.8) is from year 2000 and doesn't
  come close to compiling on modern distros, commercial versions we're
  not interested in
- "PGP" signatures in rpm mean RSA, gpg can handle that just fine since
  forever
- the code's been unused for years, unlikely to be functional anyway...
2009-03-26 09:59:01 +02:00
Panu Matilainen 1446825571 Eliminate header/payload digests from pgpDig_s, they dont belong
- allocate+free digests locally where needed, pass around in separate argument
- use digest bundles to handle rpmVerifySignatures() needs
- kill-kill-kill fdStealDigest(), dup the contexts from bundles as needed
2009-03-25 13:23:19 +02:00
Panu Matilainen fd2658ec84 Move leftover signature stuff from rpmlib.h to signature.h
- these aren't really usable or useful outside rpm, and even less so
  as all the rest of the signature stuff is in a private header too
2009-03-19 10:34:27 +02:00
Panu Matilainen 53ca9c775f Use rpmSigTag enum for signature tags everywhere, more or less.. 2008-02-05 16:35:44 +02:00
Panu Matilainen ca3ac21658 Remove const from bunch of error message return types
- headerCheck(), rpmReadHeader() and rpmReadSignature() return malloced
  error messages the caller needs to free, shouldn't be const
- adjust rpmdb hdrchk callbacks accordingly
2007-12-16 13:02:27 +02:00
Panu Matilainen 0c8401abff Yet more type-pedantry...
- use rpm_tag_t for signature tag types too
- size_t, not rpm_count_t in signature generation
- add couple of explicit casts to rpmpgp.h to avoid spurious noise from
  inlined functions
2007-12-14 12:54:35 +02:00
Panu Matilainen 9ce13e09ef Switch to <rpm/foo.h> style for public headers
- adjust include paths accordingly
2007-12-08 14:02:32 +02:00
Ralf Corsépius abeea80a38 Use #include <x.h> syntax to include public headers. 2007-11-23 06:46:19 +01:00
Ralf Corsépius 2c4e4c0ccb Include "header.h" instead of <header.h>. 2007-10-28 06:42:44 +01:00
Ralf Corsépius bebeb89735 Eliminate [u|]int_[8|16|32]. Use c99 stdint.h types instead. 2007-10-26 13:24:14 +02:00
Ralf Corsépius ebef4f211c Remove splint tags. 2007-09-11 19:07:39 +02:00
jbj 63864b6a28 Add hdrmd5ctx for header-only md5 rsa/md5 signatures.
CVS patchset: 7800
CVS date: 2005/03/12 15:16:42
2005-03-12 15:16:42 +00:00
jbj 8faa61c020 Doxygen fiddles.
CVS patchset: 7495
CVS date: 2004/10/20 10:19:34
2004-10-20 10:19:34 +00:00
jbj 9c5529608e - don't use error string after gzclose (Dmitry V. Levin).
Spliddles for rpmio, drill h_errno all the way through.

CVS patchset: 6826
CVS date: 2003/05/08 20:39:29
2003-05-08 20:39:29 +00:00
jbj 0ef682d77e - lclint clean.
CVS patchset: 5715
CVS date: 2002/09/17 15:21:03
2002-09-17 15:21:03 +00:00
jbj 40726dd94f Sync with rpm-4.1 parsing changes.
CVS patchset: 5711
CVS date: 2002/09/16 20:10:20
2002-09-16 20:10:20 +00:00
jbj cc5d229b0e Sync with rpm-4.1.
CVS patchset: 5695
CVS date: 2002/08/31 22:39:34
2002-08-31 22:39:34 +00:00
jbj 241fad1287 Propagate splint-3.0.1.7 close(2) internalState annotation throughout.
CVS patchset: 5542
CVS date: 2002/07/08 14:21:26
2002-07-08 14:21:26 +00:00
jbj 0a71efcfc0 - splint annotationsm, signature cleanup.
CVS patchset: 5351
CVS date: 2002/03/10 19:00:31
2002-03-10 19:00:31 +00:00
jbj c6449e9c44 - add header DSA signature.
CVS patchset: 5345
CVS date: 2002/03/06 23:17:31
2002-03-06 23:17:31 +00:00
jbj a3b362c466 - solaris: translate i86pc to i386 (#57182).
- fix: %GNUconfigure breaks with single quotes (#57264).
- fix: typo in find-requires.
- tru64 compiler message cleanup.
- add buildarch lines for hppa (#57728).

CVS patchset: 5228
CVS date: 2001/12/20 16:28:46
2001-12-20 16:28:46 +00:00
jbj e2dfa4f2d4 - beecrypt is at least as good as pgp/gpg on verify, pull the plug.
CVS patchset: 5124
CVS date: 2001/10/19 19:51:18
2001-10-19 19:51:18 +00:00
jbj d57a29baac Converging on lclint-3.0.17 strict level.
CVS patchset: 5118
CVS date: 2001/10/17 16:43:36
2001-10-17 16:43:36 +00:00
jbj d8dc44f363 lclint fiddles to annotate globals.
CVS patchset: 5106
CVS date: 2001/10/15 03:22:10
2001-10-15 03:22:10 +00:00
jbj 4ae69250a2 - fix typos in linux.{req,prov}.
CVS patchset: 4834
CVS date: 2001/06/05 19:26:22
2001-06-05 19:26:22 +00:00
jbj 750d54d8a3 lclint fiddles.
CVS patchset: 4833
CVS date: 2001/06/04 13:55:58
2001-06-04 13:55:58 +00:00
jbj f5ebe3fb42 - return multiple suggested packages (Pawel Kolodziej <pawelk@pld.org.pl>).
- fix: return suggested packages when using Depends cache.

CVS patchset: 4823
CVS date: 2001/05/31 22:31:14
2001-05-31 22:31:14 +00:00
jbj 8f75bbc17d - enough lclint annotations and fiddles already.
CVS patchset: 4741
CVS date: 2001/05/05 19:28:32
2001-05-05 19:28:32 +00:00
jbj d78e027808 - still more boring lclint annotations and fiddles.
CVS patchset: 4738
CVS date: 2001/05/03 21:00:18
2001-05-03 21:00:18 +00:00
jbj 85a84a6826 Add rpmRC return code type for the usual 0/1/2 codes.
Add RPMRC_BADSIZE to deal with packages changing size after repackaging.

CVS patchset: 4550
CVS date: 2001/02/12 19:02:15
2001-02-12 19:02:15 +00:00
jbj bc348ac49c Rename RPMSIG_* signature types to RPMSIGTYPE_* to avoid confusion.
Remove dead code.

CVS patchset: 4549
CVS date: 2001/02/12 16:33:08
2001-02-12 16:33:08 +00:00
jbj 2be9ecf0eb 1st stab at --repackage.
CVS patchset: 4545
CVS date: 2001/02/11 22:02:29
2001-02-11 22:02:29 +00:00