Second-order necessary conditions in Pontryagin form for optimal control problems