SIGNATURE.


Files

file  rpmlib.h
 In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not.
file  digest.c
file  rpmpgp.c
 Routines to handle RFC-2440 detached signatures.

Typedefs

typedef enum pgpVersion_e pgpVersion
 Identify PGP versions.

Enumerations

enum  rpmSigTag_e {
  RPMSIGTAG_SIZE = 1000, RPMSIGTAG_LEMD5_1 = 1001, RPMSIGTAG_PGP = 1002, RPMSIGTAG_LEMD5_2 = 1003,
  RPMSIGTAG_MD5 = 1004, RPMSIGTAG_GPG = 1005, RPMSIGTAG_PGP5 = 1006, RPMSIGTAG_PAYLOADSIZE = 1007,
  RPMSIGTAG_BADSHA1_1 = RPMTAG_BADSHA1_1, RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2, RPMSIGTAG_SHA1 = RPMTAG_SHA1HEADER, RPMSIGTAG_DSA = RPMTAG_DSAHEADER,
  RPMSIGTAG_RSA = RPMTAG_RSAHEADER
}
 Tags found in signature header from package. More...
enum  pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 }
 Identify PGP versions. More...

Functions

int rpmAddSignature (Header sigh, const char *file, uint32_t sigTag, const char *passPhrase)
 Generate signature(s) from a header+payload file, save in signature header.
rpmRC rpmVerifySignature (void *_dig, char *result)
 Verify a signature from a package.

Typedef Documentation

typedef enum pgpVersion_e pgpVersion

Identify PGP versions.

Note:
Greater than 0 is a valid PGP version.


Enumeration Type Documentation

Identify PGP versions.

Note:
Greater than 0 is a valid PGP version.
Enumerator:
PGP_NOTDETECTED 
PGP_UNKNOWN 
PGP_2 
PGP_5 

Definition at line 13 of file signature.h.

Tags found in signature header from package.

Enumerator:
RPMSIGTAG_SIZE  internal Header+Payload size in bytes.
RPMSIGTAG_LEMD5_1  internal Broken MD5, take 1
Deprecated:
legacy.
RPMSIGTAG_PGP  internal PGP 2.6.3 signature.
RPMSIGTAG_LEMD5_2  internal Broken MD5, take 2
Deprecated:
legacy.
RPMSIGTAG_MD5  internal MD5 signature.
RPMSIGTAG_GPG  internal GnuPG signature.
RPMSIGTAG_PGP5  internal PGP5 signature
Deprecated:
legacy.
RPMSIGTAG_PAYLOADSIZE  internal uncompressed payload size in bytes.
RPMSIGTAG_BADSHA1_1  internal Broken SHA1, take 1.
RPMSIGTAG_BADSHA1_2  internal Broken SHA1, take 2.
RPMSIGTAG_SHA1  internal sha1 header digest.
RPMSIGTAG_DSA  internal DSA header signature.
RPMSIGTAG_RSA  internal RSA header signature.

Definition at line 424 of file rpmtag.h.


Function Documentation

int rpmAddSignature ( Header  sigh,
const char *  file,
uint32_t  sigTag,
const char *  passPhrase 
)

Generate signature(s) from a header+payload file, save in signature header.

Parameters:
sigh signature header
file header+payload file name
sigTag type of signature(s) to add
passPhrase private key pass phrase
Returns:
0 on success, -1 on failure

Definition at line 434 of file signature.c.

References alloca(), _HE_s::c, dodigest(), headerPut(), makeHDRSignature(), _HE_s::p, PGPHASHALGO_MD5, rpmDataType_u::ptr, RPM_BIN_TYPE, RPM_UINT32_TYPE, RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_MD5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, Stat(), _HE_s::t, _HE_s::tag, and rpmDataType_u::ui32p.

Referenced by rpmReSign(), and writeRPM().

rpmRC rpmVerifySignature ( void *  _dig,
char *  result 
)

Verify a signature from a package.

Parameters:
_dig container
Return values:
result detailed text result of signature verification
Returns:
result of signature verification

Definition at line 951 of file signature.c.

References _, pgpGetSig(), pgpGetSiglen(), pgpGetSigtag(), RPMRC_NOTFOUND, RPMSIGTAG_DSA, RPMSIGTAG_MD5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, verifyDSASignature(), verifyMD5Signature(), verifyRSASignature(), verifySHA1Signature(), and verifySizeSignature().

Referenced by headerCheck(), rpmReadPackageFile(), and rpmVerifySignatures().


Generated on Sun Dec 21 08:39:19 2008 for rpm by  doxygen 1.5.6