The sheriff or jailer must, if the jail of the county is sufficient, receive into his custody any person committed under any criminal charge or offense against the United States and safely keep such prisoner, according to the order or process of commitment, until duly discharged by law; and he is liable to the same penalties for the escape of such prisoner as for the escape of a prisoner committed under the authority of this state.