我已经为 TLS 安全性集成了植物库。我得到以下错误:
jsonrpctest.exe 中 0x6DBFD1CE (vcruntime140.dll) 的第一次机会异常:0xC0000005:访问冲突读取位置 0x00962000。如果有这个异常的处理程序,程序可以安全地继续
下面是我正在调用的代码
int main(int argc, char *argv[])
{
// prepare all the parameters
Callbacks callbacks;
Botan::AutoSeeded_RNG rng;
Botan::TLS::Session_Manager_In_Memory session_mgr(rng);
Client_Credentials creds;
Botan::TLS::Strict_Policy policy;
// open the tls connection : Error comes here
Botan::TLS::Client client(callbacks,
session_mgr,
creds,
policy,
rng,
Botan::TLS::Server_Information("10.193.252.14", 43733),
Botan::TLS::Protocol_Version::TLS_V12);
while (!client.is_closed())
{
//cout << client.is_active;
// read data received from the tls server, e.g., using BSD sockets or
boost asio
// ...
// send data to the tls server using client.send_data()
} }