Commit Graph

12 Commits

Author SHA1 Message Date
Mark D. Roth 0944410d6c [reorg] move test/core/util -> test/core/test_util (#36446)
Closes #36446

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36446 from markdroth:reorg_test 5dcc85e006
PiperOrigin-RevId: 629229220
2024-04-29 17:06:40 -07:00
Yash Tibrewal a1ec7bea08 Revert "ssl: More comprehensive testing of SSL credentials, part 1. (… (#36419)
…#35433)"

This reverts commit 40d1776e07.

Closes #36419

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36419 from yashykt:Revert35433 90cfbe4229
PiperOrigin-RevId: 627083350
2024-04-22 10:36:18 -07:00
AJ Heller 1a8b22f2de [build] Restrict visibility for creating core credentials types. (#36216)
Closes #36216

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36216 from drfloob:conceal-core-cred-creation a44a299273
PiperOrigin-RevId: 625425746
2024-04-17 01:21:29 +00:00
Matthew Stevenson 40d1776e07 ssl: More comprehensive testing of SSL credentials, part 1. (#35433)
First of several PRs to improve the e2e testing for the SSL credentials API.

Closes #35433

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35433 from matthewstevenson88:more-ssl-testing 2a0db7624e
PiperOrigin-RevId: 625326074
2024-04-16 07:38:12 -07:00
Mark D. Roth 41606054c2 [load_file] remove grpc_load_file() in favor of grpc_core::LoadFile() (#35857)
Closes #35857

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35857 from markdroth:highlander 7b7d95aaa9
PiperOrigin-RevId: 605742734
2024-02-09 15:16:24 -08:00
Gregory Cooke 74c1de6512
[Security] Reapply Move ownership of tsi_ssl_client_handshaker_factory (#34726)
This reverts commit 601aaf80b7, which
results in rolling forward #34408.

The 601aaf reversion happened because of a deadlock found in Python. The
root cause ended up being an issue with the Python wrapper and was fixed
in #34712 , so this can be rolled forward again
2023-10-18 17:59:44 -04:00
nanahpang 601aaf80b7
Revert "[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials, version 2." (#34701)
Reverts grpc/grpc#34408
2023-10-16 18:18:44 +00:00
Matthew Stevenson 539e912ef8
[ssl] Do not crash if ssl session cache capacity is zero. (#34539)
This behavior is dangerous because we will crash when the cache is
created, which is not necessarily on application startup and is likely
when you first try to establish an SSL connection. Instead, we log an
error. If the SSL library attempts to put a session ticket in the cache
it will fail to do so, but everything else will continue as normal. In
particular, we will always seamlessly fall back to a full SSL handshake.

Along the way, we also ensure that you cannot put a null `SSL_SESSION`
into the cache, which would lead to a segfault when it is fetched from
the cache.
2023-10-04 12:45:09 -07:00
Gregory Cooke aa17285f8e
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials, version 2. (#34408)
Revert the reversion of the SSL_CTX_new change (#34355 reverted #34180 )
with a fix.

There was an issue with using `strcpy` on a `new[] string` in the
constructor of `ssl_credentials`. An ASAN test caught this in some CI
down the line - `ERROR: AddressSanitizer: alloc-dealloc-mismatch
(operator new [] vs free)`

That `strcpy` call was changed to `grp_strdup` which duplicates a string
in a way that can be freed by `gpr_free` and should resolve the ASAN
failure.
2023-09-21 10:07:18 -07:00
nanahpang a4ac80c394
Revert "[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials." (#34355)
Reverts grpc/grpc#34180
2023-09-14 14:54:17 -07:00
Gregory Cooke 36dc5e7391
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials. (#34180)
Move the SSL_CTX to the level of the credentials rather than the
subchannel.
The SSL_CTX should only get created once per credential rather than once
per subchannel.

We should observe no behavior change with this PR, only efficiency
gains.
2023-09-14 17:00:23 -04:00
Gregory Cooke 8d62fc2b0b
[Test] Add concurrent test for session reuse (#34293)
Add a test that runs concurrent requests using session caching.
2023-09-14 14:43:43 -04:00