public static boolean containsKey(KeyStore keyStore) throws CryptoException {
  try {
    Enumeration<String> aliases=keyStore.aliases();
    while (aliases.hasMoreElements()) {
      String alias=aliases.nextElement();
      if (isKeyEntry(alias,keyStore)) {
        return true;
      }
    }
    return false;
  }
 catch (  KeyStoreException ex) {
    throw new CryptoException(res.getString("NoCheckKeyStoreKeys.exception.message"),ex);
  }
}

public static boolean containsKey ( KeyStore keyStore ) throws CryptoException { try { Enumeration < String > aliases = keyStore . aliases ( ) ; while ( aliases . hasMoreElements ( ) ) { String alias = aliases . nextElement ( ) ; if ( isKeyEntry ( alias , keyStore ) ) { return true ; } } return false ; } catch ( KeyStoreException ex ) { throw new CryptoException ( res . getString ( "NoCheckKeyStoreKeys.exception.message" ) , ex ) ; } }
does the supplied keystore contain any key entries ? ie any entries that contain a key with no certificate chain .
