get_keycontents(3)

NAME
get_keycontents - get the contents of a public key

SYNOPSIS
#include <pgplib.h>
int
get_keycontents(PGPKEYID id, keyent_t ***ent);

DESCRIPTION
Retrieves the public key id from the database and parses it. The different packages associated with the key are also retrieved. All this information is then returned as an array of pointers to structures. ent is set to point to this array. All the memory is allocated by means of malloc and should be freed when no longer needed. This is conveniently performed by free_keyrecords().

RETURN VALUES
If the retrival was successful, 0 is returned. If no key was found, 1 is returned. If an error occured, -1 is returned.

SEE ALSO
get_keyent_from_buffer(PGPlib) get_pub_key_rec(PGPlib) free_keyrecords(PGPlib) PGPlib(3)

HISTORY
Written by Tage Stabell-Kulų. First appeared in PGPlib 0.1