rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Files | Typedefs | Enumerations | Functions
SIGNATURE.
Collaboration diagram for SIGNATURE.:

## Files
file | rpmlib.h
| In Memoriam: Steve Taylor stayl.nosp@m.or@r.nosp@m.edhat.nosp@m..com was here, now he's not.
file | signature.c
file | signature.h
| Generate and verify rpm package signatures.
file | crc.c
file | digest.c
file | rpmpgp.c
| Routines to handle RFC-2440 detached signatures.

## Typedefs
typedef enum pgpVersion_e | pgpVersion
| Identify PGP versions. More...

## 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, RPMSIGTAG_PADDING = 0x3fffffff }
| 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, rpmSigTag sigTag, const char *passPhrase)
| Generate signature(s) from a header+payload file, save in signature header. More...
rpmRC | rpmVerifySignature (void *_dig, char *result)
| Verify a signature from a package. More...

## Detailed Description

## Typedef Documentation

typedef enum pgpVersion_e pgpVersion

Identify PGP versions.

Note
  Greater than 0 is a valid PGP version.

## Enumeration Type Documentation

enum pgpVersion_e

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.

enum rpmSigTag_e

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.
RPMSIGTAG_PADDING | signature header padding

Definition at line 455 of file rpmtag.h.

## Function Documentation

int rpmAddSignature | ( | Header | sigh,
|  | const char * | file,
|  | rpmSigTag | 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 431 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 921 of file signature.c.

References _, pgpGetSig(), pgpGetSiglen(), pgpGetSigtag(), RPMRC_NOTFOUND, RPMSIGTAG_DSA, RPMSIGTAG_MD5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, verifyDSA(), verifyMD5(), verifyRSA(), verifySHA1(), and verifySize().

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