Skip to content

Commit a8bdf39

Browse files
committed
Allow TLS name mismatch as per RFC7671 Section 5.1
1 parent c0eb3a5 commit a8bdf39

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/smtp/src/outbound/delivery.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,10 @@ impl QueuedMessage {
967967
|| (message.flags & MAIL_REQUIRETLS) != 0
968968
|| mta_sts_policy.is_some()
969969
|| dane_policy.is_some();
970-
let tls_connector = if allow_invalid_certs || remote_host.allow_invalid_certs()
970+
// As per RFC7671 Section 5.1, DANE-EE(3) allows name mismatch
971+
let tls_connector = if allow_invalid_certs
972+
|| remote_host.allow_invalid_certs()
973+
|| dane_policy.as_ref().is_some_and(|t| t.has_end_entities)
971974
{
972975
&server.inner.data.smtp_connectors.dummy_verify
973976
} else {

0 commit comments

Comments
 (0)