rpm 4.19.0
The RPM Package Manager
Loading...
Searching...
No Matches
Files | Functions
RPM keyring API.

RPM keyring API. More...

Files

file  rpmkeyring.h
 

Functions

rpmKeyring rpmKeyringNew (void)
 
rpmKeyring rpmKeyringFree (rpmKeyring keyring)
 
int rpmKeyringAddKey (rpmKeyring keyring, rpmPubkey key)
 
rpmRC rpmKeyringVerifySig (rpmKeyring keyring, pgpDigParams sig, DIGEST_CTX ctx)
 
rpmKeyring rpmKeyringLink (rpmKeyring keyring)
 
rpmPubkey rpmPubkeyNew (const uint8_t *pkt, size_t pktlen)
 
rpmPubkey * rpmGetSubkeys (rpmPubkey mainkey, int *count)
 
rpmPubkey rpmPubkeyRead (const char *filename)
 
rpmPubkey rpmPubkeyFree (rpmPubkey key)
 
rpmPubkey rpmPubkeyLink (rpmPubkey key)
 
char * rpmPubkeyBase64 (rpmPubkey key)
 
pgpDigParams rpmPubkeyPgpDigParams (rpmPubkey key)
 

Detailed Description

RPM keyring API.

Function Documentation

◆ rpmGetSubkeys()

rpmPubkey * rpmGetSubkeys ( rpmPubkey  mainkey,
int *  count 
)

Return array of subkeys belonging to mainkey param mainkey main rpmPubkey param count count of returned subkeys

Returns
an array of subkey's handles

◆ rpmKeyringAddKey()

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

◆ rpmKeyringFree()

rpmKeyring rpmKeyringFree ( rpmKeyring  keyring)

Free keyring and the keys within it

Returns
NULL always

◆ rpmKeyringLink()

rpmKeyring rpmKeyringLink ( rpmKeyring  keyring)

Reference a keyring.

Parameters
keyringkeyring handle
Returns
new keyring reference

◆ rpmKeyringNew()

rpmKeyring rpmKeyringNew ( void  )

Create a new, empty keyring

Returns
new keyring handle

◆ rpmKeyringVerifySig()

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

◆ rpmPubkeyBase64()

char * rpmPubkeyBase64 ( rpmPubkey  key)

Return base64 encoding of pubkey

Parameters
keyPubkey
Returns
base64 encoded pubkey (malloced), NULL on error

◆ rpmPubkeyFree()

rpmPubkey rpmPubkeyFree ( rpmPubkey  key)

Free a pubkey.

Parameters
keyPubkey to free
Returns
NULL always

◆ rpmPubkeyLink()

rpmPubkey rpmPubkeyLink ( rpmPubkey  key)

Reference a pubkey.

Parameters
keyPubkey
Returns
new pubkey reference

◆ rpmPubkeyNew()

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

◆ rpmPubkeyPgpDigParams()

pgpDigParams rpmPubkeyPgpDigParams ( rpmPubkey  key)

Return pgp params of key

Parameters
keyPubkey
Returns
pgp params, NULL on error

◆ rpmPubkeyRead()

rpmPubkey rpmPubkeyRead ( const char *  filename)

Create a new rpmPubkey from ASCII-armored pubkey file

Parameters
filenamePath to pubkey file
Returns
new pubkey handle