-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-9601] Make system cert pool access thread safe
We currently only synchronize writes but not reads. The comm package uses this cert pool for all outgoing connections making it hard to sync reads. As the x509 std lib does not allow deep copies of its cert pool, we reload the cert pool whenever a new cert is encountered, writing only to the fresh cert pool. The attached benchmark verifies performance for the common case: BenchmarkTLSCertPool-8 30000000 50.4 ns/op BenchmarkTLSCertPoolSameCert-8 10000000 123 ns/op BenchmarkTLSCertPoolDifferentCert-8 50 25575114 ns/op This also partially reverts commit 65a56e2 as TLSCACertPool() can now return an error. Change-Id: I72a1f2a1eb21036e5e382fad208c9d44b6f09b96 Signed-off-by: Divyank Katira <[email protected]>
- Loading branch information
Showing
19 changed files
with
336 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.