]> WPIA git - cassiopeia.git/commitdiff
upd: more verbose error messages on malloc fail
authorFelix Dörre <felix@dogcraft.de>
Sat, 23 Jan 2016 17:26:41 +0000 (18:26 +0100)
committerFelix Dörre <felix@dogcraft.de>
Sat, 23 Jan 2016 17:26:41 +0000 (18:26 +0100)
src/crypto/X509.cpp

index 51f206b7cb63fcc7181ff2620104b73a200f72ac..caa2a9dfe0ff52435570faee628d9a7c8b88f1b0 100644 (file)
@@ -106,7 +106,7 @@ X509Cert::X509Cert() {
     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 );
@@ -114,7 +114,7 @@ X509Cert::X509Cert() {
 
 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";
     }
 }