X509_NAME* subjectP = X509_NAME_new();
if( !subjectP ) {
- throw "malloc failure";
+ throw "malloc failure in construct.";
}
subject = std::shared_ptr<X509_NAME>( subjectP, X509_NAME_free );
void X509Cert::addRDN( int nid, std::string data ) {
if( ! X509_NAME_add_entry_by_NID( subject.get(), nid, MBSTRING_UTF8, ( unsigned char* )const_cast<char*>( data.data() ), data.size(), -1, 0 ) ) {
- throw "malloc failure";
+ throw "malloc failure in RDN";
}
}