Lev Walkin | ce8ccfa | 2004-08-20 13:38:07 +0000 | [diff] [blame] | 1 | |
| 2 | Q: Your compiler supplies a der_encode() procedure. How do I encode BER? |
| 3 | A: |
| 4 | The DER (and CER) are stricter subsets of a more generic BER encoding |
| 5 | method. If you encode data with DER or CER, all BER-conformant decoders |
| 6 | will easily understand that. Hence, to encode data in the BER format, |
| 7 | simply use the DER encoder, der_encode(). |
| 8 | |
| 9 | See also: ISO/IEC 8825-1 / X.690: |
| 10 | "ASN.1 encoding rules: Specification of |
| 11 | Basic Encoding Rules (BER), |
| 12 | Canonical Encoding Rules (CER) and |
| 13 | Distinguished Encoding Rules (DER)" |
| 14 | |
Lev Walkin | e057ca3 | 2004-09-05 10:41:17 +0000 | [diff] [blame] | 15 | |
| 16 | Q: I've tried doing ./asn1c/asn1c -P examples/*PKIX*93*, but compiler spits |
| 17 | several fatal failures and exits. |
| 18 | A: |
| 19 | The PKIX1 specifications uses ASN.1 Information Object Classes, |
| 20 | which is arguably one of the most complex ASN.1 concepts. |
| 21 | |
| 22 | The asn1c parser and fixer subsystems currently understand most of |
| 23 | IOC syntax, but the compiler can cope with only the very basic |
| 24 | IOC semantics. |
| 25 | |
| 26 | The goal of asn1c is to adequately support the practically necessary |
| 27 | subset of IOCs to compile PKIX1 and other real-world specs, |
| 28 | but this milestone isn't yet reached. Please contact me in case |
| 29 | you have special requirements, we can work it out. |
| 30 | |
| 31 | P.S. Parser and fixer are now able to grok PKIX1, try this out: |
| 32 | |
| 33 | ./asn1c/asn1c -E -F examples/*PKIX*93* |
| 34 | |
| 35 | -- |
| 36 | Lev Walkin |
| 37 | vlm@lionet.info |