Class KeyStoreBuilder


  • public class KeyStoreBuilder
    extends java.lang.Object
    Build a key store from some options and possibly a keystore file. The following properties are read - all properties are optional:
    • project.title
    • security.keystore.password
    • security.privatekey.alias
    • security.privatekey.password
    • security.publickey.*
    • keystore.strictpublickeydecoding
    The keystore file itself is optional.
    Author:
    Alex Kalderimis
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyStoreBuilder​(java.util.Properties options, ResourceOpener opener)
      Construct a new KeyStoreBuilder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.KeyStore buildKeyStore()
      Build the key store.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyStoreBuilder

        public KeyStoreBuilder​(java.util.Properties options,
                               ResourceOpener opener)
        Construct a new KeyStoreBuilder.
        Parameters:
        options - The options to read. NOT NULL
        opener - Where I can get access to the key store file. NOT NULL
    • Method Detail

      • buildKeyStore

        public java.security.KeyStore buildKeyStore()
                                             throws java.security.KeyStoreException,
                                                    java.io.IOException,
                                                    java.security.NoSuchAlgorithmException,
                                                    java.security.cert.CertificateException
        Build the key store.
        Returns:
        A fully initialised and configured key store.
        Throws:
        java.security.KeyStoreException - If we cannnot instantiate the keystore.
        java.io.IOException - If there are system problems.
        java.security.NoSuchAlgorithmException - If the algorithm specified are wrong.
        java.security.cert.CertificateException - If we cannot generate certificates.