5 ms·
Using "const" consistently would be a good start. Better and more thorough docs would be nice as well. If you're willing to break everything a more consistent
by simias 9y ago
Using "const" consistently would be a good start. Better and more thorough docs would be nice as well.
If you're willing to break everything a more consistent API in general, especially when it comes to error handling, would make it less easy to shoot yourself in the foot.
It's the overall inconsistency of the OpenSSL API that's the main issue IMO. If the coder or code reviewer don't know all the function signatures and return values by heart it's very easy to write code that looks absolutely fine, might seem to run fine but is thoroughly broken. TFA is a good example of that.
That's why nowadays I much prefer using the Rust bindings over the raw C library. The error handling and ownership rules are checked by the compiler, it's like putting blanks in your footgun. It's liberating really.
- ianai 9y agoMaybe a wrapper API for OpenVPN/SSL that attempts to Do It Rightunder the hood would be worthwhile?