mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-13 17:44:48 +02:00
Addressed code review
This commit is contained in:
@@ -375,7 +375,6 @@ void rzn2l_tst_thread_entry(void *pvParameters)
|
|||||||
TCPInit();
|
TCPInit();
|
||||||
|
|
||||||
int TCP_connect_retry = 0;
|
int TCP_connect_retry = 0;
|
||||||
printf("\n");
|
|
||||||
printf("Start TLS Connection to %s port(%d)\n", SERVER_IP, DEFAULT_PORT);
|
printf("Start TLS Connection to %s port(%d)\n", SERVER_IP, DEFAULT_PORT);
|
||||||
wolfSSL_TLS_client_init();
|
wolfSSL_TLS_client_init();
|
||||||
|
|
||||||
@@ -410,7 +409,7 @@ void rzn2l_tst_thread_entry(void *pvParameters)
|
|||||||
|
|
||||||
int TCP_connect_retry = 0;
|
int TCP_connect_retry = 0;
|
||||||
|
|
||||||
printf("\n Start TLS Accept at %03d.%03d.%03d.%03d port(%d)\n",
|
printf("Start TLS Accept at %03d.%03d.%03d.%03d port(%d)\n",
|
||||||
ucIPAddress[0],
|
ucIPAddress[0],
|
||||||
ucIPAddress[1],
|
ucIPAddress[1],
|
||||||
ucIPAddress[2],
|
ucIPAddress[2],
|
||||||
|
@@ -732,12 +732,10 @@ static int rsip_rsa_SignVerify_test(int prnt, int keySize, int devId)
|
|||||||
|
|
||||||
RsaKey *key = (RsaKey *)XMALLOC(sizeof *key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
RsaKey *key = (RsaKey *)XMALLOC(sizeof *key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
word32 sigSz;
|
|
||||||
const char inStr [] = TEST_STRING;
|
const char inStr [] = TEST_STRING;
|
||||||
const char inStr2[] = TEST_STRING2;
|
const char inStr2[] = TEST_STRING2;
|
||||||
const word32 inLen = (word32)TEST_STRING_SZ;
|
const word32 inLen = (word32)TEST_STRING_SZ;
|
||||||
const word32 outSz = RSA_TEST_BYTES;
|
const word32 outSz = RSA_TEST_BYTES;
|
||||||
(void)sigSz;
|
|
||||||
|
|
||||||
byte *in = NULL;
|
byte *in = NULL;
|
||||||
byte *in2 = NULL;
|
byte *in2 = NULL;
|
||||||
@@ -781,7 +779,7 @@ static int rsip_rsa_SignVerify_test(int prnt, int keySize, int devId)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
sigSz = (word32)ret;
|
|
||||||
//* this should fail */
|
//* this should fail */
|
||||||
ret = wc_RsaSSL_Verify(in2, inLen, out, (word32)(keySize/8), key);
|
ret = wc_RsaSSL_Verify(in2, inLen, out, (word32)(keySize/8), key);
|
||||||
if (ret != FSP_ERR_CRYPTO_RSIP_FAIL) {
|
if (ret != FSP_ERR_CRYPTO_RSIP_FAIL) {
|
||||||
|
@@ -430,7 +430,7 @@ int wc_CryptoCb_CryptInitRenesasCmn(struct WOLFSSL* ssl, void* ctx)
|
|||||||
* first. On that time, internal instance has not yet been allocated.
|
* first. On that time, internal instance has not yet been allocated.
|
||||||
*/
|
*/
|
||||||
if (cbInfo->internal == NULL) {
|
if (cbInfo->internal == NULL) {
|
||||||
if (!ssl)
|
if (ssl)
|
||||||
cbInfo->internal =
|
cbInfo->internal =
|
||||||
(FSPSM_ST_Internal*)XMALLOC(internal_sz, ssl->heap,
|
(FSPSM_ST_Internal*)XMALLOC(internal_sz, ssl->heap,
|
||||||
DYNAMIC_TYPE_TMP_BUFFER);
|
DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
|
Reference in New Issue
Block a user