code: public final String getCertificateAlias(Certificate cert)
          throws KeyStoreException
      {
          if (!initialized) {
              throw new KeyStoreException("Uninitialized keystore");
          }
          return keyStoreSpi.engineGetCertificateAlias(cert);
      }
docs: Returns the (alias) name of the first keystore entry whose certificate
  matches the given certificate.
  
  <p> This method attempts to match the given certificate with each
  keystore entry. If the entry being considered was
  created by a call to <code>setCertificateEntry</code>,
  or created by a call to <code>setEntry</code> with a
  <code>TrustedCertificateEntry</code>,
  then the given certificate is compared to that entry's certificate.
  
  <p> If the entry being considered was
  created by a call to <code>setKeyEntry</code>,
  or created by a call to <code>setEntry</code> with a
  <code>PrivateKeyEntry</code>,
  then the given certificate is compared to the first
  element of that entry's certificate chain.
  
  @param cert the certificate to match with.
  
  @return the alias name of the first entry with a matching certificate,
  or null if no such entry exists in this keystore.
  
  @exception KeyStoreException if the keystore has not been initialized
  (loaded).