commit | 866b88dfe72f70095b7cde71f72d99f4f684abd8 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Wed Dec 15 12:02:12 2021 -0500 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Dec 16 15:31:35 2021 +0000 |
tree | a4c8e035bc201a0eb1dcbdda77ac2b68d4f31370 | |
parent | 4f1fae3043f22d3a2a0c7fcd7d0244cd91b60bdf [diff] |
Don't print small, negative serial numbers in decimal. X509_print_ex tries to print negative serial numbers in decimal. In doing so, it ends up passing a signed long to %lx and trips -Wformat-signed. A minimal fix would be to cast to unsigned long, but this unsigned long is the absolute value of a signed long (l = -l). This is tricky because -LONG_MIN does not fit in long. It all works because the length check only allows one bit short of sizeof(long)*8 bits (ASN1_INTEGER is sign-and-magnitude). Still, this is a whole lot of subtlety to account for an invalid case. Instead, send negative serial numbers down the generic path. Bug: 450 Change-Id: Ib215fd23863de27e01f7ededf95578f9c800da37 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/50766 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@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: