tls: set SSL_set_read_ahead() on DTLS connection
This commit is contained in:
parent
31a30aa487
commit
1dfceb2dc0
2 changed files with 2 additions and 4 deletions
|
@ -128,10 +128,6 @@ int tls_alloc(struct tls **tlsp, enum tls_method method, const char *keyfile,
|
|||
SSL_CTX_set_verify_depth(tls->ctx, 1);
|
||||
#endif
|
||||
|
||||
if (method == TLS_METHOD_DTLSV1) {
|
||||
SSL_CTX_set_read_ahead(tls->ctx, 1);
|
||||
}
|
||||
|
||||
/* Load our keys and certificates */
|
||||
if (keyfile) {
|
||||
if (pwd) {
|
||||
|
|
|
@ -435,6 +435,8 @@ static int conn_alloc(struct tls_conn **ptc, struct tls *tls,
|
|||
|
||||
SSL_set_bio(tc->ssl, tc->sbio_in, tc->sbio_out);
|
||||
|
||||
SSL_set_read_ahead(tc->ssl, 1);
|
||||
|
||||
out:
|
||||
if (err)
|
||||
mem_deref(tc);
|
||||
|
|
Loading…
Add table
Reference in a new issue