Macros | Functions | Variables
a_strex.c File Reference
#include <openssl/asn1.h>
#include <ctype.h>
#include <inttypes.h>
#include <string.h>
#include <openssl/bio.h>
#include <openssl/mem.h>
#include "charmap.h"
#include "internal.h"
Include dependency graph for a_strex.c:

Go to the source code of this file.

Macros

#define BUF_TYPE_CONVUTF8   0x8
 
#define BUF_TYPE_WIDTH_MASK   0x7
 
#define CHARTYPE_BS_ESC   (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
 
#define CHARTYPE_FIRST_ESC_2253   0x20
 
#define CHARTYPE_LAST_ESC_2253   0x40
 
#define CHARTYPE_PRINTABLESTRING   0x10
 
#define ESC_FLAGS
 
#define HEX_SIZE(type)   (sizeof(type)*2)
 

Functions

int ASN1_GENERALIZEDTIME_print (BIO *bp, const ASN1_GENERALIZEDTIME *tm)
 
int ASN1_STRING_print (BIO *bp, const ASN1_STRING *v)
 
int ASN1_STRING_print_ex (BIO *out, const ASN1_STRING *str, unsigned long lflags)
 
int ASN1_STRING_print_ex_fp (FILE *fp, const ASN1_STRING *str, unsigned long flags)
 
int ASN1_STRING_to_UTF8 (unsigned char **out, const ASN1_STRING *in)
 
int ASN1_TIME_print (BIO *bp, const ASN1_TIME *tm)
 
int ASN1_UTCTIME_print (BIO *bp, const ASN1_UTCTIME *tm)
 
static int consume_two_digits (int *out, const char **v, int *len)
 
static int consume_zulu_timezone (const char **v, int *len)
 
static int do_buf (unsigned char *buf, int buflen, int type, unsigned char flags, char *quotes, BIO *out)
 
static int do_dump (unsigned long lflags, BIO *out, const ASN1_STRING *str)
 
static int do_esc_char (uint32_t c, unsigned char flags, char *do_quotes, BIO *out)
 
static int do_hex_dump (BIO *out, unsigned char *buf, int buflen)
 
static int maybe_write (BIO *out, const void *buf, int len)
 

Variables

static const char *const mon [12]
 
static const signed char tag2nbyte []
 

Macro Definition Documentation

◆ BUF_TYPE_CONVUTF8

#define BUF_TYPE_CONVUTF8   0x8

Definition at line 159 of file a_strex.c.

◆ BUF_TYPE_WIDTH_MASK

#define BUF_TYPE_WIDTH_MASK   0x7

Definition at line 158 of file a_strex.c.

◆ CHARTYPE_BS_ESC

Definition at line 79 of file a_strex.c.

◆ CHARTYPE_FIRST_ESC_2253

#define CHARTYPE_FIRST_ESC_2253   0x20

Definition at line 75 of file a_strex.c.

◆ CHARTYPE_LAST_ESC_2253

#define CHARTYPE_LAST_ESC_2253   0x40

Definition at line 77 of file a_strex.c.

◆ CHARTYPE_PRINTABLESTRING

#define CHARTYPE_PRINTABLESTRING   0x10

Definition at line 73 of file a_strex.c.

◆ ESC_FLAGS

#define ESC_FLAGS
Value:
ASN1_STRFLGS_ESC_QUOTE | \
ASN1_STRFLGS_ESC_CTRL | \
ASN1_STRFLGS_ESC_MSB)

Definition at line 81 of file a_strex.c.

◆ HEX_SIZE

#define HEX_SIZE (   type)    (sizeof(type)*2)

Definition at line 98 of file a_strex.c.

Function Documentation

◆ ASN1_GENERALIZEDTIME_print()

int ASN1_GENERALIZEDTIME_print ( BIO bp,
const ASN1_GENERALIZEDTIME tm 
)

Definition at line 520 of file a_strex.c.

◆ ASN1_STRING_print()

int ASN1_STRING_print ( BIO bp,
const ASN1_STRING v 
)

Definition at line 476 of file a_strex.c.

◆ ASN1_STRING_print_ex()

int ASN1_STRING_print_ex ( BIO out,
const ASN1_STRING str,
unsigned long  lflags 
)

Definition at line 357 of file a_strex.c.

◆ ASN1_STRING_print_ex_fp()

int ASN1_STRING_print_ex_fp ( FILE *  fp,
const ASN1_STRING str,
unsigned long  flags 
)

Definition at line 435 of file a_strex.c.

◆ ASN1_STRING_to_UTF8()

int ASN1_STRING_to_UTF8 ( unsigned char **  out,
const ASN1_STRING in 
)

Definition at line 452 of file a_strex.c.

◆ ASN1_TIME_print()

int ASN1_TIME_print ( BIO bp,
const ASN1_TIME tm 
)

Definition at line 505 of file a_strex.c.

◆ ASN1_UTCTIME_print()

int ASN1_UTCTIME_print ( BIO bp,
const ASN1_UTCTIME tm 
)

Definition at line 599 of file a_strex.c.

◆ consume_two_digits()

static int consume_two_digits ( int out,
const char **  v,
int len 
)
static

Definition at line 576 of file a_strex.c.

◆ consume_zulu_timezone()

static int consume_zulu_timezone ( const char **  v,
int len 
)
static

Definition at line 589 of file a_strex.c.

◆ do_buf()

static int do_buf ( unsigned char *  buf,
int  buflen,
int  type,
unsigned char  flags,
char *  quotes,
BIO out 
)
static

Definition at line 167 of file a_strex.c.

◆ do_dump()

static int do_dump ( unsigned long  lflags,
BIO out,
const ASN1_STRING str 
)
static

Definition at line 285 of file a_strex.c.

◆ do_esc_char()

static int do_esc_char ( uint32_t  c,
unsigned char  flags,
char *  do_quotes,
BIO out 
)
static

Definition at line 100 of file a_strex.c.

◆ do_hex_dump()

static int do_hex_dump ( BIO out,
unsigned char *  buf,
int  buflen 
)
static

Definition at line 260 of file a_strex.c.

◆ maybe_write()

static int maybe_write ( BIO out,
const void *  buf,
int  len 
)
static

Definition at line 86 of file a_strex.c.

Variable Documentation

◆ mon

const char* const mon[12]
static
Initial value:
= {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
}

Definition at line 515 of file a_strex.c.

◆ tag2nbyte

const signed char tag2nbyte[]
static
Initial value:
= {
-1, -1, -1, -1, -1,
-1, -1, -1, -1, -1,
-1, -1, 0, -1,
-1, -1, -1, -1,
1, 1, 1,
-1, 1, 1, 1,
-1, 1, -1,
4, -1, 2
}

Definition at line 340 of file a_strex.c.

ASN1_STRFLGS_ESC_2253
#define ASN1_STRFLGS_ESC_2253
Definition: asn1.h:1625


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:01