Go to the documentation of this file.
66 #include "../internal.h"
75 #define ASN1_MAX_CONSTRUCTED_NEST 30
79 static int asn1_check_tlen(
long *olen,
int *otag,
unsigned char *oclass,
80 char *cst,
const unsigned char **
in,
long len,
84 const unsigned char **
in,
long len,
88 const unsigned char **
in,
long len,
94 const unsigned char **
in,
long len,
96 int tag,
int aclass,
char opt,
122 if ((
tag < 0) || (
tag > 30))
129 #define asn1_tlc_clear(c) if (c) (c)->valid = 0
131 #define asn1_tlc_clear_nc(c) (c)->valid = 0
141 const unsigned char **
in,
long len,
165 const unsigned char *
p = NULL, *q;
166 unsigned char oclass;
181 if (
len > INT_MAX/2) {
199 if ((
tag != -1) || opt) {
271 if ((
i >= 0) && (i < it->tcount)) {
272 tt =
it->templates +
i;
283 for (
i = 0, tt =
it->templates; i < it->tcount;
i++, tt++) {
302 if (
i ==
it->tcount) {
334 }
else if (
ret == -1)
352 for (
i = 0, tt =
it->templates; i < it->tcount;
i++, tt++) {
365 for (
i = 0, tt =
it->templates; i < it->tcount;
i++, tt++) {
389 if (
i == (
it->tcount - 1))
402 }
else if (
ret == -1) {
424 for (;
i <
it->tcount; tt++,
i++) {
458 ", Type=",
it->sname);
477 const unsigned char **
in,
long inlen,
484 const unsigned char *
p, *q;
500 &
p, inlen, tt->
tag, aclass, opt,
ctx);
505 }
else if (
ret == -1)
536 const unsigned char **
in,
long len,
542 const unsigned char *
p;
566 &
p,
len, sktag, skaclass, opt,
ctx);
570 }
else if (
ret == -1)
573 *val = (
ASN1_VALUE *)sk_ASN1_VALUE_new_null();
580 while (sk_ASN1_VALUE_num(sktmp) > 0) {
581 vtmp = sk_ASN1_VALUE_pop(sktmp);
594 const unsigned char *q =
p;
622 }
else if (
ret == -1)
632 }
else if (
ret == -1)
645 const unsigned char **
in,
long inlen,
652 const unsigned char *
p;
653 const unsigned char *cont = NULL;
668 unsigned char oclass;
679 &
p, inlen, -1, 0, 0,
ctx);
694 &
p, inlen,
tag, aclass, opt,
ctx);
698 }
else if (
ret == -1)
718 len =
p - cont + plen;
755 assert(
it->funcs == NULL);
767 if (utype != typ->
type)
808 (*tint)->type = utype | ((*tint)->type &
V_ASN1_NEG);
875 const unsigned char *
p;
879 if (!
p[0] && !
p[1]) {
892 char *cst,
const unsigned char **
in,
long len,
898 const unsigned char *
p, *q;
905 pclass =
ctx->pclass;
913 ctx->pclass = pclass;
924 if (!(
i & 0x80) && ((plen +
ctx->hdrlen) >
len)) {
938 if ((exptag != ptag) || (expclass != pclass)) {
#define ASN1_TFLG_ADB_MASK
#define ASN1_ITYPE_CHOICE
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED
#define ASN1_R_UNEXPECTED_EOC
#define ASN1_TFLG_TAG_CLASS
#define ASN1_R_NO_MATCHING_CHOICE_TYPE
#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE
#define ASN1_TFLG_SK_MASK
#define ASN1_R_NESTED_ASN1_ERROR
#define V_ASN1_GRAPHICSTRING
#define ASN1_R_ILLEGAL_NULL
#define V_ASN1_PRINTABLESTRING
#define B_ASN1_GENERALSTRING
#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH
#define OPENSSL_PUT_ERROR(library, reason)
#define ASN1_STRING_type_new
#define ASN1_R_TYPE_NOT_PRIMITIVE
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH
#define V_ASN1_UTF8STRING
static const unsigned long tag2bit[32]
#define V_ASN1_OCTET_STRING
#define V_ASN1_VIDEOTEXSTRING
ASN1_ex_d2i * asn1_ex_d2i
static int asn1_cb(const char *elem, int len, void *bitstr)
#define ASN1_ITYPE_SEQUENCE
#define B_ASN1_PRINTABLESTRING
#define ASN1_ITEM_ptr(iptr)
#define ASN1_item_ex_free
#define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED
#define V_ASN1_GENERALSTRING
static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth)
static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
#define V_ASN1_GENERALIZEDTIME
#define ASN1_TFLG_COMBINE
#define asn1_get_field_ptr
static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth)
#define B_ASN1_GENERALIZEDTIME
static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, const ASN1_ITEM *it)
#define B_ASN1_UNIVERSALSTRING
#define ASN1_TFLG_OPTIONAL
#define ASN1_template_free
#define V_ASN1_ENUMERATED
static void * tag(intptr_t t)
OPENSSL_EXPORT void ASN1_TYPE_free(ASN1_TYPE *a)
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH
#define V_ASN1_VISIBLESTRING
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it)
#define V_ASN1_NUMERICSTRING
#define ASN1_ITYPE_EXTERN
#define V_ASN1_BIT_STRING
#define asn1_set_choice_selector
#define ASN1_R_MSTRING_NOT_UNIVERSAL
#define c2i_ASN1_BIT_STRING
#define V_ASN1_CONSTRUCTED
#define ASN1_R_BAD_OBJECT_HEADER
#define ASN1_R_NULL_IS_WRONG_LENGTH
#define ASN1_R_TYPE_NOT_CONSTRUCTED
#define asn1_tlc_clear(c)
#define ASN1_R_BAD_TEMPLATE
#define ASN1_R_ILLEGAL_TAGGED_ANY
#define ASN1_R_EXPLICIT_LENGTH_MISMATCH
static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *cst, const unsigned char **in, long len, int exptag, int expclass, char opt, ASN1_TLC *ctx)
#define B_ASN1_NUMERICSTRING
#define ASN1_R_ILLEGAL_OPTIONAL_ANY
int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it, void *exarg)
#define ASN1_R_NESTED_TOO_DEEP
#define B_ASN1_ISO64STRING
UniquePtr< SSL_SESSION > ret
#define ASN1_R_MSTRING_WRONG_TAG
#define B_ASN1_OCTET_STRING
#define ERR_add_error_data
struct ASN1_VALUE_st ASN1_VALUE
unsigned long ASN1_tag2bit(int tag)
OPENSSL_EXPORT ASN1_TYPE * ASN1_TYPE_new(void)
#define ASN1_ITYPE_MSTRING
#define B_ASN1_GRAPHICSTRING
#define B_ASN1_BIT_STRING
#define asn1_tlc_clear_nc(c)
union asn1_type_st::@361 value
#define ASN1_ITYPE_PRIMITIVE
#define B_ASN1_VIDEOTEXSTRING
#define ASN1_R_FIELD_MISSING
#define asn1_get_choice_selector
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH
#define ASN1_MAX_CONSTRUCTED_NEST
static int asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx, int depth)
#define V_ASN1_UNIVERSALSTRING
static int asn1_check_eoc(const unsigned char **in, long len)
#define ERR_R_MALLOC_FAILURE
#define B_ASN1_UTF8STRING
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:25