|
@@ -6,6 +6,7 @@
|
|
|
#endif
|
|
|
#include <Key.h>
|
|
|
#include <Text.h>
|
|
|
+#include <iostream>
|
|
|
|
|
|
using namespace Network;
|
|
|
|
|
@@ -310,8 +311,11 @@ SSLServer::SSLServer()
|
|
|
: ReferenceCounter()
|
|
|
{
|
|
|
s = 0;
|
|
|
- ctx = SSL_CTX_new( SSLv23_server_method() );
|
|
|
- SSL_CTX_set_min_proto_version( ctx, TLS1_2_VERSION );
|
|
|
+ const SSL_METHOD *method = TLS_server_method();
|
|
|
+ ctx = SSL_CTX_new( method );
|
|
|
+ SSLErrorCheck( SSL_CTX_set_min_proto_version( ctx, TLS1_2_VERSION ), "SSL_CTX_set_min_proto_version" );
|
|
|
+ SSLErrorCheck( SSL_CTX_set_max_proto_version( ctx, TLS1_3_VERSION ), "SSL_CTX_set_max_proto_version" );
|
|
|
+ SSL_CTX_set_verify( ctx, SSL_VERIFY_NONE, 0 );
|
|
|
SSL_CTX_set_default_passwd_cb( ctx, pem_passwd_cb );
|
|
|
passw = new Text();
|
|
|
SSL_CTX_set_default_passwd_cb_userdata( ctx, passw );
|