-
Notifications
You must be signed in to change notification settings - Fork 178
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
Option to skip domain name verification of servers #527
Option to skip domain name verification of servers #527
Conversation
Thanks @Fritiofhedstrom for your PR! We need you to sign the Eclipse Contribution Agreement to be able to merge it. In the meanwhile, I've requested @milyin to review the PR. |
f9d07b2
to
d1b4c0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have some clippy warnings to fix (seems to be your update of rustls surfaced some deprecations) :)
@@ -99,6 +101,12 @@ impl ConfigurationInspector<Config> for TlsConfigurator { | |||
tls_client_certificate.into(), | |||
); | |||
} | |||
if let Some(server_name_verification) = c.server_name_verification() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could shorten this to
match c.server_name_verification() {
Some(true) | None => todo!("insert true"),
Some(false) => todo!("insert false"),
}
let server_name_verification: bool = | ||
if let Some(value) = config.get(TLS_SERVER_NAME_VERIFICATION) { | ||
value | ||
} else { | ||
TLS_SERVER_NAME_VERIFICATION_DEFAULT | ||
} | ||
.parse()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be written more shortly:
let server_name_verification: bool = config.get(TLS_SERVER_NAME_VERIFICATION)
.unwrap_or(TLS_SERVER_NAME_VERIFICATION_DEFAULT).parse()?;
d1b4c0f
to
f84d7a6
Compare
Please run |
f84d7a6
to
6701e05
Compare
6701e05
to
32cd3ec
Compare
#513
Add option "server_name_verification": Option. If set to true (default) servers' certificates must use their IP address or domain name as a common name in their ca-signed certificate in order to connect. If set to false then the servers will be trusted regardless of their common name, this is useful if the IP address of a Zenoh server is difficult to know in advance
Some small fixes on docs for zenoh-cfg-properties that were wrong.