if (ETYPE_OK(etype) == 0)
return ASN1_VALUE_NOT_VALID;
-
_asn1_tag_der (ETYPE_CLASS(etype), ETYPE_TAG(etype),
der_tag, &tag_len);
#define ETYPE_TAG(etype) (_asn1_tags[etype].tag)
#define ETYPE_CLASS(etype) (_asn1_tags[etype].class)
-#define ETYPE_OK(etype) ((etype <= _asn1_tags_size)?1:0)
+#define ETYPE_OK(etype) ((etype != ASN1_ETYPE_INVALID && \
+ etype <= _asn1_tags_size && \
+ _asn1_tags[etype].desc != NULL)?1:0)
extern unsigned int _asn1_tags_size;
extern const tag_and_class_st _asn1_tags[];
typedef struct asn1_static_node_st asn1_static_node;
/* List of constants for field type of node_asn */
+#define ASN1_ETYPE_INVALID 0
#define ASN1_ETYPE_CONSTANT 1
#define ASN1_ETYPE_IDENTIFIER 2
#define ASN1_ETYPE_INTEGER 3