Permalink
Browse files

- lophttpd: SSL_MOVING_WRITE_BUFFER yay

  • Loading branch information...
stealth committed Jan 19, 2017
1 parent cfb75c4 commit ad9d0386aef494166574b775b231445b08afdcc9
Showing with 8 additions and 1 deletion.
  1. +2 −0 ssl.cc
  2. +6 −1 tests/webstress.cc
View
2 ssl.cc
@@ -154,6 +154,8 @@ int ssl_container::init(const map<string, string> &certs, const map<string, stri
return -1;
}
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER|SSL_MODE_ENABLE_PARTIAL_WRITE);
SSL_CTX_set_session_cache_mode(ssl_ctx, SSL_SESS_CACHE_SERVER);
// check for DHE and enable it if there are parameters
View
@@ -236,7 +236,11 @@ int webstress::ssl_init()
OpenSSL_add_all_algorithms();
OpenSSL_add_all_digests();
if ((ssl_method = TLSv1_client_method()) == NULL) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000
if ((ssl_method = TLS_client_method()) == NULL) {
#else
if ((ssl_method = SSLv23_client_method()) == NULL) {
#endif
fprintf(stderr, "ERR: TLSv1_client_method: %s\n", ERR_error_string(ERR_get_error(), NULL));
return -1;
}
@@ -247,6 +251,7 @@ int webstress::ssl_init()
}
SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_NONE, NULL);
SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL);
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER|SSL_MODE_ENABLE_PARTIAL_WRITE);
return 0;
}

0 comments on commit ad9d038

Please sign in to comment.