indutny / asn1.js

ASN.1 Decoder/Encoder/DSL
MIT License
181 stars 64 forks source link

Add support for encapsulated models #60

Closed felix closed 8 years ago

felix commented 8 years ago

PR #59 adds support for encapsulated models in bit strings or octet strings.

Examples can be found in RFC 5280:

Extension  ::=  SEQUENCE  {
        -- ...
        extnValue   OCTET STRING
                    -- contains the DER encoding of an ASN.1 value
                    -- corresponding to the extension type identified
                    -- by extnID
        }

or in RFC 5912 where it is explicitly used:

Extension{EXTENSION:ExtensionSet} ::= SEQUENCE {
     -- ...
      extnValue   OCTET STRING (CONTAINING
                  EXTENSION.&ExtnType({ExtensionSet}{@extnID}))
                  --  contains the DER encoding of the ASN.1 value
                  --  corresponding to the extension type identified
                  --  by extnID
  }
indutny commented 8 years ago

I guess this can be closed now?

felix commented 8 years ago

Added in a2d711e