diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-05-25 20:55:29 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-05-25 20:55:29 +0300 |
commit | 32b752ef8f0c82a97b1d969a8019463a17ab12b1 (patch) | |
tree | 940e2c521d19545608bf052a576f88e4ff427b33 /src/tls/x509v3.h | |
parent | 969b403fa732f9a662fb68efd6fcc6f1c26f1200 (diff) | |
download | external_wpa_supplicant_8_ti-32b752ef8f0c82a97b1d969a8019463a17ab12b1.zip external_wpa_supplicant_8_ti-32b752ef8f0c82a97b1d969a8019463a17ab12b1.tar.gz external_wpa_supplicant_8_ti-32b752ef8f0c82a97b1d969a8019463a17ab12b1.tar.bz2 |
Internal TLS: Fix X.509 name handling to use sequency of attributes
There may be more than one attribute of same type (e.g., multiple DC
attributes), so the code needs to be able to handle that. Replace the
fixed structure with an array of attributes.
Diffstat (limited to 'src/tls/x509v3.h')
-rw-r--r-- | src/tls/x509v3.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/tls/x509v3.h b/src/tls/x509v3.h index e7d96ad..37292d7 100644 --- a/src/tls/x509v3.h +++ b/src/tls/x509v3.h @@ -21,14 +21,25 @@ struct x509_algorithm_identifier { struct asn1_oid oid; }; +struct x509_name_attr { + enum x509_name_attr_type { + X509_NAME_ATTR_NOT_USED, + X509_NAME_ATTR_DC, + X509_NAME_ATTR_CN, + X509_NAME_ATTR_C, + X509_NAME_ATTR_L, + X509_NAME_ATTR_ST, + X509_NAME_ATTR_O, + X509_NAME_ATTR_OU + } type; + char *value; +}; + +#define X509_MAX_NAME_ATTRIBUTES 20 + struct x509_name { - char *dc; /* domainComponent */ - char *cn; /* commonName */ - char *c; /* countryName */ - char *l; /* localityName */ - char *st; /* stateOrProvinceName */ - char *o; /* organizationName */ - char *ou; /* organizationalUnitName */ + struct x509_name_attr attr[X509_MAX_NAME_ATTRIBUTES]; + size_t num_attr; char *email; /* emailAddress */ /* from alternative name extension */ |