silc_skr_add_public_key_simple

SYNOPSIS

    SilcResult silc_skr_add_public_key_simple(SilcSKR skr,
                                              SilcPublicKey public_key,
                                              SilcSKRKeyUsage usage,
                                              void *key_context,
                                              SilcSKRKey *return_key);

DESCRIPTION

Same as silc_skr_add_public_key but adds only the public key, usage bits and key context. The key cannot be found with any other search constraint except setting the public key, usage bits and/or key context as search constraint. This function can be used to add the key with as little memory as possible to the repository, and makes it a good way to cheaply store large amounts of public keys.

Returns an entry of the added public key in the repository to the `return_key' pointer, if it is non-NULL. The returned entry remains valid as long as the public key is in the repository, however a reference may be taken with silc_skr_ref_public_key to assure the entry remains valid.

Returns SILC_OK if the key was added successfully, and error status if key could not be added, or has been added already.