Lev Walkin | ce8ccfa | 2004-08-20 13:38:07 +0000 | [diff] [blame] | 1 | |
Lev Walkin | 46edf96 | 2005-02-28 15:34:47 +0000 | [diff] [blame] | 2 | Q: How to build a simplest BER (XER) encoder or decoder? |
| 3 | A: |
| 4 | |
| 5 | Please see "Examples" section of ./doc/asn1c-usage.pdf |
| 6 | |
| 7 | Also, try the following to build the X.509v3 parser: |
| 8 | |
| 9 | cd ./examples/sample.source.PKIX1 |
| 10 | make |
| 11 | ./x509dump -h |
| 12 | |
| 13 | |
Lev Walkin | ce8ccfa | 2004-08-20 13:38:07 +0000 | [diff] [blame] | 14 | Q: Your compiler supplies a der_encode() procedure. How do I encode BER? |
| 15 | A: |
| 16 | The DER (and CER) are stricter subsets of a more generic BER encoding |
| 17 | method. If you encode data with DER or CER, all BER-conformant decoders |
| 18 | will easily understand that. Hence, to encode data in the BER format, |
| 19 | simply use the DER encoder, der_encode(). |
| 20 | |
| 21 | See also: ISO/IEC 8825-1 / X.690: |
| 22 | "ASN.1 encoding rules: Specification of |
| 23 | Basic Encoding Rules (BER), |
| 24 | Canonical Encoding Rules (CER) and |
| 25 | Distinguished Encoding Rules (DER)" |
| 26 | |
Lev Walkin | e057ca3 | 2004-09-05 10:41:17 +0000 | [diff] [blame] | 27 | |
Lev Walkin | e057ca3 | 2004-09-05 10:41:17 +0000 | [diff] [blame] | 28 | |
| 29 | -- |
| 30 | Lev Walkin |
| 31 | vlm@lionet.info |