mix MTU defines and DTLS version info

This commit is contained in:
Todd A Ouska
2011-03-11 14:10:32 -08:00
parent 9a932a2b67
commit f874bf9b76
3 changed files with 9 additions and 7 deletions

View File

@@ -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

View File

@@ -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) {

View File

@@ -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";
}