In this paper, we continue investigation of the problem considered in our earlier works. The paper deals with an optimal control problem for an ordinary differential equation with integral boundary conditions that generalizes the Cauchy problem. The problem is investigated the case when Pontryagin's maximum principle is degenerate. Moreover, the second order optimality conditions are derived for the considered problem