mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
Fixed uninitialized parameter for Base16_Encode
This commit is contained in:
@@ -33404,7 +33404,7 @@ WOLFSSL_DH* wolfSSL_DH_dup(WOLFSSL_DH* dh)
|
|||||||
/* Set the members of DhKey into WOLFSSL_DH
|
/* Set the members of DhKey into WOLFSSL_DH
|
||||||
* Specify elements to set via the 2nd parmeter
|
* Specify elements to set via the 2nd parmeter
|
||||||
*/
|
*/
|
||||||
int SetDhExternal_ex(WOLFSSL_DH *dh, Element_Set elm)
|
int SetDhExternal_ex(WOLFSSL_DH *dh, int elm)
|
||||||
{
|
{
|
||||||
DhKey *key;
|
DhKey *key;
|
||||||
WOLFSSL_MSG("Entering SetDhExternal_ex");
|
WOLFSSL_MSG("Entering SetDhExternal_ex");
|
||||||
@@ -33460,7 +33460,7 @@ int SetDhExternal_ex(WOLFSSL_DH *dh, Element_Set elm)
|
|||||||
*/
|
*/
|
||||||
int SetDhExternal(WOLFSSL_DH *dh)
|
int SetDhExternal(WOLFSSL_DH *dh)
|
||||||
{
|
{
|
||||||
Element_Set elements = ELEMENT_P | ELEMENT_G | ELEMENT_PUB | ELEMENT_PRV;
|
int elements = ELEMENT_P | ELEMENT_G | ELEMENT_PUB | ELEMENT_PRV;
|
||||||
WOLFSSL_MSG("Entering SetDhExternal");
|
WOLFSSL_MSG("Entering SetDhExternal");
|
||||||
return SetDhExternal_ex(dh, elements);
|
return SetDhExternal_ex(dh, elements);
|
||||||
}
|
}
|
||||||
|
@@ -2607,7 +2607,6 @@ static void test_wolfSSL_EVP_PKEY_print_public(void)
|
|||||||
char line1[256] = { 0 };
|
char line1[256] = { 0 };
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
(void)line1;
|
|
||||||
printf(testingFmt, "EVP_PKEY_print_public()");
|
printf(testingFmt, "EVP_PKEY_print_public()");
|
||||||
/* test error cases */
|
/* test error cases */
|
||||||
AssertIntEQ( EVP_PKEY_print_public(NULL,NULL,0,NULL),0L);
|
AssertIntEQ( EVP_PKEY_print_public(NULL,NULL,0,NULL),0L);
|
||||||
@@ -2862,6 +2861,7 @@ static void test_wolfSSL_EVP_PKEY_print_public(void)
|
|||||||
(void)wbio;
|
(void)wbio;
|
||||||
(void)rbio;
|
(void)rbio;
|
||||||
(void)line;
|
(void)line;
|
||||||
|
(void)line1;
|
||||||
(void)i;
|
(void)i;
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
#endif /* OPENSSL_EXTRA */
|
#endif /* OPENSSL_EXTRA */
|
||||||
|
@@ -7225,9 +7225,10 @@ static int PrintHexWithColon(WOLFSSL_BIO* out, const byte* input,
|
|||||||
|
|
||||||
for (in = 0; in < (word32)inlen && ret == WOLFSSL_SUCCESS; in += 15 ) {
|
for (in = 0; in < (word32)inlen && ret == WOLFSSL_SUCCESS; in += 15 ) {
|
||||||
Indent(out, indent);
|
Indent(out, indent);
|
||||||
for (i = 0; i < 15 && in + i < (word32)inlen; i++) {
|
for (i = 0; (i < 15) && (in + i < (word32)inlen); i++) {
|
||||||
|
|
||||||
if (ret == WOLFSSL_SUCCESS) {
|
if (ret == WOLFSSL_SUCCESS) {
|
||||||
|
outSz = sizeof(outHex);
|
||||||
ret = Base16_Encode((const byte*)&data[in + i], 1,
|
ret = Base16_Encode((const byte*)&data[in + i], 1,
|
||||||
outHex, &outSz) == 0;
|
outHex, &outSz) == 0;
|
||||||
}
|
}
|
||||||
@@ -7368,7 +7369,6 @@ static int PrintPubKeyRSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz,
|
|||||||
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
if (wolfSSL_BIO_write(out, line, (int)XSTRLEN(line)) <= 0) {
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
idx = 0;
|
|
||||||
XMEMSET(buff, 0, sizeof(buff));
|
XMEMSET(buff, 0, sizeof(buff));
|
||||||
if (mp_tohex(&a, (char*)buff) != 0) {
|
if (mp_tohex(&a, (char*)buff) != 0) {
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
|
@@ -4827,7 +4827,7 @@ typedef enum elem_set {
|
|||||||
ELEMENT_PUB = 0x08,
|
ELEMENT_PUB = 0x08,
|
||||||
ELEMENT_PRV = 0x10,
|
ELEMENT_PRV = 0x10,
|
||||||
} Element_Set;
|
} Element_Set;
|
||||||
WOLFSSL_LOCAL int SetDhExternal_ex(WOLFSSL_DH *dh, Element_Set elm );
|
WOLFSSL_LOCAL int SetDhExternal_ex(WOLFSSL_DH *dh, int elm );
|
||||||
WOLFSSL_LOCAL int SetDhInternal(WOLFSSL_DH* dh);
|
WOLFSSL_LOCAL int SetDhInternal(WOLFSSL_DH* dh);
|
||||||
WOLFSSL_LOCAL int SetDhExternal(WOLFSSL_DH *dh);
|
WOLFSSL_LOCAL int SetDhExternal(WOLFSSL_DH *dh);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user