Skip to content

Conversation

@tiemuhua
Copy link

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2025

Codecov Report

Attention: Patch coverage is 16.66667% with 30 lines in your changes missing coverage. Please review.

Project coverage is 95.28%. Comparing base (2a57740) to head (888c8ba).

Files with missing lines Patch % Lines
src/tls/tls.rs 16.66% 30 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #452      +/-   ##
===========================================
- Coverage    95.36%   95.28%   -0.09%     
===========================================
  Files           50       50              
  Lines        34238    34273      +35     
===========================================
+ Hits         32651    32656       +5     
- Misses        1587     1617      +30     

☔ 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.

@iyangsj iyangsj requested a review from Copilot June 3, 2025 14:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces mutual authentication configurations for both client and server TLS setups while slightly improving error handling paths.

  • Adds a new function for mutual authentication client configuration.
  • Adds a new function for mutual authentication server configuration.
  • Slightly refactors variable typing and error handling in existing functions.

) -> Result<Self> {
if cert_file.is_empty() || key_file.is_empty() {
return Err(Error::TlsFail(format!(
"cert_file({:?}) key_file({:?})",
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider improving the error message here to clearly state that both certificate and key files are required, e.g., 'Certificate file and key file must be provided, but received cert_file: {:?}, key_file: {:?}'.

Suggested change
"cert_file({:?}) key_file({:?})",
"Certificate file and key file must be provided, but received cert_file: {:?}, key_file: {:?}",

Copilot uses AI. Check for mistakes.
Ok(tls_config)
}

pub fn new_mutual_authentication_client_config(
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a doc comment for 'new_mutual_authentication_client_config' to explain its purpose and usage, aligning its documentation with that of 'new_server_config' for clarity.

Copilot uses AI. Check for mistakes.
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.

2 participants