PROTON-2613: TLS OpenSSL library: fix SSL_write configuration for partial writes main
authorCliff Jansen <cliffjansen@apache.org>
Thu, 15 Sep 2022 17:25:12 +0000 (10:25 -0700)
committerCliff Jansen <cliffjansen@apache.org>
Thu, 15 Sep 2022 17:25:12 +0000 (10:25 -0700)
c/src/tls/openssl.c

index c05e09b99404f1e6f7994bcdffd6e8cabd477525..4aadc8861486d0adad7a61552c4753f8a9c9d9da 100644 (file)
@@ -1205,6 +1205,9 @@ static int init_ssl_socket(pn_tls_t *ssl, pn_tls_config_t *domain)
     return -1;
   }
 
+  // Enable "write as much as you hve buffer space for", similar to BIOs and raw sockets.
+  SSL_set_mode(ssl->ssl, SSL_MODE_ENABLE_PARTIAL_WRITE);
+
   // store backpointer
   SSL_set_ex_data(ssl->ssl, tls_ex_data_index, ssl);