credential_clone()

Create a clone of the given credential.

Synopsis:

#include <sys/credential/credential_store.h>
 
int credential_clone(const credential_t *cred,
                     credential_t **clone)

Since:

BlackBerry 10.3.1

Arguments:

cred

The credential to clone.

clone

On return, a pointer to a cloned credential. You must call credential_release() to release this structure when you're done using it.

Library:

libcredential (For the qcc command, use the -l bps option to link against this library)

Description:

This function allocates a new credential_t structure, and initializes a deep copy of the attributes of the given credential.

Changes to a cloned credential will not be reflected in the original, and vice versa.

Returns:

0 if operation was successful, error code otherwise.