#include "common.h"
#if defined(MBEDTLS_X509_CSR_PARSE_C)
#include "mbedtls/x509_csr.h"
#include "x509_internal.h"
#include "mbedtls/error.h"
#include "mbedtls/oid.h"
#include "mbedtls/platform_util.h"
#include <string.h>
#if defined(MBEDTLS_PEM_PARSE_C)
#include "mbedtls/pem.h"
#endif
#include "mbedtls/platform.h"
#if defined(MBEDTLS_FS_IO) || defined(EFIX64) || defined(EFI32)
#include <stdio.h>
#endif
static int x509_csr_get_version(unsigned char **p,
const unsigned char *end,
int *ver)
{ … }
static int x509_csr_parse_extensions(mbedtls_x509_csr *csr,
unsigned char **p, const unsigned char *end,
mbedtls_x509_csr_ext_cb_t cb,
void *p_ctx)
{ … }
static int x509_csr_parse_attributes(mbedtls_x509_csr *csr,
const unsigned char *start, const unsigned char *end,
mbedtls_x509_csr_ext_cb_t cb,
void *p_ctx)
{ … }
static int mbedtls_x509_csr_parse_der_internal(mbedtls_x509_csr *csr,
const unsigned char *buf, size_t buflen,
mbedtls_x509_csr_ext_cb_t cb,
void *p_ctx)
{ … }
int mbedtls_x509_csr_parse_der(mbedtls_x509_csr *csr,
const unsigned char *buf, size_t buflen)
{ … }
int mbedtls_x509_csr_parse_der_with_ext_cb(mbedtls_x509_csr *csr,
const unsigned char *buf, size_t buflen,
mbedtls_x509_csr_ext_cb_t cb,
void *p_ctx)
{ … }
int mbedtls_x509_csr_parse(mbedtls_x509_csr *csr, const unsigned char *buf, size_t buflen)
{ … }
#if defined(MBEDTLS_FS_IO)
int mbedtls_x509_csr_parse_file(mbedtls_x509_csr *csr, const char *path)
{ … }
#endif
#if !defined(MBEDTLS_X509_REMOVE_INFO)
#define BEFORE_COLON …
#define BC …
int mbedtls_x509_csr_info(char *buf, size_t size, const char *prefix,
const mbedtls_x509_csr *csr)
{ … }
#endif
void mbedtls_x509_csr_init(mbedtls_x509_csr *csr)
{ … }
void mbedtls_x509_csr_free(mbedtls_x509_csr *csr)
{ … }
#endif