#include "polarssl/config.h"#include "polarssl/x509_crl.h"#include "polarssl/oid.h"#include "polarssl/pem.h"#include <string.h>#include <stdlib.h>#include <time.h>#include <stdio.h>
Go to the source code of this file.
Defines | |
| #define | polarssl_malloc malloc |
| #define | polarssl_free free |
| #define | POLARSSL_ERR_DEBUG_BUF_TOO_SMALL -2 |
| #define | SAFE_SNPRINTF() |
| #define | BEFORE_COLON 14 |
| #define | BC "14" |
Functions | |
| static int | x509_crl_get_version (unsigned char **p, const unsigned char *end, int *ver) |
| static int | x509_get_crl_ext (unsigned char **p, const unsigned char *end, x509_buf *ext) |
| static int | x509_get_crl_entry_ext (unsigned char **p, const unsigned char *end, x509_buf *ext) |
| static int | x509_get_entries (unsigned char **p, const unsigned char *end, x509_crl_entry *entry) |
| int | x509_crl_parse (x509_crl *chain, const unsigned char *buf, size_t buflen) |
| Parse one or more CRLs and add them to the chained list. | |
| int | x509_crl_parse_file (x509_crl *chain, const char *path) |
| Load one or more CRLs and add them to the chained list. | |
| int | x509_crl_info (char *buf, size_t size, const char *prefix, const x509_crl *crl) |
| Returns an informational string about the CRL. | |
| void | x509_crl_init (x509_crl *crl) |
| Initialize a CRL (chain). | |
| void | x509_crl_free (x509_crl *crl) |
| Unallocate all CRL data. | |
| #define BC "14" |
Definition at line 604 of file x509_crl.c.
Referenced by x509_crt_info(), and x509_csr_info().
| #define BEFORE_COLON 14 |
Definition at line 603 of file x509_crl.c.
Referenced by x509_crt_info(), and x509_csr_info().
| #define POLARSSL_ERR_DEBUG_BUF_TOO_SMALL -2 |
Definition at line 584 of file x509_crl.c.
| #define polarssl_free free |
Definition at line 51 of file x509_crl.c.
| #define polarssl_malloc malloc |
Definition at line 50 of file x509_crl.c.
| #define SAFE_SNPRINTF | ( | ) |
{ \
if( ret == -1 ) \
return( -1 ); \
\
if ( (unsigned int) ret > n ) { \
p[n - 1] = '\0'; \
return POLARSSL_ERR_DEBUG_BUF_TOO_SMALL;\
} \
\
n -= (unsigned int) ret; \
p += (unsigned int) ret; \
}
Definition at line 586 of file x509_crl.c.
| static int x509_crl_get_version | ( | unsigned char ** | p, | |
| const unsigned char * | end, | |||
| int * | ver | |||
| ) | [static] |
Definition at line 70 of file x509_crl.c.
References asn1_get_int(), POLARSSL_ERR_ASN1_UNEXPECTED_TAG, and POLARSSL_ERR_X509_INVALID_VERSION.
Referenced by x509_crl_parse().
| static int x509_get_crl_entry_ext | ( | unsigned char ** | p, | |
| const unsigned char * | end, | |||
| x509_buf * | ext | |||
| ) | [static] |
Definition at line 128 of file x509_crl.c.
References ASN1_CONSTRUCTED, asn1_get_tag(), ASN1_SEQUENCE, _asn1_buf::len, _asn1_buf::p, POLARSSL_ERR_ASN1_LENGTH_MISMATCH, POLARSSL_ERR_ASN1_UNEXPECTED_TAG, POLARSSL_ERR_X509_INVALID_EXTENSIONS, and _asn1_buf::tag.
Referenced by x509_get_entries().
| static int x509_get_crl_ext | ( | unsigned char ** | p, | |
| const unsigned char * | end, | |||
| x509_buf * | ext | |||
| ) | [static] |
Definition at line 93 of file x509_crl.c.
References ASN1_CONSTRUCTED, asn1_get_tag(), ASN1_SEQUENCE, POLARSSL_ERR_ASN1_LENGTH_MISMATCH, POLARSSL_ERR_ASN1_UNEXPECTED_TAG, POLARSSL_ERR_X509_INVALID_EXTENSIONS, and x509_get_ext().
Referenced by x509_crl_parse().
| static int x509_get_entries | ( | unsigned char ** | p, | |
| const unsigned char * | end, | |||
| x509_crl_entry * | entry | |||
| ) | [static] |
Definition at line 182 of file x509_crl.c.
References ASN1_CONSTRUCTED, asn1_get_tag(), ASN1_SEQUENCE, _x509_crl_entry::entry_ext, _asn1_buf::len, _x509_crl_entry::next, _asn1_buf::p, POLARSSL_ERR_ASN1_UNEXPECTED_TAG, POLARSSL_ERR_X509_MALLOC_FAILED, polarssl_malloc, _x509_crl_entry::raw, _x509_crl_entry::revocation_date, _x509_crl_entry::serial, _asn1_buf::tag, x509_get_crl_entry_ext(), x509_get_serial(), and x509_get_time().
Referenced by x509_crl_parse().
1.6.1