mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-24 04:38:08 +00:00
Motivation: The sslContextCallback overrides modify the SSL_CTX object itself. That's not useful: in addition to having a global effect, which is rarely what we want, certain modifications don't apply that late, and setting the credentials is one of them. The result is that the callback didn't actually do anything. Not that useful. Modifications: - Extract the cert chain setting functions from NIOSSLContext and move them to general-purpose functions. - Add support there for calling them on a SSL * as well as on a SSL_CTX * - Call them in an override function on SSLConnection - Call that! - Add a bunch of tests. Result: The callback actually does what it should.