replace cert by this in parse_certificate()