00001 00027 #ifndef POLARSSL_X509_CRL_H 00028 #define POLARSSL_X509_CRL_H 00029 00030 #include "config.h" 00031 00032 #include "x509.h" 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00051 typedef struct _x509_crl_entry 00052 { 00053 x509_buf raw; 00054 00055 x509_buf serial; 00056 00057 x509_time revocation_date; 00058 00059 x509_buf entry_ext; 00060 00061 struct _x509_crl_entry *next; 00062 } 00063 x509_crl_entry; 00064 00069 typedef struct _x509_crl 00070 { 00071 x509_buf raw; 00072 x509_buf tbs; 00074 int version; 00075 x509_buf sig_oid1; 00076 00077 x509_buf issuer_raw; 00079 x509_name issuer; 00081 x509_time this_update; 00082 x509_time next_update; 00083 00084 x509_crl_entry entry; 00086 x509_buf crl_ext; 00087 00088 x509_buf sig_oid2; 00089 x509_buf sig; 00090 md_type_t sig_md; 00091 pk_type_t sig_pk ; 00092 00093 struct _x509_crl *next; 00094 } 00095 x509_crl; 00096 00107 int x509_crl_parse( x509_crl *chain, const unsigned char *buf, size_t buflen ); 00108 00109 #if defined(POLARSSL_FS_IO) 00110 00119 int x509_crl_parse_file( x509_crl *chain, const char *path ); 00120 #endif /* POLARSSL_FS_IO */ 00121 00133 int x509_crl_info( char *buf, size_t size, const char *prefix, 00134 const x509_crl *crl ); 00135 00141 void x509_crl_init( x509_crl *crl ); 00142 00148 void x509_crl_free( x509_crl *crl ); 00149 00150 /* \} name */ 00151 /* \} addtogroup x509_module */ 00152 00153 #ifdef __cplusplus 00154 } 00155 #endif 00156 00157 #endif /* x509_crl.h */