
/*
 * Automatically generated by asn1_compiler.  Do not edit
 *
 * ASN.1 parser for x509_extensions_test
 */
#include "asn1_ber_bytecode.h"
#include "x509_extensions_test_asn1.h"

// clang-format off

enum x509_extensions_test_actions {
	ACT_lc_x509_extension_OID = 0,
	ACT_lc_x509_extension_continue = 1,
	ACT_lc_x509_extension_critical = 2,
	ACT_lc_x509_process_extension = 3,
	NR__x509_extensions_test_actions = 4
};

static const asn1_action_t x509_extensions_test_action_table[NR__x509_extensions_test_actions] = {
	[   0] = lc_x509_extension_OID,
	[   1] = lc_x509_extension_continue,
	[   2] = lc_x509_extension_critical,
	[   3] = lc_x509_process_extension,
};

static const asn1_action_enc_t x509_extensions_test_action_table_enc[NR__x509_extensions_test_actions] = {
	[   0] = lc_x509_extension_OID_enc,
	[   1] = lc_x509_extension_continue_enc,
	[   2] = lc_x509_extension_critical_enc,
	[   3] = lc_x509_process_extension_enc,
};

static const unsigned char x509_extensions_test_machine[] = {
	// Extensions
	[   0] = ASN1_OP_MATCH,
	[   1] = _tag(UNIV, CONS, SEQ),
	// Extension
	[   2] =  ASN1_OP_MATCH,
	[   3] =  _tag(UNIV, CONS, SEQ),
	[   4] =   ASN1_OP_MATCH_ACT,		// extnid
	[   5] =   _tag(UNIV, PRIM, OID),
	[   6] =   _action(ACT_lc_x509_extension_OID),
	[   7] =   ASN1_OP_MATCH_ACT_OR_SKIP,		// critical
	[   8] =   _tag(UNIV, PRIM, BOOL),
	[   9] =   _action(ACT_lc_x509_extension_critical),
	[  10] =   ASN1_OP_MATCH_ACT,		// extnValue
	[  11] =   _tag(UNIV, PRIM, OTS),
	[  12] =   _action(ACT_lc_x509_process_extension),
	[  13] =  ASN1_OP_END_SEQ_ACT,
	[  14] =  _action(ACT_lc_x509_extension_continue),
	[  15] = ASN1_OP_END_SEQ_OF,
	[  16] = _jump_target(2),
	[  17] = ASN1_OP_COMPLETE,
};

const struct lc_asn1_decoder lc_x509_extensions_test_decoder = {
	.machine = x509_extensions_test_machine,
	.machlen = sizeof(x509_extensions_test_machine),
	.actions = x509_extensions_test_action_table,
};

const struct lc_asn1_encoder lc_x509_extensions_test_encoder = {
	.machine = x509_extensions_test_machine,
	.machlen = sizeof(x509_extensions_test_machine),
	.actions = x509_extensions_test_action_table_enc,
};

// clang-format on
