public ClientKey(final InputStream inputStream,final String password) throws InvalidKeystoreException {
  this.password=password;
  final KeyStore keystore=getKeyStore(inputStream,password);
  final Enumeration<String> aliases=getAliases(keystore);
  if (aliases.hasMoreElements()) {
    this.alias=aliases.nextElement();
    logger.info("Client certificate serial number: " + getCertificateInfo(keystore,alias));
  }
 else {
    throw new InvalidKeystoreException("Keystore doesn't contain any keys!");
  }
  this.keyStore=keystore;
  this.clientPasswordCallback=new ClientPasswordCallback(alias,password);
}

public ClientKey ( final InputStream inputStream , final String password ) throws InvalidKeystoreException { this . password = password ; final KeyStore keystore = getKeyStore ( inputStream , password ) ; final Enumeration < String > aliases = getAliases ( keystore ) ; if ( aliases . hasMoreElements ( ) ) { this . alias = aliases . nextElement ( ) ; logger . info ( "Client certificate serial number: " + getCertificateInfo ( keystore , alias ) ) ; } else { throw new InvalidKeystoreException ( "Keystore doesn't contain any keys!" ) ; } this . keyStore = keystore ; this . clientPasswordCallback = new ClientPasswordCallback ( alias , password ) ; }
create new clientkey instance based on data provided in the stream together with the password
