Skip to content
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

Optimize RPC TLS config #190

merged 1 commit into from Dec 24, 2019

Optimize RPC TLS config #190

merged 1 commit into from Dec 24, 2019


Copy link

m4sterchain commented Dec 23, 2019


Related to #61. I optimized the TLS config cache related logic with the following changes.

  • Simplify get_tls_config logic, changed the hash_map cached structure.
  • Introduce private_key_sha256 as an identify to CertKeyPair, making get_ra_cert return a simple CertKeyPair.
  • Decouple ecc_handle from the params of fn gen_ecc_cert.
  • Split the contruction of cert_der and private_key_der in to two different functions.

I am still working the optimization, and will finally fix #61 in a descent way.

Fixes # (issue)

Type of change (select applied and DELETE the others)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • API change with a documentation update
  • Additional test coverage
  • Code cleanup or just sync with upstream third-party crates

How Has This Been Tested?

Checklist (check ALL before submitting PR, even not applicable)

  • Fork the repo and create your branch from master.
  • If you've added code that should be tested, add tests.
  • If you've changed APIs, update the documentation.
  • Ensure the tests pass (see CI results).
  • Make sure your code lints/format.
@m4sterchain m4sterchain requested review from mssun and litongxin1991 Dec 23, 2019
Make clippy happy

Restore renew time
@m4sterchain m4sterchain force-pushed the m4sterchain:rpc_tls_config branch from f87ad25 to 78beedf Dec 23, 2019
mssun approved these changes Dec 24, 2019
Copy link

mssun left a comment

LGTM. Thank you!

@mssun mssun merged commit ead453f into apache:master Dec 24, 2019
@m4sterchain m4sterchain mentioned this pull request Dec 25, 2019
7 of 11 tasks complete
@m4sterchain m4sterchain deleted the m4sterchain:rpc_tls_config branch Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.