In this paper we present an algorithm for minimization of a nondifferentiable proper closed convex function. Using the second order Dini upper directional derivative of the Moreau--Yosida regularization of the objective function we make a quadratic approximation. It is proved that the sequence of points generated by the algorithm has an accumulation point which satisfies the first order necessary and sufficient conditions.