Added certificatePolicy support to x509 plugin

This commit is contained in:
Martin Willi
2011-01-05 16:46:02 +01:00
parent 1038d9fee5
commit 20bd78106e
5 changed files with 188 additions and 11 deletions
@@ -27,6 +27,7 @@
#define X509_NO_PATH_LEN_CONSTRAINT -1
typedef struct x509_t x509_t;
typedef struct x509_cert_policy_t x509_cert_policy_t;
typedef enum x509_flag_t x509_flag_t;
/**
@@ -53,6 +54,18 @@ enum x509_flag_t {
X509_CRL_SIGN = (1<<7),
};
/**
* X.509 certPolicy extension.
*/
struct x509_cert_policy_t {
/** OID of certPolicy */
chunk_t oid;
/** Certification Practice Statement URI qualifier */
char *cps_uri;
/** UserNotice Text qualifier */
char *unotice_text;
};
/**
* X.509 certificate interface.
*
@@ -136,6 +149,13 @@ struct x509_t {
* @return enumerator over subtrees as identification_t
*/
enumerator_t* (*create_name_constraint_enumerator)(x509_t *this, bool perm);
/**
* Create an enumerator over certificate policies.
*
* @return enumerator over x509_cert_policy_t
*/
enumerator_t* (*create_cert_policy_enumerator)(x509_t *this);
};
#endif /** X509_H_ @}*/