Connections with prescribed curvature and Yang-Mills currents : the semi-simple case