public static KeyStore createDockerKeyStore(String certPath) throws IOException, GeneralSecurityException {
        PrivateKey privKey = loadPrivateKey(certPath + "/key.pem");
        Certificate[] certs = loadCertificates(certPath + "/cert.pem");

        KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
        keyStore.load(null);

        keyStore.setKeyEntry("docker", privKey, "docker".toCharArray(), certs);
        addCA(keyStore, certPath + "/ca.pem");
        return keyStore;
    }
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