Browse Source

* Enable Partial Writes and Movable Buffers for SSL to better mimic write() with our String/buffers

Bryan Drewery 15 years ago
parent
commit
577461a3a6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/openssl.c

+ 1 - 0
src/openssl.c

@@ -58,6 +58,7 @@ int init_openssl() {
 
 
   // Disable insecure SSLv2
   // Disable insecure SSLv2
   SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2);
   SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2);
+  SSL_CTX_set_mode(ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER|SSL_MODE_ENABLE_PARTIAL_WRITE);
 
 
   if (seed_PRNG()) {
   if (seed_PRNG()) {
     sdprintf("Wasn't able to properly seed the PRNG!");
     sdprintf("Wasn't able to properly seed the PRNG!");