attributeSet = getAttributeSet(null, this.getCAObjectClass(), dn, true, false);
attributeSet = getAttributeSet(this.getCAObjectClass(), crldn, true, false);
	public boolean storeCRL(Admin admin, byte[] incrl, String cafp, int number) throws PublisherException{        int ldapVersion = LDAPConnection.LDAP_V3;        LDAPConnection lc = null;        if(getUseSSL()){          lc = new LDAPConnection(new LDAPJSSESecureSocketFactory());        }else{          lc = new LDAPConnection();                }        X509CRL crl = null;        String dn = null;        try {            crl = CertTools.getCRLfromByteArray(incrl);            // Extract the issuers DN from the crl.            dn = constructLDAPDN(CertTools.getIssuerDN(crl));        } catch (Exception e) {        	log.error("Error decoding input CRL: ", e);        	        	throw new PublisherException("Error decoding input CRL.");                    }        // 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(getHostname(), Integer.parseInt(getPort()));            // authenticate to the server            lc.bind(ldapVersion, getLoginDN(), getLoginPassword());            // 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) {                log.debug("No old entry exist for '" + dn + "'.");            } else {                log.error("Error binding to and reading from LDAP server: ", e);                throw new PublisherException("Error binding to and reading from LDAP server.");                            }        }        LDAPEntry newEntry = null;        LDAPModificationSet modSet = null;        LDAPAttributeSet attributeSet = null;        if (oldEntry != null) {            modSet = getModificationSet(oldEntry, dn, false, false);        } else {            attributeSet = getAttributeSet(null, this.getCAObjectClass(), dn, true, false);        }        try {            LDAPAttribute crlAttr = new LDAPAttribute(getCRLAttribute(), crl.getEncoded());            LDAPAttribute arlAttr = new LDAPAttribute(getARLAttribute(), crl.getEncoded());            if (oldEntry != null) {                modSet.add(LDAPModification.REPLACE, crlAttr);                modSet.add(LDAPModification.REPLACE, arlAttr);            } else {                attributeSet.add(crlAttr);                attributeSet.add(arlAttr);            }        } catch (CRLException e) {            log.error("Error encoding CRL when storing in LDAP: ", e);            throw new PublisherException("Error encoding CRL when storing in LDAP.");                    }        if (oldEntry == null) {            newEntry = new LDAPEntry(dn, attributeSet);        }        try {            // connect to the server            lc.connect(getHostname(), Integer.parseInt(getPort()));            // authenticate to the server            lc.bind(ldapVersion, getLoginDN(), getLoginPassword());            // Add or modify the entry            if (oldEntry != null) {                lc.modify(dn, modSet);                log.debug("\nModified object: " + dn + " successfully.");            } else {                lc.add(newEntry);                log.debug("\nAdded object: " + dn + " successfully.");                            }            // disconnect with the server            lc.disconnect();        } catch (LDAPException e) {            log.error("Error storing CRL (" + getCRLAttribute() + ") in LDAP (" + getCAObjectClass() + "): ", e);            throw new PublisherException("Error storing CRL (" + getCRLAttribute() + ") in LDAP (" + getCAObjectClass() + "): ");                                }        return true;    }