~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/asn1_ber_bytecode.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/asn1_ber_bytecode.h (Architecture alpha) and /include/linux/asn1_ber_bytecode.h (Architecture m68k)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /* ASN.1 BER/DER/CER parsing state machine int      2 /* ASN.1 BER/DER/CER parsing state machine internal definitions
  3  *                                                  3  *
  4  * Copyright (C) 2012 Red Hat, Inc. All Rights      4  * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
  5  * Written by David Howells (dhowells@redhat.c      5  * Written by David Howells (dhowells@redhat.com)
  6  */                                                 6  */
  7                                                     7 
  8 #ifndef _LINUX_ASN1_BER_BYTECODE_H                  8 #ifndef _LINUX_ASN1_BER_BYTECODE_H
  9 #define _LINUX_ASN1_BER_BYTECODE_H                  9 #define _LINUX_ASN1_BER_BYTECODE_H
 10                                                    10 
 11 #ifdef __KERNEL__                                  11 #ifdef __KERNEL__
 12 #include <linux/types.h>                           12 #include <linux/types.h>
 13 #endif                                             13 #endif
 14 #include <linux/asn1.h>                            14 #include <linux/asn1.h>
 15                                                    15 
 16 typedef int (*asn1_action_t)(void *context,        16 typedef int (*asn1_action_t)(void *context,
 17                              size_t hdrlen, /*     17                              size_t hdrlen, /* In case of ANY type */
 18                              unsigned char tag     18                              unsigned char tag, /* In case of ANY type */
 19                              const void *value     19                              const void *value, size_t vlen);
 20                                                    20 
 21 struct asn1_decoder {                              21 struct asn1_decoder {
 22         const unsigned char *machine;              22         const unsigned char *machine;
 23         size_t machlen;                            23         size_t machlen;
 24         const asn1_action_t *actions;              24         const asn1_action_t *actions;
 25 };                                                 25 };
 26                                                    26 
 27 enum asn1_opcode {                                 27 enum asn1_opcode {
 28         /* The tag-matching ops come first and     28         /* The tag-matching ops come first and the odd-numbered slots
 29          * are for OR_SKIP ops.                    29          * are for OR_SKIP ops.
 30          */                                        30          */
 31 #define ASN1_OP_MATCH__SKIP               0x01     31 #define ASN1_OP_MATCH__SKIP               0x01
 32 #define ASN1_OP_MATCH__ACT                0x02     32 #define ASN1_OP_MATCH__ACT                0x02
 33 #define ASN1_OP_MATCH__JUMP               0x04     33 #define ASN1_OP_MATCH__JUMP               0x04
 34 #define ASN1_OP_MATCH__ANY                0x08     34 #define ASN1_OP_MATCH__ANY                0x08
 35 #define ASN1_OP_MATCH__COND               0x10     35 #define ASN1_OP_MATCH__COND               0x10
 36                                                    36 
 37         ASN1_OP_MATCH                   = 0x00     37         ASN1_OP_MATCH                   = 0x00,
 38         ASN1_OP_MATCH_OR_SKIP           = 0x01     38         ASN1_OP_MATCH_OR_SKIP           = 0x01,
 39         ASN1_OP_MATCH_ACT               = 0x02     39         ASN1_OP_MATCH_ACT               = 0x02,
 40         ASN1_OP_MATCH_ACT_OR_SKIP       = 0x03     40         ASN1_OP_MATCH_ACT_OR_SKIP       = 0x03,
 41         ASN1_OP_MATCH_JUMP              = 0x04     41         ASN1_OP_MATCH_JUMP              = 0x04,
 42         ASN1_OP_MATCH_JUMP_OR_SKIP      = 0x05     42         ASN1_OP_MATCH_JUMP_OR_SKIP      = 0x05,
 43         ASN1_OP_MATCH_ANY               = 0x08     43         ASN1_OP_MATCH_ANY               = 0x08,
 44         ASN1_OP_MATCH_ANY_OR_SKIP       = 0x09     44         ASN1_OP_MATCH_ANY_OR_SKIP       = 0x09,
 45         ASN1_OP_MATCH_ANY_ACT           = 0x0a     45         ASN1_OP_MATCH_ANY_ACT           = 0x0a,
 46         ASN1_OP_MATCH_ANY_ACT_OR_SKIP   = 0x0b     46         ASN1_OP_MATCH_ANY_ACT_OR_SKIP   = 0x0b,
 47         /* Everything before here matches unco     47         /* Everything before here matches unconditionally */
 48                                                    48 
 49         ASN1_OP_COND_MATCH_OR_SKIP      = 0x11     49         ASN1_OP_COND_MATCH_OR_SKIP      = 0x11,
 50         ASN1_OP_COND_MATCH_ACT_OR_SKIP  = 0x13     50         ASN1_OP_COND_MATCH_ACT_OR_SKIP  = 0x13,
 51         ASN1_OP_COND_MATCH_JUMP_OR_SKIP = 0x15     51         ASN1_OP_COND_MATCH_JUMP_OR_SKIP = 0x15,
 52         ASN1_OP_COND_MATCH_ANY          = 0x18     52         ASN1_OP_COND_MATCH_ANY          = 0x18,
 53         ASN1_OP_COND_MATCH_ANY_OR_SKIP  = 0x19     53         ASN1_OP_COND_MATCH_ANY_OR_SKIP  = 0x19,
 54         ASN1_OP_COND_MATCH_ANY_ACT      = 0x1a     54         ASN1_OP_COND_MATCH_ANY_ACT      = 0x1a,
 55         ASN1_OP_COND_MATCH_ANY_ACT_OR_SKIP = 0     55         ASN1_OP_COND_MATCH_ANY_ACT_OR_SKIP = 0x1b,
 56                                                    56 
 57         /* Everything before here will want a      57         /* Everything before here will want a tag from the data */
 58 #define ASN1_OP__MATCHES_TAG ASN1_OP_COND_MATC     58 #define ASN1_OP__MATCHES_TAG ASN1_OP_COND_MATCH_ANY_ACT_OR_SKIP
 59                                                    59 
 60         /* These are here to help fill up spac     60         /* These are here to help fill up space */
 61         ASN1_OP_COND_FAIL               = 0x1c     61         ASN1_OP_COND_FAIL               = 0x1c,
 62         ASN1_OP_COMPLETE                = 0x1d     62         ASN1_OP_COMPLETE                = 0x1d,
 63         ASN1_OP_ACT                     = 0x1e     63         ASN1_OP_ACT                     = 0x1e,
 64         ASN1_OP_MAYBE_ACT               = 0x1f     64         ASN1_OP_MAYBE_ACT               = 0x1f,
 65                                                    65 
 66         /* The following eight have bit 0 -> S     66         /* The following eight have bit 0 -> SET, 1 -> OF, 2 -> ACT */
 67         ASN1_OP_END_SEQ                 = 0x20     67         ASN1_OP_END_SEQ                 = 0x20,
 68         ASN1_OP_END_SET                 = 0x21     68         ASN1_OP_END_SET                 = 0x21,
 69         ASN1_OP_END_SEQ_OF              = 0x22     69         ASN1_OP_END_SEQ_OF              = 0x22,
 70         ASN1_OP_END_SET_OF              = 0x23     70         ASN1_OP_END_SET_OF              = 0x23,
 71         ASN1_OP_END_SEQ_ACT             = 0x24     71         ASN1_OP_END_SEQ_ACT             = 0x24,
 72         ASN1_OP_END_SET_ACT             = 0x25     72         ASN1_OP_END_SET_ACT             = 0x25,
 73         ASN1_OP_END_SEQ_OF_ACT          = 0x26     73         ASN1_OP_END_SEQ_OF_ACT          = 0x26,
 74         ASN1_OP_END_SET_OF_ACT          = 0x27     74         ASN1_OP_END_SET_OF_ACT          = 0x27,
 75 #define ASN1_OP_END__SET                  0x01     75 #define ASN1_OP_END__SET                  0x01
 76 #define ASN1_OP_END__OF                   0x02     76 #define ASN1_OP_END__OF                   0x02
 77 #define ASN1_OP_END__ACT                  0x04     77 #define ASN1_OP_END__ACT                  0x04
 78                                                    78 
 79         ASN1_OP_RETURN                  = 0x28     79         ASN1_OP_RETURN                  = 0x28,
 80                                                    80 
 81         ASN1_OP__NR                                81         ASN1_OP__NR
 82 };                                                 82 };
 83                                                    83 
 84 #define _tag(CLASS, CP, TAG) ((ASN1_##CLASS <<     84 #define _tag(CLASS, CP, TAG) ((ASN1_##CLASS << 6) | (ASN1_##CP << 5) | ASN1_##TAG)
 85 #define _tagn(CLASS, CP, TAG) ((ASN1_##CLASS <     85 #define _tagn(CLASS, CP, TAG) ((ASN1_##CLASS << 6) | (ASN1_##CP << 5) | TAG)
 86 #define _jump_target(N) (N)                        86 #define _jump_target(N) (N)
 87 #define _action(N) (N)                             87 #define _action(N) (N)
 88                                                    88 
 89 #endif /* _LINUX_ASN1_BER_BYTECODE_H */            89 #endif /* _LINUX_ASN1_BER_BYTECODE_H */
 90                                                    90 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php