Skip to content
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

Error in decode on RFC3161 structure #86

Open
lapo-luchini opened this issue Aug 18, 2017 · 1 comment
Open

Error in decode on RFC3161 structure #86

lapo-luchini opened this issue Aug 18, 2017 · 1 comment

Comments

@lapo-luchini
Copy link

Hi, I have a problem when decoding a TimeStampResp… when using normal decode only status is printed, while the answer is complete and certainly contains more, when using partial: true it enters a loop and never stops.
I wasn't able to detect the loop using the inspector so far (nor find any problem in my ASN.1 definition).
I saved my self-contained test case in this gist.

{ status: { status: 'granted' } }
[ 'tagged', '', 0, 1700 ]
[ 'content', '', 4, 1700 ]
[ 'tagged', 'status', 4, 9 ]
[ 'content', 'status', 6, 9 ]
[ 'tagged', 'status/status', 6, 9 ]
[ 'content', 'status/status', 8, 9 ]
[ 'tagged', 'timeStampToken', 9, 1700 ]
[ 'content', 'timeStampToken', 13, 1700 ]
[ 'tagged', 'timeStampToken/contentType', 13, 24 ]
[ 'content', 'timeStampToken/contentType', 15, 24 ]
[ 'tagged', 'timeStampToken/content', 28, 183 ]
[ 'content', 'timeStampToken/content', 30, 183 ]
[ 'tagged', 'timeStampToken/content/version', 30, 33 ]
[ 'content', 'timeStampToken/content/version', 32, 33 ]
[ 'tagged', 'timeStampToken/content/digestAlgorithms', 33, 50 ]
[ 'content', 'timeStampToken/content/digestAlgorithms', 35, 50 ]
^C
@misos1
Copy link

misos1 commented Sep 12, 2017

From where are these definitions? First problem is with "common.Attribute" where common is not defined so seems it will not parse this optional branch "this.key('timeStampToken').optional().use(TimeStampToken)" due to exception. When you set this not to be optional you get exception that common is not defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants