-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Fix RC2CBC Parameter parsing. #337
Conversation
Parameters are encoded as Sequence. See: https://tools.ietf.org/html/rfc3370#section-5.2
Thanks to Alexander Bauer for this patch. Fixes issue #337
Thanks! |
It seems that this fix creates a cast exception here: var param = (DerSequence) identifier.Parameters; identifier.Parameters is a DerInteger in my unit tests which is testing a message generated by Thunderbird. Do you actually have any real-world messages where this is a DerSequence? |
It seems that PR #337 may be wrong as it causes a CastException because identifier.Parameters is a DerInteger rather than a DerSequence. Restored my old logic for cases where identifier.Parameters is not a DerSequence.
I never volunteered for this I'm not getting paid for it why me
James Thornton
…On Oct 21, 2017 6:01 AM, "Jeffrey Stedfast" ***@***.***> wrote:
It seems that this fix creates a cast exception here:
var param = (DerSequence) identifier.Parameters;
identifier.Parameters is a DerInteger in my unit tests which is testing a
message generated by Thunderbird.
Do you actually have any real-world messages where this is a DerSequence?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AebhUN-G3kiZ2mBsbks62YqoMnUK8BAgks5suesxgaJpZM4PUXh8>
.
|
I'm not getting paid for this either. As for why you, why are you getting this message? You aren't the original submitter for this pull request. I was asking the original author of this pull request, not you. |
I am just trying to rekindle a old interest and make some money |
Yes i had some real-world messages. That's why i found the issue ;-) If identifier.Parameter is a DerInteger in your message, then it must be wrong.
|
Yea, I read that in the spec when you originally submitted the pull request which was one of the major reasons I figured the patch was correct :) I was just wondering if maybe for whatever reason real-world usage (such as Thunderbird) were consistently using DerInteger instead. I committed a fix yesterday that checks if the parameters are a DerInteger vs a DerSequence and handles them based on that. I gues that's how I'll have to handle this. Anyway, knowing that you have messages that use DerSequence is nice to know. If you can get me a sample that I can use in the unit tests, that would be stellar :) |
I wish I could I don't have a computer to do this I am on my phone |
That's perfect! Today i found both cases in real-word messages! However. I've seen the RC2-Algorithm only in SmimeCapabilities for now.
|
Aha! Thanks for this info :) |
Parameters are encoded as Sequence. See: https://tools.ietf.org/html/rfc3370#section-5.2