mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Correct cast from uint to uchar
This commit is contained in:
@ -10187,7 +10187,7 @@ int wc_OBJ_sn2nid(const char *sn)
|
|||||||
sn = "SECP256R1";
|
sn = "SECP256R1";
|
||||||
/* OpenSSL allows lowercase curve names */
|
/* OpenSSL allows lowercase curve names */
|
||||||
for (i = 0; i < (int)(sizeof(curveName) - 1) && *sn; i++) {
|
for (i = 0; i < (int)(sizeof(curveName) - 1) && *sn; i++) {
|
||||||
curveName[i] = (char)XTOUPPER((unsigned int) *sn++);
|
curveName[i] = (char)XTOUPPER((unsigned char) *sn++);
|
||||||
}
|
}
|
||||||
curveName[i] = '\0';
|
curveName[i] = '\0';
|
||||||
/* find based on name and return NID */
|
/* find based on name and return NID */
|
||||||
|
@ -3695,7 +3695,7 @@ const WOLFSSL_EVP_MD *wolfSSL_EVP_get_digestbyname(const char *name)
|
|||||||
const struct s_ent *ent;
|
const struct s_ent *ent;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(nameUpper) && name[i] != '\0'; i++) {
|
for (i = 0; i < sizeof(nameUpper) && name[i] != '\0'; i++) {
|
||||||
nameUpper[i] = (char)XTOUPPER((unsigned int) name[i]);
|
nameUpper[i] = (char)XTOUPPER((unsigned char) name[i]);
|
||||||
}
|
}
|
||||||
if (i < sizeof(nameUpper))
|
if (i < sizeof(nameUpper))
|
||||||
nameUpper[i] = '\0';
|
nameUpper[i] = '\0';
|
||||||
|
Reference in New Issue
Block a user