… | |
… | |
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 |
… | |
… | |
430 | |
430 | |
431 | our @EXPORT_OK = map @$_, values %EXPORT_TAGS; |
431 | our @EXPORT_OK = map @$_, values %EXPORT_TAGS; |
432 | |
432 | |
433 | $EXPORT_TAGS{all} = \@EXPORT_OK; |
433 | $EXPORT_TAGS{all} = \@EXPORT_OK; |
434 | $EXPORT_TAGS{const} = [map @{ $EXPORT_TAGS{$_} }, qw(const_index const_asn)]; |
434 | $EXPORT_TAGS{const} = [map @{ $EXPORT_TAGS{$_} }, qw(const_index const_asn)]; |
435 | use Data::Dump; ddx \%EXPORT_TAGS; |
|
|
436 | |
435 | |
437 | =head1 PROFILES |
436 | =head1 PROFILES |
438 | |
437 | |
439 | While any BER data can be correctly encoded and decoded out of the box, it |
438 | While any BER data can be correctly encoded and decoded out of the box, it |
440 | can be inconvenient to have to manually decode some values into a "better" |
439 | can be inconvenient to have to manually decode some values into a "better" |