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

refactor: improve ssl options validation #199

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented Nov 14, 2024

improves #191

Previously:

  1. if the initial config is invalid, the error message is extremely hard to comprehend because it's a throw without context originated from ssl lib.
  2. if trying to set invalid options, the it's a badmatch crash for the caller of set_options

Now:

  1. Initial invalid config results with an error with more context invalid_ssl_option
  2. Invalid options set from set_options returns an {error, Reason} tuple (with the same context)

see test cases for more details

@zmstone zmstone force-pushed the 241114-improve-ssl-options-validation branch from 9cd2dcf to b41f262 Compare November 14, 2024 21:11
@zmstone zmstone force-pushed the 241114-improve-ssl-options-validation branch from b41f262 to da79314 Compare November 14, 2024 21:24
@zmstone zmstone merged commit 314c8c2 into master Nov 15, 2024
3 checks passed
@zmstone zmstone deleted the 241114-improve-ssl-options-validation branch November 15, 2024 08:30
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