Comments (4)
The problem is the last component:
sqnInit SEQUENCE (SIZE (3)) OF OCTET STRING (SIZE (6)) DEFAULT {'000000000000'H, '000000000000'H, '000000000000'H }
specifically the curly-brace form on DEFAULT.
We don't yet seem to handle the SequenceOfValue
production -- I'm not entirely sure where to put it.
from asn1ate.
Thank you for your answer. What would you therefore recommend?
from asn1ate.
I think, and this is a big maybe, that you can omit the DEFAULT clause
entirely.
If I recall correctly, DEFAULTs are handled encode-time, so if you're
decoding, you'll always get a full value. If you're encoding, you'll have
to provide the value explicitly.
That might work.
- Kim
On Thu, Dec 10, 2015 at 9:11 AM, kgalhabbo [email protected] wrote:
Thank you for your answer. What would you therefore recommend?
—
Reply to this email directly or view it on GitHub
#24 (comment).
from asn1ate.
From #26 -- this actually runs clean through the parser, but generates nonsense pyasn1 code:
Clearance ::= SEQUENCE {
policyId [0] OBJECT IDENTIFIER,
classList [1] ClassList DEFAULT {unclassified},
securityCategories [2] SET OF SecurityCategory OPTIONAL
}
Output:
# the subtype(value={unclassified}) part is not valid Python
namedtype.DefaultedNamedType('classList', ClassList().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)).subtype(value={unclassified})),
from asn1ate.
Related Issues (20)
- Fail to parse Kerberos ASN.1 HOT 17
- output missing size constaint HOT 6
- multi-module asn files don't work HOT 8
- default vales for enums need to be strings HOT 4
- Support for CLASS ... WITH SYNTAX ... HOT 6
- to support Brace value notation assignment HOT 4
- Emits invalid python for `BOOLEAN true` HOT 1
- Failure parsing minimal example with VisibleString HOT 3
- restricted_integer_type range constraint HOT 2
- Parsing Error: pyparsing.ParseException: Expected "DEFINITIONS" HOT 5
- resolve imported type declarations HOT 1
- KeyError: if the type is in another module. HOT 2
- single value and range constraint with both '..' and '|' HOT 3
- KeyError EXTERNAL HOT 6
- asn1ate generates incorrect code for DefaultedNamedType
- Feauture Request for 0.6.1: Parsing DEFAULT with structure HOT 1
- interdependent asn1 files to py files HOT 2
- asn1ate needs wheels HOT 9
- PyParsing issue (and work-around) HOT 4
- ParseException: Expected Keyword 'DEFINITIONS', found 'AUTOMATIC' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asn1ate.