I don't like how this is called setCertificate but actually creates a certificate.