TrueLicense Core 1.33

de.schlichtherle.license
Class DefaultKeyStoreParam

java.lang.Object
  extended by de.schlichtherle.license.AbstractKeyStoreParam
      extended by de.schlichtherle.license.DefaultKeyStoreParam
All Implemented Interfaces:
KeyStoreParam

public class DefaultKeyStoreParam
extends AbstractKeyStoreParam

This is a convenience class implementing the KeyStoreParam interface.

Author:
Christian Schlichtherle

Field Summary
private  String alias
           
private  String keyPwd
           
private  String storePwd
           
 
Constructor Summary
DefaultKeyStoreParam(Class clazz, String resource, String alias, String storePwd, String keyPwd)
          Constructs a new instance.
 
Method Summary
 String getAlias()
          Returns the alias for the key entry in the key store.
 String getKeyPwd()
          Returns the password for the private key in the keystore.
 String getStorePwd()
          Returns the password for the keystore.
 
Methods inherited from class de.schlichtherle.license.AbstractKeyStoreParam
equals, getStream, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alias

private final String alias

keyPwd

private final String keyPwd

storePwd

private final String storePwd
Constructor Detail

DefaultKeyStoreParam

public DefaultKeyStoreParam(Class clazz,
                            String resource,
                            String alias,
                            String storePwd,
                            String keyPwd)
Constructs a new instance.

Parameters:
clazz - Used to retrieve the classloader required to load the keystore as a resource.
resource - The resource identifier for the keystore to be returned by AbstractKeyStoreParam.getStream().
alias - The alias for the key entry in the key store to be returned by getAlias().
storePwd - The key store password to be returned by getStorePwd().
keyPwd - The password for the private key in the key store entry to be returned by getStorePwd().
Method Detail

getAlias

public String getAlias()
Description copied from interface: KeyStoreParam
Returns the alias for the key entry in the key store.

Returns:
The alias for the key entry in the key store - null is never returned.

getKeyPwd

public String getKeyPwd()
Description copied from interface: KeyStoreParam
Returns the password for the private key in the keystore. This password is only required to sign a GenericCertificate and must be null in your client application (the one which just needs to install or verify license certificates rather than creating them). The LicenseNotary class may check that there is no private key in the Java key store if this password is null and vice versa and throw an exception if you don't adhere to this contract.

Note that the Policy class provides additional constraints for the returned password.

Returns:
The password for the private key in the keystore.
See Also:
Policy.checkPwd(String)

getStorePwd

public String getStorePwd()
Description copied from interface: KeyStoreParam
Returns the password for the keystore.

Note that the Policy class provides additional constraints for the returned password.

Returns:
The password for the keystore - null is never returned.
See Also:
Policy.checkPwd(String)

TrueLicense Core 1.33

Copyright © 2005-2015 Schlichtherle IT Services. All Rights Reserved.