comments added to highlight transfer syntax compatibility

This commit is contained in:
Lev Walkin 2017-09-12 11:07:06 -07:00
parent 9023deafc9
commit 286477433b
7 changed files with 13 additions and 17 deletions

15
FAQ
View File

@ -22,21 +22,6 @@
./x509dump -h
3.Q: Your compiler supplies a der_encode() procedure. How do I encode BER?
3.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)"
--
Lev Walkin
vlm@lionet.info

View File

@ -17,7 +17,10 @@ struct asn_codec_ctx_s; /* Forward declaration */
/*
* The BER decoder of any type.
* This function may be invoked directly from the application.
* The der_encode() function (der_encoder.h) is an opposite to ber_decode().
* Decodes BER, DER and CER data (DER and CER are different subsets of BER).
*
* NOTE: Use the der_encode() function (der_encoder.h) to produce encoding
* which is compliant with ber_decode().
*/
asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx,
struct asn_TYPE_descriptor_s *type_descriptor,

View File

@ -15,7 +15,10 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
* The DER encoder of any type. May be invoked by the application.
* The ber_decode() function (ber_decoder.h) is an opposite of der_encode().
* Produces DER- and BER-compliant encoding. (DER is a subset of BER).
*
* NOTE: Use the ber_decode() function (ber_decoder.h) to decode data
* produced by der_encode().
*/
asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor,
void *struct_ptr, /* Structure to be encoded */

View File

@ -18,6 +18,7 @@ struct asn_codec_ctx_s; /* Forward declaration */
/*
* The Octet Encoding Rules (OER, X.696 08/2015) decoder for any given type.
* This function may be invoked directly by the application.
* Parses CANONICAL-OER and BASIC-OER.
*/
asn_dec_rval_t oer_decode(struct asn_codec_ctx_s *opt_codec_ctx,
struct asn_TYPE_descriptor_s *type_descriptor,

View File

@ -16,6 +16,8 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
* The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type.
* This function may be invoked directly by the application.
* Produces CANONICAL-OER output compatible with CANONICAL-OER
* and BASIC-OER decoders.
*/
asn_enc_rval_t oer_encode(struct asn_TYPE_descriptor_s *type_descriptor,
void *struct_ptr, /* Structure to be encoded */

View File

@ -15,6 +15,7 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
* The XER decoder of any ASN.1 type. May be invoked by the application.
* Decodes CANONICAL-XER and BASIC-XER.
*/
asn_dec_rval_t xer_decode(struct asn_codec_ctx_s *opt_codec_ctx,
struct asn_TYPE_descriptor_s *type_descriptor,

View File

@ -22,6 +22,7 @@ enum xer_encoder_flags_e {
/*
* The XER encoder of any type. May be invoked by the application.
* Produces CANONICAL-XER and BASIC-XER depending on the (xer_flags).
*/
asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor,
void *struct_ptr, /* Structure to be encoded */