Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Avoid crashes on malformed RSA keys #88

Merged
merged 1 commit into from
Apr 22, 2019
Merged

Avoid crashes on malformed RSA keys #88

merged 1 commit into from
Apr 22, 2019

Conversation

vzsg
Copy link
Member

@vzsg vzsg commented Apr 22, 2019

This PR fixes #87.

The OpenSSL C APIs can return null pointers if PEM_read_bio_PUBKEY and co. fail to parse the provided input. Only the certificate parsing code path was properly guarded, which lead to fatal errors.

@vzsg vzsg requested a review from tanner0101 April 22, 2019 18:11
@vzsg vzsg merged commit df8eb7d into 3 Apr 22, 2019
@penny-coin
Copy link

Hey @vzsg, you just merged a pull request, have a coin!

You now have 2062 coins.

@vzsg vzsg deleted the malformed-key branch April 22, 2019 19:40
@gwynne
Copy link
Member

gwynne commented Apr 22, 2019

And this is why importing Unsafe[Mutable][Raw]Pointers from C APIs as implicitly-unwrapped optionals is Bad™. 🎺

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants