#include <int.h>
#include <structure.h>
#include "parser_aux.h"
#include <gstr.h>
Go to the source code of this file.
Functions | |
static node_asn * | MHD__asn1_copy_structure2 (node_asn *root, const char *source_name) |
node_asn * | MHD__asn1_add_node_only (unsigned int type) |
node_asn * | MHD__asn1_find_left (node_asn *node) |
MHD__asn1_retCode | MHD__asn1_array2tree (const ASN1_ARRAY_TYPE *array, ASN1_TYPE *definitions, char *errorDescription) |
MHD__asn1_retCode | MHD__asn1_delete_structure (ASN1_TYPE *structure) |
node_asn * | MHD__asn1_copy_structure3 (node_asn *source_node) |
static MHD__asn1_retCode | MHD__asn1_type_choice_config (node_asn *node) |
static MHD__asn1_retCode | MHD__asn1_expand_identifier (node_asn **node, node_asn *root) |
MHD__asn1_retCode | MHD__asn1_create_element (ASN1_TYPE definitions, const char *source_name, ASN1_TYPE *element) |
Variables | |
char | MHD__asn1_identifierMissing [] |
node_asn* MHD__asn1_add_node_only | ( | unsigned int | type | ) |
Definition at line 53 of file structure.c.
References MHD__asn1_calloc, and node_asn_struct::type.
Referenced by MHD__asn1_copy_structure3(), MHD__asn1_expand_object_id(), and MHD__asn1_type_choice_config().
MHD__asn1_retCode MHD__asn1_array2tree | ( | const ASN1_ARRAY_TYPE * | array, | |
ASN1_TYPE * | definitions, | |||
char * | errorDescription | |||
) |
MHD__asn1_array2tree - Creates the structures needed to manage the ASN1 definitions. : specify the array that contains ASN.1 declarations : return the pointer to the structure created by *ARRAY ASN.1 declarations : return the error description.
Creates the structures needed to manage the ASN.1 definitions. is a vector created by MHD__asn1_parser2array().
Returns:
ASN1_SUCCESS: Structure created correctly.
ASN1_ELEMENT_NOT_EMPTY: * not ASN1_TYPE_EMPTY.
ASN1_IDENTIFIER_NOT_FOUND: In the file there is an identifier that is not defined (see for more information).
ASN1_ARRAY_ERROR: The array pointed by is wrong.
Definition at line 108 of file structure.c.
References ASN1_ARRAY_ERROR, ASN1_ELEMENT_NOT_EMPTY, ASN1_IDENTIFIER_NOT_FOUND, ASN1_SUCCESS, ASN1_TYPE_EMPTY, CONST_DOWN, CONST_RIGHT, DOWN, Estrcat, Estrcpy, MHD__asn1_add_node(), MHD__asn1_change_integer_value(), MHD__asn1_check_identifier(), MHD__asn1_delete_list(), MHD__asn1_delete_list_and_nodes(), MHD__asn1_expand_object_id(), MHD__asn1_find_up(), MHD__asn1_identifierMissing, MHD__asn1_set_down(), MHD__asn1_set_name(), MHD__asn1_set_right(), MHD__asn1_set_value(), RIGHT, node_asn_struct::type, and UP.
Referenced by MHD__gnutls_global_init().
Definition at line 340 of file structure.c.
References MHD__asn1_copy_structure3(), and MHD__asn1_find_node().
Referenced by MHD__asn1_create_element(), and MHD__asn1_expand_identifier().
Definition at line 271 of file structure.c.
References node_asn_struct::down, DOWN, MHD__asn1_add_node_only(), MHD__asn1_find_up(), MHD__asn1_set_down(), MHD__asn1_set_name(), MHD__asn1_set_right(), MHD__asn1_set_value(), node_asn_struct::name, node_asn_struct::right, RIGHT, node_asn_struct::type, UP, node_asn_struct::value, and node_asn_struct::value_len.
Referenced by MHD__asn1_append_sequence_set(), MHD__asn1_copy_structure2(), and MHD__asn1_der_coding().
MHD__asn1_retCode MHD__asn1_create_element | ( | ASN1_TYPE | definitions, | |
const char * | source_name, | |||
ASN1_TYPE * | element | |||
) |
MHD__asn1_create_element - Creates a structure of type SOURCE_NAME. : pointer to the structure returned by "parser_asn1" function : the name of the type of the new structure (must be inside p_structure). : pointer to the structure created.
Creates a structure of type . Example using "pkix.asn":
rc = MHD__asn1_create_structure(cert_def, "PKIX1.Certificate", certptr);
Returns:
ASN1_SUCCESS: Creation OK.
ASN1_ELEMENT_NOT_FOUND: SOURCE_NAME isn't known
Definition at line 566 of file structure.c.
References ASN1_ELEMENT_NOT_FOUND, MHD__asn1_copy_structure2(), MHD__asn1_expand_identifier(), MHD__asn1_set_name(), and MHD__asn1_type_choice_config().
Referenced by MHD__gnutls_cert_get_issuer_dn(), MHD__gnutls_privkey_decode_pkcs1_rsa_key(), MHD__gnutls_x509_decode_octet_string(), MHD__gnutls_x509_der_encode(), MHD__gnutls_x509_ext_extract_keyUsage(), MHD__gnutls_x509_read_rsa_params(), MHD__gnutls_x509_write_rsa_params(), and MHD_gnutls_x509_crt_init().
MHD__asn1_retCode MHD__asn1_delete_structure | ( | ASN1_TYPE * | structure | ) |
MHD__asn1_delete_structure - Deletes the structure pointed by *ROOT. : pointer to the structure that you want to delete.
Deletes the structure *. At the end, * is set to ASN1_TYPE_EMPTY.
Returns:
ASN1_SUCCESS: Everything OK.
ASN1_ELEMENT_NOT_FOUND: * was ASN1_TYPE_EMPTY.
Definition at line 220 of file structure.c.
References ASN1_ELEMENT_NOT_FOUND, ASN1_SUCCESS, ASN1_TYPE_EMPTY, node_asn_struct::down, node_asn_struct::left, MHD__asn1_find_left(), MHD__asn1_find_up(), MHD__asn1_remove_node(), MHD__asn1_set_down(), MHD__asn1_set_right(), and node_asn_struct::right.
Referenced by MHD__asn1_delete_not_used(), MHD__asn1_der_coding(), MHD__asn1_der_decoding(), MHD__asn1_type_choice_config(), MHD__asn1_write_value(), MHD__gnutls_cert_get_issuer_dn(), MHD__gnutls_global_deinit(), MHD__gnutls_global_init(), MHD__gnutls_privkey_decode_pkcs1_rsa_key(), MHD__gnutls_x509_decode_octet_string(), MHD__gnutls_x509_der_encode(), MHD__gnutls_x509_ext_extract_keyUsage(), MHD__gnutls_x509_read_rsa_params(), MHD__gnutls_x509_write_rsa_params(), MHD_gnutls_x509_crt_deinit(), and MHD_gnutls_x509_privkey_deinit().
static MHD__asn1_retCode MHD__asn1_expand_identifier | ( | node_asn ** | node, | |
node_asn * | root | |||
) | [static] |
Definition at line 437 of file structure.c.
References ASN1_ELEMENT_NOT_FOUND, ASN1_IDENTIFIER_NOT_FOUND, ASN1_SUCCESS, CONST_DEFAULT, CONST_NOT_USED, CONST_OPTION, CONST_SET, CONST_SIZE, CONST_TAG, node_asn_struct::down, DOWN, node_asn_struct::left, MAX_NAME_SIZE, MHD__asn1_copy_structure2(), MHD__asn1_find_left(), MHD__asn1_find_up(), MHD__asn1_remove_node(), MHD__asn1_set_down(), MHD__asn1_set_name(), MHD__asn1_set_right(), MHD__asn1_str_cat(), MHD__asn1_str_cpy(), node_asn_struct::name, RIGHT, node_asn_struct::right, node_asn_struct::type, type_field, TYPE_IDENTIFIER, UP, and node_asn_struct::value.
Referenced by MHD__asn1_create_element().
Definition at line 76 of file structure.c.
References node_asn_struct::down, and node_asn_struct::left.
Referenced by MHD__asn1_delete_not_used(), MHD__asn1_delete_structure(), MHD__asn1_expand_identifier(), and MHD__asn1_type_choice_config().
static MHD__asn1_retCode MHD__asn1_type_choice_config | ( | node_asn * | node | ) | [static] |
Definition at line 352 of file structure.c.
References ASN1_ELEMENT_NOT_FOUND, ASN1_SUCCESS, CONST_TAG, node_asn_struct::down, DOWN, MHD__asn1_add_node_only(), MHD__asn1_delete_structure(), MHD__asn1_find_left(), MHD__asn1_find_up(), MHD__asn1_set_down(), MHD__asn1_set_right(), MHD__asn1_set_value(), RIGHT, node_asn_struct::right, node_asn_struct::type, TYPE_CHOICE, type_field, TYPE_TAG, UP, and node_asn_struct::value.
Referenced by MHD__asn1_create_element().
char MHD__asn1_identifierMissing[] |
Definition at line 31 of file parser_aux.c.
Referenced by MHD__asn1_array2tree(), and MHD__asn1_check_identifier().