summaryrefslogtreecommitdiff
path: root/rpmio/rpmpgp.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-01Permit DOS line-endings in PGP armors (RhBug:532992)Panu Matilainen1-4/+7
- RFC-4880 doesn't requires unix-style line-endings, we shouldn't either. This is probably still oversly strict as RFC-4880 appears to permit any whitespace to follow armor headers but ... shrug.
2010-05-19Add public pgpValString() function + enum for the various typesPanu Matilainen1-8/+26
- The equivalent used to be possible in 4.4.x era as the value tables were all exported, but this way we need to export far less and the implementation details stay internal.
2010-05-19Bury struct pgpValTbl_s definition inside rpmpgp.cPanu Matilainen1-0/+5
- as all the value tables are static inside rpmpgp.c, exposing this is pointless (should've been unexported long time ago)
2009-11-25We can't handle OpenPGP subkeys or secret keys, so dont even tryPanu Matilainen1-5/+3
- parsing subkeys ends up overwriting data in the main key, causing bogus signature checking failures - this is the final missing piece of RhBug:436812, short of adding proper support for subkeys (maybe someday...)
2009-10-09Add an interface to parse armored OpenPGP from memoryPanu Matilainen1-19/+28
- refactor the decoding part out of pgpReadPkts() to separate helper, and add pgpParsePkts() around that
2009-08-31Ugh, fix brokenness from previous commitPanu Matilainen1-1/+1
2009-08-31Replace equal/not equal uses of str[n]cmp() with rstreq[n] in io codePanu Matilainen1-4/+3
2009-05-08Fix parsing of pubkey signature packets. Ick.Panu Matilainen1-3/+3
- busted all the way from commit bcb226480d0b60a8667eade77d81c29de4c3d6c9
2009-04-23Hide NSS peculiarities from APIPanu Matilainen1-0/+27
- PKCS#11 standard requires modules to be re-initialized after fork(), arrange this to occur automatically. - Most of the time child processes will exec() something else so dont bother shutting down NSS for every child, only lazily re-initialize as needed. - This lets us initialize NSS early to force preloading of its dlopen()'ed libraries to avoid issues on chroot(), without causing problems to API users which fork() after initializing rpm (such as func, urpmi etc).
2009-04-16Pad RSA signatures up to modulus size if necessary (rhbz#494049)Panu Matilainen1-1/+20
- unfortunately can't be detected at initial allocation so extra copy is needed at verification time
2009-04-09Fix PGP v4 fingerprint calculation (rhbz#493777)Panu Matilainen1-1/+7
- patch from openSUSE / Michael Schroeder
2009-03-25Push signature identification to librpmio / pgp handlingPanu Matilainen1-0/+19
- retrieve names from pgp tables instead of manually duplicated strings
2009-03-25Push signature verification down to librpmioPanu Matilainen1-0/+76
- new pgpVerifySig() call to perform the lowlevel verify, use for verifying DSA/RSA signatures - librpm is now free of NSS specifics (apart from what still leaks through including rpmio/digest.h), remove linkage
2009-03-25Eliminate header/payload digests from pgpDig_s, they dont belongPanu Matilainen1-17/+0
- 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-16Eliminate unnecessary pgpNewPublicKey() wrappersPanu Matilainen1-12/+2
2009-03-16Eliminate unnecessary field from pgpDig_sPanu Matilainen1-35/+24
- key/signature can't be both DSA and RSA at the same time
2009-03-04Dont leak memory from hdrmd5ctxPanu Matilainen1-2/+0
2009-03-04Eliminate unnecessary fields from pgpDig_sPanu Matilainen1-3/+0
- sha1(len) and md5(len) are only needed and used locally in verify[DR]SASignature(), no point carrying them around in pgpDig - use wrapper function to hide type differences between rpm and NSS
2009-01-08Only touch _crypto_initialized if we actually change itPanu Matilainen1-5/+6
2009-01-08Don't segfault in pgpPubkeyFingerprint() if rpmDigest* failsPanu Matilainen1-3/+5
- this can happen if NSS is not properly initialized, such as after forking - partial fix to rhbz#476737 (as in "doesn't crash"), deeper issue is that NSS init needs to be done later than we do now
2008-07-01Create ascii armor that rpm itself acceptsPanu Matilainen1-1/+1
2008-07-01Eliminate the nasty global _dig and _digp variables from rpmpgpPanu Matilainen1-24/+26
- pass the digest + parameters around as arguments instead
2008-07-01Unexport all the umphteen pgp related tablesPanu Matilainen1-10/+10
- nothing outside rpmpgp.c needs
2008-07-01Make every pgp function not needed by other parts of rpm staticPanu Matilainen1-7/+158
2008-06-10Silly signedness mismatch in pgpMpiSet()Panu Matilainen1-1/+1
2008-04-15Plug a memleak in pgpArmorWrap()Panu Matilainen1-0/+1
2008-04-08Rewrite pgpArmorWrap(), the former one was insecure/hackishJindrich Novy1-30/+12
2008-04-07Uh, return allocated pointer, not the end of string...Panu Matilainen1-2/+3
2008-04-07Remove static print buffer from pgpMpiStr(), return malloc'd data insteadPanu Matilainen1-3/+12
- convert callers - only rpmpgp.c internal needs, move it there and make static?
2008-04-07Merge pgpHexCvt() into pgpHexPrt(), removing it from public headersPanu Matilainen1-1/+8
2008-04-07Remove static print buffer from pgpHexStr, return malloc'ed memory insteadPanu Matilainen1-1/+11
- inlined to get xmalloc() from system.h for consistent malloc fail behavior - convert callers for new behavior, apart from some debug fprintf()'s
2008-03-24Remove bogus consts from pgpDigParams_s structurePanu Matilainen1-6/+6
2008-03-19Remove bunch of double consts. What have I've been thinking?Panu Matilainen1-10/+10
2008-03-06Further read-only tables in rpmpgp..Panu Matilainen1-8/+8
2008-03-06Mark various pgp value tables read-only as they should bePanu Matilainen1-10/+10
2008-01-30Include spring-cleaningPanu Matilainen1-2/+3
- put some consistency into include ordering - everything (apart from bits missed ;) is now ordered like this 1. "system.h" 2. other system includes 3. rpm public headers 4. rpm private headers 5. "debug.h"
2008-01-09Last 8 bytes of RSA modulus is keyid for V3 pubkeys (#205080)Panu Matilainen1-22/+34
- ported from rpm5.org work of Jeff Johnson - minimal fix suitable for 4.4.2.x too, full rpm5.org changes require api changes which would be ok for HEAD but that's a bigger task...
2008-01-03Lose unused pgpMpiHex()Panu Matilainen1-11/+0
2007-12-19Hum, NSS needs to be shut down tooPanu Matilainen1-0/+12
- some ~80 bytes are still leaked apparently from somewhere within nss/nspr
2007-12-17Use constfree for cleaning up pgp digest contentsPanu Matilainen1-6/+6
- the contents are exposed within rpm (although not public interfaces) but pgpCleanDig() should be used to free the struct - pgpDig and pgpDigParams need encapsulation + api...
2007-12-16pgpReadPkts returns malloced memory, unconstifyPanu Matilainen1-1/+1
2007-12-14Remove bogus consts..Panu Matilainen1-2/+2
2007-12-14More misc size_t issuesPanu Matilainen1-1/+1
2007-12-14Couple of more size_t uses + related format string fixesPanu Matilainen1-4/+4
2007-12-13Big bunch of int -> size_t corrections for various signature itemsPanu Matilainen1-28/+27
2007-12-08Switch to <rpm/foo.h> style for public headersPanu Matilainen1-1/+1
- adjust include paths accordingly
2007-11-26Define and use pgpKeyID_t for pgp key id'sPanu Matilainen1-5/+5
2007-11-26Eliminate type "byte"Ralf Corsépius1-40/+40
2007-11-23Expand private include file names to be relative to $(top_srcdir)Ralf Corsépius1-2/+2
2007-11-23Move the xstr*() string variants from rpmio.h to rpmstring.hPanu Matilainen1-0/+3