crypto/x509: Make GENERAL_NAME_cmp a total order. GENERAL_NAME_cmp returned -1 in both directions when the name types differed, as did ASN1_TYPE_cmp (used for otherName values), and edipartyname_cmp when the nameAssigner fields differed. This made them unsuitable for sorting. Instead, order by type first, then by the type-specific contents, with an absent nameAssigner sorting first. Which non-NULL inputs compare equal is unchanged. ASN1_TYPE_cmp now sorts NULL before non-NULL values, so two NULLs compare equal. This lets X509_ALGOR_cmp drop its special case and also become a total order, with an absent parameter sorting first. Which inputs compare equal is unchanged. The one remaining exception is X509_NAME_cmp's -2 return when a name cannot be serialized, which cannot happen for unmodified parsed names. While I'm here, remove NULL checks in GENERAL_NAME_cmp and othername_cmp that cannot be hit. Update-Note: ASN1_TYPE_cmp and X509_ALGOR_cmp now return a consistent ordering. Callers that only compare the result against zero are unaffected, except that ASN1_TYPE_cmp(NULL, NULL) now returns zero instead of -1. Callers that checked for a specific non-zero value, such as -1, should compare against zero instead. Bug: 565047760 Change-Id: I7d8f98c25fe967afbe6ec518b4012a52b1c5e3ba Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/104768 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: Moreno Ambrosin <ambrosin@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:
To file a security issue, use the Chromium process and mention in the report this is for BoringSSL. You can ignore the parts of the process that are specific to Chromium/Chrome.
There are other files in this directory which might be helpful: