Refactor code in cert_write.c
This way is more robust. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
7c86974d6d
commit
f994bc51ad
1 changed files with 3 additions and 1 deletions
|
@ -622,7 +622,9 @@ usage:
|
|||
goto usage;
|
||||
}
|
||||
|
||||
if (strcmp(q, "IP") != 0 && strcmp(q, "DN") != 0) {
|
||||
if (cur->node.type == MBEDTLS_X509_SAN_RFC822_NAME ||
|
||||
cur->node.type == MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER ||
|
||||
cur->node.type == MBEDTLS_X509_SAN_DNS_NAME) {
|
||||
cur->node.san.unstructured_name.p = (unsigned char *) subtype_value;
|
||||
cur->node.san.unstructured_name.len = strlen(subtype_value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue