Remove parsing of rfc822Name
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
a2939e8728
commit
8a13866f65
2 changed files with 1 additions and 27 deletions
|
@ -570,8 +570,7 @@ int mbedtls_x509_crt_parse_path(mbedtls_x509_crt *chain, const char *path);
|
|||
* \param san The target structure to populate with the parsed presentation
|
||||
* of the subject alternative name encoded in \p san_raw.
|
||||
*
|
||||
* \note Only "dnsName" and "otherName" and "rfc822Name" of type hardware_module_name
|
||||
* as defined in RFC 4180 is supported.
|
||||
* \note Only "dnsName" and "otherName" as defined in RFC 5280 are supported.
|
||||
*
|
||||
* \note This function should be called on a single raw data of
|
||||
* subject alternative name. For example, after successful
|
||||
|
|
|
@ -1918,31 +1918,6 @@ int mbedtls_x509_parse_subject_alt_name(const mbedtls_x509_buf *san_buf,
|
|||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* RFC822 Name
|
||||
*/
|
||||
case (MBEDTLS_ASN1_SEQUENCE | MBEDTLS_X509_SAN_RFC822_NAME):
|
||||
{
|
||||
mbedtls_x509_name rfc822Name;
|
||||
unsigned char *bufferPointer = san_buf->p;
|
||||
unsigned char **p = &bufferPointer;
|
||||
const unsigned char *end = san_buf->p + san_buf->len;
|
||||
|
||||
/* The leading ASN1 tag and length has been processed. Stepping back with 2 bytes, because mbedtls_x509_get_name expects the beginning of the SET tag */
|
||||
*p = *p - 2;
|
||||
|
||||
ret = mbedtls_x509_get_name(p, end, &rfc822Name);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
memset(san, 0, sizeof(mbedtls_x509_subject_alternative_name));
|
||||
san->type = MBEDTLS_X509_SAN_OTHER_NAME;
|
||||
memcpy(&san->san.unstructured_name,
|
||||
&rfc822Name, sizeof(rfc822Name));
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* Type not supported
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue