Class KeyStoreUtil


  • public class KeyStoreUtil
    extends Object
    Utility class for building up a keystore which can be used in SSL communication.
    Since:
    20.10.14
    Author:
    roland
    • Constructor Detail

      • KeyStoreUtil

        public KeyStoreUtil()
    • Method Detail

      • createDockerKeyStore

        public static KeyStore createDockerKeyStore​(String certPath)
                                             throws IOException,
                                                    GeneralSecurityException
        Create a key stored holding certificates and secret keys from the given Docker key cert
        Parameters:
        certPath - directory holding the keys (key.pem) and certs (ca.pem, cert.pem)
        Returns:
        a keystore where the private key is secured with "docker"
        Throws:
        IOException - is reading of the the PEMs failed
        GeneralSecurityException - when the files in a wrong format