x509_csr.c File Reference

#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>
Include dependency graph for x509_csr.c:

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 Documentation

#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 (  ) 
Value:
{                                               \
    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.


Function Documentation

static int x509_csr_get_version ( unsigned char **  p,
const unsigned char *  end,
int *  ver 
) [static]

Generated on 9 Apr 2014 for PolarSSL v1.3.2 by  doxygen 1.6.1