Boundary-value problems for two-dimensional canonical systems