]> WPIA git - cassiopeia.git/blobdiff - src/X509.cpp
fix: resolve some memory issues with slipBio testing
[cassiopeia.git] / src / X509.cpp
index 92d7773f22f4cbff36b0b5cb4a179f030018087a..d5f8bc50d52d33970ea436094c28cebb75d9c8ea 100644 (file)
@@ -52,8 +52,8 @@ std::shared_ptr<EVP_PKEY> X509Req::getPkey() {
     return pk;
 }
 
-std::shared_ptr<X509Req> X509Req::parse( std::string filename ) {
-    std::shared_ptr<BIO> in = std::shared_ptr<BIO>( BIO_new_mem_buf( const_cast<char*>( filename.c_str() ), -1 ), BIO_free );
+std::shared_ptr<X509Req> X509Req::parseCSR( std::string content ) {
+    std::shared_ptr<BIO> in = std::shared_ptr<BIO>( BIO_new_mem_buf( const_cast<char*>( content.c_str() ), -1 ), BIO_free );
     X509_REQ* req = PEM_read_bio_X509_REQ( in.get(), NULL, NULL, NULL );
 
     if( !req ) {