Cut off certificate in various file formats