credential_from_handle()

Create an credential from its handle representation.

Synopsis:

#include <sys/credential/credential_store.h>
 
int credential_from_handle(const unsigned char *handle,
                           size_t handle_sz,
                           credential_t **cred)

Since:

BlackBerry 10.3.1

Arguments:

handle

A pointer to buffer that contains credential handle.

handle_sz

The size (in bytes) of the handle buffer.

cred

The credential that corresponds to the given handle. 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 it represent the same credential as the handle.

Returns:

0 if operation was successful, error code otherwise.