Package org.apache.synapse.securevault.keystore

# Class PKCS8KeyStoreLoader

java.lang.Object
org.apache.synapse.securevault.keystore.PKCS8KeyStoreLoader

All Implemented Interfaces:
  `IKeyStoreLoader`

public class PKCS8KeyStoreLoader extends Object implements IKeyStoreLoader
Constructs a KeyStore instance of type JKS from a pkcs8 private key and certificate.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PKCS8KeyStoreLoader(String pkcs8PrivateKeyPath, String certFilePath, String keyPass, String entryAlias)`
  constructs an instance of KeyStoreLoader

- ## Method Summary

  Modifier and Type
  Method
  Description
  `KeyStore`
  `getKeyStore()`
  Returns a JKS keyStore from the given private key, certificate path, key password and alias.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PKCS8KeyStoreLoader

    public PKCS8KeyStoreLoader(String pkcs8PrivateKeyPath, String certFilePath, String keyPass, String entryAlias)
    constructs an instance of KeyStoreLoader
    Parameters:
      `pkcs8PrivateKeyPath` - - path to a private key file. Key must be in PKCS8 format, PEM encoded and unencrypted.
      `certFilePath` - - path to certificate file. File must be PEM encoded.
      `keyPass` - - password to secure the private key within the keystore. This will be required later to retrieve the private key back from the keystore.
      `entryAlias` - - alias for the given entry within the keystore.

- ## Method Details

  - ### getKeyStore

    public KeyStore getKeyStore()
    Returns a JKS keyStore from the given private key, certificate path, key password and alias.
    Specified by:
      `getKeyStore` in interface `IKeyStoreLoader`
    Returns:
      KeyStore Instance