libksba  1.6.0
About: KSBA is a library to make the tasks of working with X.509 certificates, CMS data and related objects more easy.
  Fossies Dox: libksba-1.6.0.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

asn1-func.c File Reference
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "util.h"
#include "ksba.h"
#include "asn1-func.h"
Include dependency graph for asn1-func.c:

Go to the source code of this file.


static AsnNode add_node (node_type_t type)
AsnNode _ksba_asn_new_node (node_type_t type)
int _ksba_asn_is_primitive (node_type_t type)
void _ksba_asn_set_value (AsnNode node, enum asn_value_type vtype, const void *value, size_t len)
static void copy_value (AsnNode d, const AsnNode s)
static AsnNode copy_node (const AsnNode s)
void _ksba_asn_set_name (AsnNode node, const char *name)
static AsnNode set_right (AsnNode node, AsnNode right)
static AsnNode set_down (AsnNode node, AsnNode down)
void _ksba_asn_remove_node (AsnNode node)
static AsnNode find_node (AsnNode root, const char *name, int resolve)
AsnNode _ksba_asn_find_node (AsnNode root, const char *name)
static AsnNode _asn1_find_left (AsnNode node)
static AsnNode find_up (AsnNode node)
static void print_value (AsnNode node, FILE *fp)
void _ksba_asn_node_dump (AsnNode p, FILE *fp)
void _ksba_asn_node_dump_all (AsnNode root, FILE *fp)
: Name of the element or NULL

ksba_asn_tree_dump: @tree: A Parse Tree

@fp: dump to this stream

If the first character of the name is a '<' the expanded version of the tree will be printed.

This function is a debugging aid.

static AsnNode resolve_identifier (AsnNode root, AsnNode node, int nestlevel)
void _ksba_asn_tree_dump (ksba_asn_tree_t tree, const char *name, FILE *fp)
int _ksba_asn_delete_structure (AsnNode root)
int _ksba_asn_check_identifier (AsnNode node)
AsnNode _ksba_asn_walk_tree (AsnNode root, AsnNode node)
AsnNode _ksba_asn_walk_tree_up_right (AsnNode root, AsnNode node)
int _ksba_asn_change_integer_value (AsnNode node)
int _ksba_asn_expand_object_id (AsnNode node)
void _ksba_asn_set_default_tag (AsnNode node)
void _ksba_asn_type_set_config (AsnNode node)
static AsnNode copy_tree (AsnNode src_root, AsnNode s)
static AsnNode do_expand_tree (AsnNode src_root, AsnNode s, int depth)
AsnNode _ksba_asn_expand_tree (AsnNode parse_tree, const char *name)
AsnNode _ksba_asn_insert_copy (AsnNode node)
AsnNode _ksba_asn_find_type_value (const unsigned char *image, AsnNode root, int idx, const void *oidbuf, size_t oidlen)

Function Documentation

◆ _asn1_find_left()

static AsnNode _asn1_find_left ( AsnNode  node)

Definition at line 390 of file asn1-func.c.

References asn_node_struct::down, and asn_node_struct::left.

Referenced by _ksba_asn_delete_structure().

◆ _ksba_asn_change_integer_value()

◆ _ksba_asn_check_identifier()

◆ _ksba_asn_delete_structure()

◆ _ksba_asn_expand_object_id()

◆ _ksba_asn_expand_tree()

AsnNode _ksba_asn_expand_tree ( AsnNode  parse_tree,
const char *  name 

◆ _ksba_asn_find_node()

◆ _ksba_asn_find_type_value()

AsnNode _ksba_asn_find_type_value ( const unsigned char *  image,
AsnNode  root,
int  idx,
const void *  oidbuf,
size_t  oidlen 

◆ _ksba_asn_insert_copy()

◆ _ksba_asn_is_primitive()

◆ _ksba_asn_new_node()

AsnNode _ksba_asn_new_node ( node_type_t  type)

Definition at line 80 of file asn1-func.c.

References add_node().

Referenced by _ksba_asn_create_tree().

◆ _ksba_asn_node_dump()

◆ _ksba_asn_node_dump_all()

void _ksba_asn_node_dump_all ( AsnNode  root,
FILE *  fp 

◆ _ksba_asn_remove_node()

◆ _ksba_asn_set_default_tag()

◆ _ksba_asn_set_name()

void _ksba_asn_set_name ( AsnNode  node,
const char *  name 

◆ _ksba_asn_set_value()

◆ _ksba_asn_tree_dump()

void _ksba_asn_tree_dump ( ksba_asn_tree_t  tree,
const char *  name,
FILE *  fp 

◆ _ksba_asn_type_set_config()

◆ _ksba_asn_walk_tree()

◆ _ksba_asn_walk_tree_up_right()

AsnNode _ksba_asn_walk_tree_up_right ( AsnNode  root,
AsnNode  node 

Definition at line 825 of file asn1-func.c.

References find_up(), and asn_node_struct::right.

◆ add_node()

◆ copy_node()

static AsnNode copy_node ( const AsnNode  s)

◆ copy_tree()

static AsnNode copy_tree ( AsnNode  src_root,
AsnNode  s 

◆ copy_value()

◆ do_expand_tree()

◆ find_node()

static AsnNode find_node ( AsnNode  root,
const char *  name,
int  resolve 

◆ find_up()

◆ print_value()

◆ resolve_identifier()

◆ set_down()

static AsnNode set_down ( AsnNode  node,
AsnNode  down 

◆ set_right()

static AsnNode set_right ( AsnNode  node,
AsnNode  right