Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
28647743
Commit
28647743
authored
Sep 12, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments added to highlight transfer syntax compatibility
parent
9023deaf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
17 deletions
+13
-17
FAQ
FAQ
+0
-15
skeletons/ber_decoder.h
skeletons/ber_decoder.h
+4
-1
skeletons/der_encoder.h
skeletons/der_encoder.h
+4
-1
skeletons/oer_decoder.h
skeletons/oer_decoder.h
+1
-0
skeletons/oer_encoder.h
skeletons/oer_encoder.h
+2
-0
skeletons/xer_decoder.h
skeletons/xer_decoder.h
+1
-0
skeletons/xer_encoder.h
skeletons/xer_encoder.h
+1
-0
No files found.
FAQ
View file @
28647743
...
@@ -22,21 +22,6 @@
...
@@ -22,21 +22,6 @@
./x509dump -h
./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
Lev Walkin
vlm@lionet.info
vlm@lionet.info
skeletons/ber_decoder.h
View file @
28647743
...
@@ -17,7 +17,10 @@ struct asn_codec_ctx_s; /* Forward declaration */
...
@@ -17,7 +17,10 @@ struct asn_codec_ctx_s; /* Forward declaration */
/*
/*
* The BER decoder of any type.
* The BER decoder of any type.
* This function may be invoked directly from the application.
* 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
,
asn_dec_rval_t
ber_decode
(
struct
asn_codec_ctx_s
*
opt_codec_ctx
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
...
...
skeletons/der_encoder.h
View file @
28647743
...
@@ -15,7 +15,10 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
...
@@ -15,7 +15,10 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
/*
* The DER encoder of any type. May be invoked by the application.
* 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
,
asn_enc_rval_t
der_encode
(
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
void
*
struct_ptr
,
/* Structure to be encoded */
void
*
struct_ptr
,
/* Structure to be encoded */
...
...
skeletons/oer_decoder.h
View file @
28647743
...
@@ -18,6 +18,7 @@ struct asn_codec_ctx_s; /* Forward declaration */
...
@@ -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.
* The Octet Encoding Rules (OER, X.696 08/2015) decoder for any given type.
* This function may be invoked directly by the application.
* 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
,
asn_dec_rval_t
oer_decode
(
struct
asn_codec_ctx_s
*
opt_codec_ctx
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
...
...
skeletons/oer_encoder.h
View file @
28647743
...
@@ -16,6 +16,8 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
...
@@ -16,6 +16,8 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
/*
* The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type.
* The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type.
* This function may be invoked directly by the application.
* 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
,
asn_enc_rval_t
oer_encode
(
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
void
*
struct_ptr
,
/* Structure to be encoded */
void
*
struct_ptr
,
/* Structure to be encoded */
...
...
skeletons/xer_decoder.h
View file @
28647743
...
@@ -15,6 +15,7 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */
...
@@ -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.
* 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
,
asn_dec_rval_t
xer_decode
(
struct
asn_codec_ctx_s
*
opt_codec_ctx
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
...
...
skeletons/xer_encoder.h
View file @
28647743
...
@@ -22,6 +22,7 @@ enum xer_encoder_flags_e {
...
@@ -22,6 +22,7 @@ enum xer_encoder_flags_e {
/*
/*
* The XER encoder of any type. May be invoked by the application.
* 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
,
asn_enc_rval_t
xer_encode
(
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
void
*
struct_ptr
,
/* Structure to be encoded */
void
*
struct_ptr
,
/* Structure to be encoded */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment