mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
Fixes for CID 185033 185028 185142 185064 185068 185079 185147
This commit is contained in:
@@ -134,7 +134,7 @@ static int wolfSSL_BIO_SSL_read(WOLFSSL_BIO* bio, void* buf,
|
|||||||
WOLFSSL_ENTER("wolfSSL_BIO_SSL_write");
|
WOLFSSL_ENTER("wolfSSL_BIO_SSL_write");
|
||||||
|
|
||||||
/* already got eof, again is error */
|
/* already got eof, again is error */
|
||||||
if (bio && front->eof)
|
if (front->eof)
|
||||||
return WOLFSSL_FATAL_ERROR;
|
return WOLFSSL_FATAL_ERROR;
|
||||||
|
|
||||||
ret = wolfSSL_read(bio->ssl, buf, len);
|
ret = wolfSSL_read(bio->ssl, buf, len);
|
||||||
|
@@ -247,6 +247,8 @@ static int CheckCertCRLList(WOLFSSL_CRL* crl, DecodedCert* cert, int *pFoundEntr
|
|||||||
ca = GetCA(crl->cm, issuerHash);
|
ca = GetCA(crl->cm, issuerHash);
|
||||||
#endif /* NO_SKID */
|
#endif /* NO_SKID */
|
||||||
if (ca == NULL) {
|
if (ca == NULL) {
|
||||||
|
XFREE(sig, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
|
||||||
|
XFREE(tbs, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
|
||||||
WOLFSSL_MSG("Did NOT find CRL issuer CA");
|
WOLFSSL_MSG("Did NOT find CRL issuer CA");
|
||||||
return ASN_CRL_NO_SIGNER_E;
|
return ASN_CRL_NO_SIGNER_E;
|
||||||
}
|
}
|
||||||
|
@@ -11744,10 +11744,10 @@ static INLINE void RmdRounds(int rounds, const byte* data, int sz)
|
|||||||
RipeMd ripemd;
|
RipeMd ripemd;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
wc_InitRipeMd(&ripemd);
|
(void)wc_InitRipeMd(&ripemd);
|
||||||
|
|
||||||
for (i = 0; i < rounds; i++)
|
for (i = 0; i < rounds; i++)
|
||||||
wc_RipeMdUpdate(&ripemd, data, sz);
|
(void)wc_RipeMdUpdate(&ripemd, data, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -14681,11 +14681,13 @@ int SendAlert(WOLFSSL* ssl, int severity, int type)
|
|||||||
if ((ret = CheckAvailableSize(ssl, outputSz)) != 0)
|
if ((ret = CheckAvailableSize(ssl, outputSz)) != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/* Check output buffer */
|
||||||
|
if (ssl->buffers.outputBuffer.buffer == NULL)
|
||||||
|
return BUFFER_E;
|
||||||
|
|
||||||
/* get output buffer */
|
/* get output buffer */
|
||||||
output = ssl->buffers.outputBuffer.buffer +
|
output = ssl->buffers.outputBuffer.buffer +
|
||||||
ssl->buffers.outputBuffer.length;
|
ssl->buffers.outputBuffer.length;
|
||||||
if (output == NULL)
|
|
||||||
return BUFFER_E;
|
|
||||||
|
|
||||||
input[0] = (byte)severity;
|
input[0] = (byte)severity;
|
||||||
input[1] = (byte)type;
|
input[1] = (byte)type;
|
||||||
@@ -18380,7 +18382,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ssl->peerEccKey == NULL) {
|
if (ssl->peerEccKey == NULL) {
|
||||||
AllocKey(ssl, DYNAMIC_TYPE_ECC,
|
ret = AllocKey(ssl, DYNAMIC_TYPE_ECC,
|
||||||
(void**)&ssl->peerEccKey);
|
(void**)&ssl->peerEccKey);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto exit_dske;
|
goto exit_dske;
|
||||||
|
@@ -651,9 +651,10 @@ OcspResponse* wolfSSL_d2i_OCSP_RESPONSE_bio(WOLFSSL_BIO* bio,
|
|||||||
l = XFTELL(bio->file);
|
l = XFTELL(bio->file);
|
||||||
if (l < 0)
|
if (l < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
XFSEEK(bio->file, i, SEEK_SET);
|
if (XFSEEK(bio->file, i, SEEK_SET) != 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/* check calulated length */
|
/* check calculated length */
|
||||||
if (l - i <= 0)
|
if (l - i <= 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@@ -29186,11 +29186,13 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
|
|||||||
i = XFTELL(bp->file);
|
i = XFTELL(bp->file);
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
XFSEEK(bp->file, 0, SEEK_END);
|
if (XFSEEK(bp->file, 0, SEEK_END) != 0)
|
||||||
|
return NULL;
|
||||||
l = XFTELL(bp->file);
|
l = XFTELL(bp->file);
|
||||||
if (l < 0)
|
if (l < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
XFSEEK(bp->file, i, SEEK_SET);
|
if (XFSEEK(bp->file, i, SEEK_SET) != 0)
|
||||||
|
return NULL;
|
||||||
#else
|
#else
|
||||||
WOLFSSL_MSG("Unable to read file with NO_FILESYSTEM defined");
|
WOLFSSL_MSG("Unable to read file with NO_FILESYSTEM defined");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user