#include "polarssl/config.h"
#include "polarssl/x509.h"
#include "polarssl/asn1write.h"
#include "polarssl/oid.h"
Go to the source code of this file.
Functions | |
int | x509_string_to_names (asn1_named_data **head, const char *name) |
int | x509_set_extension (asn1_named_data **head, const char *oid, size_t oid_len, int critical, const unsigned char *val, size_t val_len) |
static int | x509_write_name (unsigned char **p, unsigned char *start, const char *oid, size_t oid_len, const unsigned char *name, size_t name_len) |
int | x509_write_names (unsigned char **p, unsigned char *start, asn1_named_data *first) |
int | x509_write_sig (unsigned char **p, unsigned char *start, const char *oid, size_t oid_len, unsigned char *sig, size_t size) |
static int | x509_write_extension (unsigned char **p, unsigned char *start, asn1_named_data *ext) |
int | x509_write_extensions (unsigned char **p, unsigned char *start, asn1_named_data *first) |
int x509_set_extension | ( | asn1_named_data ** | head, | |
const char * | oid, | |||
size_t | oid_len, | |||
int | critical, | |||
const unsigned char * | val, | |||
size_t | val_len | |||
) |
Definition at line 111 of file x509_create.c.
References asn1_store_named_data(), _asn1_buf::p, POLARSSL_ERR_X509_MALLOC_FAILED, and _asn1_named_data::val.
Referenced by x509write_crt_set_extension(), and x509write_csr_set_extension().
int x509_string_to_names | ( | asn1_named_data ** | head, | |
const char * | name | |||
) |
Definition at line 39 of file x509_create.c.
References asn1_free_named_data_list(), asn1_store_named_data(), OID_AT_CN, OID_AT_COUNTRY, OID_AT_LOCALITY, OID_AT_ORG_UNIT, OID_AT_ORGANIZATION, OID_AT_POSTAL_ADDRESS, OID_AT_POSTAL_CODE, OID_AT_SERIAL_NUMBER, OID_AT_STATE, OID_PKCS9_EMAIL, POLARSSL_ERR_X509_MALLOC_FAILED, and POLARSSL_ERR_X509_UNKNOWN_OID.
Referenced by x509write_crt_set_issuer_name(), x509write_crt_set_subject_name(), and x509write_csr_set_subject_name().
static int x509_write_extension | ( | unsigned char ** | p, | |
unsigned char * | start, | |||
asn1_named_data * | ext | |||
) | [static] |
Definition at line 225 of file x509_create.c.
References ASN1_CHK_ADD, ASN1_CONSTRUCTED, ASN1_OCTET_STRING, ASN1_OID, ASN1_SEQUENCE, asn1_write_bool(), asn1_write_len(), asn1_write_raw_buffer(), asn1_write_tag(), _asn1_buf::len, _asn1_named_data::oid, _asn1_buf::p, and _asn1_named_data::val.
Referenced by x509_write_extensions().
int x509_write_extensions | ( | unsigned char ** | p, | |
unsigned char * | start, | |||
asn1_named_data * | first | |||
) |
Definition at line 262 of file x509_create.c.
References ASN1_CHK_ADD, _asn1_named_data::next, and x509_write_extension().
Referenced by x509write_crt_der(), and x509write_csr_der().
static int x509_write_name | ( | unsigned char ** | p, | |
unsigned char * | start, | |||
const char * | oid, | |||
size_t | oid_len, | |||
const unsigned char * | name, | |||
size_t | name_len | |||
) | [static] |
Definition at line 140 of file x509_create.c.
References ASN1_CHK_ADD, ASN1_CONSTRUCTED, ASN1_SEQUENCE, ASN1_SET, asn1_write_ia5_string(), asn1_write_len(), asn1_write_oid(), asn1_write_printable_string(), asn1_write_tag(), OID_PKCS9_EMAIL, and OID_SIZE.
Referenced by x509_write_names().
int x509_write_names | ( | unsigned char ** | p, | |
unsigned char * | start, | |||
asn1_named_data * | first | |||
) |
Definition at line 176 of file x509_create.c.
References ASN1_CHK_ADD, ASN1_CONSTRUCTED, ASN1_SEQUENCE, asn1_write_len(), asn1_write_tag(), _asn1_buf::len, _asn1_named_data::next, _asn1_named_data::oid, _asn1_buf::p, _asn1_named_data::val, and x509_write_name().
Referenced by x509write_crt_der(), and x509write_csr_der().
int x509_write_sig | ( | unsigned char ** | p, | |
unsigned char * | start, | |||
const char * | oid, | |||
size_t | oid_len, | |||
unsigned char * | sig, | |||
size_t | size | |||
) |
Definition at line 197 of file x509_create.c.
References ASN1_BIT_STRING, ASN1_CHK_ADD, asn1_write_algorithm_identifier(), asn1_write_len(), asn1_write_tag(), and POLARSSL_ERR_ASN1_BUF_TOO_SMALL.
Referenced by x509write_crt_der(), and x509write_csr_der().