Go to the documentation of this file.
73 #define CHARTYPE_PRINTABLESTRING 0x10
75 #define CHARTYPE_FIRST_ESC_2253 0x20
77 #define CHARTYPE_LAST_ESC_2253 0x40
79 #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
81 #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \
82 ASN1_STRFLGS_ESC_QUOTE | \
83 ASN1_STRFLGS_ESC_CTRL | \
98 #define HEX_SIZE(type) (sizeof(type)*2)
103 unsigned char chflgs, chtmp;
118 chtmp = (
unsigned char)
c;
158 #define BUF_TYPE_WIDTH_MASK 0x7
159 #define BUF_TYPE_CONVUTF8 0x8
170 int i, outlen,
len, charwidth;
171 unsigned char orflags, *
p, *q;
232 unsigned char utfbuf[6];
262 static const char hexdig[] =
"0123456789ABCDEF";
263 unsigned char *
p, *q;
269 hextmp[0] = hexdig[*
p >> 4];
270 hextmp[1] = hexdig[*
p & 0xf];
321 unsigned char *der_buf = NULL;
374 outlen += strlen(tagname);
485 p = (
const char *)
v->data;
486 for (
i = 0;
i <
v->length;
i++) {
487 if ((
p[
i] >
'~') || ((
p[
i] <
' ') &&
488 (
p[
i] !=
'\n') && (
p[
i] !=
'\r')))
515 static const char *
const mon[12] = {
516 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
517 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
525 int y = 0, M = 0,
d = 0, h = 0,
m = 0, s = 0;
530 v = (
char *)
tm->data;
536 for (
i = 0;
i < 12;
i++)
537 if ((
v[
i] >
'9') || (
v[
i] <
'0'))
539 y = (
v[0] -
'0') * 1000 + (
v[1] -
'0') * 100 + (
v[2] -
'0') * 10 + (
v[3] -
541 M = (
v[4] -
'0') * 10 + (
v[5] -
'0');
542 if ((M > 12) || (M < 1))
544 d = (
v[6] -
'0') * 10 + (
v[7] -
'0');
545 h = (
v[8] -
'0') * 10 + (
v[9] -
'0');
546 m = (
v[10] -
'0') * 10 + (
v[11] -
'0');
547 if (
tm->length >= 14 &&
548 (
v[12] >=
'0') && (
v[12] <=
'9') &&
549 (
v[13] >=
'0') && (
v[13] <=
'9')) {
550 s = (
v[12] -
'0') * 10 + (
v[13] -
'0');
552 if (
tm->length >= 15 &&
v[14] ==
'.') {
556 while (14 + f_len <
l &&
f[f_len] >=
'0' &&
f[f_len] <=
'9')
561 if (
BIO_printf(bp,
"%s %2d %02d:%02d:%02d%.*s %d%s",
562 mon[M - 1],
d, h,
m, s, f_len,
f,
y,
563 (gmt) ?
" GMT" :
"") <= 0)
577 if (*
len < 2|| !isdigit((*
v)[0]) || !isdigit((*
v)[1])) {
580 *
out = ((*v)[0] -
'0') * 10 + ((*
v)[1] -
'0');
590 if (*
len == 0 || (*
v)[0] !=
'Z') {
600 const char *
v = (
const char *)
tm->data;
601 int len =
tm->length;
602 int Y = 0, M = 0, D = 0, h = 0,
m = 0, s = 0;
623 if (M > 12 || M == 0) {
626 if (D > 31 || D == 0) {
629 if (h > 23 ||
m > 59 || s > 60) {
644 return BIO_printf(bp,
"%s %2d %02d:%02d:%02d %d%s",
mon[M - 1], D, h,
m, s, Y,
645 is_gmt ?
" GMT" :
"") > 0;
#define CHARTYPE_FIRST_ESC_2253
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v)
static int do_dump(unsigned long lflags, BIO *out, const ASN1_STRING *str)
int utflen(const char *s)
#define V_ASN1_NEG_ENUMERATED
OPENSSL_EXPORT int i2d_ASN1_TYPE(const ASN1_TYPE *in, uint8_t **outp)
static int consume_zulu_timezone(const char **v, int *len)
static const unsigned char char_type[]
#define OPENSSL_PUT_ERROR(library, reason)
#define BUF_TYPE_CONVUTF8
#define ASN1_STRFLGS_ESC_2253
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in)
#define CHARTYPE_LAST_ESC_2253
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags)
#define ASN1_R_INVALID_UNIVERSALSTRING
static int do_buf(unsigned char *buf, int buflen, int type, unsigned char flags, char *quotes, BIO *out)
#define ASN1_STRFLGS_IGNORE_TYPE
#define V_ASN1_GENERALIZEDTIME
static int consume_two_digits(int *out, const char **v, int *len)
static int do_hex_dump(BIO *out, unsigned char *buf, int buflen)
#define BUF_TYPE_WIDTH_MASK
for(map_begin_internal(intern, &it);!map_done(&it);map_next(&it))
#define V_ASN1_ENUMERATED
#define ASN1_STRFLGS_ESC_CTRL
int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm)
#define ASN1_STRFLGS_ESC_MSB
#define ASN1_mbstring_copy
static const char *const mon[12]
#define ASN1_R_INVALID_BMPSTRING
#define ASN1_STRFLGS_SHOW_TYPE
#define ASN1_STRFLGS_UTF8_CONVERT
UniquePtr< SSL_SESSION > ret
#define ASN1_STRFLGS_ESC_QUOTE
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm)
static int maybe_write(BIO *out, const void *buf, int len)
#define ASN1_STRFLGS_DUMP_DER
int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
static const signed char tag2nbyte[]
static int do_esc_char(uint32_t c, unsigned char flags, char *do_quotes, BIO *out)
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long lflags)
#define V_ASN1_NEG_INTEGER
#define ASN1_STRFLGS_DUMP_UNKNOWN
if(p->owned &&p->wrapped !=NULL)
#define B_ASN1_UTF8STRING
#define ASN1_STRFLGS_DUMP_ALL
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:39