Skip to content

Remove sys headers from bio.h #2508

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

samuel40791765
Copy link
Contributor

@samuel40791765 samuel40791765 commented Jun 25, 2025

Issues:

Addresses CryptoAlg-3316, CryptoAlg-3292, CryptoAlg-3310, CryptoAlg-3284, and CryptoAlg-3346.

Description of changes:

Some internal builds are failing due to the duplicate header file references that bio.h has.

/usr/include/bits/types/struct_iovec.h:26:8: error: redefinition of 'struct iovec'
struct iovec
        ^~~~~
In file included from src/core/tsi/alts/crypt/aes_gcm.cc:23:0:
./src/core/tsi/alts/crypt/gsec.h:30:8: note: previous definition of 'struct iovec'
struct iovec {

The sockaddr references requires the <sys/socket.h> header to exist, but it turns out we never actually implemented BIO_dgram_get_mtu_overhead. Removing BIO_dgram_get_mtu_overhead for now allows us to get around the "redefinition failure".

OpenSSL gets around the sockaddr by containing BIO_dgram_get_mtu_overhead in a macro pointing to BIO_ctrl. We'll likely have to do the same here when we eventually implement BIO_dgram_get_mtu_overhead.

Callouts

I'll introduce CI for the issue in another PR.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@samuel40791765 samuel40791765 force-pushed the remove-sys-headers branch 2 times, most recently from f526e73 to 47606a1 Compare June 25, 2025 21:46
@samuel40791765 samuel40791765 marked this pull request as ready for review June 25, 2025 21:53
@samuel40791765 samuel40791765 requested a review from a team as a code owner June 25, 2025 21:53
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.87%. Comparing base (e2a5299) to head (523d74d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2508      +/-   ##
==========================================
+ Coverage   78.85%   78.87%   +0.02%     
==========================================
  Files         640      640              
  Lines      109560   109560              
  Branches    15520    15518       -2     
==========================================
+ Hits        86389    86415      +26     
+ Misses      22471    22447      -24     
+ Partials      700      698       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samuel40791765 samuel40791765 merged commit 9db959e into aws:main Jun 26, 2025
124 of 126 checks passed
@samuel40791765 samuel40791765 deleted the remove-sys-headers branch June 26, 2025 00:28
@skmcgrail skmcgrail mentioned this pull request Jun 26, 2025
skmcgrail added a commit that referenced this pull request Jun 27, 2025
## What's Changed
* Rename SSL test files to match Scrutinice filter by @nhatnghiho in
#2491
* Order tool output by options provided - x509 by @justsmth in
#2454
* Fix Console Test Suite Execution Locally by @smittals2 in
#2493
* Re-remove afunix.h by @justsmth in
#2495
* Note a couple of typoed struct names that we'll leave alone. by
@justsmth in #2499
* Document that EVP_PKEY_CTX_set_rsa_keygen_pubexp takes ownership by
@justsmth in #2503
* Remove sys headers from bio.h by @samuel40791765 in
#2508
* rwlock race tests is not a GoogleTest executable by @torben-hansen in
#2509
* Add two new APIs to expose TLS 1.3 traffic secrets for kTLS by
@skmcgrail in #2506
* Intentionally redefine iovec in headers as CI by @samuel40791765 in
#2512

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants