rpm  4.11.1-rc1
Files | Functions
RPM keyring API.

Files

file  rpmkeyring.h
 

Functions

rpmKeyring rpmKeyringNew (void)
 Create a new, empty keyring. More...
 
rpmKeyring rpmKeyringFree (rpmKeyring keyring)
 Free keyring and the keys within it. More...
 
int rpmKeyringAddKey (rpmKeyring keyring, rpmPubkey key)
 Add a public key to keyring. More...
 
rpmRC rpmKeyringLookup (rpmKeyring keyring, pgpDig sig)
 Perform keyring lookup for a key matching a signature. More...
 
rpmRC rpmKeyringVerifySig (rpmKeyring keyring, pgpDigParams sig, DIGEST_CTX ctx)
 Perform combined keyring lookup and signature verification. More...
 
rpmKeyring rpmKeyringLink (rpmKeyring keyring)
 Reference a keyring. More...
 
rpmPubkey rpmPubkeyNew (const uint8_t *pkt, size_t pktlen)
 Create a new rpmPubkey from OpenPGP packet. More...
 
rpmPubkey rpmPubkeyRead (const char *filename)
 Create a new rpmPubkey from ASCII-armored pubkey file. More...
 
rpmPubkey rpmPubkeyFree (rpmPubkey key)
 Free a pubkey. More...
 
rpmPubkey rpmPubkeyLink (rpmPubkey key)
 Reference a pubkey. More...
 
pgpDig rpmPubkeyDig (rpmPubkey key)
 Parse OpenPGP pubkey parameters. More...
 
char * rpmPubkeyBase64 (rpmPubkey key)
 Return base64 encoding of pubkey. More...
 

Detailed Description

Function Documentation

int rpmKeyringAddKey ( rpmKeyring  keyring,
rpmPubkey  key 
)

Add a public key to keyring.

Parameters
keyringkeyring handle
keypubkey handle
Returns
0 on success, -1 on error, 1 if key already present
rpmKeyring rpmKeyringFree ( rpmKeyring  keyring)

Free keyring and the keys within it.

Returns
NULL always
rpmKeyring rpmKeyringLink ( rpmKeyring  keyring)

Reference a keyring.

Parameters
keyringkeyring handle
Returns
new keyring reference
rpmRC rpmKeyringLookup ( rpmKeyring  keyring,
pgpDig  sig 
)

Perform keyring lookup for a key matching a signature.

Parameters
keyringkeyring handle
sigOpenPGP packet container of signature
Returns
RPMRC_OK if found, RPMRC_NOKEY otherwise
rpmKeyring rpmKeyringNew ( void  )

Create a new, empty keyring.

Returns
new keyring handle
rpmRC rpmKeyringVerifySig ( rpmKeyring  keyring,
pgpDigParams  sig,
DIGEST_CTX  ctx 
)

Perform combined keyring lookup and signature verification.

Parameters
keyringkeyring handle
sigOpenPGP signature parameters
ctxsignature hash context
Returns
RPMRC_OK / RPMRC_FAIL / RPMRC_NOKEY
char* rpmPubkeyBase64 ( rpmPubkey  key)

Return base64 encoding of pubkey.

Parameters
keyPubkey
Returns
base64 encoded pubkey (malloced), NULL on error
pgpDig rpmPubkeyDig ( rpmPubkey  key)

Parse OpenPGP pubkey parameters.

Parameters
keyPubkey
Returns
parsed output of pubkey packet parameters
rpmPubkey rpmPubkeyFree ( rpmPubkey  key)

Free a pubkey.

Parameters
keyPubkey to free
Returns
NULL always
rpmPubkey rpmPubkeyLink ( rpmPubkey  key)

Reference a pubkey.

Parameters
keyPubkey
Returns
new pubkey reference
rpmPubkey rpmPubkeyNew ( const uint8_t *  pkt,
size_t  pktlen 
)

Create a new rpmPubkey from OpenPGP packet.

Parameters
pktOpenPGP packet data
pktlenData length
Returns
new pubkey handle
rpmPubkey rpmPubkeyRead ( const char *  filename)

Create a new rpmPubkey from ASCII-armored pubkey file.

Parameters
filenamePath to pubkey file
Returns
new pubkey handle