… | |
… | |
155 | =head2 ASN.1/BER/DER/... BASICS |
155 | =head2 ASN.1/BER/DER/... BASICS |
156 | |
156 | |
157 | ASN.1 is a strange language that can be used to describe protocols and |
157 | ASN.1 is a strange language that can be used to describe protocols and |
158 | data structures. It supports various mappings to JSON, XML, but most |
158 | data structures. It supports various mappings to JSON, XML, but most |
159 | importantly, to a various binary encodings such as BER, that is the topic |
159 | importantly, to a various binary encodings such as BER, that is the topic |
160 | of this module, and is used in SNMP or LDAP for example. |
160 | of this module, and is used in SNMP, LDAP or X.509 for example. |
161 | |
161 | |
162 | While ASN.1 defines a schema that is useful to interpret encoded data, |
162 | While ASN.1 defines a schema that is useful to interpret encoded data, |
163 | the BER encoding is actually somewhat self-describing: you might not know |
163 | the BER encoding is actually somewhat self-describing: you might not know |
164 | whether something is a string or a number or a sequence or something else, |
164 | whether something is a string or a number or a sequence or something else, |
165 | but you can nevertheless decode the overall structure, even if you end up |
165 | but you can nevertheless decode the overall structure, even if you end up |