     }
   }
 
-  public func errorCaught(context: ChannelHandlerContext, error: Error) {
+  func errorCaught(context: ChannelHandlerContext, error: Error) {
     precondition(self.verificationPromise != nil, "handler has not been added to the pipeline")
     self.logger.error(
       "error caught before TLS was verified",

    verificationPromise.fail(error)
  }

  public func userInboundEventTriggered(context: ChannelHandlerContext, event: Any) {
    precondition(self.verificationPromise != nil, "handler has not been added to the pipeline")

    guard let tlsEvent = event as? TLSUserEvent,

/// Users of this handler should rely on the `verification` future held by this instance.
///
/// On fulfillment of the promise this handler is removed from the channel pipeline.
internal class TLSVerificationHandler: ChannelInboundHandler, RemovableChannelHandler {
  typealias InboundIn = Any

  private let logger = Logger(subsystem: .clientChannel)
  private var verificationPromise: EventLoopPromise<Void>!
