  We show that a compact Riemannian $3$-manifold $M$ with strictly convex
simply connected boundary and sectional curvature $K\leq a\leq 0$ is isometric
to a convex domain in a complete simply connected space of constant curvature
$a$, provided that $K\equiv a$ on planes tangent to the boundary of $M$. This
yields a characterization of strictly convex surfaces with minimal total
curvature in Cartan-Hadamard $3$-manifolds, and extends some rigidity results
of Greene-Wu, Gromov, and Schroeder-Strake. Our proof is based on a recent
comparison formula for total curvature of Riemannian hypersurfaces, which also
yields some dual results for $K\geq a\geq 0$.
