}
}
-std::shared_ptr<BIO> openSerial( const char* name ) {
- FILE* f = fopen( name, "r+" );
+std::shared_ptr<BIO> openSerial( const std::string name ) {
+ FILE* f = fopen( name.c_str(), "r+" );
if( !f ) {
std::cout << "Opening serial device failed" << std::endl;
std::shared_ptr<BIO> b( BIO_new_fd( fileno( f ), 0 ), BIO_free );
return b;
}
+
+CAConfig::CAConfig( std::string path ) {
+ this->path = path;
+ ca = loadX509FromFile( path + "/ca.crt" );
+ caKey = loadPkeyFromFile( path + "/ca.key" );
+}