00001 00023 #ifndef MBEDTLS_X509_CRL_H 00024 #define MBEDTLS_X509_CRL_H 00025 00026 #if !defined(MBEDTLS_CONFIG_FILE) 00027 #include "config.h" 00028 #else 00029 #include MBEDTLS_CONFIG_FILE 00030 #endif 00031 00032 #include "x509.h" 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00051 typedef struct mbedtls_x509_crl_entry 00052 { 00053 mbedtls_x509_buf raw; 00054 00055 mbedtls_x509_buf serial; 00056 00057 mbedtls_x509_time revocation_date; 00058 00059 mbedtls_x509_buf entry_ext; 00060 00061 struct mbedtls_x509_crl_entry *next; 00062 } 00063 mbedtls_x509_crl_entry; 00064 00069 typedef struct mbedtls_x509_crl 00070 { 00071 mbedtls_x509_buf raw; 00072 mbedtls_x509_buf tbs; 00074 int version; 00075 mbedtls_x509_buf sig_oid; 00077 mbedtls_x509_buf issuer_raw; 00079 mbedtls_x509_name issuer; 00081 mbedtls_x509_time this_update; 00082 mbedtls_x509_time next_update; 00083 00084 mbedtls_x509_crl_entry entry; 00086 mbedtls_x509_buf crl_ext; 00087 00088 mbedtls_x509_buf sig_oid2; 00089 mbedtls_x509_buf sig; 00090 mbedtls_md_type_t sig_md; 00091 mbedtls_pk_type_t sig_pk; 00092 void *sig_opts; 00094 struct mbedtls_x509_crl *next; 00095 } 00096 mbedtls_x509_crl; 00097 00108 int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain, 00109 const unsigned char *buf, size_t buflen ); 00122 int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen ); 00123 00124 #if defined(MBEDTLS_FS_IO) 00125 00135 int mbedtls_x509_crl_parse_file( mbedtls_x509_crl *chain, const char *path ); 00136 #endif /* MBEDTLS_FS_IO */ 00137 00149 int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix, 00150 const mbedtls_x509_crl *crl ); 00151 00157 void mbedtls_x509_crl_init( mbedtls_x509_crl *crl ); 00158 00164 void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ); 00165 00166 /* \} name */ 00167 /* \} addtogroup x509_module */ 00168 00169 #ifdef __cplusplus 00170 } 00171 #endif 00172 00173 #endif /* mbedtls_x509_crl.h */