#include "polarssl/config.h"
#include "polarssl/x509_csr.h"
#include "polarssl/oid.h"
#include "polarssl/pem.h"
#include <string.h>
#include <stdlib.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_csr_get_version (unsigned char **p, const unsigned char *end, int *ver) |
int | x509_csr_parse (x509_csr *csr, const unsigned char *buf, size_t buflen) |
Load a Certificate Signing Request (CSR). | |
int | x509_csr_parse_file (x509_csr *csr, const char *path) |
Load a Certificate Signing Request (CSR). | |
int | x509_csr_info (char *buf, size_t size, const char *prefix, const x509_csr *csr) |
Returns an informational string about the CSR. | |
void | x509_csr_init (x509_csr *csr) |
Initialize a CSR. | |
void | x509_csr_free (x509_csr *csr) |
Unallocate all CSR data. |
#define BC "14" |
Definition at line 358 of file x509_csr.c.
#define BEFORE_COLON 14 |
Definition at line 357 of file x509_csr.c.
#define POLARSSL_ERR_DEBUG_BUF_TOO_SMALL -2 |
Definition at line 341 of file x509_csr.c.
#define polarssl_free free |
Definition at line 51 of file x509_csr.c.
#define polarssl_malloc malloc |
Definition at line 50 of file x509_csr.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 343 of file x509_csr.c.
static int x509_csr_get_version | ( | unsigned char ** | p, | |
const unsigned char * | end, | |||
int * | ver | |||
) | [static] |
Definition at line 64 of file x509_csr.c.
References asn1_get_int(), POLARSSL_ERR_ASN1_UNEXPECTED_TAG, and POLARSSL_ERR_X509_INVALID_VERSION.
Referenced by x509_csr_parse().