The main purpose of this paper is to establish the first and second order necessary optimality conditions for stochastic optimal controls using the classical variational analysis approach. The control system is governed by a stochastic differential equation, in which both drift and diffusion terms may contain the control variable and the set of controls is allowed to be nonconvex. Only one adjoint equation is introduced to derive the first order necessary condition; while only two adjoint equations are needed to state the second order necessary conditions for stochastic optimal controls.