credential_cert_get_subject()

Retrieve the certificate subject from credentials.

Synopsis:

#include <sys/credential/credential_cert.h>
 
int credential_cert_get_subject(const credential_t *cert,
                                char **subject)

Since:

BlackBerry 10.3.1

Arguments:

cert

Certificate credentials record.

subject

On return, a pointer to a string containing the certificate subject. The string is UTF-8 encoded and null-terminated. You must call credential_util_free() to release this string when you are finished using it.

Library:

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

Description:

Retrieve and return the subject name from the client certificate in a newly allocated buffer.

Returns:

0 if operation was successful, error code otherwise.