silc_pgp_public_key_decode

SYNOPSIS

    SilcBool silc_pgp_public_key_decode(SilcList *list,
                                        SilcPGPPublicKey *ret_public_key);

DESCRIPTION

Decodes OpenPGP public key (certificate) from decoded PGP packets list indicated by `list'. The decoded public key is returned into the `ret_public_key' which the caller must free by calling the silc_pgp_public_key_free function. Returns FALSE on error.

The `list' can be allocated by calling silc_pgp_packet_decode. If the `list' contains more that one public keys this only decodes the first one. The public key `list' is advanced while decoding the public key. If another public key follows the first public key, this function may be called again to decode that public key as well.