mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-24 04:38:08 +00:00
Motivation: swift-nio-ssl has long had a flag to disable its own certificate validation behaviour. This flag works fine, and had the desired effect. However, this flag did not take account of the fact that Security.framework _also_ validates the hostname. Due to an implementation bug, setting .noHostnameVerification disabled only one of the two checks. Modifications: - Correctly check the flag before passing a hostname to Security.framework - Write some tests to make sure the behaviour works in all modes. Result: Better, more consistent behaviour.