Skip to content

Conversation

@jedisct1
Copy link
Contributor

Improved Certificate Loading:

  • Now fails explicitly when no certificates can be loaded
  • Properly reports when CA certificates are unavailable

Better Certificate Validation:

  • Certificate validation checks during connection establishment
  • Added basic validation of certificate data to ensure certificates aren't empty
  • Added proper error handling for invalid DNS names

Proper TLS Connection Validation:

  • Added explicit error handling for TLS connection failures
  • Added logging for certificate validation failures for easier debugging

1. Improved Certificate Loading:
  - Now fails explicitly when no certificates can be loaded
  - Properly reports when CA certificates are unavailable
2. Enhanced Error Handling:
  - Added new error types for specific TLS/certificate validation issues
  - Improved error messages for better diagnostics
3. Better Certificate Validation:
  - Implemented certificate validation checks during connection establishment
  - Added basic validation of certificate data to ensure certificates aren't
empty
  - Added proper error handling for invalid DNS names
4. Proper TLS Connection Validation:
  - Added explicit error handling for TLS connection failures
  - Added logging for certificate validation failures for easier debugging
@cceckman-at-fastly cceckman-at-fastly self-requested a review May 27, 2025 20:54
Copy link
Contributor

@cceckman-at-fastly cceckman-at-fastly left a comment

Choose a reason for hiding this comment

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

Patched with some syntactic changes - map_err and use of the ?, mostly - to cut out some of the error-handling boilerplate.

@jedisct1 If this looks good to you, it's good to merge IMO!

};

let remote_addr = tcp.peer_addr()?;
let remote_addr = match tcp.peer_addr() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this hunk does anything-

The ? operator applies one or more from/into conversions between the error types. crate::error::Error implements From<std::io::Error> (it's hidden in the little #[from] note on the IoError declaration), so this is just doing (more verbosely) what ? does.

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.

3 participants