  We study spectral properties of two-dimensional canonical systems
$y'(t)=zJH(t)y(t)$, $t\in[a,b)$, where the Hamiltonian $H$ is locally
integrable on $[a,b)$, positive semidefinite, and Weyl's limit point case takes
place at $b$. We answer the following questions explicitly in terms of $H$:
  Is the spectrum of the associated selfadjoint operator discrete ?
  If it is discrete, what is its asymptotic distribution ?
  Here asymptotic distribution means summability and limit superior conditions
relative to comparison functions growing sufficiently fast. Making an analogy
with complex analysis, this corresponds to convergence class and type w.r.t.\
proximate orders having order larger than $1$. It is a surprising fact that
these properties depend only on the diagonal entries of $H$.
  In 1968 L.de~Branges posed the following question as a fundamental problem:
  Which Hamiltonians are the structure Hamiltonian of some\\ de~Branges space ?
  We give a complete and explicit answer.
