mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-26 04:57:52 +00:00
Motivation: When we get channelInactive during a handshake, we currently produce a fairly useless error: .handshakeFailed(NIOSSL.BoringSSLError.sslError([])). This error isn't helpful to anyone, and it doesn't really communicate what's happened. Sadly, due to the tightly constrained types it's really hard for us to add new errors to handshakeFailed. Regardless, it would be good for us to give as much diagnostic information as we can here. Modifications: - Changed the representation of BoringSSLInternalError to allow "synthetic" errors that don't come from BoringSSL at all. - Added a new synthetic error for eof during handshake. - Sent that error instead of a BoringSSL error stack that will always be empty. Result: - Easier to diagnose the error.