For an optimal control problem we define a second variation which is i
nvariant under change of coordinates, and realize it as a linear-quadr
atic problem. When the strong Legendre condition is satisfied we give
a complete Hamiltonian characterization of the index and of the nullit
y of the second variation.