Set SSL options to accept moving buffer && auto retry
authorAlan T. DeKok <aland@freeradius.org>
Thu, 27 Feb 2014 03:46:07 +0000 (22:46 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 27 Feb 2014 03:46:07 +0000 (22:46 -0500)
SSL seems to get upset that we write to it from random areas
of memory.  This is a design feature of the server.

src/main/tls.c

index 6971cdf..1a7b379 100644 (file)
@@ -113,6 +113,9 @@ tls_session_t *tls_new_client_session(fr_tls_server_conf_t *conf, int fd)
        if (!ssn) return NULL;
 
        ssn->ctx = conf->ctx;
+
+       SSL_CTX_set_mode(ssn->ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER | SSL_MODE_AUTO_RETRY);
+
        ssn->ssl = SSL_new(ssn->ctx);
        rad_assert(ssn->ssl != NULL);