# lib/signature.h File Reference

Generate and verify signatures. More...

`#include <header.h>`

Go to the source code of this file.

## Defines

#define | RPMLOOKUPSIG_QUERY 0
#define | RPMLOOKUPSIG_DISABLE 1
#define | RPMLOOKUPSIG_ENABLE 2

## Typedefs

typedef enum sigType_e | sigType
| Signature types stored in rpm lead.
typedef enum pgpVersion_e | pgpVersion
| Identify PGP versions.

## Enumerations

enum | sigType_e { RPMSIGTYPE_NONE = 0, RPMSIGTYPE_PGP262_1024 = 1, RPMSIGTYPE_BAD = 2, RPMSIGTYPE_MD5 = 3, RPMSIGTYPE_MD5_PGP = 4, RPMSIGTYPE_HEADERSIG = 5, RPMSIGTYPE_DISABLE = 6 }
| Signature types stored in rpm lead. More...
enum | pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 }
| Identify PGP versions. More...

## Functions

Header | rpmNewSignature (void)
| Return new, empty (signature) header instance.
rpmRC | rpmReadSignature (FD_t fd, Header *headerp, sigType sig_type)
| Read (and verify header+archive size) signature header.
int | rpmWriteSignature (FD_t fd, Header h)
| Write signature header.
int | rpmAddSignature (Header h, const char *file, int_32 sigTag, const char *passPhrase)
| Generate a signature of data in file, insert in header.
int | rpmLookupSignatureType (int action)
| Return type of signature in effect for building.
char * | rpmGetPassPhrase (const char *prompt, const int sigTag)
| Read a pass phrase from the user.
const char * | rpmDetectPGPVersion (pgpVersion *pgpVer)
| Return path to pgp executable of given type, or NULL when not found.

## Detailed Description

Generate and verify signatures.

Definition in file signature.h.

## Define Documentation

#define RPMLOOKUPSIG_DISABLE 1

Definition at line 81 of file signature.h.

Referenced by main(), and rpmLookupSignatureType().

#define RPMLOOKUPSIG_ENABLE 2

Definition at line 82 of file signature.h.

Referenced by rpmLookupSignatureType().

#define RPMLOOKUPSIG_QUERY 0

Definition at line 80 of file signature.h.

Referenced by main(), rpmLookupSignatureType(), rpmReSign(), and writeRPM().