1 /*
2  * Automatically generated by asn1_compiler.  Do not edit
3  *
4  * ASN.1 parser for rsaprivkey
5  */
6 #include <linux/asn1_ber_bytecode.h>
7 #include "rsaprivkey.asn1.h"
8 
9 enum rsaprivkey_actions {
10 	ACT_rsa_get_d = 0,
11 	ACT_rsa_get_dp = 1,
12 	ACT_rsa_get_dq = 2,
13 	ACT_rsa_get_e = 3,
14 	ACT_rsa_get_n = 4,
15 	ACT_rsa_get_p = 5,
16 	ACT_rsa_get_q = 6,
17 	ACT_rsa_get_qinv = 7,
18 	NR__rsaprivkey_actions = 8
19 };
20 
21 static const asn1_action_t rsaprivkey_action_table[NR__rsaprivkey_actions] = {
22 	[   0] = rsa_get_d,
23 	[   1] = rsa_get_dp,
24 	[   2] = rsa_get_dq,
25 	[   3] = rsa_get_e,
26 	[   4] = rsa_get_n,
27 	[   5] = rsa_get_p,
28 	[   6] = rsa_get_q,
29 	[   7] = rsa_get_qinv,
30 };
31 
32 static const unsigned char rsaprivkey_machine[] = {
33 	// RsaPrivKey
34 	[   0] = ASN1_OP_MATCH,
35 	[   1] = _tag(UNIV, CONS, SEQ),
36 	[   2] =  ASN1_OP_MATCH,		// version
37 	[   3] =  _tag(UNIV, PRIM, INT),
38 	[   4] =  ASN1_OP_MATCH_ACT,		// n
39 	[   5] =  _tag(UNIV, PRIM, INT),
40 	[   6] =  _action(ACT_rsa_get_n),
41 	[   7] =  ASN1_OP_MATCH_ACT,		// e
42 	[   8] =  _tag(UNIV, PRIM, INT),
43 	[   9] =  _action(ACT_rsa_get_e),
44 	[  10] =  ASN1_OP_MATCH_ACT,		// d
45 	[  11] =  _tag(UNIV, PRIM, INT),
46 	[  12] =  _action(ACT_rsa_get_d),
47 	[  13] =  ASN1_OP_MATCH_ACT,		// prime1
48 	[  14] =  _tag(UNIV, PRIM, INT),
49 	[  15] =  _action(ACT_rsa_get_p),
50 	[  16] =  ASN1_OP_MATCH_ACT,		// prime2
51 	[  17] =  _tag(UNIV, PRIM, INT),
52 	[  18] =  _action(ACT_rsa_get_q),
53 	[  19] =  ASN1_OP_MATCH_ACT,		// exponent1
54 	[  20] =  _tag(UNIV, PRIM, INT),
55 	[  21] =  _action(ACT_rsa_get_dp),
56 	[  22] =  ASN1_OP_MATCH_ACT,		// exponent2
57 	[  23] =  _tag(UNIV, PRIM, INT),
58 	[  24] =  _action(ACT_rsa_get_dq),
59 	[  25] =  ASN1_OP_MATCH_ACT,		// coefficient
60 	[  26] =  _tag(UNIV, PRIM, INT),
61 	[  27] =  _action(ACT_rsa_get_qinv),
62 	[  28] = ASN1_OP_END_SEQ,
63 	[  29] = ASN1_OP_COMPLETE,
64 };
65 
66 const struct asn1_decoder rsaprivkey_decoder = {
67 	.machine = rsaprivkey_machine,
68 	.machlen = sizeof(rsaprivkey_machine),
69 	.actions = rsaprivkey_action_table,
70 };
71