 (defn modify-rdn
   "Modifies the RDN (Relative Distinguished Name) of an entry in the connected
   ldap server.
-  
+
   The new-rdn has the form cn=foo or ou=foo. Using just foo is not sufficient.
-  The delete-old-rdn boolean option indicates whether to delete the current 
+  The delete-old-rdn boolean option indicates whether to delete the current
   RDN value from the target entry."
   [connection dn new-rdn delete-old-rdn]
   (let [request (ModifyDNRequest. dn new-rdn delete-old-rdn)]

  (if-let [n (.nextEntry source)]
    (cons n (lazy-seq (entry-seq source)))))

;; Extended version of search-results function using a 
;; SearchRequest that uses a SimplePagedResultsControl.  
;; Allows us to read arbitrarily large result sets.
;; TODO make this lazy
(defn- search-all-results

                    JKS format file, optional, defaults to trusting all
                    certificates
   :connect-timeout The timeout for making connections (milliseconds),
                    defaults to 1 minute
   :timeout         The timeout when waiting for a response from the server
                    (milliseconds), defaults to 5 minutes
   "
