Certificate cert2 = ((IPublicKeyring) keyring).getCertificate(alias);
Certificate cert2 = publicKR.getCertificate(alias);
  public String engineGetCertificateAlias(Certificate cert)  {    if (!loaded)      {        throw new IllegalStateException ("not loaded");      }    if (keyring == null)      {        return null;      }    if (!(keyring instanceof IPublicKeyring))      {        throw new IllegalStateException("not a public keyring");      }    Enumeration aliases = keyring.aliases();    while (aliases.hasMoreElements())      {        String alias = (String) aliases.nextElement();        Certificate cert2 = ((IPublicKeyring) keyring).getCertificate(alias);        if (cert.equals(cert2))          {            return alias;          }      }    return null;  }