# File lib/openid/filestore.rb, line 135
    def get_association(server_url, handle=nil)
      unless handle.nil?
        filename = get_association_filename(server_url, handle)
        return _get_association(filename)
      end
      
      # search though existing files looking for a match
      prefix = filename_from_url(server_url)
      assoc_filenames = Dir.entries(@association_dir)
      assoc_filenames = assoc_filenames.find_all { |f| f.index(prefix) == 0 }
      
      assocs = assoc_filenames.collect do |f|
        _get_association(@association_dir.join(f))
      end

      assocs = assocs.find_all { |a| not a.nil? }
      assocs = assocs.sort_by { |a| a.issued }
      
      return nil if assocs.empty?
      return assocs[-1]
    end