Loading CA certificate from memory
问题 I am trying to load CA certificate from memory instead of file. But I keep getting handshake error while connecting. The file loading works perfectly, memory loading fails. What am I missing? std::ifstream file("message_server_ca.crt"); std::vector<char> fileContents((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); boost::asio::const_buffer buffer(&fileContents.at(0),fileContents.size()); bool useFile = false; // switch between file and memory loading. boost::asio: