-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to parse Kerberos ASN.1 #41
Comments
I haven't seen the |
I removed (IA5String) part, but still doesn't work correctly. |
I think you need to be more specific for me to be able to help. It's quite possible that the Kerberos spec contains more constructs that asn1ate doesn't support. |
I don't know. I'm just used official ASN.1 notation from Apache wiki. I'd love to tell you where is wrong but I don't know. Output from console is: thank you for your patience :) |
Here's a clue:
If you know your way around ASN.1, you may be able to change it to something simpler. I wish asn1ate's parser error reporting was better, but I haven't investigated how to improve it. |
So, I wonder how you solve the problem @gollda ,I also want to translate ASN.1 grammar of Kerberos from, Could you give me some tips |
I think this ASN.1 file may be too long for pyparsing to handler this @kimgr |
Hi, it is reaaaaally long time ago, so now I can't remember on ti. Anyway I stoped working on this beacause it was my subject of my diploma thesis and my tutor leave the company where I worked on this. So I didn't have anybody who lead me. |
Oh my god! Anyway ,thank you very much |
I don't think it's size-related, there's probably just some ASN.1 syntax in the file that isn't supported by asn1ate. I know most Kerberos specs use advanced ASN.1 features, so they're not easily translatable. If you can be more specific about what's going wrong (what does the ASN.1 look like, what does asn1ate say, what did you try, etc), I might be able to suggest a workaround. |
@kimgr Apologize for being late, I have met the same questions with gollda. When I remove the (IA5String) part, there is an error in (line:132, col:30)
there is the source of the asn.1 https://cwiki.apache.org/confluence/display/DIRxSRVx10/Kerberos+ASN.1+codec |
@gollda I am so sorry for that , Could tell me your tutor's github or twitter , I am working on kerberos for a while . Congratulations on your graduation and having a good job, Thank you |
I suspect this constrained integer isn't supported by asn1ate. you can just remove the constraint and say:
And make sure you validate in the application layer. |
OK,I will make it tomorrow,thank you very much
可用于iOS的myMail发送
2017年12月7日 星期四 +0800 22:11 发件人 notifications@github.com <notifications@github.com>:
@SuperXiaoxiong<https://github.com/superxiaoxiong>
135 msg-type [2] INTEGER (10 -- AS -- | 12 -- TGS --),
I suspect this constrained integer isn't supported by asn1ate. you can just remove the constraint and say:
msg-type [2] INTEGER,
And make sure you validate in the application layer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#41 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ARuqvdI3vWy9a9cngxjIO5UrwSy3cmluks5s9_IHgaJpZM4J20rE>.
|
Thanks, @kimgr You are right, and your work is very nice 。The problem solved while I only need to make a little adjustments , Thank you once again! |
@SuperXiaoxiong I'm glad to hear! Was this the only change you had to make to parse the Kerberos ASN.1? If so, it sounds like a priority to improve asn1ate support for constrained integers. |
@kimgr (⊙o⊙)… but maybe there are some little unknown problem .
|
Hi, I have a problem with translate ASN.1 grammar of Kerberos from:
https://cwiki.apache.org/confluence/display/DIRxSRVx10/Kerberos+ASN.1+codec
when I put:
python pyasn1gen.py KrbGrammar.asn1 > rfc4120.py
output is:
Traceback (most recent call last):
File "pyasn1gen.py", line 628, in
sys.exit(main())
File "pyasn1gen.py", line 606, in main
parse_tree = parser.parse_asn1(asn1def)
File "/usr/local/lib/python2.7/dist-packages/asn1ate/parser.py", line 40, in parse_asn1
parse_result = grammar.parseString(asn1_definition)
File "/usr/local/lib/python2.7/dist-packages/pyparsing.py", line 1613, in parseString
raise exc
pyparsing.ParseException: Expected "END" (at char 908), (line:28, col:35)
I don't know, maybe doing something wrong.
Thank you for You help.
The text was updated successfully, but these errors were encountered: