Skip to content

Commit

Permalink
Use TLS_server_method() instead of SSLv23_server_method() on recent O…
Browse files Browse the repository at this point in the history
…penSSL versions.
  • Loading branch information
shawnw committed Jan 20, 2018
1 parent 8665976 commit a12b071
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/myssl.c
Expand Up @@ -140,7 +140,11 @@ ssl_init(char *private_key_file, char *ca_file, char *ca_dir,
/* Set up SIGPIPE handler here? */

/* Create context */
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
meth = TLS_server_method();
#else
meth = SSLv23_server_method();
#endif
ctx = SSL_CTX_new(meth);
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);

Expand Down

0 comments on commit a12b071

Please sign in to comment.