mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
check CBIOCookie for NULL before trying to call it
This commit is contained in:
@@ -9098,7 +9098,7 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
return BUFFER_ERROR;
|
return BUFFER_ERROR;
|
||||||
if (i + b > totalSz)
|
if (i + b > totalSz)
|
||||||
return INCOMPLETE_DATA;
|
return INCOMPLETE_DATA;
|
||||||
if (ssl->ctx->CBIORecv == NULL) {
|
if (ssl->ctx->CBIOCookie == NULL) {
|
||||||
CYASSL_MSG("Your Cookie callback is null, please set");
|
CYASSL_MSG("Your Cookie callback is null, please set");
|
||||||
return COOKIE_ERROR;
|
return COOKIE_ERROR;
|
||||||
}
|
}
|
||||||
@@ -9413,7 +9413,7 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
output[idx++] = ssl->chVersion.minor;
|
output[idx++] = ssl->chVersion.minor;
|
||||||
|
|
||||||
output[idx++] = cookieSz;
|
output[idx++] = cookieSz;
|
||||||
if (ssl->ctx->CBIORecv == NULL) {
|
if (ssl->ctx->CBIOCookie == NULL) {
|
||||||
CYASSL_MSG("Your Cookie callback is null, please set");
|
CYASSL_MSG("Your Cookie callback is null, please set");
|
||||||
return COOKIE_ERROR;
|
return COOKIE_ERROR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user