forked from wolfSSL/wolfssl
fixed off-by-one dtls cookie size check. fixed some warnings when disabling features
This commit is contained in:
@ -473,6 +473,7 @@ void InitCiphers(CYASSL* ssl)
|
|||||||
/* Free ciphers */
|
/* Free ciphers */
|
||||||
void FreeCiphers(CYASSL* ssl)
|
void FreeCiphers(CYASSL* ssl)
|
||||||
{
|
{
|
||||||
|
(void)ssl;
|
||||||
#ifdef BUILD_ARC4
|
#ifdef BUILD_ARC4
|
||||||
XFREE(ssl->encrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER);
|
XFREE(ssl->encrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER);
|
||||||
XFREE(ssl->decrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER);
|
XFREE(ssl->decrypt.arc4, ssl->heap, DYNAMIC_TYPE_CIPHER);
|
||||||
@ -522,6 +523,7 @@ void InitSuites(Suites* suites, ProtocolVersion pv, byte haveDH, byte havePSK,
|
|||||||
int haveRSAsig = 1;
|
int haveRSAsig = 1;
|
||||||
|
|
||||||
(void)tls; /* shut up compiler */
|
(void)tls; /* shut up compiler */
|
||||||
|
(void)tls1_2;
|
||||||
(void)haveDH;
|
(void)haveDH;
|
||||||
(void)havePSK;
|
(void)havePSK;
|
||||||
(void)haveNTRU;
|
(void)haveNTRU;
|
||||||
@ -5218,7 +5220,7 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
|
|
||||||
if (cookieSz) {
|
if (cookieSz) {
|
||||||
#ifdef CYASSL_DTLS
|
#ifdef CYASSL_DTLS
|
||||||
if (cookieSz < MAX_COOKIE_LEN) {
|
if (cookieSz <= MAX_COOKIE_LEN) {
|
||||||
XMEMCPY(ssl->arrays->cookie, input + *inOutIdx, cookieSz);
|
XMEMCPY(ssl->arrays->cookie, input + *inOutIdx, cookieSz);
|
||||||
ssl->arrays->cookieSz = cookieSz;
|
ssl->arrays->cookieSz = cookieSz;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user