Package net.jsign

Class KeyStoreBuilder


  • public class KeyStoreBuilder
    extends Object
    Keystore builder.

    Example:

       KeyStore keystore = new KeyStoreBuilder().storetype(PKCS12).keystore("keystore.p12").storepass("password").build();
     
    Since:
    5.0
    • Method Detail

      • keystore

        public KeyStoreBuilder keystore​(String keystore)
        Sets the name of the resource containing the keystore. Either the path of the keystore file, the SunPKCS11 configuration file or the cloud keystore name depending on the type of keystore.
      • storepass

        public KeyStoreBuilder storepass​(String storepass)
        Sets the password to access the keystore. The password can be loaded from a file by using the file: prefix followed by the path of the file, or from an environment variable by using the env: prefix followed by the name of the variable.
      • keypass

        public KeyStoreBuilder keypass​(String keypass)
        Sets the password to access the private key. The password can be loaded from a file by using the file: prefix followed by the path of the file, or from an environment variable by using the env: prefix followed by the name of the variable.
      • certfile

        public KeyStoreBuilder certfile​(String certfile)
        Sets the file containing the certificate chain. The certificate used for signing must be the first one.
      • certfile

        public KeyStoreBuilder certfile​(File certfile)
        Sets the file containing the certificate chain. The certificate used for signing must be the first one.
      • provider

        public Provider provider()
        Returns the provider used to sign with the keystore.