feat: add support for BoringSSL on Android 16 with updated offsets#885
Conversation
…d definitions Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
|
🔧 Debug Build Complete (PR 885, RunID 19967791054) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
There was a problem hiding this comment.
Pull request overview
This pull request adds support for Android 16's BoringSSL implementation, which introduces structural changes to SSL session handling. The changes accommodate the relocation of the version field from ssl_st to ssl_session_st and the removal of the secret_length field.
- Added Android 16-specific offset definitions in a new header file
- Updated probe logic with conditional compilation to handle structural differences between Android versions
- Enhanced the offset generation script to automatically adapt for Android 16+ releases
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| variables.mk | Adds build target for Android 16 BoringSSL support |
| kern/boringssl_a_16_kern.c | New header defining offsets for Android 16's BoringSSL structures with SSL_SESSION_ST_SSL_VERSION replacing SSL_ST_VERSION |
| kern/boringssl_masterkey.h | Updates probe logic to conditionally read version from new location and handle missing secret_length field with fallback to maximum key length |
| kern/openssl.h | Adds conditional compilation guards for version reading to support Android 16's structural changes |
| utils/boringssl_android_offset.sh | Updates script to automatically handle Android 16+ by removing obsolete offsets and substituting new fields during header generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
|
🔧 Debug Build Complete (PR 885, RunID 19968063840) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
|
🔧 Debug Build Complete (PR 885, RunID 19968424840) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
This pull request adds support for Android 16's BoringSSL version to the codebase, updating offsets and logic to handle changes in BoringSSL's internal structures. The main changes include introducing a new header for Android 16, updating probe logic to use the correct offsets, and modifying the offset generation script for future Android versions.
Android 16 BoringSSL support:
kern/boringssl_a_16_kern.cwith updated offsets for BoringSSL structures specific to Android 16, reflecting changes such as the relocation or removal of fields likeversionandsecret_length.variables.mkto include the new targetkern/boringssl_a_16.Probe logic updates for BoringSSL offset changes:
kern/boringssl_masterkey.handkern/openssl.hto conditionally use new offsets (SSL_SESSION_ST_SSL_VERSION) and handle the absence of certain fields (secret_length) for Android 16 and above, using preprocessor guards for compatibility. [1] [2] [3] [4] [5] [6]BORINGSSL_SSL_MAX_MASTER_KEY_LENGTHfor use when thesecret_lengthfield is missing in Android 16's BoringSSL.Offset generation script improvements:
utils/boringssl_android_offset.shto support Android 16, including logic to remove obsolete offsets and substitute new ones when generating header files for Android versions greater than 15. [1] [2]