Improve OpenSSL integration and the compatibility layer
When reviewing the OpenSSL integration, there were some things that stood out that I thought were good to fix. First the API used around context creation and cleanup is not the current recommended documented approach, and it included superfluous initialization calls.
Second, the compatibility layer could be simplified in a number of places using the appropriate legacy bits to implement the newer API. This reduced the code a bunch and makes it easier to understand as well.
Each commit should be focussed on a specific smaller bit of cleanup.
Checklist
-
Commits have Signed-off-by:with name/author being identical to the commit author -
Code modified for feature -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated
Reviewer's checklist:
-
Any issues marked for closing are addressed -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code