This paper provides KKT and saddle point optimality conditions, dualitytheorems and stability theorems for consistent convex optimization problemsposed in locally convex topological vector spaces. The feasible sets ofthese optimization problems are formed by those elements of a given closedconvex set which satisfy a (possibly infinite) convex system. Moreover, allthe involved functions are assumed to be convex, lower semicontinuous andproper (but not necessarily real-valued). The key result in the paper is thecharacterization of those reverse-convex inequalities which are consequenceof the constraints system. As a byproduct of this new versions of Farkas'lemma we also characterize the containment of convex sets in reverse-convexsets. The main results in the paper are obtained under a suitableFarkas-type constraint qualifications and/or a certain closedness assumption.