1 /* 2 * Automatically generated by asn1_compiler. Do not edit 3 * 4 * ASN.1 parser for tpm2key 5 */ 6 #include <linux/asn1_ber_bytecode.h> 7 #include "tpm2key.asn1.h" 8 9 enum tpm2key_actions { 10 ACT_tpm2_key_parent = 0, 11 ACT_tpm2_key_priv = 1, 12 ACT_tpm2_key_pub = 2, 13 ACT_tpm2_key_type = 3, 14 NR__tpm2key_actions = 4 15 }; 16 17 static const asn1_action_t tpm2key_action_table[NR__tpm2key_actions] = { 18 [ 0] = tpm2_key_parent, 19 [ 1] = tpm2_key_priv, 20 [ 2] = tpm2_key_pub, 21 [ 3] = tpm2_key_type, 22 }; 23 24 static const unsigned char tpm2key_machine[] = { 25 // TPMKey 26 [ 0] = ASN1_OP_MATCH, 27 [ 1] = _tag(UNIV, CONS, SEQ), 28 [ 2] = ASN1_OP_MATCH_ACT, // type 29 [ 3] = _tag(UNIV, PRIM, OID), 30 [ 4] = _action(ACT_tpm2_key_type), 31 [ 5] = ASN1_OP_MATCH_JUMP_OR_SKIP, // emptyAuth 32 [ 6] = _tagn(CONT, CONS, 0), 33 [ 7] = _jump_target(19), 34 [ 8] = ASN1_OP_MATCH_ACT, // parent 35 [ 9] = _tag(UNIV, PRIM, INT), 36 [ 10] = _action(ACT_tpm2_key_parent), 37 [ 11] = ASN1_OP_MATCH_ACT, // pubkey 38 [ 12] = _tag(UNIV, PRIM, OTS), 39 [ 13] = _action(ACT_tpm2_key_pub), 40 [ 14] = ASN1_OP_MATCH_ACT, // privkey 41 [ 15] = _tag(UNIV, PRIM, OTS), 42 [ 16] = _action(ACT_tpm2_key_priv), 43 [ 17] = ASN1_OP_END_SEQ, 44 [ 18] = ASN1_OP_COMPLETE, 45 46 [ 19] = ASN1_OP_MATCH, // emptyAuth 47 [ 20] = _tag(UNIV, PRIM, BOOL), 48 [ 21] = ASN1_OP_END_SEQ, 49 [ 22] = ASN1_OP_RETURN, 50 }; 51 52 const struct asn1_decoder tpm2key_decoder = { 53 .machine = tpm2key_machine, 54 .machlen = sizeof(tpm2key_machine), 55 .actions = tpm2key_action_table, 56 }; 57