mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +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
|
#define RECORD_SIZE MAX_RECORD_SIZE
|
||||||
#else
|
#else
|
||||||
#ifdef CYASSL_DTLS
|
#ifdef CYASSL_DTLS
|
||||||
#define RECORD_SIZE 1500
|
#define RECORD_SIZE MAX_MTU
|
||||||
#else
|
#else
|
||||||
#define RECORD_SIZE 128
|
#define RECORD_SIZE 128
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1928,7 +1928,7 @@ static int GetInputData(SSL *ssl, size_t size)
|
|||||||
|
|
||||||
#ifdef CYASSL_DTLS
|
#ifdef CYASSL_DTLS
|
||||||
if (ssl->options.dtls)
|
if (ssl->options.dtls)
|
||||||
inSz = 1500; /* read ahead up to MTU */
|
inSz = MAX_MTU; /* read ahead up to MTU */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (inSz > maxLength) {
|
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)
|
const char* SSL_get_version(SSL* ssl)
|
||||||
{
|
{
|
||||||
if (ssl->version.major == 3) {
|
if (ssl->version.major == SSLv3_MAJOR) {
|
||||||
switch (ssl->version.minor) {
|
switch (ssl->version.minor) {
|
||||||
case 0 :
|
case SSLv3_MINOR :
|
||||||
return "SSLv3";
|
return "SSLv3";
|
||||||
case 1 :
|
case TLSv1_MINOR :
|
||||||
return "TLSv1";
|
return "TLSv1";
|
||||||
case 2 :
|
case TLSv1_1_MINOR :
|
||||||
return "TLSv1.1";
|
return "TLSv1.1";
|
||||||
case 3 :
|
case TLSv1_2_MINOR :
|
||||||
return "TLSv1.2";
|
return "TLSv1.2";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (ssl->version.major == DTLS_MAJOR)
|
||||||
|
return "DTLS";
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user