mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
review addressed
This commit is contained in:
@@ -7817,7 +7817,7 @@ void FreeKey(WOLFSSL* ssl, int type, void** pKey)
|
|||||||
int AllocKey(WOLFSSL* ssl, int type, void** pKey)
|
int AllocKey(WOLFSSL* ssl, int type, void** pKey)
|
||||||
{
|
{
|
||||||
int ret = WC_NO_ERR_TRACE(BAD_FUNC_ARG);
|
int ret = WC_NO_ERR_TRACE(BAD_FUNC_ARG);
|
||||||
int sz = 0;
|
size_t sz = 0;
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
ecc_key* eccKey;
|
ecc_key* eccKey;
|
||||||
#endif /* HAVE_ECC */
|
#endif /* HAVE_ECC */
|
||||||
@@ -7894,7 +7894,7 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate memory for key */
|
/* Allocate memory for key */
|
||||||
*pKey = (void *)XMALLOC((size_t)sz, ssl->heap, type);
|
*pKey = (void *)XMALLOC(sz, ssl->heap, type);
|
||||||
if (*pKey == NULL) {
|
if (*pKey == NULL) {
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
}
|
}
|
||||||
@@ -20715,7 +20715,7 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (IsEncryptionOn(ssl, 0)) {
|
if (IsEncryptionOn(ssl, 0)) {
|
||||||
int ivExtra = 0;
|
word32 ivExtra = 0;
|
||||||
#ifndef WOLFSSL_AEAD_ONLY
|
#ifndef WOLFSSL_AEAD_ONLY
|
||||||
if (ssl->specs.cipher_type == block) {
|
if (ssl->specs.cipher_type == block) {
|
||||||
if (ssl->options.tls1_1)
|
if (ssl->options.tls1_1)
|
||||||
@@ -20727,7 +20727,7 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
|
|||||||
if (CipherHasExpIV(ssl))
|
if (CipherHasExpIV(ssl))
|
||||||
ivExtra = AESGCM_EXP_IV_SZ;
|
ivExtra = AESGCM_EXP_IV_SZ;
|
||||||
}
|
}
|
||||||
dataSz -= (word32)ivExtra;
|
dataSz -= ivExtra;
|
||||||
dataSz -= ssl->keys.padSz;
|
dataSz -= ssl->keys.padSz;
|
||||||
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
||||||
if (ssl->options.startedETMRead)
|
if (ssl->options.startedETMRead)
|
||||||
|
Reference in New Issue
Block a user