1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Fix code style

Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
Agathiyan Bragadeesh
2023-08-22 17:50:00 +01:00
parent 4606bf3f38
commit 15df01240d
2 changed files with 9 additions and 12 deletions

View File

@ -867,8 +867,7 @@ int mbedtls_x509_dn_gets(char *buf, size_t size, const mbedtls_x509_name *dn)
print_hexstring = 1;
} else if (ret == MBEDTLS_ERR_OID_BUF_TOO_SMALL) {
return MBEDTLS_ERR_X509_BUFFER_TOO_SMALL;
}
else {
} else {
ret = mbedtls_snprintf(p, n, "\?\?=");
}
}
@ -921,8 +920,7 @@ int mbedtls_x509_dn_gets(char *buf, size_t size, const mbedtls_x509_name *dn)
// Special characters requiring escaping, RFC 4514 Section 2.4
if (c == '\0') {
return MBEDTLS_ERR_X509_INVALID_NAME;
}
else {
} else {
if (strchr(",=+<>;\"\\", c) ||
((i == 0) && strchr("# ", c)) ||
((i == name->val.len-1) && (c == ' '))) {

View File

@ -288,8 +288,7 @@ int mbedtls_x509_string_to_names(mbedtls_asn1_named_data **head, const char *nam
if (numericoid) {
mbedtls_free(oid.p);
return MBEDTLS_ERR_X509_INVALID_NAME;
}
else {
} else {
if ((parse_ret =
parse_attribute_value_string(s, (int) (c - s), data,
&data_len)) != 0) {