vlm | cfa6f74 | 2004-08-20 13:38:07 +0000 | [diff] [blame] | 1 | |
vlm | 3990f89 | 2005-03-20 13:26:08 +0000 | [diff] [blame] | 2 | 1.Q: Is it possible to build the asn1c compiler on Win32? |
| 3 | 1.A: |
| 4 | At this point, the asn1c source code is tied to GCC-specific |
| 5 | extensions in several key places. The CYGWIN environment with |
| 6 | gcc compiler may be what are you looking for. |
vlm | 547269c | 2005-02-28 15:34:47 +0000 | [diff] [blame] | 7 | |
vlm | 3990f89 | 2005-03-20 13:26:08 +0000 | [diff] [blame] | 8 | Please also consider using the Online ASN.1 compiler at |
| 9 | http://lionet.info/asn1c |
| 10 | which generates platform-independent code. |
| 11 | |
| 12 | |
| 13 | 2.Q: How to build a simplest BER (XER) encoder or decoder? |
| 14 | 2.A: |
vlm | 30ea544 | 2005-12-22 21:36:47 +0000 | [diff] [blame] | 15 | Please check the "Quick Start Guide" on ./doc/asn1c-quick.pdf |
| 16 | Please check the "Examples" section of ./doc/asn1c-usage.pdf |
vlm | 547269c | 2005-02-28 15:34:47 +0000 | [diff] [blame] | 17 | |
| 18 | Also, try the following to build the X.509v3 parser: |
| 19 | |
| 20 | cd ./examples/sample.source.PKIX1 |
| 21 | make |
| 22 | ./x509dump -h |
| 23 | |
| 24 | |
vlm | 3990f89 | 2005-03-20 13:26:08 +0000 | [diff] [blame] | 25 | 3.Q: Your compiler supplies a der_encode() procedure. How do I encode BER? |
| 26 | 3.A: |
vlm | cfa6f74 | 2004-08-20 13:38:07 +0000 | [diff] [blame] | 27 | The DER (and CER) are stricter subsets of a more generic BER encoding |
| 28 | method. If you encode data with DER or CER, all BER-conformant decoders |
| 29 | will easily understand that. Hence, to encode data in the BER format, |
| 30 | simply use the DER encoder, der_encode(). |
| 31 | |
| 32 | See also: ISO/IEC 8825-1 / X.690: |
| 33 | "ASN.1 encoding rules: Specification of |
| 34 | Basic Encoding Rules (BER), |
| 35 | Canonical Encoding Rules (CER) and |
| 36 | Distinguished Encoding Rules (DER)" |
| 37 | |
vlm | e6bdf51 | 2004-09-05 10:41:17 +0000 | [diff] [blame] | 38 | |
vlm | e6bdf51 | 2004-09-05 10:41:17 +0000 | [diff] [blame] | 39 | |
| 40 | -- |
| 41 | Lev Walkin |
| 42 | vlm@lionet.info |