public void engineDeleteEntry(String alias) throws KeyStoreException {
  Key k=(Key)keys.remove(alias);
  Certificate c=(Certificate)certs.remove(alias);
  if (c != null) {
    chainCerts.remove(new CertId(c.getPublicKey()));
  }
  if (k != null) {
    String id=(String)localIds.remove(alias);
    if (id != null) {
      c=(Certificate)keyCerts.remove(id);
    }
    if (c != null) {
      chainCerts.remove(new CertId(c.getPublicKey()));
    }
  }
}

public void engineDeleteEntry ( String alias ) throws KeyStoreException { Key k = ( Key ) keys . remove ( alias ) ; Certificate c = ( Certificate ) certs . remove ( alias ) ; if ( c != null ) { chainCerts . remove ( new CertId ( c . getPublicKey ( ) ) ) ; } if ( k != null ) { String id = ( String ) localIds . remove ( alias ) ; if ( id != null ) { c = ( Certificate ) keyCerts . remove ( id ) ; } if ( c != null ) { chainCerts . remove ( new CertId ( c . getPublicKey ( ) ) ) ; } } }
this is not quite complete - we should follow up on the chain , a bit tricky if a certificate appears in more than one chain . . .
