aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1
AgeCommit message (Collapse)Author
2014-08-25Fix misspellings of 'another'Tuncer Ayaz
2014-06-19Prepare releaseErlang/OTP
2014-06-05BER: Eliminate dialyzer warnings for specialized decode functionsBjörn Gustavsson
2014-06-05BER: Eliminate dialyzer warning for encoding of BIT STRINGsBjörn Gustavsson
2014-06-05BER: Optimize encoding of ENUMERATEDBjörn Gustavsson
This will also eliminate a dialyzer warning.
2014-06-05BER: Remove a redundant clause in encoding of open typesBjörn Gustavsson
The clause is just an optimization for a (extremly rare) special case. Removing it will eliminate a dialyzer warning.
2014-06-05(U)PER: Fix decoding of named INTEGERBjörn Gustavsson
2014-06-05(U)PER: Fix encoding of a semi-constrained, named INTEGERBjörn Gustavsson
The code generator would crash.
2014-06-05(U)PER: Optimize handling of named BIT STRING with a lower zero boundBjörn Gustavsson
If a named BIT STRING has a lower size bound of 0, treat it the same way as if there was no constraint for the purposes of trailing zero bits. That change will eliminate a dialyzer warning.
2014-06-05PER: Optimize encoding of character strings with simple rangesBjörn Gustavsson
The encoder for the following type would generate a dialyzer warning: Ns ::= NumericString (FROM ("0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9")) Optimize this case to make it slightly faster as well as eliminate the dialyzer warning.
2014-06-05PER: Remove unnecessary clause for handling DEFAULTBjörn Gustavsson
2014-06-05(U)PER: Suppress dialyzer warnings for complete/1Björn Gustavsson
2014-06-05Test suites: Add support for running Dialyzer on generated codeBjörn Gustavsson
Running dialyzer on test suites is good for finding both bugs and useless dialyzer warnings. Add a mechanism in asn1_test_lib for turning on running of dialyzer on all generated code. Turned off by default, because it is slow and because there are still a few dialyzer warnings left.
2014-06-05Improve tests of DEFAULT valuesBjörn Gustavsson
2014-06-05Correct OCTET STRING default when legacy_erlang_types is activeBjörn Gustavsson
The default value for an OCTET STRING when legacy_erlang_types was active would be a binary instead of a list.
2014-06-05Remove old DEFAULT-checking code made obsolete in the previous commitBjörn Gustavsson
2014-06-05Rewrite the code for testing DEFAULT for DERBjörn Gustavsson
The old code for testing DEFAULT values is messy, inefficient, and causes dialyzer warnings.
2014-05-06Test DEFAULT more thoroughlyBjörn Gustavsson
We need to test DEFAULT values both with and without legacy_erlang_types.
2014-05-06Set.py: Correct illegal DEFAULT valueBjörn Gustavsson
If SetIn is defined like this: SetIn ::= SET { boolIn BOOLEAN, intIn INTEGER } then it may not be used with an empty DEFAULT value like this: SetDef1 ::= SET { set1 SetIn DEFAULT {} } The ASN.1 compiler prints an warning message, but still generates code. (That should be fixed.) Fix the incorrect ASN.1 specification by making the components in SetIn optional: SetIn ::= SET { boolIn BOOLEAN OPTIONAL, intIn INTEGER OPTIONAL }
2014-05-06BER: Optimize decoding of ENUMERATEDBjörn Gustavsson
2014-05-06BER: Suppress dialyzer warnings for encode_bit_string/4Björn Gustavsson
We don't want to touch the code used for encoding BIT STRINGs when 'legacy_erl_types' is active, since it will be removed within two or three major releases. But we do want to suppress the dialyzer warnings in the meantime. The easiest way is to call encode_bit_string/4 with unknown types from an exported function that is never actually called like this: -export(['dialyzer-suppressions'/0]). 'dialyzer-suppressions'(Arg) -> {A,B,C,D} = Arg, encode_bit_string(A, B, C, D), ok.
2014-04-29BER: Inline testing of constraints when decodingBjörn Gustavsson
Calling library routines for validation of constraints may cause dialyzer warnings if some type of constraints handled by the library routine are not used in a specific ASN.1 module. To avoid those warnings (and slightly speed up the decoding), inline the constraint checking.
2014-04-16Refactor gen_dec_prim/3 to facilitate future optimizationsBjörn Gustavsson
2014-04-16Remove unused arguments for asn1ct_gen_ber_bin_v2:gen_dec_prim()Björn Gustavsson
Make the source code a little bit cleaner.
2014-04-16Add missing newline in -export()Björn Gustavsson
A newline was forgotten.
2014-04-07Update release notesErlang/OTP
2014-03-31Merge branch 'bjorn/asn1/documentation'Björn Gustavsson
* bjorn/asn1/documentation: Consistenly use ASN.1 instead of asn1 Correct some spelling, grammar and punctation issues Correct description of the undec_rest option Correct description of the REAL type Replace "extend-ability" with "extensibility" Remove the section about encoding rules Bring information about tags up to date Don't waste words describing the SET type Correct and modernize the examples for DEFAULT Correct the UTF8String description and example Correct the PrimStrings example Remove all uses of the deprecated asn1{ct,rt}:{en,de}code/2 functions Correct and modernize the "A First Example" section Shorten the Introduction section, keeping only the essential details Fix an ampersand Document the asn1_OPENTYPE wrapper
2014-03-28Consistenly use ASN.1 instead of asn1Björn Gustavsson
When talking about the ASN.1 standard, ASN.1 specifications, and the ASN.1 compiler, consistently use "ASN.1" instead of "asn1".
2014-03-28Correct some spelling, grammar and punctation issuesBjörn Gustavsson
2014-03-28Correct description of the undec_rest optionBjörn Gustavsson
The trailing bytes returned are now always a binary. Also condense and clean up the language.
2014-03-28Correct description of the REAL typeBjörn Gustavsson
REAL is implemented, sort of. But real numbers must be given in a string.
2014-03-28Replace "extend-ability" with "extensibility"Björn Gustavsson
While "extendability" (without the hyphen) is an English word, "extensibility" is the established term used when talking about the extensibility of ASN.1 types.
2014-03-28Remove the section about encoding rulesBjörn Gustavsson
The section about encoding rules serves no useful purpose. Most users already know which encoding rule to use for their specifications. The few users that have their own specification and need to decide on which encoding rule to use will need much more information.
2014-03-28Bring information about tags up to dateBjörn Gustavsson
Since 1994 when the AUTOMATIC TAGS was introduced, ASN.1 users no long need to worry about tagging, and the following sentence no longer makes any sense: It is essential for all users of ASN.1 to understand all the details about tags. Therefore, remove the entire existing section of tags, and replace it with a shorter section explaining why we no longer need to know about tags. Remove all tags from the examples.
2014-03-28Don't waste words describing the SET typeBjörn Gustavsson
Since the SET type is used exactly the same way as the SEQUENCE type in Erlang, we can simply say so and note that decoding will be less efficient for the BER and DER encoding rules.
2014-03-28Correct and modernize the examples for DEFAULTBjörn Gustavsson
It turns out that the current BER back-end can recognize complex DEFAULT values, so I had to commit up with a more elaborate example to show a difference between the BER and DER back-ends.
2014-03-28Correct the UTF8String description and exampleBjörn Gustavsson
2014-03-28Correct the PrimStrings exampleBjörn Gustavsson
The decode functions now return a binary, not an iolist, so we must both change the output and remove the call to list_to_binary when decoding.
2014-03-28Remove all uses of the deprecated asn1{ct,rt}:{en,de}code/2 functionsBjörn Gustavsson
2014-03-28Correct and modernize the "A First Example" sectionBjörn Gustavsson
Replace "IMPLICIT TAGS" with "AUTOMATIC TAGS" since AUTOMATIC TAGS is recommended for all new ASN.1 specifications.
2014-03-28Shorten the Introduction section, keeping only the essential detailsBjörn Gustavsson
We can assume that anyone that reads the documentation for the Asn1 documentation already knows about ASN.1, so we don't need three paragraphs of introductory. Keep one short paragraph explaining what ASN.1 is in case a reader unfamiliar with ASN.1 stumbles upon the manual. While we are at it, reformat the paragraphs in Introduction to shorter lines that don't wrap.
2014-03-28Fix an ampersandBjörn Gustavsson
2014-03-28Document the asn1_OPENTYPE wrapperBjörn Gustavsson
2014-03-21Protect generated .hrl files from multiple inclusionsBjörn Gustavsson
2014-03-20Introduce runtime_dependencies in .app filesRickard Green
Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies.
2014-03-20Bump versions and ensure that all are "normal" versionsRickard Green
Ensure all are "normal" versions according to the new version scheme introduced in OTP 17.0
2014-02-28Clean up reporting of errors in IMPORTSBjörn Gustavsson
2014-02-28asn1ct_check: Clean up error checking for INSTANCE OFBjörn Gustavsson
This will also eliminate a dialyzer warning for unmatched returns, and increase the coverage.
2014-02-28asn1ct_check: Rewrite error checking for INTEGER and BIT STRINGBjörn Gustavsson
The error checking code for INTEGER and BIT STRING was broken, since it built an error tuple that was never returned. Rewrite the error checking code, sharing most of the code between INTEGER and BIT STRING. Make sure that we test for both duplicated names and number, as well as for negative bit numbers for BIT STRING. This rewrite will eliminate two dialyzer warnings for unmatched returns.
2014-02-28asn1ct_check: Remove unreachable clauses handling {identifier,_,_}Björn Gustavsson
A named number list as used for ENUMERATED and INTEGER can never have an {identifier,...} tuple in its third position like this: {'NamedNumber',Id,{identifier,_,_}} because asn1ct_parser2:parse_NamedNumber/1 will always replace an identifier tuple with an #Externaluereference{} record.