@Override
    public Pair<String, String> buildSelfSignedEncryptionCert(final Optional<SamlRegisteredService> registeredService) throws Exception {
        return generateCertificateAndKey();
    }
This is {@link RestfulSamlIdPMetadataGenerator}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp-metadata-rest/src/main/java/org/apereo/cas/support/saml/idp/metadata/RestfulSamlIdPMetadataGenerator.java