-
Notifications
You must be signed in to change notification settings - Fork 43
Merge 1.34 with new BoringSSL #312
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
dcillera
merged 102 commits into
envoyproxy:release/v1.34
from
dcillera:merge-1.34-new-boring
Jun 13, 2025
Merged
Changes from 1 commit
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
e56a7d6
Added bssl-compat sub directory
tedjpoole e3826c7
Added patches for jwt_verify_lib
tedjpoole 42d5f4e
Added envoy-openssl specific bazelrc
tedjpoole 62e5317
Code changes to compile on bssl-compat/openssl
tedjpoole 68bdd34
Added basic build instructions and scripts
tedjpoole 85eb1cc
Replaced BoringSSL submodule with a copy (ca1690e221677cea3fb946f324e…
tedjpoole 29b0488
Updated README.md
tedjpoole 75dc026
Add missing functions and types in Bssl compat. layer
dcillera 4222ddb
OSSM-6274 Fixed some QUIC related compilation failures
tedjpoole 3b67016
Fix a compile error due to a missing include (#2)
jwendell 2657ba4
Realigned io_handle_bio_test.cc with upstream
tedjpoole ddbb85f
SSL_CTX_get_session_cache_mode added to bssl layer
dcillera 75b32d2
Use OpenSSL's BIO_meth* functions instead of our wrappers
dgn 3e63907
Add some missing symbols
dgn 0860fb6
Initial implementation of SSL_CTX_set_custom_verify()
tedjpoole a0eddb1
Disabled compilation of QUIC code (by (mis)using the existing [no]fip…
tedjpoole 37db7eb
Simplified the use of OpenSSL 3.0.x in the build container
tedjpoole b7b7360
Fixed SslSocketTest.Pkcs12CertificatesWithPassword test
tedjpoole c52a439
Disabled SslIntegrationTest.AsyncCertValidation* tests
tedjpoole e2912ed
Reinstated private key method provider implementation and (disabled) …
tedjpoole 114445a
Always act as if we are building on a non-FIPS BoringSSL
tedjpoole 02f1260
Fixed some test fingerprints & byte counts to match OpenSSL instead o…
tedjpoole 3c0077c
Tidy up some bssl-compat compiler warnings
tedjpoole 17e6eea
Allow SSL_CTX_set_verify() to receive a non-null callback parameter
tedjpoole 2727cb3
Removed WORKSPACE file from bssl-compat directory
tedjpoole 3a53176
Boringssl and rules python fix for s390x (#166)
surenderky 5bc65de
Removed .github/dependabot.yml file
tedjpoole c6a53d2
Some tweaks for proxy build
dcillera 96f5b11
Remove calls to unimplemented SSL_CTX_set_reverify_on_resume and SSL_…
dcillera 0f68416
Changes & tidy ups for proxy
dcillera 558a08d
Adding changes for ppc64le.
c2178ce
Vendor the googletest dependency
jwendell 37a858c
Report "OpenSSL" instead of "BoringSSL" in version string
tedjpoole e1a4bbe
Fixing build failures for ppc64le
NishikantThorat 41acc2b
s390x luajit fix with luajit2
8841baf
Add missing changes for luajit2 on ppc64le
Swapnali911 c7241f2
Patch to remove hard coded -lcrypto from proxy-wasm-cpp-host on s390x
tedjpoole 43c9caa
Adjust default TLS versions, ciphers & curves according to FIPS
tedjpoole 37204ee
Fixed TLS alert code mapping in SSL_CTX_set_custom_verify()
tedjpoole 4114dab
Added EAGAIN handling in SslSocket::doRead/doWrite() methods
tedjpoole fce76ee
Removed "callback failed" error message from tls_inspector.cc
tedjpoole fccc555
Tweak maxmind build
dcillera 1129d72
Add new patch for jwt_verify_lib
dgn 8f1030b
Upstream code tweaking in BIO io_handle
dcillera 0bab372
Uncomment layer function EC_KEY_set_public_key
dcillera 7845f1b
Add ECDSA_verify function to compat. layer
dcillera 8909a00
Remove compile errors in ssl_integration_test
dcillera 1ae6cab
Align io_handle_bio to envoy-openssl
dcillera 44e8d81
Add necessary defines and functions to bssl layer
dcillera 8ccec20
Replace opaque OpenSSL type "BIGNUM"
dcillera 5c6d216
Comment unimplemented function in bssl Layer
dcillera 0bc40b2
Manage split of context_config_impl.cc file
dcillera 0a0f7be
Clear compiler errors on quic libraries
dcillera a23dd58
RSA_check_key in bssl layer to solve the difference with boring when …
dcillera e99f1c2
Prevent failure of RevokedIntermediateCertificate
dcillera 9e78c84
Workaround to prevent failure of tcp_grpc_access_log_integration_test
dcillera cf631eb
temporarily disable hotrestart_handoff_test.py
zmiklank 02a84c5
Disable failing tests in aws_request_signing_integration
dcillera 5cb077a
Don't test @com_github_google_quiche//:ci_tests by default
tedjpoole 38b4603
ServerContextConfig: set TLSv1.3 as max also for FIPS mode as default
zmiklank 8aa4b10
[bp/1.31] Prevent upstream envoy code owners getting review requests
tedjpoole 4c195bf
Add missing X509 functions to bSSL layer
dcillera a5a2fd0
Build maxmind_linux in foreign_cc package
dcillera 0998212
s390x patch for datatype mismatch in valgrind
6ff743b
Comment quic cert_compression_test
dcillera d198405
Disable new async cert tests in ssl_integration_test
dcillera 986d8c2
Disable TlsCertificateSelectorFactoryTest/pending (async cert)
dcillera 7302a49
Adjust sizeof of StreamInfoImpl for the test
dcillera 97c14d1
Enabled luajit2 support for Z/P
surenderky 5604ba6
Fixed ppc64le build failure for io_bazel_rules_go
Swapnali911 ebb70c5
Added workflow to perform scheduled auto merge from upstream envoy
tedjpoole a3dad07
Set the LLVM and CLang CMAKE path
jwendell b392b77
Tweak rules_go patch
dcillera b289baa
Tweak rules_foreign_cc patch
dcillera 4b932e1
Add some functions to bssl-compat
dcillera 7d652e8
Comment some calls to functions not available in OpenSSL
dcillera 7083930
Add SSL_get0_peer_certificates to bssl-compat
dcillera 334985c
Add -latomic to clang linker options
dcillera c2f5e48
Comment building of some "quic" code
dcillera e90fc80
Implement functions in bssl-compat and comment what still TODO
dcillera f5a6832
Update BoringSSL in the bssl-compat
dcillera 9fb813d
Adjust bssl-compat to the new BoringSSL
dcillera 405fb57
Fix SSL_get_all_cipher_names function in bssl_compat
dcillera 5c912b8
Implement SSL_CTX_set_compliance_policy in the bssl_compat
dcillera 97d3bf3
Fixed failure of cert_validator_integration_test
dcillera 2ecdd4c
Fix xfcc_integration_test by correcting SSL_get0_peer_certificate in …
dcillera 394c937
SSL_get_all_curve_names dynamic implementation
zmiklank b61dd8f
SSL_get_all_cipher_names: obtain list of ciphers dynamically
zmiklank a88eea7
SSL_get_all_signature_algorithm_names: obtain algs dynamically
zmiklank ea2eacf
Added a missing `nofips` tag and removed previous commenting & workar…
tedjpoole 720187d
Fix review comments in PR#312
dcillera 6cc1a91
uri_template: Add support for the "*" character matching in pattern r…
barchw 22356f2
release/docker: Bump release image -> 67cadaf (#39344)
phlax 0a91a13
changelogs: Blank summary
phlax 8bd888d
repo: Dev v1.34.2
phlax d08f97d
conn pool: fix bugs leading to incorrect conns created (#39446)
ggreenway c937eef
Review fixes for SSL_get_all_cipher_names(), plus a test
tedjpoole 4b103b2
Review fixes for SSL_get_all_signature_algorithm_names(), plus a test
tedjpoole 2752075
Review fixes for SSL_get_all_curve_names(), plus a test
tedjpoole d860866
Fix bssl-compat functions from new review comments in PR#312
dcillera 0b27124
Remove warnings about constness
tedjpoole a9dba77
Clean, and tweak returned values, in some bssl-compat functions
dcillera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
103 changes: 68 additions & 35 deletions
103
bssl-compat/source/SSL_get_all_signature_algorithm_names.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,78 @@ | ||
#include <openssl/ssl.h> | ||
#include <ossl.h> | ||
|
||
static const size_t kMaxSignatureAlgorithmNameLen = 24; | ||
|
||
struct SignatureAlgorithmName { | ||
uint16_t signature_algorithm; | ||
const char name[kMaxSignatureAlgorithmNameLen]; | ||
}; | ||
|
||
static const struct SignatureAlgorithmName kSignatureAlgorithmNames[] = { | ||
{SSL_SIGN_RSA_PKCS1_MD5_SHA1, "rsa_pkcs1_md5_sha1"}, | ||
{SSL_SIGN_RSA_PKCS1_SHA1, "rsa_pkcs1_sha1"}, | ||
{SSL_SIGN_RSA_PKCS1_SHA256, "rsa_pkcs1_sha256"}, | ||
{SSL_SIGN_RSA_PKCS1_SHA256_LEGACY, "rsa_pkcs1_sha256_legacy"}, | ||
{SSL_SIGN_RSA_PKCS1_SHA384, "rsa_pkcs1_sha384"}, | ||
{SSL_SIGN_RSA_PKCS1_SHA512, "rsa_pkcs1_sha512"}, | ||
{SSL_SIGN_ECDSA_SHA1, "ecdsa_sha1"}, | ||
{SSL_SIGN_ECDSA_SECP256R1_SHA256, "ecdsa_secp256r1_sha256"}, | ||
{SSL_SIGN_ECDSA_SECP384R1_SHA384, "ecdsa_secp384r1_sha384"}, | ||
{SSL_SIGN_ECDSA_SECP521R1_SHA512, "ecdsa_secp521r1_sha512"}, | ||
{SSL_SIGN_RSA_PSS_RSAE_SHA256, "rsa_pss_rsae_sha256"}, | ||
{SSL_SIGN_RSA_PSS_RSAE_SHA384, "rsa_pss_rsae_sha384"}, | ||
{SSL_SIGN_RSA_PSS_RSAE_SHA512, "rsa_pss_rsae_sha512"}, | ||
{SSL_SIGN_ED25519, "ed25519"}, | ||
static const char* kSigAlgCandidates[] = { | ||
"ecdsa_secp256r1_sha256", | ||
"ecdsa_secp384r1_sha384", | ||
"ecdsa_secp521r1_sha512", | ||
"ed25519", | ||
"ed448", | ||
"rsa_pss_pss_sha256", | ||
"rsa_pss_pss_sha384", | ||
"rsa_pss_pss_sha512", | ||
"rsa_pss_rsae_sha256", | ||
"rsa_pss_rsae_sha384", | ||
"rsa_pss_rsae_sha512", | ||
"rsa_pkcs1_sha256", | ||
"rsa_pkcs1_sha384", | ||
"rsa_pkcs1_sha512", | ||
"ecdsa_sha224", | ||
"ecdsa_sha256", | ||
"ecdsa_sha384", | ||
"ecdsa_sha512", | ||
"ecdsa_sha1", | ||
"rsa_pkcs1_sha224", | ||
"rsa_pkcs1_sha1", | ||
"dsa_sha224", | ||
"dsa_sha1", | ||
"dsa_sha256", | ||
"dsa_sha384", | ||
"dsa_sha512", | ||
"gostr34102012_256_intrinsic", | ||
"gostr34102012_512_intrinsic", | ||
"gostr34102012_256_gostr34112012_256", | ||
"gostr34102012_512_gostr34112012_512", | ||
"gostr34102001_gostr3411", | ||
"rsa_pkcs1_md5_sha1", | ||
"rsa_pkcs1_sha256_legacy" | ||
}; | ||
|
||
#define CANDIDATES_SIZE 33 | ||
|
||
size_t SSL_get_all_signature_algorithm_names(const char **out, size_t max_out) { | ||
const char *kPredefinedNames[] = {"ecdsa_sha256", "ecdsa_sha384", | ||
"ecdsa_sha512"}; | ||
size_t predefinedSize = (sizeof(kPredefinedNames) / sizeof(kPredefinedNames[0])); | ||
size_t nameSize = (sizeof(kSignatureAlgorithmNames) / sizeof(kSignatureAlgorithmNames[0])); | ||
if(max_out != 0) { | ||
for(int i = 0; i < predefinedSize; i++) { | ||
*out++ = kPredefinedNames[i]; | ||
} | ||
for(int i = 0; i < nameSize; i++) { | ||
*out++ = kSignatureAlgorithmNames[i].name; | ||
} | ||
} | ||
return predefinedSize+nameSize; | ||
static uint8_t initialized = 0; | ||
static char* validSigAlgNames[CANDIDATES_SIZE]; | ||
tedjpoole marked this conversation as resolved.
Show resolved
Hide resolved
|
||
static size_t validSigAlgSize = 0; | ||
if (initialized == 0) { | ||
tedjpoole marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ossl_SSL_CTX* ctx = ossl.ossl_SSL_CTX_new(ossl.ossl_TLS_client_method()); | ||
if (!ctx) { | ||
return 0; | ||
} | ||
ossl_SSL* ssl = ossl.ossl_SSL_new(ctx); | ||
if (!ssl) { | ||
ossl.ossl_SSL_CTX_free(ctx); | ||
return 0; | ||
} | ||
|
||
// Iterate through our hardcoded candidates and attempt to set each one. | ||
for (size_t i = 0; i < CANDIDATES_SIZE; ++i) { | ||
const char* candidate = kSigAlgCandidates[i]; | ||
|
||
if (ossl.ossl_SSL_set1_sigalgs_list(ssl, candidate)) { | ||
// Success: OpenSSL knows this signature_algorithm and can handle it. | ||
validSigAlgNames[validSigAlgSize] = candidate; | ||
validSigAlgSize++; | ||
} | ||
} | ||
|
||
ossl.ossl_SSL_free(ssl); | ||
ossl.ossl_SSL_CTX_free(ctx); | ||
initialized = 1; | ||
} | ||
for(int i = 0; i < max_out && i < validSigAlgSize; i++) { | ||
*out++ = validSigAlgNames[i]; | ||
} | ||
return validSigAlgSize; // Return number of signature_algorithms found, not written | ||
} | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.