|
| 1 | +# -*- text -*- |
| 2 | +# Copyright (C) 2025 The FreeRADIUS Server project and contributors |
| 3 | +# This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0 |
| 4 | +# Version $Id$ |
| 5 | +DEFINE Certificate-Extensions x509_extensions ref=OID-Tree |
| 6 | + |
| 7 | +DEFINE Issuer tlv is_pairs |
| 8 | +BEGIN Issuer |
| 9 | +DEFINE RelativeDistinguishedName tlv subtype=set |
| 10 | +BEGIN RelativeDistinguishedName |
| 11 | +DEFINE AttributeTypeAndValue group ref=OID-Tree,sequence_of=set,is_pair |
| 12 | +END RelativeDistinguishedName |
| 13 | +END Issuer |
| 14 | + |
| 15 | +DEFINE Issuer-Set tlv is_pairs |
| 16 | +BEGIN Issuer-Set |
| 17 | +DEFINE RelativeDistinguishedName tlv |
| 18 | +BEGIN RelativeDistinguishedName |
| 19 | +DEFINE AttributeTypeAndValue group ref=OID-Tree,sequence_of=set,is_pair |
| 20 | +END RelativeDistinguishedName |
| 21 | +END Issuer-Set |
| 22 | + |
| 23 | +DEFINE Test-Seq-Of sequence sequence_of=integer |
| 24 | +BEGIN Test-Seq-Of |
| 25 | +DEFINE Test-First-Integer integer |
| 26 | +END Test-Seq-Of |
| 27 | + |
| 28 | +DEFINE Test-Set-Of tlv subtype=set,set_of=integer |
| 29 | +BEGIN Test-Set-Of |
| 30 | +DEFINE Test-First-Integer int64 |
| 31 | +END Test-Set-Of |
| 32 | + |
| 33 | +DEFINE Test-Set-Of-Group group ref=Test-Set-Of,subtype=set,set_of=integer |
| 34 | + |
| 35 | +DEFINE Test-Boolean bool |
| 36 | + |
| 37 | +DEFINE Test-Integer int64 |
| 38 | + |
| 39 | +DEFINE Foo struct subtype=sequence |
| 40 | +BEGIN Foo |
| 41 | +MEMBER Test-Integer int64 |
| 42 | +END Foo |
| 43 | + |
| 44 | +DEFINE Bar struct |
| 45 | +BEGIN Bar |
| 46 | +MEMBER Test-Boolean bool |
| 47 | +END Bar |
| 48 | + |
| 49 | +DEFINE Foo-Bar struct subtype=sequence |
| 50 | +BEGIN Foo-Bar |
| 51 | +MEMBER Test-Integer int64 has_default |
| 52 | +VALUE Test-Integer DEFAULT 1 |
| 53 | +MEMBER Test-Boolean bool |
| 54 | +END Foo-Bar |
| 55 | + |
| 56 | +DEFINE Test-Bitstring octets subtype=bitstring |
| 57 | + |
| 58 | +DEFINE Seq-Bitstring-Octets struct |
| 59 | +BEGIN Seq-Bitstring-Octets |
| 60 | +MEMBER Test-Bitstring octets |
| 61 | +END Seq-Bitstring-Octets |
| 62 | + |
| 63 | +DEFINE Bitstring-Struct struct subtype=bitstring |
| 64 | +BEGIN Bitstring-Struct |
| 65 | +MEMBER foo bit[8] |
| 66 | +MEMBER bar bit[4] |
| 67 | +MEMBER foo-bar bit[4] |
| 68 | +END Bitstring-Struct |
| 69 | + |
| 70 | +DEFINE Bitstring-Struct-7 struct subtype=bitstring |
| 71 | +BEGIN Bitstring-Struct-7 |
| 72 | +MEMBER foo bit[2] |
| 73 | +MEMBER bar bit[1] |
| 74 | +MEMBER foo-bar bit[4] |
| 75 | +END Bitstring-Struct-7 |
| 76 | + |
| 77 | +DEFINE Octetstring octets |
| 78 | + |
| 79 | +DEFINE Seq-Octetstring struct |
| 80 | +BEGIN Seq-Octetstring |
| 81 | +MEMBER Octetstring octets |
| 82 | +END Seq-Octetstring |
| 83 | + |
| 84 | +DEFINE Test-NULL bool subtype=null |
| 85 | + |
| 86 | +DEFINE Seq-Null struct |
| 87 | +BEGIN Seq-Null |
| 88 | +MEMBER Test-Null bool subtype=null |
| 89 | +END Seq-Null |
| 90 | + |
| 91 | +DEFINE Seq-Integer-Null struct |
| 92 | +BEGIN Seq-Integer-Null |
| 93 | +MEMBER Test-Integer int64 |
| 94 | +MEMBER Test-Null bool subtype=null |
| 95 | +END Seq-Integer-Null |
| 96 | + |
| 97 | +DEFINE Test-Oid string subtype=oid |
| 98 | + |
| 99 | +DEFINE Seq-Oid struct subtype=sequence |
| 100 | +BEGIN Seq-Oid |
| 101 | +MEMBER Test-Oid string subtype=oid |
| 102 | +END Seq-Oid |
| 103 | + |
| 104 | +DEFINE Test-Enumerated int64 subtype=enumerated |
| 105 | + |
| 106 | +DEFINE Test-String string |
| 107 | + |
| 108 | +DEFINE Test-String-Max string max=5 |
| 109 | + |
| 110 | +#DEFINE Test-String-UTF8 string subtype=utf8string |
| 111 | +DEFINE Test-String-UTF8 utf8string |
| 112 | + |
| 113 | +DEFINE Test-String-Custom utf8string |
| 114 | + |
| 115 | +DEFINE Test-String-Printable printablestring |
| 116 | + |
| 117 | +DEFINE Test-String-T61 t61string |
| 118 | + |
| 119 | +DEFINE Test-String-IA5 ia5string |
| 120 | + |
| 121 | +DEFINE Test-String-Visible visiblestring |
| 122 | + |
| 123 | +DEFINE Test-String-General generalstring |
| 124 | + |
| 125 | +DEFINE Test-String-Universal universalstring |
| 126 | + |
| 127 | +DEFINE Seq-String struct |
| 128 | +BEGIN Seq-String |
| 129 | +MEMBER Test-String string |
| 130 | +END Seq-String |
| 131 | + |
| 132 | +DEFINE Test-Date date |
| 133 | + |
| 134 | +DEFINE Test-UTC utctime |
| 135 | + |
| 136 | +DEFINE Test-Generalized-Time generalizedtime |
| 137 | + |
| 138 | +DEFINE Seq-Date struct |
| 139 | +BEGIN Seq-Date |
| 140 | +MEMBER Test-Date date |
| 141 | +END Seq-Date |
| 142 | + |
| 143 | +DEFINE Set-Bool-Integer struct |
| 144 | +BEGIN Set-Bool-Integer |
| 145 | +MEMBER Test-Bool bool |
| 146 | +MEMBER Test-Integer int64 |
| 147 | +END Set-Bool-Integer |
| 148 | + |
| 149 | +DEFINE Test-Context-Specific bool class=context-specific,tagnum=0,subtype=boolean |
| 150 | + |
| 151 | +DEFINE Test-Sequence-TLV tlv subtype=sequence |
| 152 | +BEGIN Test-Sequence-TLV |
| 153 | +DEFINE Test-Integer int64 |
| 154 | +DEFINE Test-Boolean bool |
| 155 | +END Test-Sequence-TLV |
| 156 | + |
| 157 | +DEFINE Test-TLV tlv |
| 158 | +BEGIN Test-TLV |
| 159 | +DEFINE Test-Integer int64 subtype=integer |
| 160 | +DEFINE Test-Boolean bool subtype=boolean |
| 161 | +END Test-TLV |
| 162 | + |
| 163 | +DEFINE Test-Sequence-GROUP group subtype=sequence,ref=Test-TLV |
| 164 | + |
| 165 | +DEFINE Test-Set-Struct struct subtype=set |
| 166 | +BEGIN Test-Set-Struct |
| 167 | +MEMBER Test-Boolean bool subtype=boolean |
| 168 | +MEMBER Test-Integer int64 subtype=integer |
| 169 | +END Test-Set-Struct |
| 170 | + |
| 171 | +DEFINE Test-Set-Bad-Struct struct subtype=set |
| 172 | +BEGIN Test-Set-Bad-Struct |
| 173 | +MEMBER Test-Integer int64 subtype=integer |
| 174 | +MEMBER Test-Boolean bool subtype=boolean |
| 175 | +END Test-Set-Bad-Struct |
| 176 | + |
| 177 | +DEFINE Test-Set-TLV tlv subtype=set |
| 178 | +BEGIN Test-Set-TLV |
| 179 | +DEFINE Test-Integer int64 subtype=integer |
| 180 | +DEFINE Test-Boolean bool subtype=boolean |
| 181 | +END Test-Set-TLV |
| 182 | + |
| 183 | +DEFINE Test-Set-GROUP group subtype=set,ref=Test-TLV |
0 commit comments