mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 03:30:49 +02:00
Merge pull request #10708 from rlm2002/support-fixes
Support fixes - various reports
This commit is contained in:
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
|
||||
wolfSSL_CIPHER_get_name(wolfSSL_get_current_cipher(ssl)));
|
||||
|
||||
wolfSSL_write(ssl, response, (int)strlen(response));
|
||||
int got = wolfSSL_read(ssl, buffer, sizeof(buffer));
|
||||
int got = wolfSSL_read(ssl, buffer, sizeof(buffer) - 1);
|
||||
if (got > 0) {
|
||||
buffer[got] = 0;
|
||||
printf("server said: %s\n", buffer);
|
||||
|
||||
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
|
||||
printf("Cipher Suite is %s\n",
|
||||
wolfSSL_CIPHER_get_name(wolfSSL_get_current_cipher(ssl)));
|
||||
|
||||
int got = wolfSSL_read(ssl, buffer, sizeof(buffer));
|
||||
int got = wolfSSL_read(ssl, buffer, sizeof(buffer) - 1);
|
||||
if (got > 0) {
|
||||
buffer[got] = 0;
|
||||
printf("client said: %s\n", buffer);
|
||||
|
||||
@@ -24467,6 +24467,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
/* in buffer */
|
||||
ret |= wc_Md5Update(&md5, in, sz);
|
||||
if (ret != 0) {
|
||||
wc_Md5Free(&md5);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24478,6 +24479,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
}
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
wc_Md5Free(&md5);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24487,6 +24489,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
ret |= wc_Md5Update(&md5, PAD2, padSz);
|
||||
ret |= wc_Md5Update(&md5, result, digestSz);
|
||||
if (ret != 0) {
|
||||
wc_Md5Free(&md5);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24498,6 +24501,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
}
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
wc_Md5Free(&md5);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24517,6 +24521,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
/* in buffer */
|
||||
ret |= wc_ShaUpdate(&sha, in, sz);
|
||||
if (ret != 0) {
|
||||
wc_ShaFree(&sha);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24528,6 +24533,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
}
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
wc_ShaFree(&sha);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24537,6 +24543,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
ret |= wc_ShaUpdate(&sha, PAD2, padSz);
|
||||
ret |= wc_ShaUpdate(&sha, result, digestSz);
|
||||
if (ret != 0) {
|
||||
wc_ShaFree(&sha);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
@@ -24548,6 +24555,7 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
}
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
wc_ShaFree(&sha);
|
||||
WOLFSSL_ERROR_VERBOSE(VERIFY_MAC_ERROR);
|
||||
return VERIFY_MAC_ERROR;
|
||||
}
|
||||
|
||||
+7
-4
@@ -9729,9 +9729,10 @@ int wc_ecc_import_point_der_ex(const byte* in, word32 inLen,
|
||||
alt_fp_init(point->z);
|
||||
#else
|
||||
err = mp_init_multi(point->x, point->y, point->z, NULL, NULL, NULL);
|
||||
#endif
|
||||
|
||||
if (err != MP_OKAY)
|
||||
return MEMORY_E;
|
||||
#endif
|
||||
|
||||
/* check for point type (4, 2, or 3) */
|
||||
pointType = in[0];
|
||||
@@ -11029,9 +11030,10 @@ static int _ecc_import_x963_ex2(const byte* in, word32 inLen, ecc_key* key,
|
||||
key->kb, key->ku
|
||||
#endif
|
||||
);
|
||||
|
||||
if (err != MP_OKAY)
|
||||
return MEMORY_E;
|
||||
#endif
|
||||
if (err != MP_OKAY)
|
||||
return MEMORY_E;
|
||||
#ifdef WOLFSSL_ECC_BLIND_K
|
||||
mp_forcezero(key->kb);
|
||||
#endif
|
||||
@@ -12093,9 +12095,10 @@ static int _ecc_import_raw_private(ecc_key* key, const char* qx,
|
||||
key->kb, key->ku
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
||||
if (err != MP_OKAY)
|
||||
return MEMORY_E;
|
||||
#endif
|
||||
#ifdef WOLFSSL_ECC_BLIND_K
|
||||
mp_forcezero(key->kb);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user