Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

SIGNATURE.


Files

file  digest.c
file  rpmlib.h
file  rpmpgp.c
 Routines to handle RFC-2440 detached signatures.

file  signature.c
file  signature.h
 Generate and verify signatures.


Typedefs

typedef enum sigType_e sigType
typedef enum pgpVersion_e pgpVersion

Enumerations

enum  sigType_e { RPMSIGTYPE_HEADERSIG = 5 }
enum  pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 }

Functions

Header rpmNewSignature (void)
rpmRC rpmReadSignature (FD_t fd, Header *sighp, sigType sig_type)
int rpmWriteSignature (FD_t fd, Header h)
int rpmAddSignature (Header sig, const char *file, int_32 sigTag, const char *passPhrase)
int rpmLookupSignatureType (int action)
char * rpmGetPassPhrase (const char *prompt, const int sigTag)
const char * rpmDetectPGPVersion (pgpVersion *pgpVer)

Typedef Documentation

typedef enum pgpVersion_e pgpVersion
 

Identify PGP versions.

Note:
Greater than 0 is a valid PGP version.

Referenced by checkPassPhrase, makePGPSignature, and rpmDetectPGPVersion.

typedef enum sigType_e sigType
 

Signature types stored in rpm lead.

Referenced by rpmLookupSignatureType, and rpmReadSignature.


Enumeration Type Documentation

enum pgpVersion_e
 

Identify PGP versions.

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

Definition at line 22 of file signature.h.

enum sigType_e
 

Signature types stored in rpm lead.

Enumeration values:
RPMSIGTYPE_HEADERSIG  Header style signature

Definition at line 14 of file signature.h.


Function Documentation

int rpmAddSignature Header    sig,
const char *    file,
int_32    sigTag,
const char *    passPhrase
 

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

Parameters:
sig  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 615 of file signature.c.

Referenced by rpmReSign, and writeRPM.

const char* rpmDetectPGPVersion pgpVersion   pgpVer
 

< Lookup type in effect

Definition at line 71 of file signature.c.

References int_32.

Referenced by checkPassPhrase, main, and makePGPSignature.

char* rpmGetPassPhrase const char *    prompt,
const int    sigTag
 

Read a pass phrase using getpass(3), confirm with gpg/pgp helper binaries.

Parameters:
prompt  user prompt
sigTag  signature type/tag
Returns:
pass phrase

Definition at line 779 of file signature.c.

Referenced by main.

int rpmLookupSignatureType int    action
 

Return type of signature needed for signing/building.

Parameters:
action  enable/disable/query action
Returns:
sigTag to use, 0 if none, -1 on error

Definition at line 31 of file signature.c.

References rpmRC, and sigType.

Referenced by main, rpmReSign, and writeRPM.

Header rpmNewSignature void   
 

Return new, empty (signature) header instance.

Returns:
signature header

Definition at line 242 of file signature.c.

rpmRC rpmReadSignature FD_t    fd,
Header   sighp,
sigType    sig_type
 

Read (and verify header+payload size) signature header. If an old-style signature is found, we emulate a new style one.

Parameters:
fd  file handle
Return values:
sighp  address of (signature) header (or NULL)
Parameters:
sig_type  type of signature header to read (from lead)
Returns:
rpmRC return code

Definition at line 146 of file signature.c.

Referenced by main, rpmReadPackageFile, rpmReSign, and rpmVerifySignatures.

int rpmWriteSignature FD_t    fd,
Header    h
 

Write signature header.

Parameters:
fd  file handle
h  (signature) header
Returns:
0 on success, 1 on error

Definition at line 220 of file signature.c.

Referenced by main, rpmReSign, and writeRPM.


Generated on Wed Sep 4 12:50:05 2002 for rpm by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002