commit | 890c201d4ac9c345c304d646365fe077cf2b60c1 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Wed Feb 08 15:24:47 2023 -0500 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Feb 16 17:51:20 2023 +0000 |
tree | 5e31c13ed68cd1fd35e5cd63f22e694fe814c180 | |
parent | 987dff1a9fa953a8c7dffa369d78caae02b8d9ab [diff] |
Make EVP_PKEY opaque. While hiding 'type' isn't such a huge deal, accessing 'pkey' without a type check is very dangerous. The accessors are type-checked and avoid this problem. It also gets us slightly closer to not needing to utter CRYPTO_refcount_t in public headers, as we're currently not quite declaring it right. And it allows us to remove another union: https://boringssl-review.googlesource.com/c/boringssl/+/57106 This matches what upstream did in OpenSSL 1.1.0. Update-Note: Code that reaches into the EVP_PKEY struct will no longer compile, like in OpenSSL. I believe I've fixed all the cases. If I missed any, the fix is to switch code to accessors. EVP_PKEY_id(pkey) for pkey->type is the most common fix. Change-Id: Ibe8d6b6cb8fbd141ea1cef0d02dc1ae3703e9469 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/57105 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com>
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
Project links:
There are other files in this directory which might be helpful: