Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Demo] [Incomplete] Allow compilation and linking against BoringSSL #116399

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Commits on Mar 5, 2024

  1. Google's patches to link against BoringSSL.

    Does not include configure.ac or Makefile.ac changes.  The _ssl_data
    changes are hand created rather than properly updating the code
    generator.  A future upstream API is anticipated to deal with those
    better anyways.
    gpshead committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    a7bdf20 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Revert the switch to SSL_read_ex and SSL_write_ex.

    BoringSSL, for now, does not provide these APIs because of design flaws
    in the API.  When we've disentangled this mess, and implemented the
    functions in BoringSSL, this patch can be removed.
    gpshead committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    3a9a06b View commit details
    Browse the repository at this point in the history
  2. Revert upstream PR python#102918

    It adds an ill-advised feature that BoringSSL can't support.
    gpshead committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    cb56dc5 View commit details
    Browse the repository at this point in the history
  3. TODO Undesirable: revert python#114573

    This concurrency fix needs reworking for use with BoringSSL.
    gpshead committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    530411f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1ad4f96 View commit details
    Browse the repository at this point in the history
  5. Fix configure hashlib APIs check.

    Don't test for hash functions that are entirely optional for a TLS
    implementation.  This configure check should be reworked anyways, even
    md5 and sha1 could possibly not be present (FIPS?).
    gpshead committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    0e5e1d5 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. Merge branch 'main' into ssl/BoringSSL

    some manual fixups, more testing and post-fixing will be required.
    gpshead committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    0cded81 View commit details
    Browse the repository at this point in the history
  2. Use the new BoringSSL ERR_ symbol APIs.

    Python needs to map OpenSSL error codes like ERR_R_INTERNAL_ERROR into strings
    like "INTERNAL_ERROR". OpenSSL lacks an API for this, so CPython instead
    maintains its own table.
    
    This table is necessarily sensitive to the OpenSSL version and causes issues for
    BoringSSL. Rather than maintain our own copy of this table, BoringSSL has APIs
    to do the thing CPython actually wants. This patch switches CPython to use them.
    To keep the patch small, it doesn't ifdef the err_codes_to_names, etc., fields,
    but they are no longer necessary.
    
    See openssl/openssl#19848 and
    https://discuss.python.org/t/error-tables-in-the-ssl-module/25431 for context.
    
    BoringSSL API addition:
    https://boringssl.googlesource.com/boringssl/+/dbad745811195c00b729efd0ee0a09b7d9fce1d2
    gpshead committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    6640b72 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6bca20b View commit details
    Browse the repository at this point in the history
  4. remove duplicate import

    gpshead committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    1ca135c View commit details
    Browse the repository at this point in the history
  5. Remove keylog_bio patch, obsolete.

    BoringSSL was originally missing BIO_FP_TEXT preventing the keylog
    callback API from working.  That was added to BoringSSL.
    gpshead committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    29fedb4 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. Configuration menu
    Copy the full SHA
    4a41ae3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22df1b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ec927e View commit details
    Browse the repository at this point in the history