aboutsummaryrefslogtreecommitdiffstats
path: root/FAQ
blob: c6a945917ef95bdfdef16ff7c0bbacb85f29fc6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Q: Your compiler supplies a der_encode() procedure. How do I encode BER?
A:
	The DER (and CER) are stricter subsets of a more generic BER encoding
	method. If you encode data with DER or CER, all BER-conformant decoders
	will easily understand that. Hence, to encode data in the BER format,
	simply use the DER encoder, der_encode().

	See also:	ISO/IEC 8825-1 / X.690:
			"ASN.1 encoding rules: Specification of
			 Basic Encoding Rules (BER),
			 Canonical Encoding Rules (CER) and
			 Distinguished Encoding Rules (DER)"


Q: I've tried doing ./asn1c/asn1c -P examples/*PKIX*93*, but compiler spits
   several fatal failures and exits.
A:
	The old (RFC2459) PKIX1 specifications used ASN.1 Information Object
	Classes, which is arguably one of the most complex ASN.1 concepts.

	The asn1c parser and fixer subsystems currently understand most of
	IOC syntax, but the compiler can cope with only the very basic
	IOC semantics.

	The goal of asn1c is to adequately support the practically necessary
	subset of IOCs to compile PKIX1 and other real-world specs,
	but this milestone isn't yet reached. Please contact me in case
	you have special requirements, we can work it out.

	However, the asn1c compiler is able to understand the newer PKIX1
	ASN.1 specs, contained in RFC3280, which obsole RFC2459.
	Try this one out:

		./asn1c/asn1c -P examples/rfc3280-*.asn1

-- 
Lev Walkin
vlm@lionet.info