Commit Graph

18 Commits

Author SHA1 Message Date
Panu Matilainen 3e9d8b6d36 Eliminate bogus switch-cases from rpmReadSignature() returns
- rpmReadSignature() returns failure on NULL header anyway, so the
  "No signature available" message is not only misleading but also
  can never happen.
2014-02-01 14:51:09 +02:00
Panu Matilainen 2077b3dc54 Update library current + age (ie libs are now 3.1.0)
- We haven't removed or changed any interfaces in a way that would
  require full soname bump, only a handful of new interfaces have
  been added.
- There aren't actually any new interfaces in librpmbuild or librpmsign
  but for sanity and consistency's sake they're all updated...
2012-11-05 10:22:50 +02:00
Panu Matilainen ac5e6cd521 Bump library sonames in preparation for new release
- This is stupid... only librpm and librpmio actually need the bump due
  to ABI breakage, librpmbuild and librpmsign are unchanged and could
  use just a revision bump. But just incrementing the revision (or age)
  would set us on collision course with maintenance updates to 4.9.x.
  Then again its not like you can actually use librpmbuild or librpmsign
  without also linking to librpm(io) so from everything needs rebuilding
  anyway. This all also pretty much makes the whole libtool library
  versioning a bit moot. Bah.
2012-03-20 09:56:30 +02:00
Panu Matilainen 6bced5bc08 Eliminate uses of pgpDig in package signing routines
- No functional changes, just eliminates pile of unnecessary allocations
  and other calls, simplifying the code a bit.
2011-11-09 13:57:34 +02:00
Panu Matilainen cde47f5945 Use pgpDigParamsAlgo() throughout the codebase
- Tedious but straightforward conversion to use the API instead
  of going to the struct directly.
- Remove digest.h includes where no longer necessary
2011-11-07 14:47:03 +02:00
Panu Matilainen 45c880304b Add an API for comparing two digest parameter containers
- Lift the digest parameter comparison from librpmsign to rpmpgp.c
  where it really belongs.
2011-11-07 13:29:29 +02:00
Panu Matilainen 598d059fc9 Eliminate direct pgpDig accesses from signing code 2011-11-07 12:56:03 +02:00
Panu Matilainen b8ad9ac920 Log an error on signing if we can't even parse the gpg-generated signature
- The error message is not very helpful but if pgpPrtPkts() fails
  we dont have a whole lot clue in the caller why it failed, spitting
  out at least *some* error is better than silently failing
  (RhBug:748116, RhBug:719154)
2011-10-23 14:26:42 +03:00
Panu Matilainen 78c95448a1 Further streamline & sanitize lead handling
- Never log anything from rpmLeadRead(), instead return an error message
  the callers can log if they see fit
- Add a return value for the lead type (which is the only bit of
  info from the lead we sometimes resort to using)
- Permit NULL pointers on all return values
- Eliminate rpmLeadCheck() and rpmLeadType() from the internal API,
  these are now combined into rpmLeadRead().
- Fix up the callers: only (re)signing needs the actual lead,
  signature verification only cares if its valid or not and
  package reading only wants the type from the lead (annoying but...)
2011-07-07 11:55:28 +03:00
Panu Matilainen da53e0d66e Make rpmLeadRead() return an allocated lead, fixup callers
- Requiring callers to allocate a lead "buffer" for reading into
  is just DUMB (greetings to self back in 2008, sigh). This avoids
  having to deal with freeing the lead in case the read failed, and
  allows getting rid of rpmLeadNew() completely.
2011-07-06 12:42:56 +03:00
Panu Matilainen 2a9a150290 Eliminate dead NULL-assignments at scope-end in librpmsign 2011-05-29 11:52:17 +03:00
Panu Matilainen d885361c84 Issue an error on failure to replace original package on signing
- Previously any failure on replacing the original package with the
  newly signed one would silently fail, causing rather confusing
  behavior when eg attempting to (re)sign readable but not writable
  packages.
2011-05-25 10:20:45 +03:00
Panu Matilainen eada0e3e47 Handle errors from moving target file into place in rpmSign()
- Signing isn't successful unless we manage to replace the original
  file with the signed one, take the stat() etc returns into count.
2011-04-21 11:09:28 +03:00
Panu Matilainen e393393ff7 headerPut() and headerDel() returns aren't interesting here 2011-04-21 10:55:00 +03:00
Panu Matilainen c798aed743 Remove redundant indentation block from rpmSign()
- No code changes, just formatting sanity/prettiness
2011-04-21 10:48:42 +03:00
Panu Matilainen 96e160d408 Mark the identical signature warning as translatable 2011-01-31 13:01:26 +02:00
Panu Matilainen bf1b4dede6 Eek.. librpmsign sources went missing in the move
- Re-adding the files that should've gotten moved (not removed) in
  commit 9f2c1bd909
- Mild wtf ... probably user (not git) error though. Too bad the
  broken state got pushed already :-/
2010-10-22 18:31:01 +03:00
Panu Matilainen 9f2c1bd909 Move librpmsign to its own subdirectory in the sources 2010-10-22 15:00:49 +03:00