Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.fgov.ehealth.technicalconnector.ra.utils
Class KeyStoreUtils

    java.lang.Object
      be.fgov.ehealth.technicalconnector.ra.utils.KeyStoreUtils

    public class KeyStoreUtils

extends Object

Utility class for KeyStore actions.

Constructor Summary
`KeyStoreUtils()` Create an empty PKCS12 KeyStore.
`KeyStoreUtils(String storeType)` Creates a empty KeyStore based on the given storeType.

Method Summary
`void` | `addAuthenticationChain(char[] passwd, X509Certificate... chain)` Add the X509Certificate chain to the keystore, the alias of the actuele certificate is "authentication".
`void` | `addAuthenticationKeyPair(KeyPair entry, char[] passwd)` Add the authentication keypair to the keystore, a dummy X509Certificate will be generated.
`void` | `addEncryptionToken(KeyPair entry, char[] passwd, X509Certificate etkCert)` Add the EncryptionToken to the keystore, the alias will be the hex value of the serialnumber.
`void` | `load(char[] passwd, byte[] content)` Load content from another keystore of the same type into the new one.
`void` | `store(String location, char[] passwd)` Store the keystore to the given location with the given password.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KeyStoreUtils

    public KeyStoreUtils()

  Create an empty PKCS12 KeyStore.

### KeyStoreUtils

    public KeyStoreUtils(String storeType)

  Creates a empty KeyStore based on the given storeType.

Method Detail

### load

    public void load(char[] passwd,
                     byte[] content)

  Load content from another keystore of the same type into the new one.

### addAuthenticationChain

    public void addAuthenticationChain(char[] passwd,
                                       X509Certificate... chain)
                                throws TechnicalConnectorException

  Add the X509Certificate chain to the keystore, the alias of the actuele certificate is "authentication".

  Throws:
    `TechnicalConnectorException`

### addEncryptionToken

    public void addEncryptionToken(KeyPair entry,
                                   char[] passwd,
                                   X509Certificate etkCert)
                            throws TechnicalConnectorException

  Add the EncryptionToken to the keystore, the alias will be the hex value of the serialnumber.

  Throws:
    `TechnicalConnectorException`

### addAuthenticationKeyPair

    public void addAuthenticationKeyPair(KeyPair entry,
                                         char[] passwd)
                                  throws TechnicalConnectorException

  Add the authentication keypair to the keystore, a dummy X509Certificate will be generated.

  Throws:
    `TechnicalConnectorException`

### store

    public void store(String location,
                      char[] passwd)
               throws TechnicalConnectorException

  Store the keystore to the given location with the given password.

  Throws:
    `TechnicalConnectorException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Connector Packaging PERSOCCUPATIONALTHERAPIST 3.13.1 API
Copyright © {inceptionYear}-2017 eHealth. All Rights Reserved.