Added the certificate controller and function to generate certificate.