forked from wolfSSL/wolfssl
Use signed variable for length calculation in SendTls13Certificate
This commit is contained in:
@ -8459,12 +8459,13 @@ static int SendTls13Certificate(WOLFSSL* ssl)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
word32 certSz, certChainSz, headerSz, listSz, payloadSz;
|
word32 certSz, certChainSz, headerSz, listSz, payloadSz;
|
||||||
word16 extSz = 0;
|
word16 extSz = 0;
|
||||||
word32 length, maxFragment;
|
word32 maxFragment;
|
||||||
word32 len = 0;
|
word32 len = 0;
|
||||||
word32 idx = 0;
|
word32 idx = 0;
|
||||||
word32 offset = OPAQUE16_LEN;
|
word32 offset = OPAQUE16_LEN;
|
||||||
byte* p = NULL;
|
byte* p = NULL;
|
||||||
byte certReqCtxLen = 0;
|
byte certReqCtxLen = 0;
|
||||||
|
sword32 length;
|
||||||
#ifdef WOLFSSL_POST_HANDSHAKE_AUTH
|
#ifdef WOLFSSL_POST_HANDSHAKE_AUTH
|
||||||
byte* certReqCtx = NULL;
|
byte* certReqCtx = NULL;
|
||||||
#endif
|
#endif
|
||||||
@ -8510,7 +8511,7 @@ static int SendTls13Certificate(WOLFSSL* ssl)
|
|||||||
listSz = 0;
|
listSz = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!ssl->buffers.certificate) {
|
if (!ssl->buffers.certificate || !ssl->buffers.certificate) {
|
||||||
WOLFSSL_MSG("Send Cert missing certificate buffer");
|
WOLFSSL_MSG("Send Cert missing certificate buffer");
|
||||||
return NO_CERT_ERROR;
|
return NO_CERT_ERROR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user