error( "Error storing CRL in LDAP: ", e);
error( "Error storing CRL ("+cRLAttribute+") in LDAP ("+cAObjectclass+"): ", e);
    public boolean storeCRL(byte[] incrl, String cafp, int number) {        int ldapVersion  = LDAPConnection.LDAP_V3;        LDAPConnection lc = new LDAPConnection();        X509CRL crl;        try {            crl = CertTools.getCRLfromByteArray(incrl);        } catch (Exception e) {            error("Error decoding input CRL: ",e);            return false;        }        // Extract the users DN from the cert.        String dn = CertTools.stringToBCDNString(crl.getIssuerDN().toString());        if (checkContainerName(dn) == false)            return false;        // Check if the entry is already present, we will update it with the new certificate.        LDAPEntry oldEntry = null;        try {            // connect to the server            lc.connect( ldapHost, ldapPort );            // authenticate to the server            lc.bind( ldapVersion, loginDN, loginPassword );            // try to read the old object            oldEntry = lc.read(dn);            // disconnect with the server            lc.disconnect();        } catch( LDAPException e ) {            if (e.getLDAPResultCode() == LDAPException.NO_SUCH_OBJECT) {                debug("No old entry exist for '"+dn+"'.");            } else {                error( "Error binding to and reading from LDAP server: ", e);                return false;            }        }        LDAPEntry newEntry = null;        LDAPModificationSet modSet = null;        LDAPAttributeSet attributeSet = null;        if (oldEntry != null)            modSet = getModificationSet(oldEntry, dn, false);        else            attributeSet = getAttributeSet(cAObjectclass, dn, false);        try {            LDAPAttribute crlAttr = new LDAPAttribute( cRLAttribute, crl.getEncoded() );            if (oldEntry != null)                modSet.add(LDAPModification.REPLACE, crlAttr);            else                attributeSet.add( crlAttr );        } catch (CRLException e) {            error("Error encoding CRL when storing in LDAP: ",e);            return false;        }        if (oldEntry == null)            newEntry = new LDAPEntry( dn, attributeSet );        try {            // connect to the server            lc.connect( ldapHost, ldapPort );            // authenticate to the server            lc.bind( ldapVersion, loginDN, loginPassword );            // Add or modify the entry            if (oldEntry != null) {                lc.modify(dn, modSet);                info( "\nModified object: " + dn + " successfully." );            } else {                lc.add( newEntry );                info( "\nAdded object: " + dn + " successfully." );            }            // disconnect with the server            lc.disconnect();        }        catch( LDAPException e ) {            error( "Error storing CRL in LDAP: ", e);            return false;        }        return true;    } // storeCRL