catcert_subjectname - get subject name as a string
#include <cat/cat.h>
int catcert_subjectname(const cat_cert *cert, char **subject);
This function extracts the subject name from cert and returns a pointer to the result in *subject.
The resulting subject name will be a string in RFC2253 format and UTF-8
encoded.
The result is allocated and must be freed by the caller.
The function returns 0 if successful, or a negative code on error.
cat, catcert, catcert_issuername