This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hybrid support for OpenSSL 1.0 and 1.1
This changes the functional code to use OpenSSL 1.1 API in the places where the API changed. "apibridge" provides equivalent methods for the OpenSSL 1.0 environment. The following configurations have been tested: * Non-portable against OpenSSL 1.0 * Non-portable against OpenSSL 1.1 * Portable, built against OpenSSL 1.0 and run against OpenSSL 1.0 * Portable, built against OpenSSL 1.0 and run against OpenSSL 1.1 * Portable, built against OpenSSL 1.1 and run against OpenSSL 1.0 * Portable, built against OpenSSL 1.1 and run against OpenSSL 1.1 In opensslshim, the PER_FUNCTION_BLOCK macro style has been broken up into a named purposes: * REQUIRED_FUNCTION(fn) * API that we use unconditionally, regardless of version * Formerly PER_FUNCTION_BLOCK(fn, true) * NEW_REQUIRED_FUNCTION(fn) * API that we use unconditionally in paths that only exist against OpenSSL 1.1, is not probed for when the runtime is 1.0 * LIGHTUP_FUNCTION(fn) * API that might not exist, must be probed with API_EXISTS checks before being utilized * Formerly PER_FUNCTION_BLOCK(fn, false) * FALLBACK_FUNCTION(fn) * API that is required on OpenSSL 1.1, and when not found will bind to a method named local_#fn in the shim library * RENAMED_FUNCTION(fn,oldfn) * Handles a rename with no signature change from oldfn to newfn, binds appropriately based on the runtime library. * LEGACY_FUNCTION(fn) * API that we use unconditionally in paths that only exist against OpenSSL 1.0, is not probed for when the runtime is 1.1. Two new #defines are available, but ideally need no further usage: * NEED_OPENSSL_1_0 * Defined when building portable, or on non-portable when the headers are OpenSSL 1.0 * NEED_OPENSSL_1_1 * Defined when building portable, or on non-portable when the headers are OpenSSL 1.1
- Loading branch information