Renaming x509_get_subject_alt_name to x509_get_general_names and mbedtls_x509_parse_subject_alt_name to mbedtls_x509_parse_general_name so they can be used not only to collect subject alt name, but the V3 authority cert issuer that is also GeneralName type.

Also updated the x509_get_general_names function to be able to parse rfc822Names

Test are also updated according these changes.

Signed-off-by: toth92g <toth92g@gmail.com>
This commit is contained in:
toth92g 2021-05-10 15:16:33 +02:00 committed by Przemek Stekiel
parent 5042b104c2
commit 8d435a0c8b
5 changed files with 375 additions and 107 deletions

View file

@ -248,7 +248,7 @@ typedef mbedtls_asn1_sequence mbedtls_x509_sequence;
*/
typedef struct mbedtls_x509_authority {
mbedtls_x509_buf keyIdentifier;
mbedtls_x509_name authorityCertIssuer;
mbedtls_x509_sequence authorityCertIssuer;
mbedtls_x509_buf authorityCertSerialNumber;
mbedtls_x509_buf raw;
}