Closed vzsg closed 5 years ago
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.
PEM_read_bio_PUBKEY
Hey @vzsg, you just merged a pull request, have a coin!
You now have 2062 coins.
And this is why importing Unsafe[Mutable][Raw]Pointers from C APIs as implicitly-unwrapped optionals is Bad™. 🎺
Unsafe[Mutable][Raw]Pointers
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.