code: func (va *ValidationAuthorityImpl) tlsDial(ctx context.Context, hostPort string, config *tls.Config) (*tls.Conn, error) {
  	ctx, cancel := context.WithTimeout(ctx, va.singleDialTimeout)
  	defer cancel()
  	dialer := &net.Dialer{}
  	netConn, err := dialer.DialContext(ctx, "tcp", hostPort)
  	if err != nil {
  		return nil, err
  	}
  	deadline, ok := ctx.Deadline()
  	if !ok {
  		va.log.AuditErr("tlsDial was called without a deadline")
  		return nil, fmt.Errorf("tlsDial was called without a deadline")
  	}
  	_ = netConn.SetDeadline(deadline)
  	conn := tls.Client(netConn, config)
  	err = conn.Handshake()
  	if err != nil {
  		return nil, err
  	}
  	return conn, nil
  }
docs: // tlsDial does the equivalent of tls.Dial, but obeying a context. Once
  // tls.DialContextWithDialer is available, switch to that.