Comments (10)
Please attach EtsiTs102941MessagesItss.asn
to make it possible to easily reproduce the issue.
from asn1tools.
Here it is with the key included.
from asn1tools.
The problem is that a floating point number is not allowed encoding an integer. Replace generation_time = calendar.timegm(time.gmtime())-time.mktime(t)
with generation_time = int(calendar.timegm(time.gmtime())-time.mktime(t))
and the example works.
from asn1tools.
The syntax in this specification is unlike anything I've seen before. I'll do my best adding support for the missing functionality.
from asn1tools.
Thank you so much for the fast response. It is working correctli.
from asn1tools.
Do you have the unmodified ASN.1-specification as well? I could use it as a test case when inplementing support for more ASN.1 syntax.
from asn1tools.
Here are the files.
With pyasn1 I can not use this definitions (it failed on "WITH COMPONENTS" and some other specific parts). Also the import export part is not working. With pyasn1 and I could not figure out how can I do this with your library.
Hope that it is helping you and I cut of every modifications.
I think that the EtsiTs103097 and the Ieee files will be enough because the EtsiTs102941 asn file includes more than one asn1 architecture.
I am working with the Ieee 1609.2 (2016) and the EtsiTs103097 v 1.3.1 standards.
These defines COER encoding.
I have try to find out, based on the documentation, that what kind of OER do you use.
Is it BASIC or CANONICAL OER?
If I can help you with anything let me know about it.
from asn1tools.
Thank you very much for the files! I'll have a look at them and likely improve the parser soon.
The OER codec in asn1tools is implementing the BASIC version of the encoding. I'm continuously improving asn1tools and adding more encodings. COER is likely to be added in the future, along with CER. Feel free to start the implementation yourself and we can implement it together. We can probably reuse some of the OER implementation already in place in asn1tools/codecs/oer.py.
Adding support for more syntax in the parser is quite challenging as the parser implementation is very hard to understand. I get confused every time I open that file. I wouldn't recommend you to help out in that file.
from asn1tools.
I have created IEEE 1609dot2 certificate and I passed it to a java code. It seems to be correct COER encoded.
from asn1tools.
I fixed a bug not allowing EXPORTS ALL;
, and added support for types in constraints. Now only a few manual modifications have to be done to make IEEE 1609dot2 compile.
Replace this section with:
NinetyDegreeInt ::= INTEGER {
min (-900000000),
max (900000000),
unknown (900000001)
} (-900000000..900000001)
KnownLatitude ::= NinetyDegreeInt (-900000000..900000000)
UnknownLatitude ::= NinetyDegreeInt (900000001) -- Minus 90 deg to +90
-- deg in microdegree
-- intervals
OneEightyDegreeInt ::= INTEGER {
min (-1799999999),
max (1800000000),
unknown (1800000001)
} (-1799999999..1800000001)
KnownLongitude ::= OneEightyDegreeInt (-1799999999..1800000000)
UnknownLongitude ::= OneEightyDegreeInt (1800000001)
Here is a test that does similar encoding as in your example: https://github.com/eerimoq/asn1tools/blob/master/tests/test_oer.py#L685-L751
from asn1tools.
Related Issues (20)
- encode_message() fails to validate ASN.1 BIT STRING SIZE constraints
- how to parse the "CONTAING SEQUENCE" msg immediately HOT 1
- Compile nrppa using PER fail
- How to view encoded values
- Test failures with pyparsing 3.1.1 HOT 4
- oer c code generation fails when addition contains a sequence with enums (type error) HOT 2
- decoding erros HOT 9
- SEQUENCE OF has no maximum length HOT 1
- parser claims "syntax error" for `SEQUENCE (SIZE (32)) OF OCTET STRING (SIZE (6))` with `DEFAULT` HOT 4
- How to encode a complex json object ?
- ParseError when compile the ASN1 schema file
- OpenType does not exist for xer
- Changing `numeric_enums` parameter has no effect when `cache_dir` is set and cache previously created
- Example for ETSI CAM-ASN1 to Json Command
- Decode hangs when decoding the output of encode if ASN.1 contains a SEQUENCE of CHOICE of SEQUENCE
- Hello eerimoq
- Error Decoding Indefinite Length ASN.1 Elements Containing Extension Marker HOT 1
- Type 'SetupRelease' not found in module 'EUTRA-RRC-Definitions'.
- UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 3: ordinal not in range(128)
- License of generated code 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 asn1tools.