added parsing level to x509_create_from_chunk() and added is_ocsp_signer() method

This commit is contained in:
Andreas Steffen
2007-03-07 22:57:50 +00:00
parent 78703918aa
commit 8dfb0a31b5
2 changed files with 42 additions and 7 deletions
+16 -1
View File
@@ -31,6 +31,13 @@ typedef struct x509_t x509_t;
#include <utils/identification.h>
#include <utils/iterator.h>
/* authority flags */
#define AUTH_NONE 0x00 /* no authorities */
#define AUTH_CA 0x01 /* certification authority */
#define AUTH_AA 0x02 /* authorization authority */
#define AUTH_OCSP 0x04 /* ocsp signing authority */
/**
* @brief X.509 certificate.
*
@@ -210,6 +217,14 @@ struct x509_t {
*/
bool (*is_ca) (const x509_t *this);
/**
* @brief Returns the OCSPSigner extended key usage flag
*
* @param this certificate being examined
* @return TRUE if the OCSPSigner flag is set
*/
bool (*is_ocsp_signer) (const x509_t *this);
/**
* @brief Checks if the certificate is self-signed (subject equals issuer)
*
@@ -234,7 +249,7 @@ struct x509_t {
*
* @ingroup transforms
*/
x509_t *x509_create_from_chunk(chunk_t chunk);
x509_t *x509_create_from_chunk(chunk_t chunk, u_int level);
/**
* @brief Read a x509 certificate from a DER encoded file.