private Optional<SamlRegisteredService> getRegisteredServiceIfAny(final String service) {
        if (NumberUtils.isDigits(service)) {
            val svc = servicesManager.findServiceBy(Long.parseLong(service), SamlRegisteredService.class);
            return Optional.ofNullable(svc);
        }
        val svc = StringUtils.isNotBlank(service) ? webApplicationServiceFactory.createService(service) : null;
        val registeredService = servicesManager.findServiceBy(svc, SamlRegisteredService.class);
        return Optional.ofNullable(registeredService);
    }
Idp encryption certificate.

@param service  the service
@throws Throwable the throwable
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/metadata/SamlIdPMetadataController.java