class SecurityUtils {

    public static Certificate[] loadCertificateChain(HttpsConfig config) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException {
        if (config.getKeyStore() != null) {
            KeyStore ks = loadKeyStore(config);
            return ks.getCertificateChain(config.getKeyAlias());
        }
        return new Certificate[0];
    }

}