Remove instances in libssl of the constant 28 (for size of IPv4 header + UDP)
and instead use the value provided by the underlying BIO. Also provide some
new DTLS_CTRLs so that the library user can set the mtu without needing to
know this constant. These new DTLS_CTRLs provide the capability to set the
link level mtu to be used (i.e. including this IP/UDP overhead). The previous
DTLS_CTRLs required the library user to subtract this overhead first.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 59669b6abf
)
Conflicts:
ssl/d1_both.c
This commit is contained in:
@@ -787,6 +787,10 @@ struct ssl_session_st
|
||||
SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)
|
||||
#define SSL_set_mtu(ssl, mtu) \
|
||||
SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL)
|
||||
#define DTLS_set_link_mtu(ssl, mtu) \
|
||||
SSL_ctrl((ssl),DTLS_CTRL_SET_LINK_MTU,(mtu),NULL)
|
||||
#define DTLS_get_link_min_mtu(ssl) \
|
||||
SSL_ctrl((ssl),DTLS_CTRL_GET_LINK_MIN_MTU,0,NULL)
|
||||
|
||||
#define SSL_get_secure_renegotiation_support(ssl) \
|
||||
SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL)
|
||||
@@ -1836,6 +1840,8 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
|
||||
#define SSL_CTRL_SET_CURRENT_CERT 117
|
||||
|
||||
#define SSL_CTRL_CHECK_PROTO_VERSION 119
|
||||
#define DTLS_CTRL_SET_LINK_MTU 120
|
||||
#define DTLS_CTRL_GET_LINK_MIN_MTU 121
|
||||
|
||||
|
||||
#define SSL_CERT_SET_FIRST 1
|
||||
|
Reference in New Issue
Block a user