错误编译openssl / demo / ssl / serv.cpp openssl

时间:2015-10-14 16:09:37

标签: c++ openssl

当我尝试从openssl / demo / ssl编译serv.cpp时:

g++ serv.cpp -L/usr/lib/x86_64-linux-gnu -L/usr/lib/ipsec -o -lssl -lcrypto -ltls

我收到下一个错误:

serv.cpp:58:53: error: ‘TLS_server_method’ was not declared in this scope
   meth = const_cast<SSL_METHOD *>(TLS_server_method());

1 个答案:

答案 0 :(得分:0)

https://www.openssl.org/docs/man1.0.2/ssl/TLSv1_server_method.html

TLSv1_server_method(),TLSv1_1_server_method(),TLSv1_2_server_method()。