update main-with-bazel from master branch
This commit is contained in:
+4
-2
@@ -90,8 +90,10 @@ addition to the operations above.
|
||||
|
||||
On Linux ARM platforms, BoringSSL depends on OS APIs to query CPU capabilities.
|
||||
32-bit and 64-bit ARM both depend on the `getauxval` function. 32-bit ARM, to
|
||||
work around bugs in older Android devices, may additionally read `/proc/cpuinfo`
|
||||
and `/proc/self/auxv`.
|
||||
work around bugs in older Android devices, may additionally read
|
||||
`/proc/cpuinfo`.
|
||||
|
||||
On 64-bit Apple ARM platforms, BoringSSL needs to query `hw.optional.*` sysctls.
|
||||
|
||||
If querying CPU capabilities fails, BoringSSL will still function, but may not
|
||||
perform as well.
|
||||
|
||||
@@ -65,6 +65,9 @@ void OPENSSL_cpuid_setup(void) {
|
||||
// available in macOS 12. For compatibility with macOS 11, we also support
|
||||
// the old names. The old names don't have values for features like FEAT_AES,
|
||||
// so instead we detect them statically above.
|
||||
//
|
||||
// If querying new sysctls, update the Chromium sandbox definition. See
|
||||
// https://crrev.com/c/4415225.
|
||||
if (has_hw_feature("hw.optional.arm.FEAT_SHA512") ||
|
||||
has_hw_feature("hw.optional.armv8_2_sha512")) {
|
||||
OPENSSL_armcap_P |= ARMV8_SHA512;
|
||||
|
||||
@@ -94,7 +94,7 @@ int HKDF_expand(uint8_t *out_key, size_t out_len, const EVP_MD *digest,
|
||||
}
|
||||
|
||||
todo = digest_len;
|
||||
if (done + todo > out_len) {
|
||||
if (todo > out_len - done) {
|
||||
todo = out_len - done;
|
||||
}
|
||||
OPENSSL_memcpy(out_key + done, previous, todo);
|
||||
|
||||
Reference in New Issue
Block a user