summaryrefslogtreecommitdiff
path: root/compat/verification/rsapubkey.asn1.c
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2019-03-04 12:01:54 +0100
committerDominik Sliwa <dominik.sliwa@toradex.com>2019-03-04 12:01:54 +0100
commit348fa3f6871f56a37dcd16c99ca98118c6d79a38 (patch)
tree6fcae7785bae4ffb838fd6549f7d01ba6abf0763 /compat/verification/rsapubkey.asn1.c
Backports v4.19.24
Backports generated by toradex backports 515a1fa55cda2b1d952872e1786857481bd54fcc against mainline kernel tag v4.19.24 Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'compat/verification/rsapubkey.asn1.c')
-rw-r--r--compat/verification/rsapubkey.asn1.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/compat/verification/rsapubkey.asn1.c b/compat/verification/rsapubkey.asn1.c
new file mode 100644
index 0000000..6bb1994
--- /dev/null
+++ b/compat/verification/rsapubkey.asn1.c
@@ -0,0 +1,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,
+};