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

Crypto error handling #148

Merged
merged 4 commits into from
Aug 29, 2019
Merged

Crypto error handling #148

merged 4 commits into from
Aug 29, 2019

Conversation

martinthomson
Copy link
Member

Alex pointed out a few potential bugs in the code. This fixes the integer overflow and the UAF, but in doing the latter I decided that it would be better to centralize the error handling into the experimental API macro. That allows the wrapper to report errors with CString::new() rather than just calling panic!.

Fixes #145.

Copy link
Contributor

@agrover agrover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just 2 questions/comments.

neqo-crypto/src/result.rs Outdated Show resolved Hide resolved
neqo-crypto/src/aead.rs Outdated Show resolved Hide resolved
This attempts to use TryFrom more aggressively so that we have a clearer
indication of the expected type.  I left a few try_into instances around
where the type was clear from context and the extra type information
would have polluted things too much.
@mergify mergify bot dismissed agrover’s stale review August 20, 2019 01:07

Pull request has been modified.

@martinthomson
Copy link
Member Author

I've rebased this and done some more serious refactoring of the error handling pieces. I've removed a couple of files in the process, which were created before I understood the whole conversion piece better.

@agrover
Copy link
Contributor

agrover commented Aug 27, 2019

looks good, just needs conflicts resolved.

@martinthomson martinthomson merged commit 188dde0 into master Aug 29, 2019
@martinthomson martinthomson deleted the crypto-error-handling branch August 29, 2019 03:07
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

Successfully merging this pull request may close these issues.

Potentially unsafe uses of unsafe
2 participants