Class KeyStoreCertificateSource

java.lang.Object
eu.europa.esig.dss.spi.x509.CommonCertificateSource
eu.europa.esig.dss.spi.x509.KeyStoreCertificateSource
All Implemented Interfaces:
CertificateSource, Serializable

public class KeyStoreCertificateSource
extends CommonCertificateSource
Implements a CertificateSource using a KeyStore (PKCS12, JKS,...). Note: PKCS12 + JDK7 don't allow trust store
See Also:
Serialized Form
  • Constructor Details

    • KeyStoreCertificateSource

      public KeyStoreCertificateSource​(String ksType, String ksPassword)
      Constructor for KeyStoreCertificateSource. This constructor allows to create a new empty keystore.
      Parameters:
      ksType - the keystore type
      ksPassword - the keystore password
    • KeyStoreCertificateSource

      public KeyStoreCertificateSource​(String ksFilePath, String ksType, String ksPassword) throws IOException
      Constructor for KeyStoreCertificateSource.
      Parameters:
      ksFilePath - the keystore filepath
      ksType - the keystore type
      ksPassword - the keystore password
      Throws:
      IOException - if the file not exists
    • KeyStoreCertificateSource

      public KeyStoreCertificateSource​(File ksFile, String ksType, String ksPassword) throws IOException
      Constructor for KeyStoreCertificateSource with CertificatePool.
      Parameters:
      ksFile - the keystore file
      ksType - the keystore type
      ksPassword - the keystore password
      Throws:
      IOException - if the file not exists
    • KeyStoreCertificateSource

      public KeyStoreCertificateSource​(InputStream ksStream, String ksType, String ksPassword)
      The default constructor for KeyStoreCertificateSource.
      Parameters:
      ksStream - the inputstream with the keystore (can be null to create a new keystore)
      ksType - the keystore type
      ksPassword - the keystore password
  • Method Details