CertificateService for replacing certificate and private key