signature.h File Reference
SIGNATURE.

Generate and verify rpm package signatures. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Typedefs

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

## Enumerations

enum | pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 }
| Identify PGP versions. More...

## Functions

int | rpmTempFile (const char *prefix, const char **fnptr, void *fdptr)
| Return file handle for a temporaray file. More...
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...
int | rpmCheckPassPhrase (const char *passPhrase)
| Check for valid pass phrase by invoking a helper. More...
rpmRC | rpmVerifySignature (void *_dig, char *result)
| Verify a signature from a package. More...

## Detailed Description

Generate and verify rpm package signatures.

Definition in file signature.h.

## Function Documentation

int rpmCheckPassPhrase | ( | const char * | passPhrase | ) |

Check for valid pass phrase by invoking a helper.

Parameters

  passPhrase | pass phrase

Returns
  0 on valid, 1 on invalid

Definition at line 487 of file signature.c.

References _, _free(), errno, rpmExpand(), rpmIsVerbose, rpmkuPassPhrase(), rpmlog(), RPMLOG_ERR, setenv(), and unsetenv().

Referenced by main().

int rpmTempFile | ( | const char * | prefix,
|  | const char ** | fnptr,
|  | void * | fdptr
| ) |  |

Return file handle for a temporaray file.

A unique temporaray file path will be generated using rpmGenPath(prefix, "%{_tmppath}/", "rpm-tmp.XXXXX") where "XXXXXX" is filled in using rand(3). The file is opened, and the link count and (dev,ino) location are verified after opening. The file name and the open file handle are returned.

Parameters

  prefix | leading part of temp file path

Return values

  *fnptr | temp file name (or NULL)
  *fdptr | temp file handle

Returns
  0 on success

Definition at line 29 of file signature.c.

References _, _free(), errno, Fclose(), Ferror(), Fileno(), Fopen(), rpmGenPath(), rpmioMkpath(), rpmlog(), RPMLOG_ERR, S_ISLNK, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by makeHDRSignature(), manageFile(), runScript(), and writeRPM().