issue959 remove bad decorator in function generate_certificate