summaryrefslogtreecommitdiff
path: root/compat/verification/rsapubkey.asn1.c
blob: 6bb1994e93f418f7f053d4d738ba47c70a0652ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Automatically generated by asn1_compiler.  Do not edit
 *
 * ASN.1 parser for rsapubkey
 */
#include <linux/asn1_ber_bytecode.h>
#include "rsapubkey.asn1.h"

enum rsapubkey_actions {
	ACT_rsa_get_e = 0,
	ACT_rsa_get_n = 1,
	NR__rsapubkey_actions = 2
};

static const asn1_action_t rsapubkey_action_table[NR__rsapubkey_actions] = {
	[   0] = rsa_get_e,
	[   1] = rsa_get_n,
};

static const unsigned char rsapubkey_machine[] = {
	// RsaPubKey
	[   0] = ASN1_OP_MATCH,
	[   1] = _tag(UNIV, CONS, SEQ),
	[   2] =  ASN1_OP_MATCH_ACT,		// n
	[   3] =  _tag(UNIV, PRIM, INT),
	[   4] =  _action(ACT_rsa_get_n),
	[   5] =  ASN1_OP_MATCH_ACT,		// e
	[   6] =  _tag(UNIV, PRIM, INT),
	[   7] =  _action(ACT_rsa_get_e),
	[   8] = ASN1_OP_END_SEQ,
	[   9] = ASN1_OP_COMPLETE,
};

const struct asn1_decoder rsapubkey_decoder = {
	.machine = rsapubkey_machine,
	.machlen = sizeof(rsapubkey_machine),
	.actions = rsapubkey_action_table,
};