Fix Windows x64 build errors with type conversions

Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
Agathiyan Bragadeesh 2023-08-04 14:57:36 +01:00
parent 39ba121d3a
commit 7f639fc7ab
2 changed files with 3 additions and 4 deletions

View file

@ -826,9 +826,8 @@ static char nibble_to_hex_digit(int i)
int mbedtls_x509_dn_gets(char *buf, size_t size, const mbedtls_x509_name *dn)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t i, j, n, asn1_len_size;
size_t i, j, n, asn1_len_size, asn1_len_start;
unsigned char asn1_len_buf[5];
int asn1_len_start;
unsigned char *asn1_len_p;
unsigned char c, merge = 0;
const mbedtls_x509_name *name;

View file

@ -296,7 +296,7 @@ int mbedtls_x509_string_to_names(mbedtls_asn1_named_data **head, const char *nam
if (!in_tag && ((*c == ',' && *(c-1) != '\\') || c == end)) {
if (!numericoid) {
if ((parse_ret = parse_attribute_value_string(s, c - s, data, &data_len)) != 0) {
if ((parse_ret = parse_attribute_value_string(s, (int) (c - s), data, &data_len)) != 0) {
return parse_ret;
}
tag = attr_descr->default_tag;
@ -304,7 +304,7 @@ int mbedtls_x509_string_to_names(mbedtls_asn1_named_data **head, const char *nam
if (numericoid) {
#if defined(MBEDTLS_ASN1_PARSE_C)
if ((parse_ret =
parse_attribute_value_ber_encoded(s, c - s, data, &data_len, &tag)) != 0) {
parse_attribute_value_ber_encoded(s, (int) (c - s), data, &data_len, &tag)) != 0) {
return parse_ret;
}
#else