@Override
    public X509Certificate[] getCertificateChain(final String alias) {
        return this.keyManagers.stream().map(keyManager -> keyManager.getCertificateChain(alias))
            .filter(chain -> chain != null && chain.length > 0)
            .findFirst().orElse(null);
    }
This is {@link CompositeX509KeyManager}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ssl/CompositeX509KeyManager.java