case $n_+(A)\neq n_-(A)$ our definition of a boundary relation is more natural and convenient for applications. Observe also that other generalizations of boundary triplets can be found e.g. in [@BehLan07].

Next by using the concept of a boundary relation we investigate in the paper linear relations induced by a general (not necessarily definite) canonical system of differential equations with possibly unequal deficiency indices. Such a system is of the form $$\begin{gathered}
\label{1.8}
J y'(t)-B(t)y(t)=\D (t)f(t), \quad t\in\cI,\end{gathered}$$ where $J$ is an operator in the finite-dimensional Hilbert space $\bH$ such that $J^*=J^{-1}=-J$ and $B(t)$ and $\D(t)$ are locally integrable $[\bH]$-valued functions defined on an interval $\cI=(a,b),\; -\infty\leq a< b
\leq\infty,$ and such that $B(t)=B^*(t)$ and $ \D(t)\geq 0$ a.e. on $\cI$. Without loss of generality we assume that $$\begin{gathered}
\label{1.9}
\bH=H\oplus\hat H\oplus H\end{gathered}$$ with the Hilbert spaces $H$ and $\hat H$ and the operator $J$ is $$\begin{gathered}
 \label{1.10}
J=\begin{pmatrix} 0 & 0&-I_H \cr 0& i I_{\hat H}&0\cr I_H&
0&0\end{pmatrix}:H\oplus\hat H\oplus H \to H\oplus\hat H\oplus H.\end{gathered}$$ The canonical system is called Hamiltonian if $\hat H=\{0\}$, in which case the operator $J$ takes the form $$\begin{gathered}
J=\begin{pmatrix} 0 & -I_H \cr  I_H& 0\end{pmatrix}:H\oplus H \to H\oplus H.\end{gathered}$$ Clearly, the Hamiltonian system is a 