mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
mix MTU defines and DTLS version info
This commit is contained in:
@@ -499,7 +499,7 @@ enum {
|
||||
#define RECORD_SIZE MAX_RECORD_SIZE
|
||||
#else
|
||||
#ifdef CYASSL_DTLS
|
||||
#define RECORD_SIZE 1500
|
||||
#define RECORD_SIZE MAX_MTU
|
||||
#else
|
||||
#define RECORD_SIZE 128
|
||||
#endif
|
||||
|
@@ -1928,7 +1928,7 @@ static int GetInputData(SSL *ssl, size_t size)
|
||||
|
||||
#ifdef CYASSL_DTLS
|
||||
if (ssl->options.dtls)
|
||||
inSz = 1500; /* read ahead up to MTU */
|
||||
inSz = MAX_MTU; /* read ahead up to MTU */
|
||||
#endif
|
||||
|
||||
if (inSz > maxLength) {
|
||||
|
12
src/ssl.c
12
src/ssl.c
@@ -2718,18 +2718,20 @@ int CyaSSL_set_compression(SSL* ssl)
|
||||
|
||||
const char* SSL_get_version(SSL* ssl)
|
||||
{
|
||||
if (ssl->version.major == 3) {
|
||||
if (ssl->version.major == SSLv3_MAJOR) {
|
||||
switch (ssl->version.minor) {
|
||||
case 0 :
|
||||
case SSLv3_MINOR :
|
||||
return "SSLv3";
|
||||
case 1 :
|
||||
case TLSv1_MINOR :
|
||||
return "TLSv1";
|
||||
case 2 :
|
||||
case TLSv1_1_MINOR :
|
||||
return "TLSv1.1";
|
||||
case 3 :
|
||||
case TLSv1_2_MINOR :
|
||||
return "TLSv1.2";
|
||||
}
|
||||
}
|
||||
else if (ssl->version.major == DTLS_MAJOR)
|
||||
return "DTLS";
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user