private static Certificate[] loadCertificates(String certPath) throws IOException, CertificateException {
        try (InputStream is = new FileInputStream(certPath)) {
            CertificateFactory certificateFactory = CertificateFactory.getInstance("X509");
            Collection<? extends Certificate> certs = certificateFactory.generateCertificates(is);
            return certs.toArray(new Certificate[certs.size()]);
        }
    }
Create a key stored holding certificates and secret keys from the given Docker key cert

@param certPath directory holding the keys (key.pem) and certs (ca.pem, cert.pem)
@return a keystore where the private key is secured with "docker"

@throws IOException is reading of the the PEMs failed
@throws GeneralSecurityException when the files in a wrong format
src/main/java/io/fabric8/maven/docker/access/KeyStoreUtil.java