ldapjdk-4.18/0000775001003300100330000000000010667357302012440 5ustar viveklviveklldapjdk-4.18/mozilla/0000775001003300100330000000000010667357302014107 5ustar viveklviveklldapjdk-4.18/mozilla/directory/0000775001003300100330000000000010667357303016114 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/0000775001003300100330000000000010667357333017617 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/build.properties0000664001003300100330000000061510315014722023014 0ustar viveklvivekl# ----------------------------------------------------------------------------- # build.properties.sample # # This is an example "build.properties" file, used to customize building # Mozilla Java LDAP SDK for your local environment. # # $Id: build.properties,v 1.2 2005/09/23 15:05:54 richm%stanfordalumni.org Exp $ # ----------------------------------------------------------------------------- ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp.mk0000664001003300100330000001040510602743265021423 0ustar viveklvivekl# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1999 # the Initial Developer. All Rights Reserved. # # Contributor(s): # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** # # Makefile for the LDAPSP classes # # A debug compile (java -g) is done by default. You can specify "DEBUG=0" on # the make line to compile with '-O' option. # ARCH := $(shell uname -s) MCOM_ROOT=. ifeq ($(ARCH), WINNT) MOZ_DIR:=$(subst \,/,$(MOZ_SRC)) BASEDIR:=$(MOZ_DIR)/mozilla/directory/java-sdk else ifeq ($(ARCH), WIN95) MOZ_DIR:=$(subst \,/,$(MOZ_SRC)) BASEDIR:=$(MOZ_DIR)/mozilla/directory/java-sdk else BASEDIR := $(shell cd $(MCOM_ROOT); pwd) endif endif # Destination for class files and packages CLASS_DEST=$(BASEDIR)/dist/classes ifeq ($(ARCH), WINNT) JDK := $(subst \,/,$(JAVA_HOME)) SEP=; else ifeq ($(ARCH), WIN95) JDK := $(subst \,/,$(JAVA_HOME)) SEP=; else JDK := $(JAVA_HOME) SEP=: endif endif JNDILIB:=$(BASEDIR)/ldapsp/lib/jndi.jar JAVACLASSPATH:=$(CLASS_DEST)$(SEP)$(BASEDIR)/ldapsp$(SEP)$(JDK)/lib/classes.zip$(SEP)$(JNDILIB)$(SEP)$(CLASSPATH) SRCDIR=com/netscape/jndi/ldap DISTDIR=$(MCOM_ROOT)/dist CLASSDIR=$(MCOM_ROOT)/dist/classes CLASSPACKAGEDIR=$(DISTDIR)/packages DOCDIR=$(DISTDIR)/doc/ldapsp BASEPACKAGENAME=ldapsp.jar CLASSPACKAGE=$(CLASSPACKAGEDIR)/$(PACKAGENAME) DOCCLASSES=com.netscape.jndi.ldap.controls ifdef JAVA_HOME JDKBIN=$(JDK)/bin/ endif ifndef JAVAC ifndef DEBUG #defualt mode is debug (-g) JAVAC=$(JDKBIN)javac -g -classpath "$(JAVACLASSPATH)" else ifeq ($(DEBUG), 1) JAVAC=$(JDKBIN)javac -g -classpath "$(JAVACLASSPATH)" else JAVAC=$(JDKBIN)javac -O -classpath "$(JAVACLASSPATH)" endif endif endif ifndef JAR JAR:=$(JDKBIN)jar endif ifndef JAVADOC JAVADOC=$(JDKBIN)javadoc -classpath "$(JAVACLASSPATH)" endif all: classes doc: $(DISTDIR) $(DOCDIR) $(JAVADOC) -d $(DOCDIR) $(DOCCLASSES) basics: $(DISTDIR) $(CLASSDIR) classes: JNDICLASSES package: basepackage basepackage: $(CLASSPACKAGEDIR) cd $(DISTDIR)/classes; rm -f ../packages/$(BASEPACKAGENAME); $(JAR) cvf ../packages/$(BASEPACKAGENAME) com/netscape/jndi/ldap/*.class com/netscape/jndi/ldap/common/*.class com/netscape/jndi/ldap/schema/*.class com/netscape/jndi/ldap/controls/*.class MAIN: basics cd ldapsp/$(SRCDIR); $(JAVAC) -d $(CLASS_DEST) *.java SCHEMA: basics cd ldapsp/$(SRCDIR)/schema; $(JAVAC) -d $(CLASS_DEST) *.java COMMON: basics cd ldapsp/$(SRCDIR)/common; $(JAVAC) -d $(CLASS_DEST) *.java CONTROLS: basics cd ldapsp/$(SRCDIR)/controls; $(JAVAC) -d $(CLASS_DEST) *.java JNDICLASSES: COMMON CONTROLS SCHEMA MAIN clean: rm -rf $(DISTDIR)/classes/com/netscape/jndi/ldap $(CLASSPACKAGEDIR): mkdir -p $@ $(DOCDIR): mkdir -p $@ $(DISTDIR): mkdir -p $@ $(CLASSDIR): mkdir -p $@ ldapjdk-4.18/mozilla/directory/java-sdk/tools/0000775001003300100330000000000010667357333020757 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/tools/LDAPTool.java0000664001003300100330000001164610602743274023200 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ import netscape.ldap.*; import netscape.ldap.util.*; import netscape.ldap.controls.*; /** * LDAPTool * Base class for LDAP command-line tools * * @version 1.0 * @author Rob Weltman **/ class LDAPTool { /** * This function is to extract specified parameters from the * arguments list. * @param args list of args */ protected static GetOpt extractParameters(String privateOpts, String args[]) { GetOpt options = new GetOpt("vnRMD:h:O:p:w:d:V:y:" + privateOpts, args); if (options.hasOption('n')) m_justShow = true; if (options.hasOption('v')) m_verbose = true; if (options.hasOption('R')) m_referrals = false; /* -D bind DN */ if (options.hasOption('D')) m_binddn = options.getOptionParam('D'); /* -h ldap host */ if (options.hasOption('h')) m_ldaphost = options.getOptionParam('h'); /* -p ldap port */ if (options.hasOption('p')) { /* if the option is -p */ try { m_ldapport = Integer.parseInt(options.getOptionParam('p')); } catch (NumberFormatException e) { m_ldapport = 389; } } /* if the option is -p */ /* -O hop limit */ if (options.hasOption('O')) { /* if the option is -O */ try { m_hopLimit = Integer.parseInt(options.getOptionParam('O')); } catch (NumberFormatException e) { m_hopLimit = 10; } } /* if the option is -O */ /* -d debug level */ if (options.hasOption('d')) { /* if the option is -d */ try { m_debugLevel = Integer.parseInt(options.getOptionParam('d')); } catch (NumberFormatException e) { m_debugLevel = 0; } } /* if the option is -d */ /* -V ldap protocol version */ if (options.hasOption('V')) { /* if the option is -V */ try { m_version = Integer.parseInt(options.getOptionParam('V')); } catch (NumberFormatException e) { m_version = 3; } } /* if the option is -V */ /* -w bind password */ if (options.hasOption('w')) m_passwd = options.getOptionParam('w'); /* -y proxy DN */ if (options.hasOption('y')) m_proxyControl = new LDAPProxiedAuthControl( options.getOptionParam('y'), true ); /* -M treat ref attribute as ordinary entry */ if (options.hasOption('M')) m_ordinary = true; return options; } protected static void setDefaultReferralCredentials( LDAPConstraints cons ) { LDAPRebind rebind = new LDAPRebind() { public LDAPRebindAuth getRebindAuthentication( String host, int port ) { return new LDAPRebindAuth( m_client.getAuthenticationDN(), m_client.getAuthenticationPassword() ); } }; cons.setReferrals( true ); cons.setRebindProc( rebind ); } protected static int m_ldapport = 389; protected static String m_binddn = null; protected static String m_ldaphost = "localhost"; protected static String m_passwd = null; protected static int m_version = 3; protected static int m_debugLevel = 0; protected static int m_hopLimit = 10; protected static boolean m_referrals = true; protected static LDAPConnection m_client = null; protected static boolean m_justShow = false; protected static boolean m_verbose = false; protected static boolean m_ordinary = false; protected static LDAPControl m_proxyControl = null; } ldapjdk-4.18/mozilla/directory/java-sdk/tools/LDAPModify.java0000664001003300100330000005054410602743274023512 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * @(#) LDAPModify.java * */ import java.io.*; import java.net.*; import java.util.*; import netscape.ldap.*; import netscape.ldap.util.*; /** * Executes modify, delete, add, and modRDN. * This class is implemented based on the java LDAP classes. * *
 * usage       : java LDAPModify [options]
 * example     : java LDAPModify -D "uid=johnj,ou=People,o=Airius.com"
 *                 -w "password" -h ldap.netscape.com -p 389
 *                 -f modify.cfg
 *
 * options: {np = no parameters, p = requires parameters}
 *  'D' bind DN --------------------------------------------- p
 *  'w' bind password --------------------------------------- p
 *  'f' input file ------------------------------------------ p
 *  'h' LDAP host ------------------------------------------- p
 *  'p' LDAP port ------------------------------------------- p
 *  'e' record rejected records in a text file -------------- p
 *  'c' continuous, do not stop on error ------------------- np
 *  'a' add, if no operation is specified ------------------ np
 *  'r' replace, if no operation is specified -------------- np
 *  'b' binary, read values starting with / from a file ---- np
 *  'd' debugging level ------------------------------------- p
 *  'V' version, specify LDAP protocol version (2 or 3) ----- p
 *  'R' do not follow referrals ---------------------------- np
 *  'O' hop limit ------------------------------------------- p
 *  'H' help, display usage--------------------------------- np
 *  'M' manage referrals, do not follow them --------------- np
 *  'n' show what would be done but do not do it ----------- np
 *  'v' verbose mode --------------------------------------- np
 *  'e' reject file, where to list rejected records --------- p
 *  'y' proxy DN, DN to use for access control -------------- p
 *
 * note: '-' or '/' is used to mark an option field.
 *       e.g. -a -b /c /d parameter -e parameter
 *
 * 
* * @version 1.0 */ public class LDAPModify extends LDAPTool { /* LDAPModify */ public static void main(String args[]) { /* main */ /* extract parameters from the arguments list */ extractParameters(args); /* perform an LDAP client connection operation */ try { if (!m_justShow) { m_client = new LDAPConnection(); m_client.connect( m_ldaphost, m_ldapport ); } } catch(Exception e) { System.err.println("Error: client connection failed!"); System.exit(0); } /* perform an LDAP bind operation */ try { if (!m_justShow) m_client.authenticate( m_version, m_binddn, m_passwd ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } try { if ( m_file != null ) m_ldif = new LDIF(m_file); else { m_ldif = new LDIF(); } } catch (Exception e) { if ( m_file == null ) m_file = "stdin"; System.err.println("Failed to read LDIF file " + m_file + ", " + e.toString()); System.exit(0); } /* performs a JDAP Modify operation */ try { doModify(); } catch (Exception e) { System.err.println( e.toString() ); } /* disconnect */ try { if (!m_justShow) m_client.disconnect(); } catch (Exception e) { System.err.println( e.toString() ); } System.exit(0); } /* main */ /** * Prints usage. */ private static void doUsage() { System.err.println( "usage: LDAPModify [options]" ); System.err.println("options"); System.err.println(" -h host LDAP server name or IP address"); System.err.println(" -p port LDAP server TCP port number"); System.err.println(" -V version LDAP protocol version " + "number (default is 3)"); System.err.println(" -D binddn bind dn"); System.err.println(" -w password bind passwd (for simple " + "authentication)"); System.err.println(" -d level set LDAP debugging level " + "to \'level\'"); System.err.println(" -R do not automatically follow " + "referrals"); System.err.println(" -O hop limit maximum number of referral " + "hops to traverse"); System.err.println(" -H display usage information"); System.err.println(" -c continuous mode (do not " + "stop on errors)"); System.err.println(" -M manage references (treat them " + "as regular entries)"); System.err.println(" -f file read modifications from " + "file instead of standard input"); System.err.println(" -a add entries"); System.err.println(" -b read values that start with " + "/ from files (for bin attrs)"); System.err.println(" -n show what would be done but " + "don\'t actually do it"); System.err.println(" -v run in verbose mode"); System.err.println(" -r replace existing values by " + "default"); System.err.println(" -e rejectfile save rejected entries in " + "\'rejfile\'"); System.err.println(" -y proxy-DN DN to use for access control"); } /** * This class-method is used to extract specified parameters from the * arguments list. */ /* extract parameters */ protected static void extractParameters(String args[]) { String privateOpts = "abcHFre:f:"; GetOpt options = LDAPTool.extractParameters( privateOpts, args ); /* -H Help */ if (options.hasOption('H')) { doUsage(); System.exit(0); } /* Help */ if (options.hasOption('F')) m_force = true; if (options.hasOption('a')) m_add = true; if (options.hasOption('c')) m_continuous = true; if (options.hasOption('r')) m_add = false; if (options.hasOption('b')) m_binaryFiles = true; /* -f input file */ if(options.hasOption('f')) { /* Is input file */ m_file = (String)options.getOptionParam('f'); } /* End Is input file */ /* -e rejects file */ if(options.hasOption('e')) { /* rejects file */ m_rejectsFile = (String)options.getOptionParam('e'); } /* End rejects file */ } /* extract parameters */ /** * Call the LDAPConnection modify operation with the * specified options, and/or parameters. */ private static void doModify() throws IOException { /* doModify */ PrintWriter reject = null; LDAPConstraints baseCons = null; if (!m_justShow) { baseCons = m_client.getConstraints(); Vector controlVector = new Vector(); if (m_proxyControl != null) controlVector.addElement(m_proxyControl); if (m_ordinary) { controlVector.addElement( new LDAPControl( LDAPControl.MANAGEDSAIT, true, null) ); } if (controlVector.size() > 0) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto(controls); baseCons.setServerControls(controls); } baseCons.setReferrals( m_referrals ); if ( m_referrals ) { setDefaultReferralCredentials( baseCons ); } baseCons.setHopLimit( m_hopLimit ); } LDIFRecord rec = m_ldif.nextRecord(); for (; rec != null; rec = m_ldif.nextRecord() ) { LDAPConstraints cons = baseCons; if (!m_justShow) { // Were there any controls specified in the LDIF // record? LDAPControl[] newControls = rec.getControls(); if ( newControls != null ) { LDAPControl[] controls = newControls; LDAPControl[] oldControls = baseCons.getServerControls(); if ( oldControls != null ) { // If there were already controls defined, merge in // the new ones controls = new LDAPControl[oldControls.length + newControls.length]; for( int i = 0; i < oldControls.length; i++ ) { controls[i] = oldControls[i]; } for( int i = 0; i < newControls.length; i++ ) { controls[i+oldControls.length] = newControls[i]; } } // Assign the merged controls to a copy of the constraints cons = (LDAPSearchConstraints)baseCons.clone(); cons.setServerControls( controls ); } } LDIFContent content = rec.getContent(); LDAPModification mods[] = null; LDAPAttribute addAttrs[] = null; boolean doDelete = false; boolean doModDN = false; LDAPEntry newEntry = null; /* What type of record is this? */ if ( content instanceof LDIFModifyContent ) { mods = ((LDIFModifyContent)content).getModifications(); } else if ( content instanceof LDIFAddContent ) { addAttrs = ((LDIFAddContent)content).getAttributes(); } else if ( content instanceof LDIFAttributeContent ) { /* No change type; decide what to do based on options */ if ( m_add ) { addAttrs = ((LDIFAttributeContent)content).getAttributes(); } else { LDAPAttribute[] tmpAttrs = ((LDIFAttributeContent)content).getAttributes(); mods = new LDAPModification[tmpAttrs.length]; for( int ta = 0; ta < tmpAttrs.length; ta++ ) { mods[ta] = new LDAPModification( LDAPModification.REPLACE, tmpAttrs[ta] ); } } } else if ( content instanceof LDIFDeleteContent ) { doDelete = true; } else if (content instanceof LDIFModDNContent ) { doModDN = true; } else { } /* Prepare for adding */ if ( addAttrs != null ) { LDAPAttributeSet newAttrSet = new LDAPAttributeSet(); for( int a = 0; a < addAttrs.length; a++ ) newAttrSet.add( addAttrs[a] ); newEntry = new LDAPEntry( rec.getDN(), newAttrSet ); } /* Get values from files? */ boolean skip = false; if ( m_binaryFiles ) { /* Check each value of each attribute, to see if it needs replacing with the contents of a file */ if ( mods != null ) { for( int m = 0; m < mods.length; m++ ) { LDAPModification mod = mods[m]; LDAPAttribute attr = mods[m].getAttribute(); LDAPAttribute newAttr = checkFiles( attr ); if ( newAttr == null ) skip = true; else mods[m] = new LDAPModification( mod.getOp(), newAttr ); } } else if ( addAttrs != null ) { LDAPAttributeSet newAttrSet = new LDAPAttributeSet(); for( int a = 0; a < addAttrs.length; a++ ) { LDAPAttribute attr = addAttrs[a]; LDAPAttribute newAttr = checkFiles( attr ); if ( newAttr == null ) { skip = true; break; } else { newAttrSet.add( newAttr ); } } if ( !skip ) { newEntry = new LDAPEntry( rec.getDN(), newAttrSet ); } } } /* Do the directory operation */ int errCode = 0; if ( !skip ) { try { if ( mods != null ) { LDAPModificationSet modSet = new LDAPModificationSet(); System.out.println("\nmodifying entry "+rec.getDN() ); for( int m = 0; m < mods.length; m++ ) { if (m_verbose) System.out.println("\t"+mods[m] ); modSet.add( mods[m].getOp(), mods[m].getAttribute() ); } if (!m_justShow) { m_client.modify( rec.getDN(), modSet, cons ); } } else if ( newEntry != null ) { System.out.println( "\nadding new entry " + newEntry.getDN() ); if ( m_verbose ) { LDAPAttributeSet set = newEntry.getAttributeSet(); for( int a = 0; a < set.size(); a++ ) { System.out.println("\t"+set.elementAt(a) ); } } if (!m_justShow) { m_client.add( newEntry, cons ); } } else if ( doDelete ) { System.out.println( "\ndeleting entry " + rec.getDN() ); if (!m_justShow) m_client.delete( rec.getDN(), cons ); } else if ( doModDN) { System.out.println( "\nmodifying RDN of entry " + rec.getDN()+" and/or moving it beneath a new parent"); if ( m_verbose ) { System.out.println( "\t"+content.toString()); } if (!m_justShow) { LDIFModDNContent moddnContent = (LDIFModDNContent)content; m_client.rename( rec.getDN(), moddnContent.getRDN(), moddnContent.getNewParent(), moddnContent.getDeleteOldRDN(), cons ); System.out.println( "rename completed"); } } } catch (LDAPException e) { System.err.println( rec.getDN() + ": " + e.errorCodeToString() ); if (e.getLDAPErrorMessage() != null) System.err.println( "additional info: " + e.getLDAPErrorMessage() ); if ( !m_continuous ) { System.exit(1); } skip = true; errCode = e.getLDAPResultCode(); } } /* Write to rejects file? */ if ( skip && (m_rejectsFile != null) ) { try { if ( reject == null ) { reject = new PrintWriter( new FileOutputStream( m_rejectsFile ) ); } } catch ( Exception e ) { } if ( reject != null ) { reject.println( "dn: "+rec.getDN()+ " # Error: " + errCode ); if ( mods != null ) { for( int m = 0; m < mods.length; m++ ) { reject.println( mods[m].toString() ); } } else if ( newEntry != null ) { reject.println( "Add " + newEntry.toString() ); } else if ( doDelete ) { reject.println( "Delete " + rec.getDN() ); } else if (doModDN) { reject.println( "ModDN "+ ((LDIFModDNContent)content).toString() ); } reject.flush(); } } } System.exit(0); } /* doModify */ /** * Read in binary data for values specified with a leading / * @param attr Source attribute. * @return Updated attribute. **/ private static LDAPAttribute checkFiles ( LDAPAttribute attr ) { LDAPAttribute newAttr = new LDAPAttribute( attr.getName() ); /* Check each value and see if it is a file name */ Enumeration e = attr.getStringValues(); if (e != null) { while ( e.hasMoreElements() ) { String val = (String)e.nextElement(); if ( (val != null) && (val.length() > 1)) { try { File file = new File( val ); FileInputStream fi = new FileInputStream( file ); byte[] bval = new byte[(int)file.length()]; fi.read( bval, 0, (int)file.length() ); newAttr.addValue( bval ); } catch (FileNotFoundException ex) { newAttr.addValue(val) ; } catch ( IOException ex ) { System.err.println( "Unable to read value " + "from file " + val ); if ( !m_continuous ) System.exit(1); newAttr = null; } } else { newAttr.addValue( val ); } } } else System.err.println("Failed to do string conversion for "+attr.getName()); return newAttr; } private static boolean m_continuous = false; private static boolean m_force = false; private static boolean m_add = false; private static boolean m_binaryFiles = false; private static String m_rejectsFile = null; private static LDIF m_ldif = null; private static String m_file = null; } /* LDAPModify */ ldapjdk-4.18/mozilla/directory/java-sdk/tools/LDAPSearch.java0000664001003300100330000004460310602743274023467 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ import java.io.*; import java.net.*; import java.util.*; import netscape.ldap.*; import netscape.ldap.util.*; import netscape.ldap.controls.*; /** * Execute Search operations through the LDAP client interface. * This class is implemented based on the LDAP class library. * *
 * usage       : java LDAPSearch -b baseDN [options] filter [attributes...]
 * for example : java LDAPSearch -b "c=us" -h ds.internic.net -p 389 
 *               "(objectClass=*)"
 *     
 *   note: '-' or '/' is used to distinct the option field.
 *         e.g. -a -b /c /d parameter -e parameter
 *
 * filter:
 *   Any string in RFC1558 specification.
 *    e.g. "(objectClass=*)"
 *
 * attributes: {0..n}
 *   All the string parameters follows with the filter.
 *     e.g. filter attrsA attrsB attrsC
 * 
* * @version 1.0 */ public class LDAPSearch extends LDAPTool { /** * This is the main function. * @param args list of arguments */ public static void main(String args[]) { /* extract parameters from the arguments list */ extractParameters(args); if (!m_justShow) { /* perform an LDAP client connection operation */ try { m_client = new LDAPConnection(); m_client.connect( m_ldaphost, m_ldapport ); } catch(Exception e) { System.err.println("Error: client connection failed!"); System.exit(0); } /* perform an LDAP bind operation */ try { m_client.authenticate( m_version, m_binddn, m_passwd ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } /* perform a search operation */ dosearch(); m_pw.flush(); m_pw.close(); /* disconnect */ try { m_client.disconnect(); } catch (Exception e) { System.err.println( e.toString() ); } } System.exit(0); } /** * Prints usage. */ private static void doUsage() { System.err.println("usage: LDAPSearch -b basedn [options] " + "filter [attributes...]"); System.err.println("options"); System.err.println(" -h host LDAP server name or IP address"); System.err.println(" -p port LDAP server TCP port number"); System.err.println(" -V version LDAP protocol version " + "number (default is 3)"); System.err.println(" -D binddn bind dn"); System.err.println(" -w password bind passwd (for simple " + "authentication)"); System.err.println(" -v run in verbose mode"); System.err.println(" -n show what would be done but "+ "don't actually do it"); System.err.println(" -d level set LDAP debugging level " + "to \'level\'"); System.err.println(" -R do not automatically follow " + "referrals"); System.err.println(" -O hop limit maximum number of referral " + "hops to traverse"); System.err.println(" -H display usage information"); System.err.println(" -t write values to files"); System.err.println(" -A retrieve attribute names only"); System.err.println(" -F sep print \'sep\' instead of " + "\'=\' between attribute names and values"); System.err.println(" -S attr sort the results by attribute " + "\'attr\'"); System.err.println(" -s scope one of base, one, or sub " + "(search scope)"); System.err.println(" -a deref one of never, always, search, " + "or find (alias dereferencing)"); System.err.println(" -l timelimit time limit (in seconds) for " + "search"); System.err.println(" -T do not fold (wrap) long lines "+ "(default is to fold)"); System.err.println(" -x perform sorting on server"); System.err.println(" -M manage references (treat them "+ "as regular entries)"); System.err.println(" -z sizelimit size limit (in entries) for " + "search"); System.err.println(" -G before:after:index:count | before:after:value "+ "where 'before' and 'after' are the number of "+ "entries surrounding 'index'. 'count' is the "+ "content count, 'value' is the search value."); System.err.println(" -y proxy-DN DN to use for access control"); System.err.println(" -X output DSML instead of LDIF"); } /** * This function is to extract specified parameters from the * arguments list. * @param args list of args */ protected static void extractParameters(String args[]) { String privateOpts = "HATtxvnXa:b:F:l:s:S:z:G:"; GetOpt options = LDAPTool.extractParameters( privateOpts, args ); /* -H Help */ if (options.hasOption('H')) { doUsage(); System.exit(0); } /* Help */ /* -A retrieve attribute name only == no values */ if (options.hasOption('A')) m_attrsonly = true; if (options.hasOption('x')) m_sortOnServer = true; if (options.hasOption('t')) m_tempFiles = true; /* -F separator */ if (options.hasOption('F')) m_sep = options.getOptionParam('F'); /* -a set alias deref option */ if (options.hasOption('a')) { /* has option a */ String param = options.getOptionParam('a'); if (param.equalsIgnoreCase("never")) m_deref = 0; else if (param.equalsIgnoreCase("search")) m_deref = 1; else if (param.equalsIgnoreCase("find")) m_deref = 2; else if (param.equalsIgnoreCase("always")) m_deref = 3; else System.err.println("Error: alias deref option " + "should be never, search, find, " + "or always."); } /* has option a */ /* -b searchbase */ if (options.hasOption('b')) m_base = options.getOptionParam('b'); /* -S sort attribute */ if (options.hasOption('S')) m_sort.addElement( options.getOptionParam('S') ); /* -l time limit */ if (options.hasOption('l')) { /* if the option is -l */ try { m_timelimit = Integer.parseInt(options.getOptionParam('l')); } catch (NumberFormatException e) { m_timelimit = 0; } } /* if the option is -l */ /* -s search scope */ if (options.hasOption('s')) { /* has option s */ String param = options.getOptionParam('s'); if (param.equalsIgnoreCase("base")) m_scope = 0; else if (param.equalsIgnoreCase("one")) m_scope = 1; else if (param.equalsIgnoreCase("sub")) m_scope = 2; else System.err.println("Error: scope should be base, " + "one or sub."); } /* has option s */ /* -z size limit */ if (options.hasOption('z')) { /* if the option is -z */ try { m_sizelimit = Integer.parseInt(options.getOptionParam('z')); } catch (NumberFormatException e) { m_sizelimit = 0; } } /* if the option is -z */ /* -T fold line */ if (options.hasOption('T')) { /* if the option is -T */ m_foldLine = false; } if (options.hasOption('X')) m_printDSML = true; parseVlv(options); /* extract the filter string and attributes */ Enumeration pa = options.getParameters().elements(); Vector vec = new Vector(); while (pa.hasMoreElements()) { /* while */ vec.addElement(pa.nextElement()); } /* while */ int counter = vec.size(); if (counter <= 0) { /* No filter */ System.err.println("Error: must supply filter string!"); doUsage(); System.exit(0); } /* No filter */ if (counter == 1) { /* Has filter but no attributes */ /* gets filter string */ m_filter = (String)vec.elementAt(0); if (m_verbose) System.err.println("filter pattern: "+m_filter); /* no attributes */ m_attrs = null; if (m_verbose) { System.err.println("returning: ALL"); System.err.println("filter is: ("+m_filter+")"); } } /* Has filter but no attributes */ if (counter > 1) { /* Has filter and attributes */ /* gets filter string */ m_filter = (String)vec.elementAt(0); if (m_verbose) { System.err.println("filter pattern: "+m_filter); System.err.print("returning:"); } /* gets attributes */ m_attrs = new String[counter]; for (int j = 1; j < counter; j++) { m_attrs[j-1] = (String)vec.elementAt(j); if (m_verbose) System.err.print(" "+m_attrs[j-1]); } if (m_verbose) { System.err.println(); System.err.println("filter is: ("+m_filter+")"); } } /* Has filter and attributes */ } private static void parseVlv(GetOpt options) { /* -G virtual list */ if (options.hasOption('G')) { /* if the option is -G */ String val = options.getOptionParam('G'); StringTokenizer tokenizer = new StringTokenizer(val, ":"); m_vlvTokens = tokenizer.countTokens(); if (m_vlvTokens < 3) { doUsage(); System.exit(0); } try { m_beforeCount = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_beforeCount = 0; } try { m_afterCount = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_afterCount = 0; } if (m_vlvTokens == 3) { m_searchVal = (String)tokenizer.nextElement(); } else if (m_vlvTokens > 3) { try { m_index = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_index = 0; } try { m_count = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_count = 0; } } } /* if the option is -G */ } /** * This class-method is used to call the LDAP Search Operation with the * specified options, parameters, filters and/or attributes. */ private static void dosearch() { LDAPControl[] controls = null; try { Vector cons = new Vector(); LDAPSortControl sort = null; if ( m_sortOnServer && (m_sort.size() > 0) ) { LDAPSortKey[] keys = new LDAPSortKey[m_sort.size()]; for( int i = 0; i < keys.length; i++ ) { keys[i] = new LDAPSortKey( (String)m_sort.elementAt(i) ); } sort = new LDAPSortControl( keys, true ); cons.addElement(sort); } if ((sort == null) && (m_vlvTokens >= 3)) { System.err.println("Server-side sorting is required for "+ "virtual list option"); doUsage(); System.exit(0); } LDAPVirtualListControl vControl = null; if (m_vlvTokens == 3) { vControl = new LDAPVirtualListControl(m_searchVal, m_beforeCount, m_afterCount); } else if (m_vlvTokens > 3) { vControl = new LDAPVirtualListControl(m_index, m_beforeCount, m_afterCount, m_count); } if (vControl != null) cons.addElement(vControl); if (m_proxyControl != null) cons.addElement(m_proxyControl); if (m_ordinary) { LDAPControl manageDSAITControl = new LDAPControl( LDAPControl.MANAGEDSAIT, true, null); cons.addElement(manageDSAITControl); } if (cons.size() > 0) { controls = new LDAPControl[cons.size()]; cons.copyInto(controls); } } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } /* perform an LDAP Search Operation */ LDAPSearchResults res = null; try { LDAPSearchConstraints cons = m_client.getSearchConstraints(); cons.setServerControls(controls); cons.setDereference( m_deref ); cons.setMaxResults( m_sizelimit ); cons.setServerTimeLimit( m_timelimit ); cons.setReferrals( m_referrals ); if ( m_referrals ) { setDefaultReferralCredentials( cons ); } cons.setHopLimit( m_hopLimit ); res = m_client.search( m_base, m_scope, m_filter, m_attrs, m_attrsonly, cons ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(1); } /* Sort? */ if ( (m_sort.size() > 0) && !m_sortOnServer ) { String[] sortAttrs = new String[m_sort.size()]; for( int i = 0; i < sortAttrs.length; i++ ) sortAttrs[i] = (String)m_sort.elementAt( i ); res.sort( new LDAPCompareAttrNames( sortAttrs ) ); } /* print out the values of the entries */ printResults( res ); /* Any sort control responses? */ showControls( m_client.getResponseControls() ); } /** * Print the result entries. * @param res Search results */ private static void printResults( LDAPSearchResults res ) { boolean isSchema = false; boolean didEntryIntro = false; LDAPWriter writer; if ( m_printDSML ) { printString( DSML_INTRO ); writer = new DSMLWriter( m_pw ); } else { writer = new LDIFWriter( m_pw, m_attrsonly, m_sep, m_foldLine, m_tempFiles ); } /* print out the retrieved entries */ try { /* Loop on results until finished */ while ( res.hasMoreElements() ) { LDAPEntry entry = null; try { /* Next directory entry */ entry = (LDAPEntry)res.next(); } catch (LDAPReferralException ee) { LDAPUrl[] urls= ee.getURLs(); System.err.println("Referral entries: "); for (int i=0; i"; private static final String DSML_END = ""; private static final String DSML_RESULTS_INTRO = " "; private static final String DSML_RESULTS_END = " "; private static boolean m_attrsonly = false; private static int m_deref = 0; private static int m_scope = 2; // default is sub search private static int m_sizelimit = 0; private static int m_timelimit = 0; private static int verbose = 0; private static String m_attrs[] = null; private static String m_base = "o=ace industry,c=us"; private static String m_filter = null; private static String m_sep = ":"; private static Vector m_sort = new Vector(); private static boolean m_sortOnServer = false; private static boolean m_tempFiles = false; private static int m_beforeCount = 0; private static int m_afterCount = 0; private static int m_index = 0; private static int m_count = 0; private static int m_vlvTokens = 0; private static String m_searchVal = null; private static boolean m_foldLine = true; private static final int MAX_LINE = 77; private static PrintWriter m_pw = new PrintWriter(System.out); private static MimeBase64Encoder m_encoder = new MimeBase64Encoder(); private static boolean m_printDSML = false; } ldapjdk-4.18/mozilla/directory/java-sdk/tools/LDAPDelete.java0000664001003300100330000001765010602743274023466 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ import java.io.*; import java.net.*; import java.util.*; import netscape.ldap.*; import netscape.ldap.util.*; /** * Executes the delete command to delete an LDAP entry. * This class is implemented based on the java LDAP classes. * *
 * usage       : java LDAPDelete [options] DN
 * for example : java -D "dn" -w password -h ds.internic.net -p 389
 *               "cn=Johnny James,o=Ace Industry"
 *
 * options: {np = no parameters, p = requires parameters}
 *  'D' bind DN --------------------------------------------- p
 *  'h' LDAP host ------------------------------------------- p
 *  'p' LDAP port ------------------------------------------- p
 *  'w' bind password --------------------------------------- p
 *
 * note: '-' or '/' is used to distinct the option field.
 *       e.g. -a -b /c /d parameter -e parameter
 *
 * 
* * @version 1.0 */ public class LDAPDelete extends LDAPTool { /* LDAPDelete */ public static void main(String args[]) { /* main */ if ( args.length < 1 ) { doUsage(); System.exit(1); } /* extract parameters from the arguments list */ extractParameters(args); if (!m_justShow) { /* perform an LDAP client connection operation */ try { m_client = new LDAPConnection(); m_client.connect( m_ldaphost, m_ldapport ); } catch(Exception e) { System.err.println("Error: client connection failed!"); System.exit(1); } /* perform an LDAP bind operation */ try { m_client.authenticate( m_version, m_binddn, m_passwd ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(1); } /* perform a delete operation */ dodelete(); /* disconnect */ try { m_client.disconnect(); } catch (Exception e) { System.err.println( e.toString() ); } } else dodelete(null); System.exit(0); } /* main */ /** * Prints usage. */ private static void doUsage() { System.err.println( "usage: LDAPDelete [options] dn" ); System.err.println("options"); System.err.println(" -h host LDAP server name or IP address"); System.err.println(" -p port LDAP server TCP port number"); System.err.println(" -V version LDAP protocol version " + "number (default is 3)"); System.err.println(" -D binddn bind dn"); System.err.println(" -w password bind passwd (for simple " + "authentication)"); System.err.println(" -d level set LDAP debugging level " + "to \'level\'"); System.err.println(" -f file read DNs to delete from file"); System.err.println(" -R do not automatically follow " + "referrals"); System.err.println(" -O hop limit maximum number of referral " + "hops to traverse"); System.err.println(" -H display usage information"); System.err.println(" -c continuous mode (do not "+ "stop on errors)"); System.err.println(" -M manage references (treat them "+ "as regular entries)"); System.err.println(" -y proxy-DN DN to use for access control"); } /** * This class-method is used to extract specified parameters from the * arguments list. */ protected static void extractParameters(String args[]) { GetOpt options = LDAPTool.extractParameters( "Hcf:", args ); /* -H Help */ if (options.hasOption('H')) { doUsage(); System.exit(0); } /* Help */ /* -c continuous mode */ if (options.hasOption('c')) { m_cont = true; } /* continous mode */ /* -f file */ if (options.hasOption('f')) { String filename = options.getOptionParam('f'); if (filename == null) { doUsage(); System.exit(0); } try { FileInputStream fs = new FileInputStream(filename); DataInputStream ds = new DataInputStream(fs); m_reader = new BufferedReader(new InputStreamReader(ds)); } catch (FileNotFoundException e) { System.err.println("File "+filename+" not found"); } catch (IOException e) { System.err.println("Error in opening the file "+filename); } } /* input file */ if (m_reader == null) { Enumeration pa = options.getParameters().elements(); Vector vec = new Vector(); while (pa.hasMoreElements()) { /* while */ vec.addElement(pa.nextElement()); } if (vec.size() <= 0) { doUsage(); System.exit(0); } m_delete_dn = new String[vec.size()]; vec.copyInto(m_delete_dn); } } /* extract parameters */ /** * This class-method is used to call the LDAP Delete Operation with the * specified options, and/or parameters. */ private static void dodelete() { /* dodelete */ int msgid = 0; LDAPConstraints cons = m_client.getConstraints(); Vector controlVector = new Vector(); if (m_proxyControl != null) controlVector.addElement(m_proxyControl); if (m_ordinary) { controlVector.addElement( new LDAPControl( LDAPControl.MANAGEDSAIT, true, null) ); } if (controlVector.size() > 0) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto(controls); cons.setServerControls(controls); } cons.setReferrals( m_referrals ); if ( m_referrals ) { setDefaultReferralCredentials( cons ); } cons.setHopLimit( m_hopLimit ); dodelete(cons); } /* dodelete */ private static void dodelete(LDAPConstraints cons) { try { if (m_reader == null) { for (int i=0; i" @echo " Usage example : gmake -f ldap.mk MOZ_SRC=c:\mozilla exit 1 else @echo "MOZ_SRC is $(MOZ_SRC)" endif ifndef JAVA_VERSION @echo "JAVA_VERSION is undefined" @echo " JAVA_VERSION=n.n where n.n is 1.1, 1.2, 1.3, 1.4, etc." @echo " Usage example : gmake -f ldap.mk JAVA_VERSION=1.4" exit 1 else @echo "JAVA_VERSION is $(JAVA_VERSION)" endif ifndef JAVA_HOME ifeq ($(JAVA_VERSION), 1.1) @echo "JAVA_HOME is undefined" @echo " JAVA_HOME=" @echo " Usage example : gmake -f ldap.mk JAVA_HOME=c:\jdk1.1.8 JAVA_VERSION=1.1" exit 1 else @echo "WARNING: JAVA_HOME is undefined; Using java from the PATH, expected version is" $(JAVA_VERSION) @java -version endif else @echo "JAVA_HOME is $(JAVA_HOME)" endif ARCH := $(shell uname -s) MCOM_ROOT=. ifeq ($(ARCH), WINNT) MOZ_DIR:=$(subst \,/,$(MOZ_SRC)) BASEDIR:=$(MOZ_DIR)/mozilla/directory/java-sdk else ifeq ($(ARCH), WIN95) MOZ_DIR:=$(subst \,/,$(MOZ_SRC)) BASEDIR:=$(MOZ_DIR)/mozilla/directory/java-sdk else BASEDIR := $(shell cd $(MCOM_ROOT); pwd) endif endif ifeq ($(ARCH), WINNT) JDK := $(subst \,/,$(JAVA_HOME)) SEP=; else ifeq ($(ARCH), WIN95) JDK := $(subst \,/,$(JAVA_HOME)) SEP=; else JDK := $(JAVA_HOME) SEP=: endif endif JSS_LIB=$(BASEDIR)/ldapjdk/lib/jss32_stub.jar JAASLIB=$(BASEDIR)/ldapjdk/lib/jaas.jar JSSELIB=$(BASEDIR)/ldapjdk/lib/jnet.jar$(SEP)$(BASEDIR)/ldapjdk/lib/jsse.jar # Set up the JAVACLASSPATH JAVACLASSPATH:=$(CLASSPATH)$(SEP)$(BASEDIR)/ldapjdk ifeq ($(JAVA_VERSION), 1.1) JAVACLASSPATH:=$(JDK)/lib/classes.zip$(SEP)$(JAVACLASSPATH)$(SEP)$(JAASLIB) else ifeq ($(JAVA_VERSION), 1.2) JAVACLASSPATH:=$(JAVACLASSPATH)$(SEP)$(JAASLIB)$(SEP)$(JSSELIB)$(SEP)$(JSS_LIB) else ifeq ($(JAVA_VERSION), 1.3) JAVACLASSPATH:=$(JAVACLASSPATH)$(SEP)$(JAASLIB)$(SEP)$(JSSELIB)$(SEP)$(JSS_LIB) else # JDK 1.4 and higher JAVACLASSPATH:=$(JAVACLASSPATH)$(SEP)$(JSS_LIB) endif endif endif ifdef JAVA_HOME JDKBIN=$(JDK)/bin/ endif ifndef JAVAC ifndef DEBUG #defualt mode is debug (-g) JAVAC=$(JDKBIN)javac -g -classpath "$(JAVACLASSPATH)" else ifeq ($(DEBUG), 1) JAVAC=$(JDKBIN)javac -g -classpath "$(JAVACLASSPATH)" else JAVAC=$(JDKBIN)javac -O -classpath "$(JAVACLASSPATH)" endif endif endif ifndef JAR JAR:=$(JDKBIN)jar endif ifndef JAVADOC JAVADOC=$(JDKBIN)javadoc -classpath "$(JAVACLASSPATH)$(SEP)$(BASEDIR)/ldapbeans" endif # Destination for class files and packages CLASS_DEST=$(BASEDIR)/dist/classes SRCDIR=netscape/ldap DISTDIR=$(MCOM_ROOT)/dist CLASSDIR=$(MCOM_ROOT)/dist/classes CLASSPACKAGEDIR=$(DISTDIR)/packages BASEPACKAGENAME=ldapjdk.jar TOOLSTARGETDIR=$(DISTDIR)/tools TOOLSDIR=$(BASEDIR)/tools ERRORSDIR=$(CLASSDIR)/netscape/ldap/errors SASLDIR=com/netscape/sasl SASLMECHANISMDIR=com/netscape/sasl/mechanisms all: classes basics: .CHECK_VARS $(DISTDIR) $(CLASSDIR) classes: LDAPCLASSES package: basepackage basepackage: $(CLASSPACKAGEDIR) cd $(DISTDIR)/classes; rm -f ../packages/$(BASEPACKAGENAME); $(JAR) cvf ../packages/$(BASEPACKAGENAME) netscape/ldap/*.class netscape/ldap/client/*.class netscape/ldap/client/opers/*.class netscape/ldap/ber/stream/*.class netscape/ldap/controls/*.class netscape/ldap/factory/*.class netscape/ldap/util/*.class netscape/ldap/errors/*.props com/netscape/sasl/*.class com/netscape/sasl/mechanisms/*.class *.class MAIN: basics cd ldapjdk/$(SRCDIR); $(JAVAC) -d "$(CLASS_DEST)" *.java FACTORY: basics ifneq ($(JAVA_VERSION), 1.1) cd ldapjdk/$(SRCDIR)/factory; $(JAVAC) -d "$(CLASS_DEST)" *.java endif CLIENT: basics cd ldapjdk/$(SRCDIR)/client; $(JAVAC) -d "$(CLASS_DEST)" *.java OPERS: basics cd ldapjdk/$(SRCDIR)/client/opers; $(JAVAC) -d "$(CLASS_DEST)" *.java BER: basics cd ldapjdk/$(SRCDIR)/ber/stream; $(JAVAC) -d "$(CLASS_DEST)" *.java UTIL: basics cd ldapjdk/$(SRCDIR)/util; $(JAVAC) -d "$(CLASS_DEST)" *.java SASLMECHANISM: basics cd ldapjdk/$(SASLMECHANISMDIR); $(JAVAC) -d "$(CLASS_DEST)" *.java SASL: basics cd ldapjdk/$(SASLDIR); $(JAVAC) -d "$(CLASS_DEST)" *.java ERRORS: basics $(ERRORSDIR) cp -p ldapjdk/$(SRCDIR)/errors/*.props $(ERRORSDIR) CONTROLS: basics cd ldapjdk/$(SRCDIR)/controls; $(JAVAC) -d "$(CLASS_DEST)" *.java TOOLS: basics cd tools; $(JAVAC) -d "$(CLASS_DEST)" *.java LDAPCLASSES: BER OPERS CLIENT MAIN FACTORY UTIL CONTROLS ERRORS SASL SASLMECHANISM TOOLS ########################################################################## # JAVADOC ########################################################################## DOCDIR=$(DISTDIR)/doc DOCNAME=ldapdoc.zip DOCPACKAGE=$(CLASSPACKAGEDIR)/$(DOCNAME) BERDOCCLASSES=netscape.ldap.ber.stream SASLDOCCLASSES=com.netscape.sasl com.netscape.sasl.mechanisms ifneq ($(JAVA_VERSION), 1.1) FACTORYDOCCLASSES := netscape.ldap.factory endif DOCCLASSES=netscape.ldap netscape.ldap.beans netscape.ldap.controls \ netscape.ldap.util $(FACTORYDOCCLASSES) \ $(SASLDOCCLASSES) $(TOOLSDIR)/*.java $(BERDOCCLASSES) doc: $(DISTDIR) $(DOCDIR) $(JAVADOC) -d $(DOCDIR) $(DOCCLASSES) docpackage: $(DOCDIR) $(CLASSPACKAGEDIR) cd $(DOCDIR); rm -f ../packages/$(DOCNAME); $(JAR) cvf ../packages/$(DOCNAME) *.html *.css netscape/ldap/*.html netscape/ldap/beans/*.html netscape/ldap/controls/*.html netscape/ldap/util/*.html netscape/ldap/ber/stream/*.html ########################################################################## # LDAPBEANS ########################################################################## BEANDIR=$(BASEDIR)/ldapbeans/netscape/ldap/beans BEANPACKAGENAME=ldapbeans.jar beanclasses: basics cd ldapbeans/$(SRCDIR)/beans; $(JAVAC) -d "$(CLASS_DEST)" *.java beanpackage: $(CLASSPACKAGEDIR) cd $(DISTDIR)/classes; rm -f ../packages/$(BEANPACKAGENAME); $(JAR) cvf ../packages/$(BEANPACKAGENAME) netscape/ldap/beans ########################################################################## # Filter package ########################################################################## FILTERCLASSDIR=$(MCOM_ROOT)/dist/ldapfilt FILTER_CLASS_DEST=$(BASEDIR)/dist/ldapfilt FILTERJAR=ldapfilt.jar filterclasses: $(FILTERCLASSDIR) cd ldapfilter/netscape/ldap/util; $(JAVAC) -d "$(FILTER_CLASS_DEST)" *.java filterpackage: $(CLASSPACKAGEDIR) cd "$(FILTER_CLASS_DEST)"; rm -f ../packages/$(FILTERJAR); $(JAR) cvf ../packages/$(FILTERJAR) netscape/ldap/util/*.class clean: rm -rf $(DISTDIR) $(CLASSPACKAGEDIR): mkdir -p $@ $(DOCDIR): mkdir -p $@ $(DISTDIR): mkdir -p $@ $(CLASSDIR): mkdir -p $@ $(ERRORSDIR): mkdir -p $@ $(FILTERCLASSDIR): mkdir -p $@ ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/0000775001003300100330000000000010667357320021224 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/0000775001003300100330000000000010667357320023026 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/0000775001003300100330000000000010667357327023755 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPv2.java0000664001003300100330000005062410620653754025607 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; /** * This interface summarizes the basic functionality available in the * Lightweight Directory Access Protocol (LDAP) version 2. (See * RFC 1777 * for the definition of the protocol.) *

* * In the general model for this protocol, objects exist under a directory * in a particular server. Objects are identified by unique, hierarchical names * called Distinguished Names, commonly abreviated "DN". An example of a DN: *

 *  cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=us
 * 
* Objects have attributes, of the form *
 *  attributeName = attributeValue(s)
 * 
* Attribute names must be Strings, and attribute values can be any 8-bit * sequence (Strings or binary values). * * @version 1.0 */ public interface LDAPv2 { /** * The default port number for LDAP servers. You can specify * this identifier when calling the LDAPConnection.connect * method to connect to an LDAP server. * @see netscape.ldap.LDAPConnection#connect */ public final static int DEFAULT_PORT = 389; /** * Option specifying how aliases are dereferenced. *

* * This option can have one of the following values: *

*

* * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int DEREF = 2; /** * Option specifying the maximum number of search results to * return. *

* * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int SIZELIMIT = 3; /** * Option specifying the maximum number of milliseconds to * wait for an operation to complete. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int TIMELIMIT = 4; /** * Option specifying the maximum number of milliseconds the * server should spend returning search results before aborting * the search. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int SERVER_TIMELIMIT = 5; /** * Option specifying whether or not referrals to other LDAP * servers are followed automatically. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPRebindAuth */ public static final int REFERRALS = 8; /** * Option specifying the object containing the method for * getting authentication information (the distinguished name * and password) used during a referral. For example, when * referred to another LDAP server, your client uses this object * to obtain the DN and password. Your client authenticates to * the LDAP server using this DN and password. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPRebindAuth */ public static final int REFERRALS_REBIND_PROC = 9; /** * Option specifying the maximum number of referrals to follow * in a sequence when requesting an LDAP operation. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int REFERRALS_HOP_LIMIT = 10; /** * Option specifying the object containing the method for * authenticating to the server. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPBind */ public static final int BIND = 13; /** * Option specifying the version of the LDAP protocol * used by your client when interacting with the LDAP server. * If no version is set, the default version is 2. If you * are planning to use LDAP v3 features (such as controls * or extended operations), you should set this version to 3 * or specify version 3 as an argument to the authenticate * method of the LDAPConnection object. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPConnection#authenticate(int, java.lang.String, java.lang.String) */ public static final int PROTOCOL_VERSION = 17; /** * Option specifying the number of results to return at a time. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int BATCHSIZE = 20; /* * Valid options for Scope */ /** * Specifies that the scope of a search includes * only the base DN (distinguished name). * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public static final int SCOPE_BASE = 0; /** * Specifies that the scope of a search includes * only the entries one level below the base DN (distinguished name). * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public static final int SCOPE_ONE = 1; /** * Specifies that the scope of a search includes * the base DN (distinguished name) and all entries at all levels * beneath that base. * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public static final int SCOPE_SUB = 2; /* * Valid options for Dereference */ /** * Specifies that aliases are never dereferenced. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int DEREF_NEVER = 0; /** * Specifies that aliases are dereferenced when searching the * entries beneath the starting point of the search (but * not when finding the starting entry). * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int DEREF_SEARCHING = 1; /** * Specifies that aliases are dereferenced when finding the * starting point for the search (but not when searching * under that starting entry). * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int DEREF_FINDING = 2; /** * Specifies that aliases are always dereferenced. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int DEREF_ALWAYS = 3; /** * Connects to the LDAP server. * @param host hostname of the LDAP server * @param port port number of the LDAP server. To specify the * default port, use DEFAULT_PORT. * @exception LDAPException Failed to connect to the server. */ public void connect (String host, int port) throws LDAPException; /** * Connects and authenticates to the LDAP server. * @param host hostname of the LDAP server * @param port port number of the LDAP server. To specify the * default port, use DEFAULT_PORT. * @param dn distinguished name to use for authentication * @param passwd password for authentication * @exception LDAPException Failed to connect and authenticate to the server. */ public void connect (String host, int port, String dn, String passwd) throws LDAPException; /** * Disconnects from the LDAP server. Subsequent operational calls * will first try to re-establish the connection to the same LDAP server. * @exception LDAPException Failed to disconnect from the server. */ public void disconnect() throws LDAPException; /** * Notifies the server to not send additional results associated with this * LDAPSearchResults object, and discards any results already * received. * @param results LDAPSearchResults object returned from a search * @exception LDAPException Failed to notify the server. */ public void abandon(LDAPSearchResults results) throws LDAPException; /** * Authenticates user with the LDAP server. * @param DN distinguished name to use for authentication * @param passwd password for authentication * @exception LDAPException Failed to authenticate to the server. */ public void authenticate (String DN, String passwd) throws LDAPException; /** * Authenticates user with the LDAP server. * @param DN distinguished name to use for authentication * @param passwd password for authentication * @exception LDAPException Failed to authenticate to the server. */ public void bind (String DN, String passwd) throws LDAPException; /** * Read the entry corresponding to the specified distinguished name (DN). * @param DN distinguished name of the entry to retrieve * @exception LDAPException Failed to retrieve the specified entry. */ public LDAPEntry read (String DN) throws LDAPException; /** * Read the entry corresponding to the specified distinguished name (DN), * and retrieve only the specified attributes. * @param DN distinguished name of the entry to retrieve * @param attrs names of attributes to retrieve * @exception LDAPException Failed to retrieve the specified entry. */ public LDAPEntry read (String DN, String attrs[]) throws LDAPException; /** * Read the entry corresponding to the specified distinguished name (DN), * and retrieve only the specified attributes. * @param DN distinguished name of the entry to retrieve * @param attrs names of attributes to retrieve * @param cons the constraints set for the read operation * @exception LDAPException Failed to retrieve the specified entry. */ public LDAPEntry read (String DN, String attrs[], LDAPSearchConstraints cons) throws LDAPException; /** * Searches for entries in the directory. * @param base starting point for the search in the directory * (distinguished name) * @param scope indicates whether the scope of the search includes * only the base DN (equivalent to a read operation), only the entries * one level below the base DN, or all entries at all levels beneath * the base DN (including the base DN itself) * @param filter String which describes the search criteria. The format * of the string is described fully in * RFC 1558. * @param attrs names of the attributes to return for each matching * directory entry. If null, all attributes are returned. * @param attrsOnly if true, the search will return only the names of * the attributes (and not their values) * @exception LDAPException Failed to complete the requested search. */ public LDAPSearchResults search (String base, int scope, String filter, String[] attrs, boolean attrsOnly) throws LDAPException; /** * Searches for entries in the directory. * @param base starting point for the search in the directory * (distinguished name) * @param scope indicates whether the scope of the search includes * only the base DN (equivalent to a read operation), only the entries * one level below the base DN, or all entries at all levels beneath * the base DN (including the base DN itself) * @param filter String which describes the search criteria. The format * of the string is described fully in * RFC 1558. * @param attrs names of the attributes to return for each matching * directory entry. If null, all attributes are returned. * @param attrsOnly if true, the search will return only the names of * the attributes (and not their values) * @param cons constraints specific to the search (for example, the maximum number * of entries to return or the maximum time to wait for the search operation to complete) * @exception LDAPException Failed to complete the requested search. */ public LDAPSearchResults search (String base, int scope, String filter, String[] attrs, boolean attrsOnly, LDAPSearchConstraints cons) throws LDAPException; /** * Compares the given entry's attribute value to the specified * attribute value. * @param DN distinguished name of the entry that you want compared * against the specified attribute value * @param attr attribute name and value to use in the comparison * @exception LDAPException Failed to perform the comparison. */ public boolean compare (String DN, LDAPAttribute attr) throws LDAPException; /** * Compares the given entry's attribute value to the specified * attribute value. * @param DN distinguished name of the entry that you want compared * against the specified attribute value * @param attr attribute name and value to use in the comparison * @param cons the constraints set for the compare operation * @exception LDAPException Failed to perform the comparison. */ public boolean compare (String DN, LDAPAttribute attr, LDAPConstraints cons) throws LDAPException; /** * Adds an entry to the directory. * @param entry new entry to add to the directory * @exception LDAPException Failed to add the entry to the directory. */ public void add (LDAPEntry entry) throws LDAPException; /** * Adds an entry to the directory. * @param entry new entry to add to the directory * @param cons the constraints set for the add operation * @exception LDAPException Failed to add the entry to the directory. */ public void add (LDAPEntry entry, LDAPConstraints cons) throws LDAPException; /** * Modifies an attribute of a directory entry. * @param DN distinguished name identifying the entry to modify * @param mod the modification to make * @exception LDAPException Failed to modify the specified entry. */ public void modify (String DN, LDAPModification mod) throws LDAPException; /** * Modifies an attribute of a directory entry. * @param DN distinguished name identifying the entry to modify * @param mod the modification to make * @param cons the constraints set for the modify operation * @exception LDAPException Failed to modify the specified entry. */ public void modify (String DN, LDAPModification mod, LDAPConstraints cons) throws LDAPException; /** * Modifies the attributes of a directory entry. * @param DN distinguished name identifying the entry to modify * @param mods list of the modifications to make * @exception LDAPException Failed to modify the specified entry. */ public void modify (String DN, LDAPModificationSet mods ) throws LDAPException; /** * Modifies the attributes of a directory entry. * @param DN distinguished name identifying the entry to modify * @param mods list of the modifications to make * @param cons the constraints set for the modify operation * @exception LDAPException Failed to modify the specified entry. */ public void modify (String DN, LDAPModificationSet mods, LDAPConstraints cons ) throws LDAPException; /** * Removes an entry from the directory. * @param DN distinguished name identifying the entry to remove * @exception LDAPException Failed to remove the entry from the directory. */ public void delete( String DN ) throws LDAPException; /** * Removes an entry from the directory. * @param DN distinguished name identifying the entry to remove * @param cons the constraints set for the delete operation * @exception LDAPException Failed to remove the entry from the directory. */ public void delete( String DN, LDAPConstraints cons ) throws LDAPException; /** * Changes the name of an entry in the directory. * @param DN distinguished name (DN) of entry * @param newRDN the new relative distinguished name (RDN) of the entry * @param deleteOldRDN true if the original RDN should no longer * be an attribute of the entry; false if it should * @exception LDAPException Failed to rename the entry in the directory. */ public void rename ( String DN, String newRDN, boolean deleteOldRDN ) throws LDAPException; /** * Changes the name of an entry in the directory. * @param DN distinguished name (DN) of entry * @param newRDN new relative distinguished name (RDN) of the entry * @param deleteOldRDN specifies whether or not the original RDN remains * as an attribute of the entry. If true, the original RDN * is no longer an attribute of the entry. * @param cons the constraints set for the rename operation * @exception LDAPException Failed to rename the entry in the directory. */ public void rename ( String DN, String newRDN, boolean deleteOldRDN, LDAPConstraints cons ) throws LDAPException; /** * Retrieves an option that applies to the connection. * The particular meaning may be implementation-dependent. * The standard options are the options described by * the LDAPSearchConstraints and LDAPConstraints * classes. * @exception LDAPException Failed to retrieve the value of the specified option. */ public Object getOption( int option ) throws LDAPException; /** * Sets an option that applies to the connection. * The particular meaning may be implementation-dependent. * The standard options are the options described by * the LDAPSearchConstraints and LDAPConstraints * classes. * @exception LDAPException Failed to set the specified option. */ public void setOption( int option, Object value ) throws LDAPException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPTraceWriter.java0000664001003300100330000000536510620653754027515 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * The LDAPTraceWriter interface enables logging of LDAP * trace messages in environments where an OutputStream can not be used. *

* The interface is primarily meant for integrating LDAP tracing with the * servlet log facility: *

*

 *     servletCtx = config.getServletContext();
 *     ...
 *     LDAPConnection ld = new LDAPConnection();
 *     ld.setProperty(ld.TRACE_PROPERTY, 
 *            new LDAPTraceWriter() { 
 *                public void write (String msg) {
 *                    servletCtx.log(msg);
 *                }
 *            });
 * 
 * 

* * @version 1.0 * @see netscape.ldap.LDAPConnection#setProperty(java.lang.String, java.lang.Object) */ public interface LDAPTraceWriter { /** * Writes an LDAP trace message. * * @param msg An incoming or outgoing LDAP message * * @see netscape.ldap.LDAPConnection#setProperty(java.lang.String, java.lang.Object) */ public void write (String msg); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSearchResult.java0000664001003300100330000000624610602743270027656 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import netscape.ldap.client.opers.JDAPSearchResponse; /** * A LDAPSearchResult object encapsulates a single search result. * * @version 1.0 */ public class LDAPSearchResult extends LDAPMessage { static final long serialVersionUID = 36890821518462301L; /** * LDAPEntry */ private LDAPEntry m_entry; /** * Constructor * * @param msgid message identifier * @param rsp search operation response * @param controls array of controls or null * @see netscape.ldap.LDAPEntry */ LDAPSearchResult(int msgid, JDAPSearchResponse rsp, LDAPControl[]controls) { super(msgid, rsp, controls); } /** * Returns the entry of a server search response. * @return an entry returned by the server in response to a search * request. * @see netscape.ldap.LDAPEntry */ public LDAPEntry getEntry() { if (m_entry == null) { JDAPSearchResponse rsp = (JDAPSearchResponse)getProtocolOp(); LDAPAttribute[] lattrs = rsp.getAttributes(); LDAPAttributeSet attrs; if ( lattrs != null ) { attrs = new LDAPAttributeSet( lattrs ); } else { attrs = new LDAPAttributeSet(); } String dn = rsp.getObjectName(); m_entry = new LDAPEntry( dn, attrs ); } return m_entry; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPAttribute.java0000664001003300100330000004474710602743270027225 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.io.*; import java.util.*; import netscape.ldap.ber.stream.*; /** * Represents the name and values of an attribute in an entry. * * @version 1.0 * @see netscape.ldap.LDAPAttributeSet */ public class LDAPAttribute implements java.io.Serializable { static final long serialVersionUID = -4594745735452202600L; private String name = null; private byte[] nameBuf = null; /** * Internally, this is a list of "byte[]"-based attribute values. */ private Object values[] = new Object[0]; /** * Constructs an attribute from another existing attribute. * Effectively, this makes a copy of the existing attribute. * @param attr the attribute to copy */ public LDAPAttribute( LDAPAttribute attr ) { name = attr.name; nameBuf = attr.nameBuf; values = new Object[attr.values.length]; for (int i = 0; i < attr.values.length; i++) { values[i] = new byte[((byte[])attr.values[i]).length]; System.arraycopy((byte[])attr.values[i], 0, (byte[])values[i], 0, ((byte[])attr.values[i]).length); } } /** * Constructs an attribute with no values. * @param attrName name of the attribute */ public LDAPAttribute( String attrName ) { name = attrName; } /** * Constructs an attribute with a byte-formatted value. * @param attrName name of the attribute * @param attrValue value of the attribute in byte format */ public LDAPAttribute( String attrName, byte[] attrValue ) { name = attrName; addValue(attrValue); } /** * Constructs an attribute that has a single string value. * @param attrName name of the attribute * @param attrValue value of the attribute in String format */ public LDAPAttribute( String attrName, String attrValue ) { name = attrName; addValue( attrValue ); } /** * Constructs an attribute that has an array of string values. * @param attrName name of the attribute * @param attrValues the list of string values for this attribute */ public LDAPAttribute( String attrName, String[] attrValues ) { name = attrName; if (attrValues != null) { setValues( attrValues ); } } /** * Constructs an attribute from a BER (Basic Encoding Rules) element. * (The protocol elements of LDAP are encoded for exchange using the * Basic Encoding Rules.) * @param element element that you want translated into an attribute * @exception IOException The attribute could not be created from * the specified element. */ public LDAPAttribute(BERElement element) throws IOException { BERSequence seq = (BERSequence)element; BEROctetString type = (BEROctetString)seq.elementAt(0); nameBuf = type.getValue(); BERSet set = (BERSet)seq.elementAt(1); if (set.size() > 0) { Object[] vals = new Object[set.size()]; for (int i = 0; i < set.size(); i++) { vals[i] = ((BEROctetString)set.elementAt(i)).getValue(); if (vals[i] == null) { vals[i] = new byte[0]; } } setValues( vals ); } } /** * Returns the number of values of the attribute. * @return number of values for this attribute. */ public int size() { return values.length; } /** * Returns an enumerator for the string values of an attribute. * @return enumerator for the string values. */ public Enumeration getStringValues() { Vector v = new Vector(); synchronized(this) { try { for (int i=0; iString * objects. * @return array of attribute values. Each element in the array * is a String object. */ public String[] getStringValueArray() { String s[] = new String[values.length]; synchronized(this) { try { for (int i=0; i < values.length; i++) { if ( values[i] !=null ) { s[i] = new String((byte[])values[i], "UTF8"); } else { s[i] = new String(""); } } } catch (Exception e) { return null; } } return s; } /** * Returns an enumerator for the values of the attribute in byte[] * format. * @return a set of attribute values. Each element in the enumeration * is of type byte[]. */ public Enumeration getByteValues() { Vector v = new Vector(); synchronized(this) { for (int i=0; ibyte[] * format. * @return array of attribute values. Each element in the array * will be of type byte[]. */ public byte[][] getByteValueArray() { byte b[][] = new byte[values.length][]; synchronized(this) { try { for (int i=0; i < values.length; i++) { b[i] = new byte[((byte[])(values[i])).length]; System.arraycopy((byte[])values[i], 0, (byte[])b[i], 0, ((byte[])(values[i])).length); } } catch (Exception e) { return null; } } return b; } /** * Returns the name of the attribute. * @return name of the attribute. */ public String getName() { if ((name == null) && (nameBuf != null)) { try{ name = new String(nameBuf, "UTF8"); } catch(Throwable x) {} } return name; } /** * Extracts the subtypes from the specified attribute name. * For example, if the attribute name is cn;lang-ja;phonetic, * this method returns an array containing lang-ja * and phonetic. *

* * @param attrName name of the attribute from which to extract the subtypes * @return array of subtypes, or null (if the name has no subtypes). * @see netscape.ldap.LDAPAttribute#getBaseName */ public static String[] getSubtypes(String attrName) { StringTokenizer st = new StringTokenizer(attrName, ";"); if( st.hasMoreElements() ) { // First element is base name st.nextElement(); String[] subtypes = new String[st.countTokens()]; int i = 0; // Extract the types while( st.hasMoreElements() ) subtypes[i++] = (String)st.nextElement(); return subtypes; } return null; } /** * Extracts the subtypes from the attribute name of the current * LDAPAttribute object. For example, if the attribute * name is cn;lang-ja;phonetic, this method returns an array * containing lang-ja and phonetic. *

* * @return array of subtypes, or null (if the name has no subtypes). */ public String[] getSubtypes() { return getSubtypes(getName()); } /** * Extracts the language subtype from the attribute name of the * LDAPAttribute object, if any. For example, if the * attribute name is cn;lang-ja;phonetic, this method * returns the String lang-ja. *

* * @return the language subtype, or null (if the name has no * language subtype). */ public String getLangSubtype() { String[] subTypes = getSubtypes(); if ( subTypes != null ) { for( int i = 0; i < subTypes.length; i++ ) { if ((subTypes[i].length() >= 5) && (subTypes[i].substring(0, 5).equalsIgnoreCase("lang-"))) return subTypes[i]; } } return null; } /** * Extracts the base name from the specified attribute name. * For example, if the attribute name is cn;lang-ja;phonetic, * this method returns cn. *

* * @param attrName name of the attribute from which to extract the base name * @return base name (the attribute name without any subtypes). * @see netscape.ldap.LDAPAttribute#getSubtypes */ public static String getBaseName(String attrName) { String basename = attrName; StringTokenizer st = new StringTokenizer(attrName, ";"); if( st.hasMoreElements() ) // First element is base name basename = (String)st.nextElement(); return basename; } /** * Extracts the base name from the attribute name of the current * LDAPAttribute object. For example, if the attribute * name is cn;lang-ja;phonetic, this method returns * cn. *

* * @return base name (the attribute name without any subtypes). * @see netscape.ldap.LDAPAttribute#getSubtypes */ public String getBaseName() { return getBaseName(getName()); } /** * Reports whether the attribute name contains the specified subtype. * For example, if you check for the subtype lang-en * and the attribute name is cn;lang-en, this method * returns true. *

* * @param subtype the single subtype for which you want to check * @return true if the attribute name contains the specified subtype. * @see netscape.ldap.LDAPAttribute#getSubtypes */ public boolean hasSubtype(String subtype) { String[] mytypes = getSubtypes(); for(int i = 0; i < mytypes.length; i++) { if( subtype.equalsIgnoreCase( mytypes[i] ) ) return true; } return false; } /** * Reports if the attribute name contains all specified subtypes * For example, if you check for the subtypes lang-en * and phonetic and the attribute name is * cn;lang-en;phonetic, this method returns true. * If the attribute name is cn;phonetic or * cn;lang-en, this method returns false. *

* @param subtypes an array of subtypes to check * @return true if the attribute name contains all subtypes * @see netscape.ldap.LDAPAttribute#getSubtypes */ public boolean hasSubtypes(String[] subtypes) { for(int i = 0; i < subtypes.length; i++) { if( !hasSubtype(subtypes[i]) ) return false; } return true; } /** * Adds a string value to the attribute. * @param attrValue the string value to add to the attribute */ public synchronized void addValue( String attrValue ) { if (attrValue != null) { try { byte[] b = attrValue.getBytes("UTF8"); addValue( b ); } catch(Throwable x) {} } } /** * Sets the string values as the attribute's values. * @param attrValues the string values to use in the attribute */ protected void setValues( String[] attrValues ) { Object[] vals; if (attrValues != null) { vals = new Object[attrValues.length]; for (int i = 0; i < vals.length; i++) { try { vals[i] = attrValues[i].getBytes("UTF8"); } catch(Throwable x) { vals[i] = new byte[0]; } } } else { vals = new Object[0]; } setValues(vals); } /** * Adds a byte[]-formatted value to the attribute. * @param attrValue the byte[]-formatted value to * add to the attribute */ public synchronized void addValue( byte[] attrValue ) { if (attrValue != null) { Object[] vals = new Object[values.length+1]; for (int i = 0; i < values.length; i++) vals[i] = values[i]; vals[values.length] = attrValue; values = vals; } } /** * Sets the byte[] values as the attribute's values. * @param attrValues the values to use in the attribute */ protected synchronized void setValues( Object[] attrValues ) { values = attrValues; } /** * Removes a string value from the attribute. * @param attrValue the string value to remove */ public synchronized void removeValue( String attrValue) { if (attrValue != null) { try{ byte b[] = attrValue.getBytes("UTF8"); removeValue ( b ); } catch(Throwable x) {} } } /** * Removes a byte[]-formatted value from the attribute. * @param attrValue byte[]-formatted value to remove */ public synchronized void removeValue( byte[] attrValue) { if ((attrValue == null) || (values == null)|| (values.length < 1)) return; int ind = -1; for (int i=0; i= 0) { Object[] vals = new Object[values.length-1]; int j = 0; for (int i = 0; i < values.length; i++) { if (i != ind) { vals[j++] = values[i]; } } values = vals; } } private static boolean equalValue(byte[] a, byte[] b) { if (a.length != b.length) return false; for (int i=0; i 0 ) { for (int i = 0; i < values.length; i++) { if (i != 0) { sb.append(","); } byte[] val = (byte[])values[i]; try { String sval = new String(val, "UTF8"); if (sval.length() == 0 && val.length > 0) { sb.append(""); } else { sb.append(sval); } } catch (Exception e) { if (val != null) { sb.append(""); } else { sb.append("null value"); } } } } return "{type='" + getName() + "', values='" + sb.toString() + "'}"; } /** * Retrieves the string representation of an attribute * in an LDAP entry. For example: * *

LDAPAttribute {type='cn', values='Barbara Jensen,Babs Jensen'}
* * @return string representation of the attribute. */ public String toString() { return "LDAPAttribute " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSearchListener.java0000664001003300100330000001554610602743270030170 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; /** * Manages search results, references and responses returned on one or * more search requests * */ public class LDAPSearchListener extends LDAPMessageQueue { static final long serialVersionUID = -7163312406176592277L; // this instance variable is only for cache purpose private Long m_key = null; private LDAPSearchConstraints m_constraints; /** * Constructs a LDAP search listener. * @param asynchOp a boolean flag indicating whether the object is used * for asynchronous LDAP operations * @param cons LDAP search constraints * @see netscape.ldap.LDAPAsynchronousConnection */ LDAPSearchListener ( boolean asynchOp, LDAPSearchConstraints cons ) { super ( asynchOp ); m_constraints = cons; } /** * Block until all results are in. Used for synchronous search with * batch size of zero. * @return search response message. * @exception Network exception error */ LDAPResponse completeSearchOperation () throws LDAPException{ return completeRequest(); } /** * Blocks until a search result, reference or response is available, * or until all operations associated with the object have completed * or been canceled. * * @return a search result, search reference, search response message, * or null if there are no more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted * @see LDAPResponse * @see LDAPSearchResult * @see LDAPSearchResultReference */ public LDAPMessage getResponse () throws LDAPException{ return nextMessage(); } /** * Override nextMessage to wake up the LDAPConnThread if * backlog limit has been reached */ LDAPMessage nextMessage() throws LDAPException{ LDAPMessage result = super.nextMessage(); // Notify LDAPConnThread to wake up if backlog limit has been reached if (result instanceof LDAPSearchResult || result instanceof LDAPSearchResultReference) { LDAPConnThread connThread = getConnThread(result.getMessageID()); if (connThread != null) { connThread.resultRetrieved(); } } return result; } /** * Merge two response listeners. * Move/append the content from another response listener to this one. *

* To be used for synchronization of asynchronous LDAP operations where * requests are sent by one thread but processed by another one. *

* A client may be implemented in such a way that one thread makes LDAP * requests and calls l.getMessageIDs(), while another thread * is responsible for * processing of responses (call l.getResponse()). Both threads are using * the same listener objects. In such a case, a race * condition may occur, where a LDAP response message is retrieved and * the request terminated (request ID removed) before the first thread * has a chance to execute l.getMessageIDs(). * The proper way to handle this scenario is to create a separate listener * for each new request, and after l.getMessageIDs() has been invoked, * merge the new request with the existing one. * @param listener2 the listener with which to merge */ public void merge(LDAPSearchListener listener2) { super.merge(listener2); } /** * Reports true if a response has been received from the server. * * @return a flag indicating whether the response message queue is empty. */ public boolean isResponseReceived() { return super.isMessageReceived(); } /** * Returns message IDs for all outstanding requests * @return message ID array. */ public int[] getMessageIDs() { return super.getMessageIDs(); } /** * Return the search constraints used to create this object. * @return the search constraints used to create this object. */ LDAPSearchConstraints getSearchConstraints() { return m_constraints; } /** * Set new search constraints object. * @param cons LDAP search constraints */ void setSearchConstraints(LDAPSearchConstraints cons) { m_constraints = cons; } /** * Resets the state of this object, so it can be recycled. * Used by LDAPConnection synchronous operations. */ void reset () { super.reset(); m_constraints = null; } /** * Set the key of the cache entry. The listener needs to know this value * when the results get processed in the queue. After the results have been * saved in the vector, then the key and a vector of results are put in * the cache. * @param key the key of the cache entry */ void setKey(Long key) { m_key = key; } /** * Get the key of the cache entry. * @return the key of the cache entry. */ Long getKey() { return m_key; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPCache.java0000664001003300100330000006420410602743270026253 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; import netscape.ldap.client.*; import netscape.ldap.util.*; import java.util.zip.CRC32; /** * LDAPCache represents an in-memory cache that you can use * to reduce the number of search requests sent to the LDAP server. *

* * Each item in the cache represents a search request and * its results. Each item is uniquely identified by the * search criteria, which includes: *

* *

    *
  • the host name and port number of the LDAP server *
  • the base DN of the search *
  • the search filter *
  • the scope of the search *
  • the attributes to be returned in the search results *
  • the DN used to authenticate the client when binding * to the server *
  • the LDAP v3 controls specified in the search request *
*

* * After a search request is cached, the results of any * subsequent search requests using the same criteria are * read from the cache. Note that if any part of the * criteria differs (for example, if a different DN is used * when binding to the server or if a different set of * attributes to be returned is specified), the search * request is sent to the server. *

* * When you create the cache, you specify the maximum amount * of time that an item can be kept in the cache. When an * item's age exceeds that time limit, the item is removed * from the cache. *

* * The cache also has a maximum size that you specify when * creating the cache. If adding a new item exceeds the * maximum size of the cache, the first entries in the cache * are removed to make enough space for the new item. *

* * Finally, when creating the cache, you can specify a list * of the base DNs in search requests that you want to cache. * For example, if you specify o=Airius.com as * a base DN to cache, your client caches search requests * where the base DN is o=Airius.com. *

* * To specify that you want to use a cache for a particular * LDAP session, call the setCache method of * the LDAPConnection object that you are * working with. *

* * All clones of an LDAPConnection object share * the same LDAPCache object. *

* * Note that LDAPCache does not maintain consistency * with the directory, so that cached search results may no longer be * valid after a directory update. If the same application is performing * both cached searches and directory updates, then the * application should flush the corresponding cache entries after an update. * To do this use the flushEntries method. *

* * Also, note that search requests that return referrals are not cached. *

* * The LDAPCache class includes methods for * getting statistics (such as hit rates) from the cache and * for flushing entries from the cache. *

* * @see netscape.ldap.LDAPConnection#setCache(netscape.ldap.LDAPCache) * @see netscape.ldap.LDAPConnection#getCache */ public class LDAPCache implements Serializable { static final long serialVersionUID = 6275167993337814294L; /** * A hashtable of search results. The key is created from the search * request parameters (see createKey() method). The value is a Vector * where the first element is a Long integer representing the size * of all entries, followed by the actual search result entries (of type * LDAPEntry). */ private Hashtable m_cache; /** * A list of cached entries ordered by time (augments m_cache). Each * element in the list is a 2 element Vector where the element at index * 0 is the key in the m_cache table, and the element at index 1 is the * time when the entry was created. * The list is used to track the time-to-live limit and to implement the * FIFO algorithm when adding new entries; if the size of the new entry * exceeds the cache available space, the extra space is made by removing * existing cached results in the order of their entry in the cache. */ private Vector m_orderedStruct; private long m_timeToLive; private long m_maxSize; private String[] m_dns; private long m_remainingSize = 0; // Count of LDAPConnections that share this cache private int m_refCnt = 0; /** * Delimiter used internally when creating keys * for the cache. */ public static final String DELIM = "#"; private TTLTimer m_timer = null; private long m_totalOpers = 0; private long m_hits = 0; private long m_flushes = 0; // Debug can be activated by defining debug.cache property private static boolean m_debug = false; static { try { String traceProp = System.getProperty("debug.cache"); m_debug = (traceProp != null); } catch (Exception e) { ;// In browser access to property might not be allowed } } /** * Constructs a new LDAPCache object, using the * specified maximum size of the cache (in bytes) and the maximum * age of cached items (in seconds). When items in the cache * exceed this age, they are removed from the cache. *

* * @param ttl the maximum amount of time that an item can be cached * (in seconds) * @param size the maximum size of the cache (in bytes) */ public LDAPCache(long ttl, long size) { init(ttl, size); } /** * Constructs a new LDAPCache object, using the * specified maximum size of the cache (in bytes), and the maximum * age of cached items (in seconds), and an array of the base DNs * of searches that you want to cache. (For example, * if the array of base DNs includes o=Airius.com, * the cache stores search results if the base DN in the search * request is o=Airius.com.) *

* * @param ttl the maximum amount of time that an item can be cached * (in seconds) * @param size the maximum size of the cache (in bytes) * @param dns the list of base DNs of searches that you want to cache. */ public LDAPCache(long ttl, long size, String[] dns) { init(ttl, size); m_dns = new String[dns.length]; if ((dns != null) && (dns.length > 0)) for (int i=0; i * * @return the maximum size of the cache (in bytes). */ public long getSize() { return m_maxSize; } /** * Gets the maximum age allowed for cached items (in * seconds). (Items that exceed this age are * removed from the cache.) *

* * @return the maximum age of items in the cache (in * seconds). */ public long getTimeToLive() { return m_timeToLive/1000; } /** * Gets the array of base DNs of searches to be cached. * (Search requests with these base DNs are cached.) *

* * @return the array of base DNs. */ public String[] getBaseDNs() { return m_dns; } /** * Flush the entries identified by DN and scope from the cache. *

* * @param dn the distinguished name (or base DN) of the entries * to be removed from the cache. Use this parameter in conjunction * with scope to identify the entries that you want * removed from the cache. If this parameter is null, * the entire cache is flushed. * @param scope the scope identifying the entries that you want * removed from the cache. The value of this parameter can be * one of the following: *

    *
  • LDAPv2.SCOPE_BASE (to remove the entry identified * by dn) *
  • LDAPv2.SCOPE_ONE (to remove the entries that * have dn as their parent entry) *
  • LDAPv2.SCOPE_SUB (to remove the entries in the * subtree under dn in the directory) *
*

* @return true if the entry is removed from the cache; * false if the entry is not removed. */ public synchronized boolean flushEntries(String dn, int scope) { if (m_debug) System.out.println("DEBUG: User request for flushing entry: dn "+ dn+" and scope "+scope); // if the dn is null, invalidate the whole cache if (dn == null) { // reclaim all the cache spaces m_remainingSize = m_maxSize; m_cache.clear(); m_orderedStruct.removeAllElements(); // reset stats m_totalOpers = m_hits = m_flushes = 0; return true; } DN dn2 = new DN(dn); Enumeration e = m_cache.keys(); while(e.hasMoreElements()) { Long key = (Long)e.nextElement(); Vector val = (Vector)m_cache.get(key); // LDAPEntries start at idx 1, at idx 0 is a Long // (size of all LDAPEntries returned by search()) int j=1; int size2=val.size(); for (; j"+key); return true; } } if (m_debug) System.out.println("DEBUG: The number of keys in the cache is " +m_cache.size()); return false; } /** * Gets the amount of available space (in bytes) left in the cache. *

* * @return the available space (in bytes) in the cache. */ public long getAvailableSize() { return m_remainingSize; } /** * Gets the total number of requests for retrieving items from * the cache. This includes both items successfully found in * the cache and items not found in the cache. *

* * @return the total number of requests for retrieving items from * the cache. */ public long getTotalOperations() { return m_totalOpers; } /** * Gets the total number of requests which failed to find and * retrieve an item from the cache. *

* * @return the number of requests that did not find and retrieve * an item in the cache. */ public long getNumMisses() { return (m_totalOpers - m_hits); } /** * Gets the total number of requests which successfully found and * retrieved an item from the cache. * @return the number of requests that successfully found and * retrieved an item from the cache. */ public long getNumHits() { return m_hits; } /** * Gets the total number of entries that are flushed when timer expires * and flushEntries is called. *

* * @return the total number of entries that are flushed when timer * expires. */ public long getNumFlushes() { return m_flushes; } /** * Create a key for a cache entry by concatenating all input parameters * @return the key for a cache entry * @exception LDAPException Thrown when failed to create key. */ Long createKey(String host, int port, String baseDN, String filter, int scope, String[] attrs, String bindDN, LDAPConstraints cons) throws LDAPException { DN dn = new DN(baseDN); baseDN = dn.toString(); if (m_dns != null) { int i=0; for (; i= m_dns.length) throw new LDAPException(baseDN+" is not a cached base DN", LDAPException.OTHER); } String key = null; key = appendString(baseDN); key = key+appendString(scope); key = key+appendString(host); key = key+appendString(port); key = key+appendString(filter); key = key+appendString(attrs); key = key+appendString(bindDN); LDAPControl[] serverControls = null; LDAPControl[] clientControls = null; // get server and client controls if (cons != null) { serverControls = cons.getServerControls(); clientControls = cons.getClientControls(); } if ((serverControls != null) && (serverControls.length > 0)) { String[] objID = new String[serverControls.length]; for (int i=0; i 0)) { String[] objID = new String[clientControls.length]; for (int i=0; i "+key+ " not found in the cache."); else System.out.println("DEBUG: Entry whose key -> "+key+ " found in the cache."); } if (obj != null) m_hits++; return obj; } /** * Flush entries which stay longer or equal to the time-to-live. */ synchronized void flushEntries() { Vector v = null; boolean delete = false; long currTime = System.currentTimeMillis(); m_flushes = 0; while(true) { if (m_orderedStruct.size() <= 0) break; v = (Vector)m_orderedStruct.firstElement(); long diff = currTime-((Long)v.elementAt(1)).longValue(); if (diff >= m_timeToLive) { Long key = (Long)v.elementAt(0); if (m_debug) System.out.println("DEBUG: Timer flush entry whose key is "+key); Vector entry = (Vector)m_cache.remove(key); m_remainingSize += ((Long)entry.firstElement()).longValue(); // always delete the first one m_orderedStruct.removeElementAt(0); m_flushes++; } else break; } if (m_debug) System.out.println("DEBUG: The number of keys in the cache is " +m_cache.size()); } /** * Add the entry to the hashtable cache and to the vector respectively. * The vector is used to keep track of the order of the entries being added. * @param key the key for the cache entry * @param value the cache entry being added to the cache for the specified * key * @return a flag indicating whether the entry was added. */ synchronized boolean addEntry(Long key, Object value) { // if entry exists, dont perform add operation if (m_cache.get(key) != null) return false; Vector v = (Vector)value; long size = ((Long)v.elementAt(0)).longValue(); if (size > m_maxSize) { if (m_debug) { System.out.println("Failed to add an entry to the cache since the new entry exceeds the cache size"); } return false; } // if the size of entry being added is bigger than the spare space in the // cache if (size > m_remainingSize) { while (true) { Vector element = (Vector)m_orderedStruct.firstElement(); Long str = (Long)element.elementAt(0); Vector val = (Vector)m_cache.remove(str); if (m_debug) System.out.println("DEBUG: The spare size of the cache is not big enough "+ "to hold the new entry, deleting the entry whose key -> "+str); // always remove the first one m_orderedStruct.removeElementAt(0); m_remainingSize += ((Long)val.elementAt(0)).longValue(); if (m_remainingSize >= size) break; } } m_remainingSize -= size; m_cache.put(key, v); Vector element = new Vector(2); element.addElement(key); element.addElement(new Long(System.currentTimeMillis())); m_orderedStruct.addElement(element); // Start TTL Timer if first entry is added if (m_orderedStruct.size() == 1) { scheduleTTLTimer(); } if (m_debug) { System.out.println("DEBUG: Adding a new entry whose key -> "+key); System.out.println("DEBUG: The current number of keys in the cache "+ m_cache.size()); } return true; } /** * Flush entries which stayed longer or equal to the time-to-live, and * Set up the TTLTimer for the next flush. Called when first entry is * added to the cache and when the TTLTimer expires. */ synchronized void scheduleTTLTimer() { if (m_orderedStruct.size() <= 0) { return; } if (m_timer == null) { m_timer = new TTLTimer(this); } Vector v = (Vector)m_orderedStruct.firstElement(); long currTime = System.currentTimeMillis(); long creationTime = ((Long)v.elementAt(1)).longValue(); long timeout = creationTime + m_timeToLive - currTime; if (timeout > 0) { m_timer.start(timeout); } else { flushEntries(); scheduleTTLTimer(); } } /** * Gets the number of entries being cached. * @return the number of entries being cached. */ public int getNumEntries() { return m_cache.size(); } /** * Get number of LDAPConnections that share this cache * @return Reference Count */ int getRefCount() { return m_refCnt; } /** * Add a new reference to this cache. * */ synchronized void addReference() { m_refCnt++; if (m_debug) { System.err.println("Cache refCnt="+ m_refCnt); } } /** * Remove a reference to this cache. * If the reference count is 0, cleaup the cache. * */ synchronized void removeReference() { if (m_refCnt > 0) { m_refCnt--; if (m_debug) { System.err.println("Cache refCnt="+ m_refCnt); } if (m_refCnt == 0 ) { cleanup(); } } } /** * Cleans up */ synchronized void cleanup() { flushEntries(null, 0); if (m_timer != null) { m_timer.stop(); m_timer = null; } } /** * Initialize the instance variables. */ private void init(long ttl, long size) { m_cache = new Hashtable(); m_timeToLive = ttl*1000; m_maxSize = size; m_remainingSize = size; m_dns = null; m_orderedStruct = new Vector(); } /** * Concatenates the specified integer with the delimiter. * @param str the String to concatenate with the delimiter * @return the concatenated string. */ private String appendString(String str) { if (str == null) return "null"+DELIM; else return str.trim()+DELIM; } /** * Concatenates the specified integer with the delimiter. * @param num the integer to concatenate with the delimiter * @return the concatenated string. */ private String appendString(int num) { return num+DELIM; } /** * Concatenate the specified string array with the delimiter. * @param str a string array * @return the concatenated string. */ private String appendString(String[] str) { if ((str == null) || (str.length < 1)) return "0"+DELIM; else { String[] sorted = new String[str.length]; System.arraycopy( str, 0, sorted, 0, str.length ); sortStrings(sorted); String s = sorted.length+DELIM; for (int i=0; i 0) { String t = str[i]; str[i] = str[j]; str[j] = t; } } } /** * Create a 32 bits CRC from the given byte array. */ private long getCRC32(byte[] barray) { if (barray==null) { return 0; } CRC32 crcVal = new CRC32(); crcVal.update(barray); return crcVal.getValue(); } } /** * Represents a timer which will timeout for every certain interval. It * provides methods to start, stop, or restart timer. */ class TTLTimer implements Runnable{ private long m_timeout; private LDAPCache m_cache; private Thread t = null; /** * Constructor with the specified timout. * @param timeout the timeout value in milliseconds */ TTLTimer(LDAPCache cache) { m_cache = cache; } /** * (Re)start the timer. */ void start(long timeout) { m_timeout = timeout; if (Thread.currentThread() != t) { stop(); } t = new Thread(this, "LDAPCache-TTLTimer"); t.setDaemon(true); t.start(); } /** * Stop the timer. */ void stop() { if (t !=null) { t.interrupt(); } } /** * The runnable waits until the timeout period has elapsed. It then notify * the registered listener who listens for the timeout event. */ public void run() { synchronized(this) { try { this.wait(m_timeout); } catch (InterruptedException e) { // This happens if the timer is stopped return; } } m_cache.scheduleTTLTimer(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPAttributeSet.java0000664001003300100330000003621210602743270027665 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; /** * Represents a set of attributes (for example, the set of attributes * in an entry). * * @version 1.0 * @see netscape.ldap.LDAPAttribute */ public class LDAPAttributeSet implements Cloneable, java.io.Serializable { static final long serialVersionUID = 5018474561697778100L; Hashtable attrHash = null; LDAPAttribute[] attrs = new LDAPAttribute[0]; /* If there are less attributes than this in the set, it's not worth creating a Hashtable - faster and cheaper most likely to string comparisons. Most applications fetch attributes once only, anyway */ static final int ATTR_COUNT_REQUIRES_HASH = 5; /** * Constructs a new set of attributes. This set is initially empty. */ public LDAPAttributeSet() { } /** * Constructs an attribute set. * @param attrs the list of attributes */ public LDAPAttributeSet( LDAPAttribute[] attrs ) { this.attrs = attrs; } public synchronized Object clone() { try { LDAPAttributeSet attributeSet = new LDAPAttributeSet(); attributeSet.attrs = new LDAPAttribute[attrs.length]; for (int i = 0; i < attrs.length; i++) { attributeSet.attrs[i] = new LDAPAttribute(attrs[i]); } return attributeSet; } catch (Exception e) { return null; } } /** * Returns an enumeration of the attributes in this attribute set. * @return enumeration of the attributes in this set. */ public Enumeration getAttributes () { Vector v = new Vector(); synchronized(this) { for (int i=0; i * * For example, suppose an attribute set contains the following attributes: *

* *

     * cn
     * cn;lang-ja
     * sn;phonetic;lang-ja
     * sn;lang-us
     * 
* * If you call the getSubset method and pass * lang-ja as the argument, the method returns * an attribute set containing the following attributes: *

* *

     * cn;lang-ja
     * sn;phonetic;lang-ja
     * 
* * @param subtype semi-colon delimited list of subtypes * to find within attribute names. * For example: *
     *     "lang-ja"        // Only Japanese language subtypes
     *     "binary"         // Only binary subtypes
     *     "binary;lang-ja" // Only Japanese language subtypes
     *                         which also are binary
     * 
* @return attribute set containing the attributes that have * the specified subtypes. * @see netscape.ldap.LDAPAttribute * @see netscape.ldap.LDAPAttributeSet#getAttribute * @see netscape.ldap.LDAPEntry#getAttributeSet */ public LDAPAttributeSet getSubset(String subtype) { LDAPAttributeSet attrs = new LDAPAttributeSet(); if ( subtype == null ) return attrs; StringTokenizer st = new StringTokenizer(subtype, ";"); if( st.countTokens() < 1 ) return attrs; String[] searchTypes = new String[st.countTokens()]; int i = 0; while( st.hasMoreElements() ) { searchTypes[i] = (String)st.nextElement(); i++; } Enumeration attrEnum = getAttributes(); while( attrEnum.hasMoreElements() ) { LDAPAttribute attr = (LDAPAttribute)attrEnum.nextElement(); if( attr.hasSubtypes( searchTypes ) ) attrs.add( new LDAPAttribute( attr ) ); } return attrs; } /** * Returns a single attribute that exactly matches the specified attribute * name. * @param attrName name of attribute to return * For example: *
     *     "cn"            // Only a non-subtyped version of cn
     *     "cn;lang-ja"    // Only a Japanese version of cn
     *
* @return attribute that has exactly the same name, or null * (if no attribute in the set matches the specified name). * @see netscape.ldap.LDAPAttribute */ public LDAPAttribute getAttribute( String attrName ) { prepareHashtable(); if (attrHash != null) { return (LDAPAttribute)attrHash.get( attrName.toLowerCase() ); } else { for (int i = 0; i < attrs.length; i++) { if (attrName.equalsIgnoreCase(attrs[i].getName())) { return attrs[i]; } } return null; } } /** * Prepares hashtable for fast attribute lookups. */ private void prepareHashtable() { if ((attrHash == null) && (attrs.length >= ATTR_COUNT_REQUIRES_HASH)) { attrHash = new Hashtable(); for (int j = 0; j < attrs.length; j++) { attrHash.put( attrs[j].getName().toLowerCase(), attrs[j] ); } } } /** * Returns the subtype that matches the attribute name specified * by attrName and the language specificaton identified * by lang. *

* * If no attribute in the set has the specified name and subtype, * the method returns null. * * Attributes containing subtypes other than lang * (for example, cn;binary) are returned only if * they contain the specified lang subtype and if * the set contains no attribute having only the lang * subtype. (For example, getAttribute( "cn", "lang-ja" ) * returns cn;lang-ja;phonetic only if the * cn;lang-ja attribute does not exist.) *

* * If null is specified for the lang argument, * calling this method is the same as calling the * getAttribute(attrName) method. *

* * For example, suppose an entry contains only the following attributes: *

*

    *
  • cn;lang-en *
  • cn;lang-ja-JP-kanji *
  • sn *
*

* * Calling the following methods will return the following values: *

*

    *
  • getAttribute( "cn" ) returns null. *
  • getAttribute( "sn" ) returns the "sn" attribute. *
  • getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute. *
  • getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute. *
  • getAttribute( "cn", "lang-ja" ) returns null. *
  • getAttribute( "sn", "lang-en" ) returns the "sn" attribute. *
*

* @param attrName name of attribute to find in the entry * @param lang a language specification * @return the attribute that matches the base name and that best * matches any specified language subtype. * @see netscape.ldap.LDAPAttribute */ public LDAPAttribute getAttribute( String attrName, String lang ) { if ( (lang == null) || (lang.length() < 1) ) return getAttribute( attrName ); String langLower = lang.toLowerCase(); if ((langLower.length() < 5) || ( !langLower.substring( 0, 5 ).equals( "lang-" ) )) { return null; } StringTokenizer st = new StringTokenizer( langLower, "-" ); // Skip first token, which is "lang-" st.nextToken(); String[] langComponents = new String[st.countTokens()]; int i = 0; while ( st.hasMoreTokens() ) { langComponents[i] = st.nextToken(); i++; } String searchBasename = LDAPAttribute.getBaseName(attrName); String[] searchTypes = LDAPAttribute.getSubtypes(attrName); LDAPAttribute found = null; int matchCount = 0; for( i = 0; i < attrs.length; i++ ) { boolean isCandidate = false; LDAPAttribute attr = attrs[i]; // Same base name? if ( attr.getBaseName().equalsIgnoreCase(searchBasename) ) { // Accept any subtypes? if( (searchTypes == null) || (searchTypes.length < 1) ) { isCandidate = true; } else { // No, have to check each subtype for inclusion if( attr.hasSubtypes( searchTypes ) ) isCandidate = true; } } String attrLang = null; if ( isCandidate ) { attrLang = attr.getLangSubtype(); // At this point, the base name and subtypes are okay if ( attrLang == null ) { // If there are no language attributes, this one is okay found = attr; } else { // We just have to check for language match st = new StringTokenizer( attrLang.toLowerCase(), "-" ); // Skip first token, which is "lang-" st.nextToken(); // No match if the attribute's language spec is longer // than the target one if ( st.countTokens() > langComponents.length ) continue; // How many subcomponents of the language match? int j = 0; while ( st.hasMoreTokens() ) { if ( !langComponents[j].equals( st.nextToken() ) ) { j = 0; break; } j++; } if ( j > matchCount ) { found = attr; matchCount = j; } } } } return found; } /** * Returns the attribute at the position specified by the index. * For example, if you specify the index 0, the method returns the * first attribute in the set. The index is 0-based. * * @param index index of the attribute to obtain * @return attribute at the position specified by the index. */ public LDAPAttribute elementAt (int index) { return attrs[index]; } /** * Removes the attribute at the position specified by the index. * For example, if you specify the index 0, the method removes the * first attribute in the set. The index is 0-based. * * @param index index of the attribute to remove */ public void removeElementAt (int index) { if ((index >= 0) && (index < attrs.length)) { synchronized(this) { LDAPAttribute[] vals = new LDAPAttribute[attrs.length-1]; int j = 0; for (int i = 0; i < attrs.length; i++) { if (i != index) { vals[j++] = attrs[i]; } } if (attrHash != null) { attrHash.remove(attrs[index].getName().toLowerCase()); } attrs = vals; } } } /** * Returns the number of attributes in this set. * @return number of attributes in this attribute set. */ public int size () { return attrs.length; } /** * Adds the specified attribute to this attribute set. * @param attr attribute to add to this set */ public synchronized void add( LDAPAttribute attr ) { if (attr != null) { LDAPAttribute[] vals = new LDAPAttribute[attrs.length+1]; for (int i = 0; i < attrs.length; i++) vals[i] = attrs[i]; vals[attrs.length] = attr; attrs = vals; if (attrHash != null) { attrHash.put( attr.getName().toLowerCase(), attr ); } } } /** * Removes the specified attribute from the set. * @param name name of the attribute to remove */ public synchronized void remove( String name ) { for( int i = 0; i < attrs.length; i++ ) { if ( name.equalsIgnoreCase( attrs[i].getName() ) ) { removeElementAt(i); break; } } } /** * Retrieves the string representation of all attributes * in the attribute set. For example: * *

     * LDAPAttributeSet: LDAPAttribute {type='cn', values='Barbara Jensen,Babs
     * Jensen'}LDAPAttribute {type='sn', values='Jensen'}LDAPAttribute {type='
     * givenname', values='Barbara'}LDAPAttribute {type='objectclass', values=
     * 'top,person,organizationalPerson,inetOrgPerson'}LDAPAttribute {type='ou',
     * values='Product Development,People'}
     * 
* * @return string representation of all attributes in the set. */ public String toString() { StringBuffer sb = new StringBuffer("LDAPAttributeSet: "); for( int i = 0; i < attrs.length; i++ ) { if (i != 0) { sb.append(" "); } sb.append(attrs[i].toString()); } return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPEntryComparator.java0000664001003300100330000000620610620653754030406 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * The LDAPEntryComparator interface represents the * algorithm used to sort the search results. This interface specifies * one method, isGreater, which compares two entries and * determines the order in which the two entries should be sorted. *

* * The netscape.ldap package includes a class that * implements this interface. The LDAPCompareAttrNames * class represents a comparator that sorts the two entries alphabetically, * based on the value of one or more attributes. *

* * When calling the sort method of the * LDAPSearchResults class, you need to specify * a class that implements the LDAPEntryComparator * interface. *

* * @version 1.0 * @see netscape.ldap.LDAPCompareAttrNames * @see netscape.ldap.LDAPSearchResults#sort */ public interface LDAPEntryComparator { /** * Specifies the algorithm used to * compare entries when sorting search results. *

* * isGreater returns true * if the entry specified in the first argument should * be sorted before the entry specified in the second * argument. *

* * @see netscape.ldap.LDAPCompareAttrNames * @see netscape.ldap.LDAPSearchResults#sort */ public boolean isGreater (LDAPEntry greater, LDAPEntry less); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSSLSocketWrapFactory.java0000664001003300100330000003113210602743270031236 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.io.*; import java.net.*; import java.util.Hashtable; /** * Creates an SSL socket connection to an LDAP Server. This class is provided * by the package in which the SSL socket does not extend Socket object. * The class internally provides a wrapper to convert the SSL socket extending * the Object class to the one extending the Socket class. * This factory class implements the LDAPSocketFactory interface. *

* * To use this class, pass the instance of this factory object to the * LDAPConnection constructor. * * @version 1.0 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(netscape.ldap.LDAPSocketFactory) */ public class LDAPSSLSocketWrapFactory implements LDAPSSLSocketFactoryExt, java.io.Serializable { static final long serialVersionUID = -4171548771815037740L; /** * The constructor with the specified package for security * @param className the name of a class which has an implementation * of the SSL Socket extending Object class */ public LDAPSSLSocketWrapFactory(String className) { m_packageName = new String(className); } /** * The constructor with the specified package for security and the * specified cipher suites. * @param className the name of a class which has an implementation * of the SSL Socket extending Object class * @param cipherSuites the cipher suites */ public LDAPSSLSocketWrapFactory(String className, Object cipherSuites) { m_packageName = new String(className); m_cipherSuites = cipherSuites; } /** * Returns socket to the specified host name and port number. * @param host the host to connect to * @param port the port number * @return the socket to the host name and port number as passed in. * @exception LDAPException A socket to the specified host and port * could not be created. */ public Socket makeSocket(String host, int port) throws LDAPException { LDAPSSLSocket s = null; try { if (m_cipherSuites == null) s = new LDAPSSLSocket(host, port, m_packageName); else s = new LDAPSSLSocket(host, port, m_packageName, m_cipherSuites); return s; } catch (Exception e) { System.err.println("Exception: "+e.toString()); throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } /** * Returns true if client authentication is to be used. * @return true if client authentication is enabled; * falseif client authentication is disabled. */ public boolean isClientAuth() { return m_clientAuth; } /** * (Not implemented yet)
* Enables client authentication for an application running in * a java VM which provides transparent certificate database management. * Calling this method has no effect after makeSocket() has been * called. * @exception LDAPException Since this method is not yet implemented, * calling this method throws an exception. */ public void enableClientAuth() throws LDAPException { throw new LDAPException("Client Authentication is not implemented yet."); } /** * Returns the name of the class that implements SSL sockets for this factory. * * @return the name of the class that implements SSL sockets for this factory. */ public String getSSLSocketImpl() { return m_packageName; } /** * Returns the suite of ciphers used for SSL connections made through * sockets created by this factory. * * @return the suite of ciphers used. */ public Object getCipherSuites() { return m_cipherSuites; } /** * Indicates if client authentication is on. */ private boolean m_clientAuth = false; /** * Name of class implementing SSLSocket. */ private String m_packageName = null; /** * The cipher suites */ private Object m_cipherSuites = null; } // LDAPSSLSocket class wraps the implementation of the SSL socket class LDAPSSLSocket extends Socket { public LDAPSSLSocket(String host, int port, String packageName) throws LDAPException { super(); m_packageName = packageName; try { // instantiate the SSLSocketFactory implementation, and // find the right constructor Class c = Class.forName(m_packageName); java.lang.reflect.Constructor[] m = c.getConstructors(); for (int i = 0; i < m.length; i++) { /* Check if the signature is right: String, int */ Class[] params = m[i].getParameterTypes(); if ((params.length == 2) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int"))) { Object[] args = new Object[2]; args[0] = host; args[1] = new Integer(port); m_socket = (Object)(m[i].newInstance(args)); return; } } throw new LDAPException("No appropriate constructor in " + m_packageName, LDAPException.PARAM_ERROR); } catch (ClassNotFoundException e) { throw new LDAPException("Class " + m_packageName + " not found", LDAPException.OTHER); } catch (Exception e) { throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } public LDAPSSLSocket(String host, int port, String packageName, Object cipherSuites) throws LDAPException { super(); m_packageName = packageName; String cipherClassName = null; if (cipherSuites != null) cipherClassName = cipherSuites.getClass().getName(); try { // instantiate the SSLSocketFactory implementation, and // find the right constructor Class c = Class.forName(m_packageName); java.lang.reflect.Constructor[] m = c.getConstructors(); for (int i = 0; i < m.length; i++) { /* Check if the signature is right: String, int */ Class[] params = m[i].getParameterTypes(); if (cipherSuites == null) throw new LDAPException("Cipher Suites is required"); if ((params.length == 3) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int")) && (params[2].getName().equals(cipherClassName))) { Object[] args = new Object[3]; args[0] = host; args[1] = new Integer(port); args[2] = cipherSuites; m_socket = (Object)(m[i].newInstance(args)); return; } } throw new LDAPException("No appropriate constructor in " + m_packageName, LDAPException.PARAM_ERROR); } catch (ClassNotFoundException e) { throw new LDAPException("Class " + m_packageName + " not found", LDAPException.OTHER); } catch (Exception e) { throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } public InputStream getInputStream() { try { Object obj = invokeMethod(m_socket, "getInputStream", null); return (InputStream)obj; } catch (LDAPException e) { printDebug(e.toString()); } return null; } public OutputStream getOutputStream() { try { Object obj = invokeMethod(m_socket, "getOutputStream", null); return (OutputStream)obj; } catch (LDAPException e) { printDebug(e.toString()); } return null; } public void close() throws IOException { try { invokeMethod(m_socket, "close", null); } catch (LDAPException e) { printDebug(e.toString()); } } public void close(boolean wait) throws IOException { try { Object[] args = new Object[1]; args[0] = new Boolean(wait); invokeMethod(m_socket, "close", args); } catch (LDAPException e) { printDebug(e.toString()); } } public InetAddress getInetAddress() { try { Object obj = invokeMethod(m_socket, "getInetAddress", null); return (InetAddress)obj; } catch (LDAPException e) { printDebug(e.toString()); } return null; } public int getLocalPort() { try { Object obj = invokeMethod(m_socket, "getLocalPort", null); return ((Integer)obj).intValue(); } catch (LDAPException e) { printDebug(e.toString()); } return -1; } public int getPort() { try { Object obj = invokeMethod(m_socket, "getPort", null); return ((Integer)obj).intValue(); } catch (LDAPException e) { printDebug(e.toString()); } return -1; } private Object invokeMethod(Object obj, String name, Object[] args) throws LDAPException { try { java.lang.reflect.Method m = getMethod(name); if (m != null) { return (m.invoke(obj, args)); } } catch (Exception e) { throw new LDAPException("Invoking "+name+": "+ e.toString(), LDAPException.PARAM_ERROR); } return null; } private java.lang.reflect.Method getMethod(String name) throws LDAPException { try { java.lang.reflect.Method method = null; if ((method = (java.lang.reflect.Method)(m_methodLookup.get(name))) != null) return method; Class c = Class.forName(m_packageName); java.lang.reflect.Method[] m = c.getMethods(); for (int i = 0; i < m.length; i++ ) { if (m[i].getName().equals(name)) { m_methodLookup.put(name, m[i]); return m[i]; } } throw new LDAPException("Method " + name + " not found in " + m_packageName); } catch (ClassNotFoundException e) { throw new LDAPException("Class "+ m_packageName + " not found"); } } private void printDebug(String msg) { if (m_debug) { System.out.println(msg); } } private final boolean m_debug = true; private Object m_socket; private Hashtable m_methodLookup = new Hashtable(); private String m_packageName = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/0000775001003300100330000000000010667357330024724 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/GetOpt.java0000664001003300100330000002272610602743272026773 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; /** * This class is similar to the getopt() function in * UNIX System V. You can use this class to parse command-line * arguments. *

* * When you create an object of this class, you specify a string * containing the command-line options that you want to check for. * The string should contain the letters of these options. If an * option requires an argument (for example, "-h "), * you should add a colon after the letter in this string. *

* * For example, in the following string, the -h, * -p, -D,, and -w options * all require arguments. The -H option does not * require any arguments. *

 * "h:p:D:w:H"
 * 
* * You can use the hasOption method to determine if * an option has been specified and the getOptionParam * method to get the argument specified after a particular option. *

* * If an option not specified in the string is passed in as an * argument, the GetOpt object prints out an error * message. Note that the object does not throw an exception or * exit the application if an invalid option is specified. *

* * Note that you are still responsible for verifying that any * required arguments have been specified. *

* * The following example parses the command-line arguments for * the hostname, port number, DN, and password to use when * connecting and authenticating to an LDAP server. *

 * import netscape.ldap.*;
 * import netscape.ldap.controls.*;
 * import netscape.ldap.util.*;
 * import java.util.*;
 *
 * public class SearchDirectory {
 *
 *     public static void main( String[] args )
 *     {
 *
 *         String usage = "Usage: java SearchDirectory -h  -p  "
 *                      + "[-D ] [-w ]"
 *
 *         int portnumber = LDAPv2.DEFAULT_PORT;
 *
 *         // Check for these options. -H means to print out a usage message.
 *         GetOpt options = new GetOpt( "h:p:D:w:H", args );
 *
 *         // Get the arguments specified for each option.
 *         String hostname = options.getOptionParam( 'h' );
 *         String port = options.getOptionParam( 'p' );
 *         String bindDN = options.getOptionParam( 'D' );
 *         String bindPW = options.getOptionParam( 'w' );
 *
 *         // Check to see if the hostname (which is mandatory)
 *         // is not specified or if the user simply wants to
 *         // see the usage message (-H).
 *         if ( hostname == null || options.hasOption( 'H' ) ) {
 *             System.out.println( usage );
 *             System.exit( 1 );
 *         }
 *
 *         // If a port number was specified, convert the port value
 *         //  to an integer.
 *         if ( port != null ) {
 *             try {
 *                 portnumber = java.lang.Integer.parseInt( port );
 *             } catch ( java.lang.Exception e ) {
 *                 System.out.println( "Invalid port number: " + port );
 *                 System.out.println( usage );
 *                 System.exit( 1 );
 *             }
 *         }
 *
 *         // Create a new connection.
 *         LDAPConnection ld = new LDAPConnection();
 *
 *         try {
 *             // Connect and authenticate to server.
 *             ld.connect( 3, hostname, portnumber, bindDN, bindPW );
 *             ...
 *         } catch ( LDAPException e ) {
 *             System.out.println( "Error: " + e.toString() );
 *         }
 *         ...
 *     }
 * }
 * 
* * @version 1.0 */ public class GetOpt implements java.io.Serializable { /** * Internal variables */ private int m_pos; private String optarg; private String m_control; private Vector m_option; private Vector m_ParameterList; private Hashtable m_optionHashTable; private Hashtable m_optionParamHashTable; static final long serialVersionUID = -2570196909939660248L; /** * Constructs a GetOpt object. * @param strControl a string specifying the letters of * all available options. If an option requires an argument * (for example, "-h "), use a colon after the * letter for that option (for example, "h:p:D:w:H"). * @param args an array of strings representing the list * of arguments to parse (for example, the * array passed into Main). */ public GetOpt(String strControl, String args[]) { m_option = new Vector(); m_control = strControl; m_optionHashTable = new Hashtable(); m_optionParamHashTable = new Hashtable(); m_ParameterList = new Vector(); for (int i=0;i0) { if ((sOpt.charAt(0)=='-') || (sOpt.charAt(0)=='/')) { if (sOpt.length()>1) { int nIndex = m_control.indexOf(sOpt.charAt(1)); if (nIndex == (-1)) { System.err.println("Invalid usage. No option -" + sOpt.charAt(1)); } else { char cOpt[]= new char[1]; cOpt[0]= sOpt.charAt(1); String sName = new String(cOpt); m_optionHashTable.put(sName,"1"); if ((m_control != null) && (m_control.length() > (nIndex+1))) { if (m_control.charAt(nIndex+1)==':') { i++; if (i < args.length) m_optionParamHashTable.put(sName,args[i]); else System.err.println("Missing argument for option "+ sOpt); } } } } else { System.err.println("Invalid usage."); } } else { // probably parameters m_ParameterList.addElement(args[i]); } } } } /** * Determines if an option was specified. For example, * hasOption( 'H' ) checks if the -H option * was specified. *

* * @param c letter of the option to check * @return true if the option was specified. */ public boolean hasOption(char c) { boolean fReturn = false; char cOption[]=new char[1]; cOption[0]=c; String s = new String(cOption); if (m_optionHashTable.get(s)=="1") { fReturn = true; } return(fReturn); } /** * Gets the argument specified with an option. * For example, getOptionParameter( 'h' ) * gets the value of the argument specified with * the -h option (such as "localhost" in "-h localhost"). *

* * @param c the letter of the option to check * @return the argument specified for this option. */ public String getOptionParam(char c) { char cOption[] = new char[1]; cOption[0]=c; String s = new String(cOption); String sReturn=(String)m_optionParamHashTable.get(s); return(sReturn); } /** * Gets a list of any additional parameters specified * (not including the arguments for any options). * @return a list of the additional parameters. */ public Vector getParameters() { return(m_ParameterList); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFWriter.java0000664001003300100330000001455310602743272027503 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import netscape.ldap.*; import java.io.*; /** * Class for outputting LDAP entries to a stream as LDIF. * * @version 1.0 */ public class LDIFWriter extends LDAPWriter { // static final long serialVersionUID = -2710382547996750924L; private String m_sep; private boolean m_foldLines; private boolean m_attrsOnly; private boolean m_toFiles; private static final String DEFAULT_SEPARATOR = ":"; private static final int MAX_LINE = 77; /** * Constructs an LDIFWriter object to output entries * to a stream as LDIF. * * @param pw output stream */ public LDIFWriter( PrintWriter pw ) { this( pw, false, DEFAULT_SEPARATOR, true, false ); } /** * Constructs an LDIFWriter object to output entries * to a stream as LDIF. * * @param pw output stream * @param attrsOnly true if only attribute names, not * values, are to be printed * @param separator String to use between attribute names and values; * the default is ":" * @param foldLines true to fold lines at 77 characters, * false to not fold them; the default is true. * @param toFiles true to write each attribute value to a * file in the temp folder, false to write them to the * output stream in printable format; the default is false. */ public LDIFWriter( PrintWriter pw, boolean attrsOnly, String separator, boolean foldLines, boolean toFiles ) { super( pw ); m_attrsOnly = attrsOnly; m_sep = separator; m_foldLines = foldLines; m_toFiles = toFiles; } /** * Print an attribute of an entry * * @param attr the attribute to format to the output stream */ protected void printAttribute( LDAPAttribute attr ) { String attrName = attr.getName(); if ( m_attrsOnly ) { printString( attrName + m_sep ); return; } /* Loop on values for this attribute */ Enumeration enumVals = attr.getByteValues(); if ( enumVals != null ) { while (enumVals.hasMoreElements()) { if ( m_toFiles ) { try { FileOutputStream f = getTempFile( attrName ); f.write( (byte[])enumVals.nextElement() ); } catch ( Exception e ) { System.err.println( "Error writing values " + "of " + attrName + ", " + e.toString() ); System.exit(1); } } else { byte[] b = (byte[])enumVals.nextElement(); String s; if ( LDIF.isPrintable(b) ) { try { s = new String( b, "UTF8" ); } catch ( UnsupportedEncodingException e ) { s = ""; } printString( attrName + m_sep + " " + s ); } else { s = getPrintableValue( b ); if ( s.length() > 0 ) { printString( attrName + ":: " + s ); } else { printString( attrName + m_sep + ' ' ); } } } } } else { printString( attrName + m_sep + ' ' ); } } /** * Print prologue to entry * * @param dn the DN of the entry */ protected void printEntryStart( String dn ) { if ( dn == null ) { printString( "dn" + m_sep + " "); } else { byte[] b = null; try { b = dn.getBytes( "UTF8" ); } catch ( UnsupportedEncodingException ex ) { } if ( LDIF.isPrintable(b) ) { printString( "dn" + m_sep + " " + dn ); } else { dn = getPrintableValue( b ); printString( "dn" + m_sep + m_sep + " " + dn ); } } } /** * Print epilogue to entry * * @param dn the DN of the entry */ protected void printEntryEnd( String dn ) { m_pw.println(); } protected void printString( String value ) { if ( m_foldLines ) { LDIF.breakString( m_pw, value, MAX_LINE ); } else { m_pw.print( value ); m_pw.print( '\n' ); } } /** * Create a unique file name in the temp folder and open an * output stream to the file * * @param name base name of file; an extension is appended which * consists of a number that makes the name unique * @return an open output stream to the file * @exception IOException if the file couldn't be opened for output */ protected FileOutputStream getTempFile( String name ) throws IOException { int num = 0; File f; String filename; do { filename = name + '.' + num; f = new File( filename ); num++; } while ( f.exists() ); printString(name + m_sep + " " + filename); return new FileOutputStream( f ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFAddContent.java0000664001003300100330000000767310602743272030257 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import netscape.ldap.LDAPAttribute; /** * * An object of this class represents the content of an LDIF record that * specifies a new entry to be added. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFAddContent. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord#getContent */ public class LDIFAddContent extends LDIFBaseContent { /** * Internal variables */ private LDAPAttribute m_attrs[] = null; static final long serialVersionUID = -665548826721177756L; /** * Constructs a new LDIFAddContent object with * the specified attributes. * @param attrs an array of LDAPAttribute objects * representing the attributes of the entry to be added */ public LDIFAddContent(LDAPAttribute attrs[]) { m_attrs = attrs; } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.ADD_CONTENT). * @see netscape.ldap.util.LDIFRecord#getContent */ public int getType() { return ADD_CONTENT; } /** * Retrieves the list of the attributes specified in the content * of the LDIF record. * @return an array of LDAPAttribute objects that * represent the attributes specified in the content of the LDIF record. */ public LDAPAttribute[] getAttributes() { return m_attrs; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; for (int i = 0; i < m_attrs.length; i++) { s = s + m_attrs[i].toString(); } if ( getControls() != null ) { s += getControlString(); } return "LDIFAddContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/DSMLWriter.java0000664001003300100330000002267510602743272027530 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import netscape.ldap.*; import java.io.*; /** * Class for outputting LDAP entries to a stream as DSML. * * @version 1.0 */ public class DSMLWriter extends LDAPWriter { // static final long serialVersionUID = -2710382547996750924L; /** * Constructs a DSMLWriter object to output entries * to a stream as DSML. * * @param pw output stream */ public DSMLWriter( PrintWriter pw ) { super( pw ); } /** * Prints the schema from an entry containing subschema * * entry entry containing schema definitions */ public void printSchema( LDAPEntry entry ) { LDAPSchema schema = new LDAPSchema( entry ); printString( " " ); printObjectClassSchema( schema ); printAttributeSchema( schema ); printString( " " ); } /** * Prints the object class schema from a schema object * * schema schema elements */ protected void printObjectClassSchema( LDAPSchema schema ) { Enumeration en = schema.getObjectClasses(); while( en.hasMoreElements() ) { LDAPObjectClassSchema s = (LDAPObjectClassSchema)en.nextElement(); printString( " " ); if ( s.isObsolete() ) { printString( " obsolete=true" ); } printString( " " + s.getName() + "" ); printString( " " + s.getDescription() + "" ); Enumeration attrs = s.getRequiredAttributes(); while( attrs.hasMoreElements() ) { printString( " " ); } attrs = s.getOptionalAttributes(); while( attrs.hasMoreElements() ) { printString( " " ); } printString( " " ); } } /** * Prints the attribute schema from a schema object * * schema schema elements */ protected void printAttributeSchema( LDAPSchema schema ) { Enumeration en = schema.getAttributes(); while( en.hasMoreElements() ) { LDAPAttributeSchema s = (LDAPAttributeSchema)en.nextElement(); printString( " 0) ) { printString( " equality=" + vals[0] ); } vals = s.getQualifier( s.ORDERING ); if ( (vals != null) && (vals.length > 0) ) { printString( " ordering=" + vals[0] ); } vals = s.getQualifier( s.SUBSTR ); if ( (vals != null) && (vals.length > 0) ) { printString( " substring=" + vals[0] ); } printString( " " + s.getName() + "" ); printString( " " + s.getDescription() + "" ); printString( " " + s.getSyntaxString() + "" ); printString( " " ); } } /** * Print an attribute of an entry * * @param attr the attribute to format to the output stream */ protected void printAttribute( LDAPAttribute attr ) { String attrName = attr.getName(); // Object classes are treated differently in DSML. Also, they // are always String-valued if ( attrName.equalsIgnoreCase( "objectclass" ) ) { Enumeration enumVals = attr.getStringValues(); if ( enumVals != null ) { while ( enumVals.hasMoreElements() ) { String s = (String)enumVals.nextElement(); printString( " " + s + "" ); } } return; } printString( " " ); /* Loop on values for this attribute */ Enumeration enumVals = attr.getByteValues(); if ( enumVals != null ) { while ( enumVals.hasMoreElements() ) { byte[] b = (byte[])enumVals.nextElement(); String s; if ( LDIF.isPrintable(b) ) { try { s = new String( b, "UTF8" ); } catch ( UnsupportedEncodingException e ) { s = ""; } printEscapedValue( " ", s, "" ); } else { s = getPrintableValue( b ); if ( s.length() > 0 ) { printString( " " + "" ); printString( " " + s ); printString( " " ); } } } } printString( " " ); } /** * Print prologue to entry * * @param dn the DN of the entry */ protected void printEntryStart( String dn ) { if ( dn == null ) { dn = ""; } printString( " " ); } /** * Print epilogue to entry * * @param dn the DN of the entry */ protected void printEntryEnd( String dn ) { printString( " " ); } /** * Print the element start, the value with escaping of special * characters, and the element end * * @param prolog element start * @param value value to be escaped * @param epilog element end */ protected void printEscapedValue( String prolog, String value, String epilog ) { m_pw.print( prolog ); int l = value.length(); char[] text = new char[l]; value.getChars( 0, l, text, 0 ); for ( int i = 0; i < l; i++ ) { char c = text[i]; switch (c) { case '<' : m_pw.print( "<" ); break; case '&' : m_pw.print( "&" ); break; default : m_pw.print( c ); } } m_pw.print( epilog); m_pw.print( '\n' ); } protected void printString( String value ) { m_pw.print( value ); m_pw.print( '\n' ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIF.java0000664001003300100330000007110210620653755026305 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import netscape.ldap.*; import netscape.ldap.client.*; import java.io.*; import java.net.*; /** * LDAP Data Interchange Format (LDIF) is a file format used to * import and export directory data from an LDAP server and to * describe a set of changes to be applied to data in a directory. * This format is described in the Internet draft * The LDAP Data Interchange Format (LDIF) - * Technical Specification. *

* * This class implements an LDIF file parser. You can construct * an object of this class to parse data in LDIF format and * manipulate the data as individual LDIFRecord objects. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord */ public class LDIF implements Serializable { /** * Internal constants */ private final static char COMMENT = '#'; static final long serialVersionUID = -2710382547996750924L; /** * Constructs an LDIF object to parse the * LDAP data read from stdin. * @exception IOException An I/O error has occurred. */ public LDIF() throws IOException { DataInputStream ds = new DataInputStream(System.in); BufferedReader d = new BufferedReader(new InputStreamReader(ds, "UTF8")); m_reader = new LineReader(d); m_source = "System.in"; m_decoder = new MimeBase64Decoder(); } /** * Constructs an LDIF object to parse the * LDIF data read from a specified file. * @param file the name of the LDIF file to parse * @exception IOException An I/O error has occurred. */ public LDIF(String file) throws IOException { FileInputStream fs = new FileInputStream(file); DataInputStream ds = new DataInputStream(fs); BufferedReader d = new BufferedReader(new InputStreamReader(ds, "UTF8")); m_reader = new LineReader(d); m_source = file; m_decoder = new MimeBase64Decoder(); } /** * Constructs an LDIF object to parse the * LDIF data read from an input stream. * @param ds The input stream providing the LDIF data * @exception IOException An I/O error has occurred. */ public LDIF(DataInputStream ds) throws IOException { BufferedReader d = new BufferedReader(new InputStreamReader(ds, "UTF8")); m_reader = new LineReader(d); m_source = ds.toString(); m_decoder = new MimeBase64Decoder(); } /** * Returns the next record in the LDIF data. You can call this * method repeatedly to iterate through all records in the LDIF data. *

* * @return the next record as an LDIFRecord * object or null if there are no more records. * @exception IOException An I/O error has occurred. * @see netscape.ldap.util.LDIFRecord */ public LDIFRecord nextRecord() throws IOException { if ( m_done ) return null; else return parse_ldif_record( m_reader ); } /** * Parses ldif content. The list of attributes is * terminated by \r\n or '-'. This function is * also used to parse the attributes in modifications. * @param ds data input stream */ private LDIFRecord parse_ldif_record(LineReader d) throws IOException { String line = null; String dn = null; Vector attrs = new Vector(); LDIFRecord rec = null; // Skip past any blank lines while( ((line = d.readLine()) != null) && (line.length() < 1) ) { } if (line == null) { return null; } if (line.startsWith("version:")) { m_version = Integer.parseInt( line.substring("version:".length()).trim() ); if ( m_version != 1 ) { throwLDIFException( "Unexpected " + line ); } // Do the next record line = d.readLine(); if ( (line != null) && (line.length() == 0) ) { // Skip the newline line = d.readLine(); } if (line == null) { return null; } } if (!line.startsWith("dn:")) throwLDIFException("expecting dn:"); dn = line.substring(3).trim(); if (dn.startsWith(":") && (dn.length() > 1)) { String substr = dn.substring(1).trim(); dn = new String(getDecodedBytes(substr), "UTF8"); } LDIFContent content = parse_ldif_content(d); rec = new LDIFRecord(dn, content); return rec; } /** * Parses ldif content. The list of attributes is * terminated by \r\n or '-'. This function is * also used to parse the attributes in modifications. * @param ds data input stream */ private LDIFContent parse_ldif_content(LineReader d) throws IOException { String line = d.readLine(); if ((line == null) || (line.length() < 1) || (line.equals("-"))) { // if this is empty line, then we're finished reading all // the info for the current entry if ((line != null) && (line.length() < 1)) { m_currEntryDone = true; } return null; } if (line.startsWith("changetype:")) { /* handles (changerecord) */ LDIFContent lc = null; String changetype = line.substring(11).trim(); if (changetype.equals("modify")) { lc = parse_mod_spec(d); } else if (changetype.equals("add")) { lc = parse_add_spec(d); } else if (changetype.equals("delete")) { lc = parse_delete_spec(d); } else if (changetype.equals("moddn") || changetype.equals("modrdn")) { lc = parse_moddn_spec(d); } else { throwLDIFException("change type not supported"); } return lc; } /* handles 1*(attrval-spec) */ Hashtable ht = new Hashtable(); String newtype = null; Object val = null; LDAPAttribute newAttr = null; Vector controlVector = null; /* Read lines until we're past the record */ while( true ) { if (line.startsWith("control:")) { if ( controlVector == null ) { controlVector = new Vector(); } controlVector.addElement( parse_control_spec( line ) ); } else { /* An attribute */ int len = line.length(); if ( len < 1 ) { break; } int idx = line.indexOf(':'); /* Must have a colon */ if (idx == -1) throwLDIFException("no ':' found"); /* attribute type */ newtype = line.substring(0,idx).toLowerCase(); val = ""; /* Could be :: for binary */ idx++; if ( len > idx ) { if ( line.charAt(idx) == ':' ) { idx++; String substr = line.substring(idx).trim(); val = getDecodedBytes(substr); } else if (line.charAt(idx) == '<') { try { URL url = new URL(line.substring(idx+1).trim()); String filename = url.getFile(); val = getFileContent(filename); } catch (MalformedURLException ex) { throwLDIFException( ex + ": cannot construct url "+ line.substring(idx+1).trim()); } } else { val = line.substring(idx).trim(); } } /* Is there a previous value for this attribute? */ newAttr = (LDAPAttribute)ht.get( newtype ); if ( newAttr == null ) { newAttr = new LDAPAttribute( newtype ); } if ( val instanceof String ) { newAttr.addValue( (String)val ); } else { newAttr.addValue( (byte[])val ); } ht.put( newtype, newAttr ); } line = d.readLine(); if (line == null || (line.length() < 1) || (line.equals("-"))) { if ((line != null) && (line.length() < 1)) { m_currEntryDone = true; } break; } } LDIFAttributeContent ac = new LDIFAttributeContent(); // Copy over the attributes to the record Enumeration en = ht.elements(); while( en.hasMoreElements() ) { ac.addElement( (LDAPAttribute)en.nextElement() ); } ht.clear(); if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); ac.setControls( controls ); controlVector.removeAllElements(); } return ac; } private byte[] getDecodedBytes(String line) { ByteBuf inBuf = new ByteBuf(line); ByteBuf decodedBuf = new ByteBuf(); /* Translate from base 64 */ m_decoder.translate( inBuf, decodedBuf ); return decodedBuf.toBytes(); } private byte[] getFileContent(String url) throws IOException { StringTokenizer tokenizer = new StringTokenizer(url, "|"); String filename = url; int num = tokenizer.countTokens(); if (num == 2) { String token = (String)tokenizer.nextElement(); int index = token.lastIndexOf("/"); String drive = token.substring(index+1); token = (String)tokenizer.nextElement(); token = token.replace('/', '\\'); filename = drive+":"+token; } File file = new File(filename); byte[] b = new byte[(int)file.length()]; FileInputStream fi = new FileInputStream(filename); fi.read(b); return b; } /** * Parses add content * @param ds data input stream */ private LDIFAddContent parse_add_spec(LineReader d) throws IOException { LDIFAttributeContent ac = (LDIFAttributeContent)parse_ldif_content(d); if (m_currEntryDone) m_currEntryDone = false; LDAPAttribute attrs[] = ac.getAttributes(); LDIFAddContent rc = new LDIFAddContent(attrs); LDAPControl[] controls = ac.getControls(); if ( controls != null ) { rc.setControls( controls ); } return rc; } /** * Parses delete content * @param ds data input stream */ private LDIFDeleteContent parse_delete_spec(LineReader d) throws IOException { Vector controlVector = null; LDIFDeleteContent dc = new LDIFDeleteContent(); String line = d.readLine(); while( line != null && !line.equals("") ) { if (line.startsWith("control:")) { if ( controlVector == null ) { controlVector = new Vector(); } controlVector.addElement( parse_control_spec( line ) ); } else { throwLDIFException("invalid SEP" ); } line = d.readLine(); } if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); dc.setControls( controls ); controlVector.removeAllElements(); } return dc; } /** * Parses change modification. * @param ds data input stream */ private LDIFModifyContent parse_mod_spec(LineReader d) throws IOException { Vector controlVector = null; String line = null; line = d.readLine(); LDIFModifyContent mc = new LDIFModifyContent(); do { int oper = -1; if (line.startsWith("add:")) { oper = LDAPModification.ADD; } else if (line.startsWith("delete:")) { oper = LDAPModification.DELETE; } else if (line.startsWith("replace:")) { oper = LDAPModification.REPLACE; } else throwLDIFException("unknown modify type"); LDIFAttributeContent ac = (LDIFAttributeContent)parse_ldif_content(d); if (ac != null) { LDAPAttribute attrs[] = ac.getAttributes(); for (int i = 0; i < attrs.length; i++) { LDAPModification mod = new LDAPModification(oper, attrs[i]); mc.addElement( mod ); } LDAPControl[] controls = ac.getControls(); if ( controls != null ) { if ( controlVector == null ) { controlVector = new Vector(); } for( int i = 0; i < controls.length; i++ ) { controlVector.addElement( controls[i] ); } } // if there is no attrval-spec, go into the else statement } else { int index = line.indexOf(":"); if (index == -1) throwLDIFException("colon missing in "+line); String attrName = line.substring(index+1).trim(); if (oper == LDAPModification.ADD) throwLDIFException("add operation needs the value for attribute "+attrName); LDAPAttribute attr = new LDAPAttribute(attrName); LDAPModification mod = new LDAPModification(oper, attr); mc.addElement(mod); } if (m_currEntryDone) { m_currEntryDone = false; break; } line = d.readLine(); } while (line != null && !line.equals("")); if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); mc.setControls( controls ); controlVector.removeAllElements(); } return mc; } /** * Parses moddn/modrdn modification. * @param d data input stream */ private LDIFModDNContent parse_moddn_spec(LineReader d) throws IOException { Vector controlVector = null; String line = null; line = d.readLine(); LDIFModDNContent mc = new LDIFModDNContent(); String val = null; do { if (line.startsWith("newrdn:") && (line.length() > ("newrdn:".length()+1))) { mc.setRDN(line.substring("newrdn:".length()).trim()); } else if (line.startsWith("deleteoldrdn:") && (line.length() > ("deleteoldrdn:".length()+1))) { String str = line.substring("deleteoldrdn:".length()).trim(); if (str.equals("0")) mc.setDeleteOldRDN(false); else if (str.equals("1")) mc.setDeleteOldRDN(true); else throwLDIFException("Incorrect input for deleteOldRdn "); } else if (line.startsWith("newsuperior:") && (line.length() > ("newsuperior:".length()+1))) { mc.setNewParent(line.substring( "newsuperior:".length()).trim()); } else if (line.startsWith("newparent:") && (line.length() > ("newparent:".length()+1))) { mc.setNewParent(line.substring( "newparent:".length()).trim()); } else if (line.startsWith("control:")) { if ( controlVector == null ) { controlVector = new Vector(); } controlVector.addElement( parse_control_spec( line ) ); } line = d.readLine(); } while (line != null && !line.equals("")); if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); mc.setControls( controls ); controlVector.removeAllElements(); } return mc; } /** * Parses the specification of a control
* * A control looks line one of the following: *
* control: 1.2.3.4.10.210 *
* control: 1.2.3.4.10.210 true *
* control: 1.2.3.4.10.210 true: someASCIIvalue *
* control: 1.2.3.4.10.210: someASCIIvalue *
* control: 1.2.3.4.10.210 true:: 44GK44GM44GV44KP44KJ *
* control: 1.2.3.4.10.210:: 44GK44GM44GV44KP44KJ *
* control: 1.2.3.4.10.210 true:< file:///usr/local/directory/cont.dta *
* control: 1.2.3.4.10.210:< file:///usr/local/directory/cont.dta * * @param line a line containing a control spec * @return a parsed control. * @exception IOException if the line could not be parsed */ protected LDAPControl parse_control_spec( String line ) throws IOException { boolean criticality = true; String OID; byte[] val = null; int len = line.length(); int idx = line.indexOf(':') + 2; /* OID, must be present */ if ( idx >= len ) { throwLDIFException("OID required for control"); } line = line.substring(idx).trim(); idx = line.indexOf(' '); if ( idx < 0 ) { OID = line; } else { /* Optional criticality */ OID = line.substring(0, idx); line = line.substring(idx+1); idx = line.indexOf(':'); String criticalVal; if (idx > 0) { criticalVal = line.substring(0, idx); } else { criticalVal = line; } if ( criticalVal.compareTo("true") == 0 ) { criticality = true; } else if ( criticalVal.compareTo("false") == 0 ) { criticality = false; } else { throwLDIFException( "Criticality for control must be true" + " or false, not " + criticalVal); } /* Optional value */ if ( idx > 0 ) { /* Could be :: for binary */ idx++; if ( line.length() > idx ) { if ( line.charAt(idx) == ':' ) { idx++; line = line.substring(idx).trim(); val = getDecodedBytes(line); } else if (line.charAt(idx) == '<') { String urlString = line.substring(idx+1).trim(); try { URL url = new URL(urlString); String filename = url.getFile(); val = getFileContent(filename); } catch (MalformedURLException ex) { throwLDIFException( ex + ": cannot construct url "+ urlString); } } else { try { val = line.substring(idx).trim().getBytes("UTF8"); } catch(Exception x) { } } } } } return new LDAPControl( OID, criticality, val ); } /** * Returns true if all the bytes in the given array are valid for output as a * String according to the LDIF specification. If not, the array should * output base64-encoded. * @return true if all the bytes in the given array are valid for * output as a String according to the LDIF specification; otherwise, * false. */ public static boolean isPrintable(byte[] b) { for( int i = b.length - 1; i >= 0; i-- ) { if ( (b[i] < ' ') || (b[i] > 127) ) { if ( b[i] != '\t' ) return false; } } return true; } /** * Outputs the String in LDIF line-continuation format. No line will be longer * than the given max. A continuation line starts with a single blank space. * @param pw the printer writer * @param value the given string being printed out * @param max the maximum characters allowed in the line */ public static void breakString( PrintWriter pw, String value, int max) { int leftToGo = value.length(); int written = 0; int maxChars = max; /* Limit to 77 characters per line */ while( leftToGo > 0 ) { int toWrite = Math.min( maxChars, leftToGo ); String s = value.substring( written, written+toWrite); if ( written != 0 ) { pw.print( " " + s ); } else { pw.print( s ); maxChars -= 1; } written += toWrite; leftToGo -= toWrite; /* Don't use pw.println, because it outputs an extra CR in Win32 */ pw.print( '\n' ); } } /** * Gets the version of LDIF used in the data. * @return version of LDIF used in the data. */ public int getVersion() { return m_version; } /** * Gets the string representation of the * entire LDIF file. * @return the string representation of the entire LDIF data file. */ public String toString() { return "LDIF {" + m_source + "}"; } /** * Throws a LDIF file exception including the current line number. * @param msg Error message */ protected void throwLDIFException(String msg)throws IOException { throw new IOException ("line " + (m_currLineNum-m_continuationLength) + ": " + msg); } /** * Internal variables */ private int m_version = 1; private boolean m_done = false; private LineReader m_reader = null; private String m_source = null; private MimeBase64Decoder m_decoder = null; private boolean m_currEntryDone = false; private int m_currLineNum; private int m_continuationLength; /* Concatenate continuation lines, if present */ class LineReader { LineReader( BufferedReader d ) { _d = d; } /** * Reads a non-comment line. * @return a string or null. */ String readLine() throws IOException { String line = null; String result = null; int readCnt = 0, continuationLength = 0; do { /* Leftover line from last time? */ if ( _next != null ) { line = _next; _next = null; } else { line = _d.readLine(); } if (line != null) { readCnt++; /* Empty line means end of record */ if( line.length() < 1 ) { if ( result == null ) result = line; else { _next = line; break; } } else if( line.charAt(0) == COMMENT ) { /* Ignore comment lines */ } else if( line.charAt(0) != ' ' ) { /* Not a continuation line */ if( result == null ) { result = line; } else { _next = line; break; } } else { /* Continuation line */ if ( result == null ) { m_currLineNum += readCnt; throwLDIFException("continuation out of nowhere"); } result += line.substring(1); continuationLength++; } } else { /* End of file */ break; } } while ( true ); m_done = ( line == null ); m_currLineNum += readCnt; if (_next != null) { // read one line ahead m_currLineNum--; } m_continuationLength = continuationLength; return result; } private BufferedReader _d; String _next = null; } /** * Converts a byte array to a printable string following * the LDIF rules (encode in base64 if necessary) * * @param b the byte array to convert * @return a converted string which is printable. */ public static String toPrintableString( byte[] b ) { String s = ""; if (isPrintable(b)) { try { s = new String(b, "UTF8"); } catch ( java.io.UnsupportedEncodingException e ) { } } else { ByteBuf inBuf = new ByteBuf( b, 0, b.length ); ByteBuf encodedBuf = new ByteBuf(); // Translate to base 64 MimeBase64Encoder encoder = new MimeBase64Encoder(); encoder.translate( inBuf, encodedBuf ); int nBytes = encodedBuf.length(); if ( nBytes > 0 ) { s = new String(encodedBuf.toBytes(), 0, nBytes); } } return s; } /** * Test driver - just reads and parses an LDIF file, printing * each record as interpreted * * @param args name of the LDIF file to parse */ public static void main( String[] args ) { if ( args.length != 1 ) { System.out.println( "Usage: java LDIF " ); System.exit( 1 ); } LDIF ldif = null; try { ldif = new LDIF( args[0] ); } catch (Exception e) { System.err.println("Failed to read LDIF file " + args[0] + ", " + e.toString()); System.exit(1); } try { for( LDIFRecord rec = ldif.nextRecord(); rec != null; rec = ldif.nextRecord() ) { System.out.println( rec.toString() + '\n' ); } } catch ( IOException ex ) { System.out.println( ex ); System.exit( 1 ); } System.exit( 0 ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFContent.java0000664001003300100330000001135610602743272027637 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import netscape.ldap.LDAPControl; /** * This interface represents the content of an LDIF record. * An LDIF record can specify an entry or modifications to be * made to an entry. *

* * The following classes implement this interface: *

* *

    *
  • LDIFAttributeContent (represents the content * of an LDIF record that specifies an entry) *
  • LDIFAddContent (represents the content * of an LDIF record that adds a new entry) *
  • LDIFModifyContent (represents the content * of an LDIF record that modifies an entry) *
  • LDIFDeleteContent (represents the content * of an LDIF record that deletes an entry) *
  • LDIFModDNContent (represents the content * of an LDIF record that changes the RDN or DN of an entry) *
*

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord * @see netscape.ldap.util.LDIFAttributeContent * @see netscape.ldap.util.LDIFAddContent * @see netscape.ldap.util.LDIFModifyContent * @see netscape.ldap.util.LDIFDeleteContent * @see netscape.ldap.util.LDIFModDNContent */ public interface LDIFContent { /** * The LDIF record specifies an entry and its attributes. */ public final static int ATTRIBUTE_CONTENT = 0; /** * The LDIF record specifies a new entry to be added. */ public final static int ADD_CONTENT = 1; /** * The LDIF record specifies an entry to be deleted. */ public final static int DELETE_CONTENT = 2; /** * The LDIF record specifies modifications to an entry. */ public final static int MODIFICATION_CONTENT = 3; /** * The LDIF record specifies changes to the DN or RDN of an entry. */ public final static int MODDN_CONTENT = 4; /** * Determines the content type. * @return the content type, identified by one of the following values: *

    *
  • ATTRIBUTE_CONTENT (specifies an entry and its attributes) *
  • ADD_CONTENT (specifies a new entry to be added) *
  • DELETE_CONTENT (specifies an entry to be deleted) *
  • MODIFICATION_CONTENT (specifies an entry to be modified) *
  • MODDN_CONTENT (specifies a change to the RDN or DN of an entry) *
*/ public int getType(); /** * Retrieves the list of controls specified in the content * of the LDIF record, if any * @return an array of LDAPControl objects that * represent any controls specified in the the LDIF record, * or null if none were specified. */ public LDAPControl[] getControls(); /** * Sets the list of controls * @param controls an array of LDAPControl objects * or null if none are to be specified */ public void setControls( LDAPControl[] controls ); /** * Returns the string representation of the content of the LDIF record. * @return string representation of the content of the LDIF record. */ public String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFRecord.java0000664001003300100330000002010410602743272027432 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.io.Serializable; import netscape.ldap.LDAPControl; /** * An object of this class represents an LDIF record in an LDIF * file (or in LDIF data). A record can contain a list of attributes * (which describes an entry) or a list of modifications (which * decribes the changes that need to be made to an entry). * Each record also has a distinguished name. *

* * You can get an LDIFRecord object from LDIF data * by calling the nextRecord method of the * LDIF object holding the data. *

* * If you are constructing a new LDIFRecord object, * you can specify the content of the record in one of the * following ways: *

* *

    *
  • To create a record that specifies an entry, use an object of * the LDIFAttributeContent class. *
  • To create a record that specifies a modification to be made, * use an object of one of the following classes: *
      *
    • Use LDIFAddContent to add a new entry. *
    • Use LDIFModifyContent to modify an entry. *
    • Use LDIFDeleteContent to delete an entry. *
    *
*

* * @version 1.0 * @see netscape.ldap.util.LDIF * @see netscape.ldap.util.LDIFAddContent * @see netscape.ldap.util.LDIFModifyContent * @see netscape.ldap.util.LDIFDeleteContent * @see netscape.ldap.util.LDIFAttributeContent */ public class LDIFRecord implements Serializable { /** * Internal variables */ private String m_dn = null; private LDIFBaseContent m_content = null; static final long serialVersionUID = -6537481934870076178L; /** * Constructs a new LDIFRecord object with the * specified content. * @param dn distinguished name of the entry associated with * the record * @param content content of the LDIF record. You can specify * an object of the LDIFAttributeContent, * LDIFAddContent, LDIFModifyContent, * or LDIFDeleteContent classes. * @see netscape.ldap.util.LDIFAddContent * @see netscape.ldap.util.LDIFModifyContent * @see netscape.ldap.util.LDIFDeleteContent * @see netscape.ldap.util.LDIFAttributeContent */ public LDIFRecord(String dn, LDIFContent content) { m_dn = dn; m_content = (LDIFBaseContent)content; } /** * Retrieves the distinguished name of the LDIF record. * @return the distinguished name of the LDIF record. */ public String getDN() { return m_dn; } /** * Retrieves the content of the LDIF record. The content is * an object of the LDIFAttributeContent, * LDIFAddContent, LDIFModifyContent, * or LDIFDeleteContent classes. *

* * To determine the class of the object, use the getType * method of that object. getType returns one of * the following values: *

    *
  • LDIFContent.ATTRIBUTE_CONTENT (the object is an * LDIFAttributeContent object) *
  • LDIFContent.ADD_CONTENT (the object is an * LDIFAddContent object) *
  • LDIFContent.MODIFICATION_CONTENT (the object is an * LDIFModifyContent object) *
  • LDIFContent.DELETE_CONTENT (the object is an * LDIFDeleteContent object) *
*

* * For example: *

     * ...
     * import netscape.ldap.*;
     * import netscape.ldap.util.*;
     * import java.io.*;
     * import java.util.*;
     * ...
     *     try {
     *         // Parse the LDIF file test.ldif.
     *         LDIF parser = new LDIF( "test.ldif" );
     *         // Iterate through each LDIF record in the file.
     *         LDIFRecord nextRec = parser.nextRecord();
     *         while ( nextRec != null ) {
     *             // Based on the type of content in the record,
     *             // get the content and cast it as the appropriate
     *             // type.
     *             switch( nextRec.getContent().getType() ) {
     *                 case LDIFContent.ATTRIBUTE_CONTENT:
     *                     LDIFAttributeContent attrContent =
     *                         (LDIFAttributeContent)nextRec.getContent();
     *                     break;
     *                 case LDIFContent.ADD_CONTENT:
     *                     LDIFAddContent addContent =
     *                         (LDIFAddContent)nextRec.getContent();
     *                     break;
     *                 case LDIFContent.MODIFICATION_CONTENT:
     *                     LDIFModifyContent modifyContent =
     *                         (LDIFModifyContent)nextRec.getContent();
     *                     break;
     *                 case LDIFContent.DELETE_CONTENT:
     *                     LDIFDeleteContent deleteContent =
     *                         (LDIFDeleteContent)nextRec.getContent();
     *                     break;
     *             }
     *             ...
     *             // Iterate through each record.
     *             nextRec = parser.nextRecord();
     *         }
     *     } catch ( IOException e ) {
     *         System.out.println( "Error: " + e.toString() );
     *         System.exit(1);
     *     }
     * ...
     * 
* * @return the content of the LDIF record. * @see netscape.ldap.util.LDIFAddContent * @see netscape.ldap.util.LDIFModifyContent * @see netscape.ldap.util.LDIFDeleteContent * @see netscape.ldap.util.LDIFAttributeContent */ public LDIFContent getContent() { return m_content; } /** * Retrieves the list of controls specified in the content * of the LDIF record, if any. * @return an array of LDAPControl objects that * represent any controls specified in the LDIF record, * or null if none were specified. */ public LDAPControl[] getControls() { return (m_content == null) ? null : m_content.getControls(); } /** * Gets the string representation of the LDIFRecord * object. * @return the string representation of the LDIF record. */ public String toString() { return "LDIFRecord {dn=" + m_dn + ", content=" + m_content + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFDeleteContent.java0000664001003300100330000000653110602743272030761 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; /** * An object of this class represents the content of an LDIF record that * specifies the deletion of an entry. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFDeleteContent. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord#getContent */ public class LDIFDeleteContent extends LDIFBaseContent { static final long serialVersionUID = -6581979396116035503L; /** * Constructs an LDIFDeleteContent object * to specify that an entry should be deleted. (The DN * identifying the entry is part of the LDIFRecord * object. */ public LDIFDeleteContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.DELETE_CONTENT). * @see netscape.ldap.util.LDIFRecord#getContent */ public int getType() { return DELETE_CONTENT; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; if ( getControls() != null ) { s += getControlString(); } return "LDIFDeleteContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFAttributeContent.java0000664001003300100330000001061710602743272031522 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.Vector; import netscape.ldap.LDAPAttribute; /** * An object of this class represents the content of an LDIF record that * specifies an entry and its attributes. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFAttributeContent. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord#getContent */ public class LDIFAttributeContent extends LDIFBaseContent { /** * Internal variables */ private Vector m_attrs = new Vector(); static final long serialVersionUID = -2912294697848028220L; /** * Constructs an empty LDIFAttributeContent object with * no attributes specified. You can use the addElement * method to add attributes to this object. * @see netscape.ldap.util.LDIFAttributeContent#addElement */ public LDIFAttributeContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.ATTRIBUTE_CONTENT). * @see netscape.ldap.util.LDIFRecord#getContent */ public int getType() { return ATTRIBUTE_CONTENT; } /** * Adds an attribute to the content of the LDIF record. * @param attr the attribute to add */ public void addElement(LDAPAttribute attr) { m_attrs.addElement(attr); } /** * Retrieves the list of the attributes specified in the content * of the LDIF record. * @return an array of LDAPAttribute objects that * represent the attributes specified in the content of the LDIF record. */ public LDAPAttribute[] getAttributes() { LDAPAttribute attrs[] = new LDAPAttribute[m_attrs.size()]; for (int i = 0; i < m_attrs.size(); i++) { attrs[i] = (LDAPAttribute)m_attrs.elementAt(i); } return attrs; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; for (int i = 0; i < m_attrs.size(); i++) { s = s + ((LDAPAttribute)m_attrs.elementAt(i)).toString(); } if ( getControls() != null ) { s += getControlString(); } return "LDIFAttributeContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/DN.java0000664001003300100330000003473010602743272026070 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import java.io.*; import java.util.StringTokenizer; /** * Objects of this class represent distinguished names (DN). A * distinguished name is used to identify an entry in a directory. *

* * The netscape.ldap.LDAPDN class uses this class * internally. In most cases, when working with DNs in the * LDAP Java classes, you should use the * netscape.ldap.LDAPDN class. *

* * The following DNs are examples of the different formats * for DNs that may appear: *

    *
  • uid=bjensen, ou=People, o=Airius.com * (RFC 1485 format) *
  • o=Airius.com/ou=People/uid=bjensen (OSF format) *
*

* * @version 1.0 * @see netscape.ldap.LDAPDN */ public final class DN implements Serializable { /** * List of RDNs. DN consists of one or more RDNs. * RDNs follow RFC1485 order. */ private Vector m_rdns = new Vector(); /** * Type specifying a DN in the RFC format. *

* * @see netscape.ldap.util.DN#getDNType * @see netscape.ldap.util.DN#setDNType */ public static int RFC = 0; /** * Type specifying a DN in the OSF format. *

* * @see netscape.ldap.util.DN#getDNType * @see netscape.ldap.util.DN#setDNType */ public static int OSF = 1; private int m_dnType = RFC; static final long serialVersionUID = -8867457218975952548L; /** * Constructs an empty DN object. */ public DN() { } /** * Constructs a DN object from the specified * distinguished name. The string representation of the DN * can be in RFC 1485 or OSF format. *

* * @param dn string representation of the distinguished name */ public DN(String dn) { String neutralDN = neutralizeEscapes(dn); if (neutralDN == null) { return; // malformed } // RFC1485 if (neutralDN.indexOf(',') != -1 || neutralDN.indexOf(';') != -1) { parseRDNs(neutralDN, dn, ",;"); } else if (dn.indexOf('/') != -1) { /* OSF */ m_dnType = OSF; StringTokenizer st = new StringTokenizer(dn, "/"); Vector rdns = new Vector(); while (st.hasMoreTokens()) { String rdn = st.nextToken(); if (RDN.isRDN(rdn)) rdns.addElement(new RDN(rdn)); else return; } /* reverse the RDNs order */ for (int i = rdns.size() - 1; i >= 0; i--) { m_rdns.addElement(rdns.elementAt(i)); } } else if (RDN.isRDN(dn)) { m_rdns.addElement(new RDN(dn)); } } /** * Neutralize backslash escapes and quoted sequences for easy parsing. * @return dn string with disabled escapes or null if malformed dn */ private String neutralizeEscapes(String dn) { String neutralDN = RDN.neutralizeEscapes(dn); if (neutralDN == null) { return null; // malformed } String dn2 = neutralDN.trim(); if (dn2.length() == 0) { return neutralDN; } if (dn2.charAt(0) == ';' || dn2.charAt(0) == ',') { return null; // malformed } int lastIdx = dn2.length() -1; if (dn2.charAt(lastIdx) == ';' || dn2.charAt(lastIdx) == ',') { return null; // malformed } return neutralDN; } /** * Parse RDNs in the DN */ private void parseRDNs(String neutralDN, String dn, String sep) { int startIdx=0, endIdx=0; RDN rdn = null; StringTokenizer tok = new StringTokenizer(neutralDN, sep); while (tok.hasMoreElements()) { String neutralRDN = tok.nextToken(); endIdx = startIdx + neutralRDN.length(); rdn = new RDN (dn.substring(startIdx, endIdx)); if (rdn.getTypes() != null) { m_rdns.addElement(rdn); } else { // malformed rdn m_rdns.removeAllElements(); return; } startIdx = endIdx + 1; } } /** * Adds the specified relative distinguished name (RDN) to the * beginning of the current DN. *

* * @param rdn the relative distinguished name to add to the * beginning of the current DN * @see netscape.ldap.util.RDN */ public void addRDNToFront(RDN rdn) { m_rdns.insertElementAt(rdn, 0); } /** * Adds the specified relative distinguished name (RDN) to the * end of the current DN. *

* * @param rdn the relative distinguished name to append to the current DN * @see netscape.ldap.util.RDN */ public void addRDNToBack(RDN rdn) { m_rdns.addElement(rdn); } /** * Adds the specified relative distinguished name (RDN) to the current DN. * If the DN is in RFC 1485 format, the RDN is added to the beginning * of the DN. If the DN is in OSF format, the RDN is appended to the * end of the DN. *

* * @param rdn the relative distinguished name to add to the current DN * @see netscape.ldap.util.RDN */ public void addRDN(RDN rdn) { if (m_dnType == RFC) { addRDNToFront(rdn); } else { addRDNToBack(rdn); } } /** * Sets the type of format used for the DN (RFC format or OSF format). *

* * @param type one of the following constants: DN.RFC * (to use the RFC format) or DN.OSF (to use the OSF format) * @see netscape.ldap.util.DN#getDNType * @see netscape.ldap.util.DN#RFC * @see netscape.ldap.util.DN#OSF */ public void setDNType(int type) { m_dnType = type; } /** * Gets the type of format used for the DN (RFC format or OSF format). *

* * @return one of the following constants: DN.RFC * (if the DN is in RFC format) or DN.OSF * (if the DN is in OSF format). * @see netscape.ldap.util.DN#setDNType * @see netscape.ldap.util.DN#RFC * @see netscape.ldap.util.DN#OSF */ public int getDNType() { return m_dnType; } /** * Returns the number of components that make up the current DN. * @return the number of components in this DN. */ public int countRDNs() { return m_rdns.size(); } /** * Returns a list of the components (RDN objects) * that make up the current DN. * @return a list of the components of this DN. * @see netscape.ldap.util.RDN */ public Vector getRDNs() { return m_rdns; } /** * Returns an array of the individual components that make up * the current distinguished name. * @param noTypes specify true to remove the attribute type * and equals sign (for example, "cn=") from each component */ public String[] explodeDN(boolean noTypes) { if (m_rdns.size() == 0) return null; String str[] = new String[m_rdns.size()]; for (int i = 0; i < m_rdns.size(); i++) { if (noTypes) str[i] = ((RDN)m_rdns.elementAt(i)).getValue(); else str[i] = ((RDN)m_rdns.elementAt(i)).toString(); } return str; } /** * Determines if the DN is in RFC 1485 format. * @return true if the DN is in RFC 1485 format. */ public boolean isRFC() { return (m_dnType == RFC); } /** * Returns the DN in RFC 1485 format. * @return the DN in RFC 1485 format. */ public String toRFCString() { String dn = ""; for (int i = 0; i < m_rdns.size(); i++) { if (i != 0) dn += ","; dn = dn + ((RDN)m_rdns.elementAt(i)).toString(); } return dn; } /** * Returns the DN in OSF format. * @return the DN in OSF format. */ public String toOSFString() { String dn = ""; for (int i = 0; i < m_rdns.size(); i++) { if (i != 0) { dn = "/" + dn; } RDN rdn = (RDN)m_rdns.elementAt(i); dn = rdn.toString() + dn; } return dn; } /** * Returns the string representation of the DN * in its original format. (For example, if the * DN object was constructed from a DN * in RFC 1485 format, this method returns the DN * in RFC 1485 format. * @return the string representation of the DN. */ public String toString() { if (m_dnType == RFC) return toRFCString(); else return toOSFString(); } /** * Determines if the given string is an distinguished name or * not. * @param dn distinguished name * @return true or false. */ public static boolean isDN(String dn) { if ( dn.equals( "" ) ) { return true; } DN newdn = new DN(dn); return (newdn.countRDNs() > 0); } /** * Determines if the current DN is equal to the specified DN. * @param dn DN to compare against the current DN * @return true if the two DNs are the same. */ public boolean equals(DN dn) { return (dn.toRFCString().toUpperCase().equals(toRFCString().toUpperCase())); } /** * Gets the parent DN for this DN. *

* * For example, the following section of code gets the * parent DN of "uid=bjensen, ou=People, o=Airius.com." *

     *    DN dn = new DN("uid=bjensen, ou=People, o=Airius.com");
     *    DN parent = dn.getParent();
     * 
* The parent DN in this example is "ou=People, o=Airius.com". *

* * @return DN of the parent of this DN. */ public DN getParent() { DN newdn = new DN(); for (int i = m_rdns.size() - 1; i > 0; i--) { newdn.addRDN((RDN)m_rdns.elementAt(i)); } return newdn; } /** * Determines if the given DN is under the subtree defined by this DN. *

* * For example, the following section of code determines if the * DN specified by dn1 is under the subtree specified * by dn2. *

     *    DN dn1 = new DN("uid=bjensen, ou=People, o=Airius.com");
     *    DN dn2 = new DN("ou=People, o=Airius.com");
     *
     *    boolean isContain = dn1.contains(dn2)
     * 
* In this case, since "uid=bjensen, ou=People, o=Airius.com" * is an entry under the subtree "ou=People, o=Airius.com", * the value of isContain is true. *

* * @param dn the DN of a subtree to check * @return true if the current DN belongs to the subtree * specified by dn. * @deprecated Please use isDescendantOf() instead. */ public boolean contains(DN dn) { return isDescendantOf(dn); } /** * Determines if this DN is a descendant of the given DN. *

* * For example, the following section of code determines if the * DN specified by dn1 is a descendant of the DN specified * by dn2. *

     *    DN dn1 = new DN("uid=bjensen, ou=People, o=Airius.com");
     *    DN dn2 = new DN("ou=People, o=Airius.com");
     *
     *    boolean isDescendant = dn1.isDescendantOf(dn2)
     * 
* In this case, since "uid=bjensen, ou=People, o=Airius.com" * is an entry under the subtree "ou=People, o=Airius.com", * the value of isDescendant is true. *

* * In the case where the given DN is equal to this DN * it returns false. * * @param dn the DN of a subtree to check * @return true if the current DN is a descendant of the DN * specified by dn. */ public boolean isDescendantOf(DN dn) { Vector rdns1 = dn.m_rdns; Vector rdns2 = this.m_rdns; int i = rdns1.size() - 1; int j = rdns2.size() - 1; if ((j < i) || (equals(dn) == true)) return false; for (; i>=0 && j>=0; i--, j--) { RDN rdn1 = (RDN)rdns1.elementAt(i); RDN rdn2 = (RDN)rdns2.elementAt(j); if (!rdn2.equals(rdn1)) { return false; } } return true; } /** * Array of the characters that may be escaped in a DN. */ public static final char[] ESCAPED_CHAR = {',', '+', '"', '\\', '<', '>', ';'}; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFModifyContent.java0000664001003300100330000001106510602743272031004 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.Vector; import netscape.ldap.LDAPModification; /** * An object of this class represents the content of an LDIF record that * specifies modifications to an entry. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFModifyContent. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord#getContent */ public class LDIFModifyContent extends LDIFBaseContent { /** * Internal variables */ private Vector m_mods = new Vector(); static final long serialVersionUID = -710573832339780084L; /** * Constructs an empty LDIFModifyContent object. * To specify the modifications to be made to the entry, use * the addElement method. * @see netscape.ldap.util.LDIFModifyContent#addElement */ public LDIFModifyContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.MODIFICATION_CONTENT). * @see netscape.ldap.util.LDIFRecord#getContent */ public int getType() { return MODIFICATION_CONTENT; } /** * Specifies an additional modification that should be made to * the entry. * @param mod LDAPModification object representing * the change to make to the entry * @see netscape.ldap.LDAPModification */ public void addElement(LDAPModification mod) { m_mods.addElement(mod); } /** * Retrieves the list of the modifications specified in the content * of the LDIF record. * @return an array of LDAPModification objects that * represent the modifications specified in the content of the LDIF record. * @see netscape.ldap.LDAPModification */ public LDAPModification[] getModifications() { LDAPModification mods[] = new LDAPModification[m_mods.size()]; for (int i = 0; i < m_mods.size(); i++) { mods[i] = (LDAPModification)m_mods.elementAt(i); } return mods; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; for (int i = 0; i < m_mods.size(); i++) { s = s + ((LDAPModification)m_mods.elementAt(i)).toString(); } if ( getControls() != null ) { s += getControlString(); } return "LDIFModifyContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/MimeBase64Encoder.java0000664001003300100330000001331510602743272030717 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; /** Implements a plaintext -> Base64 encoder. */ public final class MimeBase64Encoder extends MimeEncoder { static final long serialVersionUID = 8781620079813078315L; private int buf = 0; // a 24-bit quantity private int buf_bytes = 0; // how many octets are set in it private byte line[] = new byte[74]; // output buffer private int line_length = 0; // output buffer fill pointer static private final byte crlf[] = "\r\n".getBytes(); static private final char map[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0-7 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 8-15 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 16-23 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 24-31 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 32-39 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 40-47 'w', 'x', 'y', 'z', '0', '1', '2', '3', // 48-55 '4', '5', '6', '7', '8', '9', '+', '/', // 56-63 }; private final void encode_token() { int i = line_length; line[i] = (byte)map[0x3F & (buf >> 18)]; // sextet 1 (octet 1) line[i+1] = (byte)map[0x3F & (buf >> 12)]; // sextet 2 (octet 1 and 2) line[i+2] = (byte)map[0x3F & (buf >> 6)]; // sextet 3 (octet 2 and 3) line[i+3] = (byte)map[0x3F & buf]; // sextet 4 (octet 3) line_length += 4; buf = 0; buf_bytes = 0; } private final void encode_partial_token() { int i = line_length; line[i] = (byte)map[0x3F & (buf >> 18)]; // sextet 1 (octet 1) line[i+1] = (byte)map[0x3F & (buf >> 12)]; // sextet 2 (octet 1 and 2) if (buf_bytes == 1) line[i+2] = (byte)'='; else line[i+2] = (byte)map[0x3F & (buf >> 6)]; // sextet 3 (octet 2 and 3) if (buf_bytes <= 2) line[i+3] = (byte)'='; else line[i+3] = (byte)map[0x3F & buf]; // sextet 4 (octet 3) line_length += 4; buf = 0; buf_bytes = 0; } private final void flush_line(ByteBuf out) { out.append(line, 0, line_length); line_length = 0; } /** Given a sequence of input bytes, produces a sequence of output bytes using the base64 encoding. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ public final void translate(ByteBuf in, ByteBuf out) { byte inb[] = in.toBytes(); int in_length = in.length(); for (int i = 0; i < in_length; i++) { if (buf_bytes == 0) buf = (buf & 0x00FFFF) | (inb[i] << 16); else if (buf_bytes == 1) buf = (buf & 0xFF00FF) | ((inb[i] << 8) & 0x00FFFF); else buf = (buf & 0xFFFF00) | (inb[i] & 0x0000FF); if ((++buf_bytes) == 3) { encode_token(); if (line_length >= 72) { flush_line(out); } } if (i == (in_length-1)) { if ((buf_bytes > 0) && (buf_bytes < 3)) encode_partial_token(); if (line_length > 0) flush_line(out); } } for (int i=0; i * Call destroy() to release all connections. *

Example:
*

 * ConnectionPool pool = null;
 * try {
 *     pool = new ConnectionPool( 10, 30,
 *                                "foo.acme.com",389,
 *                                "uid=me, o=acme.com",
 *                                "password" );
 * } catch ( LDAPException e ) {
 *    System.err.println( "Unable to create connection pool" );
 *    System.exit( 1 );
 * }
 * while ( clientsKnocking ) {
 *     String filter = getSearchFilter();
 *     LDAPConnection ld = pool.getConnection();
 *     try {
 *         LDAPSearchResults res = ld.search( BASE, ld.SCOPE_SUB,
 *                                            filter, attrs,
 *                                            false );
 *         pool.close( ld );
 *         while( res.hasMoreElements() ) {
 *             ...
 *
*/ /** * Connection pool, typically used by a server to avoid creating * a new connection for each client * * @version 1.2 **/ public class ConnectionPool { /** * Constructor for specifying all parameters * * @param min initial number of connections * @param max maximum number of connections * @param host hostname of LDAP server * @param port port number of LDAP server * @param authdn DN to authenticate as * @param authpw password for authentication * @exception LDAPException on failure to create connections */ public ConnectionPool( int min, int max, String host, int port, String authdn, String authpw ) throws LDAPException { this( min, max, host, port, authdn, authpw, null ); } /** * Constructor for specifying all parameters, anonymous * identity * * @param min initial number of connections * @param max maximum number of connections * @param host hostname of LDAP server * @param port port number of LDAP server * @exception LDAPException on failure to create connections */ public ConnectionPool( int min, int max, String host, int port) throws LDAPException { this( min, max, host, port, "", ""); } /** * Constructor for using default parameters, anonymous identity * * @param host hostname of LDAP server * @param port port number of LDAP server * @exception LDAPException on failure to create connections */ public ConnectionPool( String host, int port ) throws LDAPException { // poolsize=10,max=20,host,port, // noauth,nopswd this( 10, 20, host, port, "", "" ); } /** * Constructor for using an existing connection to clone * from. *

* The connection to clone must be already established and * the user authenticated. * * @param min initial number of connections * @param max maximum number of connections * @param ldc connection to clone * @exception LDAPException on failure to create connections */ public ConnectionPool( int min, int max, LDAPConnection ldc ) throws LDAPException { this( min, max, ldc.getHost(), ldc.getPort(), ldc.getAuthenticationDN(), ldc.getAuthenticationPassword(), (LDAPConnection)ldc.clone() ); } /* * Constructor for using an existing connection to clone * from * * @param min initial number of connections * @param max maximum number of connections * @param host hostname of LDAP server * @param port port number of LDAP server * @param authdn DN to authenticate as * @param authpw password for authentication * @param ldc connection to clone * @exception LDAPException on failure to create connections */ private ConnectionPool( int min, int max, String host, int port, String authdn, String authpw, LDAPConnection ldc ) throws LDAPException { this.poolSize = min; this.poolMax = max; this.host = host; this.port = port; this.authdn = authdn; this.authpw = authpw; this.ldc = ldc; this.debugMode = false; createPool(); } /** * Destroy the whole pool - called during a shutdown */ public void destroy() { for ( int i = 0; i < pool.size(); i++ ) { disconnect( (LDAPConnectionObject)pool.elementAt(i) ); } pool.removeAllElements(); } /** * Gets a connection from the pool * * If no connections are available, the pool will be * extended if the number of connections is less than * the maximum; if the pool cannot be extended, the method * blocks until a free connection becomes available. * * @return an active connection. */ public LDAPConnection getConnection() { LDAPConnection con; while( (con = getConnFromPool()) == null ) { synchronized( pool ) { try { pool.wait(); } catch ( InterruptedException e ) { } } } return con; } /** * Gets a connection from the pool within a time limit. * * If no connections are available, the pool will be * extended if the number of connections is less than * the maximum; if the pool cannot be extended, the method * blocks until a free connection becomes available or the * time limit is exceeded. * * @param timeout timeout in milliseconds * @return an active connection or null if timed out. */ public LDAPConnection getConnection(int timeout) { LDAPConnection con; while( (con = getConnFromPool()) == null ) { long t1, t0 = System.currentTimeMillis(); if (timeout <= 0) { return con; } synchronized( pool ) { try { pool.wait(timeout); } catch ( InterruptedException e ) { return null; } } t1 = System.currentTimeMillis(); timeout -= (t1 - t0); } return con; } /** * Gets a connection from the pool * * If no connections are available, the pool will be * extended if the number of connections is less than * the maximum; if the pool cannot be extended, the method * returns null. * * @return an active connection or null. */ protected synchronized LDAPConnection getConnFromPool() { LDAPConnection con = null; LDAPConnectionObject ldapconnobj = null; int pSize = pool.size(); // Get an available connection for ( int i = 0; i < pSize; i++ ) { // Get the ConnectionObject from the pool LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(i); if ( co.isAvailable() ) { // Conn available? ldapconnobj = co; break; } } if ( ldapconnobj == null ) { // If there there were no conns in pool, can we grow // the pool? if ( (poolMax < 0) || ( (poolMax > 0) && (pSize < poolMax)) ) { // Yes we can grow it int i = addConnection(); // If a new connection was created, use it if ( i >= 0 ) { ldapconnobj = (LDAPConnectionObject)pool.elementAt(i); } } else { debug("All pool connections in use"); } } if ( ldapconnobj != null ) { ldapconnobj.setInUse( true ); // Mark as in use con = ldapconnobj.getLDAPConn(); } return con; } /** * This is our soft close - all we do is mark * the connection as available for others to use. * We also reset the auth credentials in case * they were changed by the caller. * * @param ld a connection to return to the pool */ public synchronized void close( LDAPConnection ld ) { int index = find( ld ); if ( index != -1 ) { LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(index); // Reset the auth if necessary if (ldc == null || !ldc.getAuthenticationMethod().equals("sasl")) { boolean reauth = false; //if user bound anon then getAuthenticationDN is null if ( ld.getAuthenticationDN() == null ) { reauth = (authdn != null); } else if ( !ld.getAuthenticationDN().equalsIgnoreCase(authdn) ) { reauth = true; } if (reauth) { try { debug("user changed credentials-resetting"); ld.bind(authdn,authpw); //reauth as proper user } catch (LDAPException e) { debug("unable to reauth during close as "+authdn); debug(e.toString()); } } } co.setInUse( false ); // Mark as available synchronized( pool ) { pool.notifyAll(); } } } /** * Debug method to print the contents of the pool */ public void printPool(){ System.out.println("--ConnectionPool--"); for ( int i = 0; i < pool.size(); i++ ) { LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(i); System.out.println( "" + i + "=" + co ); } } private void disconnect( LDAPConnectionObject ldapconnObject ) { if ( ldapconnObject != null ) { if (ldapconnObject.isAvailable()) { LDAPConnection ld = ldapconnObject.getLDAPConn(); if ( (ld != null) && (ld.isConnected()) ) { try { ld.disconnect(); } catch (LDAPException e) { debug("disconnect: "+e.toString()); } } ldapconnObject.setLDAPConn(null); // Clear conn } } } private void createPool() throws LDAPException { // Called by the constructors if ( poolSize <= 0 ) { throw new LDAPException("ConnectionPoolSize invalid"); } if ( poolMax < poolSize ) { debug("ConnectionPoolMax is invalid, set to " + poolSize); poolMax = poolSize; } debug("****Initializing LDAP Pool****"); debug("LDAP host = "+host+" on port "+port); debug("Number of connections="+poolSize); debug("Maximum number of connections="+poolMax); debug("******"); pool = new java.util.Vector(); // Create pool vector setUpPool( poolSize ); // Initialize it } private int addConnection() { int index = -1; debug("adding a connection to pool..."); try { int size = pool.size() + 1; // Add one connection setUpPool( size ); if ( size == pool.size() ) { // New size is size requested? index = size - 1; } } catch (Exception ex) { debug("Adding a connection: "+ex.toString()); } return index; } private synchronized void setUpPool( int size ) throws LDAPException { // Loop on creating connections while( pool.size() < size ) { LDAPConnectionObject co = new LDAPConnectionObject(); // Make LDAP connection, using template if available LDAPConnection newConn = (ldc != null) ? (LDAPConnection)ldc.clone() : new LDAPConnection(); co.setLDAPConn(newConn); try { if ( newConn.isConnected() ) { // If using a template, then reconnect // to create a separate physical connection newConn.reconnect(); } else { // Not using a template, so connect with // simple authentication using ldap v3 try { newConn.connect( 3, host, port, authdn, authpw); } catch (LDAPException connEx) { // fallback to ldap v2 if v3 is not supported if (connEx.getLDAPResultCode() == connEx.PROTOCOL_ERROR) { newConn.connect( 2, host, port, authdn, authpw); } else { throw connEx; } } } } catch ( LDAPException le ) { debug("Creating pool:"+le.toString()); debug("aborting...."); throw le; } co.setInUse( false ); // Mark not in use pool.addElement( co ); } } private int find( LDAPConnection con ) { // Find the matching Connection in the pool if ( con != null ) { for ( int i = 0; i < pool.size(); i++ ) { LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(i); if ( co.getLDAPConn() == con ) { return i; } } } return -1; } /** * Sets the debug printout mode. * * @param mode debug mode to use */ public synchronized void setDebug( boolean mode ) { debugMode = mode; } /** * Reports the debug printout mode. * * @return debug mode in use. */ public boolean getDebug() { return debugMode; } private void debug( String s ) { if ( debugMode ) System.out.println("ConnectionPool ("+ new Date()+") : " + s); } private void debug(String s, boolean severe) { if ( debugMode || severe ) { System.out.println("ConnectionPool ("+ new Date()+") : " + s); } } /** * Wrapper for LDAPConnection object in pool */ class LDAPConnectionObject{ /** * Returns the associated LDAPConnection. * * @return the LDAPConnection. * */ LDAPConnection getLDAPConn() { return this.ld; } /** * Sets the associated LDAPConnection * * @param ld the LDAPConnection * */ void setLDAPConn( LDAPConnection ld ) { this.ld = ld; } /** * Marks a connection in use or available * * @param inUse true to mark in use, false if available * */ void setInUse( boolean inUse ) { this.inUse = inUse; } /** * Returns whether the connection is available * for use by another user. * * @return true if available. */ boolean isAvailable() { return !inUse; } /** * Debug method * * @return s user-friendly rendering of the object. */ public String toString() { return "LDAPConnection=" + ld + ",inUse=" + inUse; } private LDAPConnection ld; // LDAP Connection private boolean inUse; // In use? (true = yes) } private int poolSize; // Min pool size private int poolMax; // Max pool size private String host; // LDAP host private int port; // Port to connect at private String authdn; // Identity of connections private String authpw; // Password for authdn private LDAPConnection ldc = null; // Connection to clone private java.util.Vector pool; // the actual pool private boolean debugMode; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/ByteBuf.java0000664001003300100330000003753510620653755027143 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import java.io.FileInputStream; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.io.RandomAccessFile; import java.io.Serializable; /** * This class is similar to the java.lang.StringBuffer * class. Instead of storing a string, an object of this class * stores an array of bytes. (This is referred to as a "byte buffer".) *

* * This class also differs from StringBuffer in the * following ways: *

    *
  • None of the methods are synchronized. You cannot share a * byte buffer among multiple threads. *
  • Converting to a String requires a copy of the character data. *
  • In order to speed up memory allocation, Alloc * and Recycle methods are provided. You can "recycle" * any ByteBuf objects you no longer need by using the * Recycle method. Calling the Alloc * method will reuse objects that have been "recycled." To * To clear out the cache of these "recycled" objects, use * the EmptyRecycler method. *
  • Additional "helper" methods are provided (for example, * functions for comparing data). *
*/ public final class ByteBuf implements Serializable { static final long serialVersionUID = -786393456618166871L; private byte value[]; private int count; /** * Constructs an empty byte buffer with the default length of 16. */ public ByteBuf() { this(16); } /** * Constructs an empty byte buffer with the specified initial length. * @param length initial number of bytes that this buffer should hold */ public ByteBuf(int length) { value = new byte[length]; } /** * Constructs a byte buffer with the specified initial value. * The new byte buffer is 16 bytes longer than the initial value. * @param str initial value that this buffer should hold */ public ByteBuf(String str) { this(str.length() + 16); append(str); } /** * Constructs a byte buffer with the specified length. * An initial value is stored in this buffer, starting * at the specified offset. * @param bytes array of bytes to initially store in the buffer * @param offset index where you want the initial value to start in the array * @param length length of the buffer to allocate */ public ByteBuf(byte bytes[], int offset, int length) { value = new byte[length]; System.arraycopy(bytes, offset, value, 0, length); count = length; } /** * Returns the length (character count) of the byte buffer. */ public int length() { return count; } /** * Returns the current capacity of the byte buffer. The capacity * is the amount of storage available for newly inserted bytes. * If the capacity is exceeded, more space will be allocated. */ public int capacity() { return value.length; } /** * Ensures that the capacity of the buffer is at least equal to the * specified minimum capacity. * @param minimumCapacity the minimum number of bytes that you want * the byte buffer to hold */ public void ensureCapacity(int minimumCapacity) { int maxCapacity = value.length; if (minimumCapacity > maxCapacity) { int newCapacity = (maxCapacity + 1) * 2; if (minimumCapacity > newCapacity) { newCapacity = minimumCapacity; } byte newValue[] = new byte[newCapacity]; System.arraycopy(value, 0, newValue, 0, count); value = newValue; } } /** * Sets the length of the byte buffer. If you set a length that is * shorter than the current length, bytes at the end of the buffer * are lost. If you increase the length of the buffer, the values * of the new bytes in the buffer are set to 0. * @param newLength the new length of the buffer * @exception StringIndexOutOfBoundsException You have specified * an invalid length. */ public void setLength(int newLength) { if (newLength < 0) { throw new StringIndexOutOfBoundsException(newLength); } if (count < newLength) { ensureCapacity(newLength); for (; count < newLength; count++) { value[count] = 0; } } count = newLength; } /** * Returns the byte at the specified index. The value of an index * can range from 0 to length - 1. * @param index index of the byte to find * @exception StringIndexOutOfBoundsException You have specified an * invalid index. */ public byte byteAt(int index) { if ((index < 0) || (index >= count)) { throw new StringIndexOutOfBoundsException(index); } return value[index]; } /** * Copies the bytes (from the section of the byte buffer from the index * srcBegin to the index srcEnd - 1 ) * into the specified byte array. The copied * bytes are inserted in the byte array at the index specified by * dstBegin. Both srcBegin and * srcEnd must be valid indexes in the buffer. * @param srcBegin index identifying the start of the section * of the byte buffer to copy * @param srcEnd index identifying the end of the section * of the byte buffer to copy. (Copy all bytes * before the byte identified by this index.) * @param dst the byte array to copy the data to * @param dstBegin index of the byte array identifying the * location to which the byte buffer is copied * @exception StringIndexOutOfBoundsException You specified an invalid index into the buffer. */ public void getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin) { if ((srcBegin < 0) || (srcBegin >= count)) { throw new StringIndexOutOfBoundsException(srcBegin); } if ((srcEnd < 0) || (srcEnd > count)) { throw new StringIndexOutOfBoundsException(srcEnd); } if (srcBegin < srcEnd) { System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin); } } /** * Sets the value of the byte at the specified index. * @param index the index of the byte to set * @param b the new value to set * @exception StringIndexOutOfBoundsException You have specified * an invalid index. */ public void setByteAt(int index, byte b) { if ((index < 0) || (index >= count)) { throw new StringIndexOutOfBoundsException(index); } value[index] = b; } /** * Appends an object to the end of this byte buffer. * @param obj the object to append to the buffer * @return the same ByteBuf object (not a new object) * with the string representation of the specified object appended. */ public ByteBuf append(Object obj) { return append(String.valueOf(obj)); } /** * Appends a string to the end of this byte buffer. * This method appends one byte for each character in the string. * The upper 8 bits of the character are stripped off. *

* * If you want to retain all bits in the character (not just * the lower 8 bits), use append(String.getBytes()) * instead. * @param str the string that you want appended to the buffer * @return the same ByteBuf object (not a new object) * with the specified string appended */ public ByteBuf append(String str) { if (str == null) { str = String.valueOf(str); } int len = str.length(); ensureCapacity(count + len); for (int i=0 ; iByteBuf object (not a new object) * with the specified bytes appended. */ public ByteBuf append(byte str[]) { int len = str.length; ensureCapacity(count + len); System.arraycopy(str, 0, value, count, len); count += len; return this; } /** * Appends a part of an array of bytes to the end of this byte buffer. * @param str the array of bytes to append to this buffer * @param offset the index in the array marking the start of the * section to copy * @param len the number of bytes to add * @return the same ByteBuf object (not a new object) * with the specified section of the byte array appended */ public ByteBuf append(byte str[], int offset, int len) { ensureCapacity(count + len); System.arraycopy(str, offset, value, count, len); count += len; return this; } /** * Appends a byte buffer to the end of this byte buffer. * @param buf the byte buffer to append to this buffer * @return the original ByteBuf object (not a new object) * with bytes from the specified byte buffer appended. */ public ByteBuf append(ByteBuf buf) { append(buf.toBytes(), 0, buf.length()); return this; } /** * Appends a boolean to the end of this byte buffer. * @param b the boolean value that you want appended to this buffer * @return the original ByteBuf object (not a new object) * with bytes from the string representation of the boolean value appended. */ public ByteBuf append(boolean b) { return append(String.valueOf(b)); } /** * Appends a byte to the end of this byte buffer. * @param b the byte to append to this buffer * @return the original ByteBuf object (not a new object) * with the specified byte appended. */ public ByteBuf append(byte b) { ensureCapacity(count + 1); value[count++] = b; return this; } /** * Appends an integer to the end of this byte buffer. * @param i the integer to append to this byte buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified integer appended. */ public ByteBuf append(int i) { return append(String.valueOf(i)); } /** * Appends a long value to the end of this byte buffer. * @param l the long value to append to this buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified long * value appended. */ public ByteBuf append(long l) { return append(String.valueOf(l)); } /** * Appends a float to the end of this byte buffer. * @param f the float value to append to this buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified float * value appended. */ public ByteBuf append(float f) { return append(String.valueOf(f)); } /** * Appends a double to the end of this byte buffer. * @param d the double value to append to this buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified double * value appended. */ public ByteBuf append(double d) { return append(String.valueOf(d)); } /** * Returns the data in the byte buffer to a string. * @return the string representation of the data in the byte buffer. */ public String toString() { return new String(value, 0, count); } /** * Returns the data in the byte buffer as a byte array. * @return the byte array containing data in the byte buffer. */ public byte[] toBytes() { byte[] b = new byte[count]; System.arraycopy(value, 0, b, 0, count); return b; } /** * Invokes the InputStream.read method and appends the * the bytes read to this byte buffer. * @param file the input stream from which to read the bytes * @param max_bytes the maximum number of bytes to read into the * byte buffer * @return the number of bytes read, or -1 if there is no more data * to read. * @exception IOException An I/O error has occurred. */ public int read(InputStream file, int max_bytes) throws IOException { ensureCapacity(count + max_bytes); int i = file.read(value, count, max_bytes); if (i > 0) count += i; return i; } /** * Invokes the RandomAccessFile.read method, appending * the bytes read to this byte buffer. * @param file the RandomAccessFile object from which * to read the bytes * @param max_bytes the maximum number of bytes to read into the * byte buffer * @return the number of bytes read, or -1 if there is no more data * to read. * @exception IOException An I/O error has occurred. */ public int read(RandomAccessFile file, int max_bytes) throws IOException { ensureCapacity(count + max_bytes); int i = file.read(value, count, max_bytes); if (i > 0) count += i; return i; } /** * Writes the contents of the byte buffer to the specified output stream. * @param out the output stream * @exception IOException An I/O error has occurred. */ public void write(OutputStream out) throws IOException { out.write(value, 0, count); } /** * Writes the contents of the byte buffer to the specified * RandomAccessFile object. * @param out the RandomAccessFile object * dexception IOException An I/O error has occurred. */ public void write(RandomAccessFile out) throws IOException { out.write(value, 0, count); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFBaseContent.java0000664001003300100330000000727010602743272030432 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import netscape.ldap.LDAPControl; /** * * An object of this class represents the content of an LDIF record. * This class implements the LDIFContent interface, but * it is abstract and must be extended for the various record types. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord#getContent */ public abstract class LDIFBaseContent implements LDIFContent, java.io.Serializable { static final long serialVersionUID = -8542611537447295949L; /** * Internal variables */ private LDAPControl[] m_controls = null; /** * Blank constructor for deserialization */ public LDIFBaseContent() { } /** * Retrieves the list of controls specified in the content * of the LDIF record, if any * @return an array of LDAPControl objects that * represent any controls specified in the the LDIF record, * or null if none were specified. */ public LDAPControl[] getControls() { return m_controls; } /** * Sets the list of controls * @param controls an array of LDAPControl objects * or null if none are to be specified */ public void setControls( LDAPControl[] controls ) { m_controls = controls; } /** * Get the OIDs of all controls, if any, as a string * * @return the OIDs of all controls, if any, as a string, * or an empty string if there are no controls. */ protected String getControlString() { String s = ""; if ( getControls() != null ) { s += ' '; LDAPControl[] controls = getControls(); int len = controls.length; for( int i = 0; i < len; i++ ) { s += controls[i].toString(); if ( i < (len-1) ) { s += ' '; } } } return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/RDN.java0000664001003300100330000003747510620653755026231 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; /** * Objects of this class represent the components of a distinguished * name (DN). (In some situations, these components are referred to * as relative distinguished names, or RDNs.) For example, the * DN "uid=bjensen, ou=People, o=Airius.com" has three components: * "uid=bjensen", "ou=People", and "o=Airius.com". *

* * Each DN component consists of an attribute type and a value. * For example, in "o=Airius.com", the attribute type is "o" * and the value is "Airius.com". *

* * You can use objects of this class to add components to an * existing DN object. *

* * @version 1.0 * @see netscape.ldap.util.DN */ public final class RDN implements java.io.Serializable { static final long serialVersionUID = 7895454691174650321L; /** * List of RDNs. DN consists of one or more RDNs. */ private String[] m_type = null; private String[] m_value = null; private boolean m_ismultivalued = false; /** * Hash table of case sensitive attributes */ private static Hashtable m_attributehash = new Hashtable(); /** * Constructs a new RDN object from the specified * DN component. * @param rdn DN component */ public RDN( String rdn ) { String neutralRDN = neutralizeEscapes(rdn); if (neutralRDN == null) { return; // malformed RDN } int index = neutralRDN.indexOf( "=" ); int next_plus; // if the rdn doesnt have = or = positions right at the beginning of the rdn if (index <= 0) return; Vector values = new Vector(); Vector types = new Vector(); types.addElement( rdn.substring( 0, index ).trim() ); next_plus = neutralRDN.indexOf( '+', index ); while ( next_plus != -1 ) { m_ismultivalued = true; values.addElement( rdn.substring( index + 1, next_plus).trim() ); index = neutralRDN.indexOf( "=", next_plus + 1 ); if ( index == -1 ) { // malformed RDN? return; } types.addElement( rdn.substring( next_plus + 1, index ).trim() ); next_plus = neutralRDN.indexOf('+', index ); } values.addElement( rdn.substring( index + 1 ).trim() ); m_type = new String[types.size()]; m_value = new String[values.size()]; for( int i = 0; i < types.size(); i++ ) { m_type[i] = (String)types.elementAt( i ); if (!isValidType(m_type[i])) { m_type = m_value = null; return; // malformed } m_value[i] = (String)values.elementAt( i ); if (!isValidValue(m_value[i])) { m_type = m_value = null; return; // malformed } } } /** * Neutralize backslash escapes and quoted sequences for easy parsing. * @return rdn string with disabled escapes or null if malformed rdn */ static String neutralizeEscapes(String rdn) { if (rdn == null) { return null; } StringBuffer sb = new StringBuffer(rdn); boolean quoteOn = false; // first pass, disable backslash escapes for (int i=0; i < sb.length(); i++) { if (sb.charAt(i) =='\\') { sb.setCharAt(i, 'x'); if (i < sb.length()-1) { sb.setCharAt(i+1, 'x'); } else { return null; } } } // second pass, disable quoted sequences for (int i=0; i < sb.length(); i++) { if (sb.charAt(i) == '"') { quoteOn = !quoteOn; continue; } if (quoteOn) { sb.setCharAt(i, 'x'); } } return quoteOn ? null : sb.toString(); } /** * Type names can not contain any DN special characters */ private boolean isValidType(String type) { if (type == null || type.length() < 1) { return false; } for (int i=0; i< type.length(); i++) { for (int j=0; j < DN.ESCAPED_CHAR.length; j++) { if (type.charAt(i) == DN.ESCAPED_CHAR[j]) { return false; } } } return true; } /** * Values can contain only single quote sequence, where quotes are * at the beginning and the end of the sequence */ private boolean isValidValue(String val) { if (val == null || val.length() < 1) { return false; } // count unescaped '"' int cnt=0, i=0; while (i >=0 && i < val.length()) { i = val.indexOf('"', i); if (i >= 0) { if (i==0 || (val.charAt(i-1) != '\\')) { cnt++; } i++; } } if (cnt == 0) { return true; } else if (cnt != 2) { // can have only two of them surrounding the value return false; } else if (val.charAt(0) != '"' || val.charAt(val.length()-1) != '"') { return false; } return true; } /** * Returns the DN component as the first element in an * array of strings. * @param noType specify true to ignore the attribute type and * equals sign (for example, "cn=") and return only the value * @return an array of strings representing the DN component. * @deprecated use toString or getValues instead. */ public String[] explodeRDN(boolean noType) { if (m_type == null) return null; String str[] = new String[1]; if (noType) { str[0] = getValue(); } else { str[0] = toString(); } return str; } /** * Returns the attribute type of the DN component. * @return rdn the attribute type of the DN component. * @deprecated use getTypes() instead. */ public String getType() { if (m_type != null && m_type.length > 0) { return m_type[0]; } return null; } /** * Returns the attribute types of the DN component. * @return rdn the attribute types of the DN component. */ public String[] getTypes() { return m_type; } /** * Returns the value of the DN component. * @return rdn the value of the DN component. * @deprecated use getValues() instead. */ public String getValue() { if (m_value != null && m_value.length > 0) { return m_value[0]; } return null; } /** * Returns the values of the DN component. * @return rdn the values of the DN component. */ public String[] getValues() { return m_value; } /** * Returns true if the RDN is multi-valued. * @return true if the RDN is multi-valued. */ public boolean isMultivalued() { return m_ismultivalued; } /** * Returns the string representation of the DN component. * @return the string representation of the DN component. */ public String toString() { StringBuffer buf = new StringBuffer(); for ( int i = 0; m_type != null && i < m_type.length; i++ ) { if ( i != 0) { buf.append(" + "); } buf.append( m_type[i] + "=" + m_value[i]); } return buf.toString(); } /** * Determines if the specified string is a distinguished name component. * @param rdn the string to check * @return true if the string is a distinguished name component. */ public static boolean isRDN(String rdn) { RDN newrdn = new RDN(rdn); return ((newrdn.getTypes() != null) && (newrdn.getValues() != null)); } /** * Determines if the current DN component is equal to the specified * DN component. Uses an internal table of ces (case exact string) * attributes to determine how the attributes should be compared. * @param rdn the DN component to compare against the * current DN component. * @return true if the two DN components are equal. * @see netscape.ldap.util.RDN#registerAttributeSyntax * @see netscape.ldap.util.RDN#getAttributeSyntax */ public boolean equals(RDN rdn) { String[] this_types = (String[])getTypes().clone(); String[] this_values = (String[])getValues().clone(); String[] rdn_types = (String[])rdn.getTypes().clone(); String[] rdn_values = (String[])rdn.getValues().clone(); if ( this_types.length != rdn_types.length ) { return false; } sortTypesAndValues( this_types, this_values ); sortTypesAndValues( rdn_types, rdn_values ); for (int i = 0; i < this_types.length; i++ ) { if ( !this_types[i].equalsIgnoreCase( rdn_types[i] ) ) { return false; } if ( CES_SYNTAX.equals( getAttributeSyntax( this_types[i] ) ) ) { if ( !this_values[i].equals( rdn_values[i] ) ) { return false; } } else { if ( !this_values[i].equalsIgnoreCase( rdn_values[i] ) ) { return false; } } } return true; } /* sorts the rdn components by attribute to make comparison easier */ void sortTypesAndValues( String[] types, String[] values ) { boolean no_changes; do { no_changes = true; for ( int i = 0; i < types.length - 1; i++ ) { if ( types[i].toLowerCase().compareTo( types[i + 1].toLowerCase() ) > 0 ) { String tmp_type = types[i]; String tmp_value = values[i]; types[i] = types[i + 1]; values[i] = values[i + 1]; types[i + 1] = tmp_type; values[i + 1] = tmp_value; no_changes = false; } } } while ( no_changes = false ); } /** * Registers the the given attribute for the given syntax in an * internal table. This table is used for attribute comparison in the * equals() method. * @param attr the attribute to register. * @param oid the syntax to register with the attribute. * @see netscape.ldap.util.RDN#equals * @see netscape.ldap.util.RDN#unregisterAttributeSyntax * @see netscape.ldap.util.RDN#getAttributeSyntax * @see netscape.ldap.util.RDN#getAttributesForSyntax */ public static void registerAttributeSyntax( String attr, String oid ) { m_attributehash.put( attr.toLowerCase(), oid ); } /** * Removes the the given attribute from the attribute syntax table. * @param attr the attribute to remove. * @see netscape.ldap.util.RDN#registerAttributeSyntax * @see netscape.ldap.util.RDN#getAttributeSyntax * @see netscape.ldap.util.RDN#getAttributesForSyntax */ public static void unregisterAttributeSyntax( String attr ) { m_attributehash.remove( attr.toLowerCase() ); } /** * Returns the syntax for the attribute if the given attribute is registered * in the internal attribute table. * @param attr the attribute to lookup in the table. * @return the syntax of the attribute if found, null otherwise. * @see netscape.ldap.util.RDN#unregisterAttributeSyntax * @see netscape.ldap.util.RDN#registerAttributeSyntax * @see netscape.ldap.util.RDN#getAttributesForSyntax */ public static String getAttributeSyntax( String attr ) { return (String)m_attributehash.get( attr.toLowerCase() ); } /** * Returns all attributes registered for the given syntax as a * String Array. * @param oid the syntax to look up in the table. * @return all attributes for the given syntax as a String[] * @see netscape.ldap.util.RDN#unregisterAttributeSyntax * @see netscape.ldap.util.RDN#registerAttributeSyntax * @see netscape.ldap.util.RDN#getAttributeSyntax */ public static String[] getAttributesForSyntax( String oid ) { Enumeration itr = m_attributehash.keys(); Vector key_v = new Vector(); String tmp_str = null; while ( itr.hasMoreElements() ) { tmp_str = (String)itr.nextElement(); if ( oid.equals( (String)m_attributehash.get( tmp_str ) ) ) { key_v.addElement( tmp_str ); } } String[] str = new String[key_v.size()]; for ( int i = 0; i < str.length; i++ ) { str[i] = new String( (String)key_v.elementAt( i ) ); } return str; } public static final String[] _cesAttributes = { "adminurl", "altserver", "automountinformation", "bootfile", "bootparameter", "cirbindcredentials", "generation", "homedirectory", "internationalisdnnumber", "labeleduri", "membercertificatedescription", "membernisnetgroup", "memberuid", "memberurl", "nismapentry", "nisnetgrouptriple", "nsaddressbooksyncurl", "presentationaddress", "ref", "replicaentryfilter", "searchguide", "subtreeaci", "vlvfilter", "vlvname", "x121address" }; public static final String CES_SYNTAX = "1.3.6.1.4.1.1466.115.121.1.26"; static { /* static initializer to fill the ces attribute hash * this list was generated from the slapd.at.conf that * ships with Netscape Directory Server 4.1 */ for ( int i = 0; i < _cesAttributes.length; i++ ) { registerAttributeSyntax( _cesAttributes[i], CES_SYNTAX ); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDAPWriter.java0000664001003300100330000001021110602743272027470 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import netscape.ldap.*; import java.io.*; /** * Abstract class for outputting LDAP entries to a stream. * * @version 1.0 */ public abstract class LDAPWriter implements Serializable { // static final long serialVersionUID = -2710382547996750924L; protected PrintWriter m_pw; private static MimeBase64Encoder m_encoder = new MimeBase64Encoder(); /** * Constructs an LDAPWriter object to output entries * to a stream. * * @param pw output stream */ public LDAPWriter( PrintWriter pw ) { m_pw = pw; } /** * The main method of LDAPWriter. It calls printEntryIntro, * printAttribute, and printEntryEnd of derived classes. * * @param entry an LDAPEntry to be formatted to the output * stream */ public void printEntry( LDAPEntry entry ) throws IOException { printEntryStart( entry.getDN() ); /* Get the attributes of the entry */ LDAPAttributeSet attrs = entry.getAttributeSet(); Enumeration enumAttrs = attrs.getAttributes(); /* Loop on attributes */ while ( enumAttrs.hasMoreElements() ) { LDAPAttribute anAttr = (LDAPAttribute)enumAttrs.nextElement(); printAttribute( anAttr ); } printEntryEnd( entry.getDN() ); } /** * Default schema writer - assumes an ordinary entry * * @param entry an LDAPEntry containing schema to be formatted * to the output stream */ public void printSchema( LDAPEntry entry ) throws IOException { printEntry( entry ); } /** * Print an attribute of an entry * * @param attr the attribute to format to the output stream */ protected abstract void printAttribute( LDAPAttribute attr ); /** * Print prologue to entry * * @param dn the DN of the entry */ protected abstract void printEntryStart( String dn ); /** * Print epilogue to entry * * @param dn the DN of the entry */ protected abstract void printEntryEnd( String dn ); protected String getPrintableValue( byte[] b ) { String s = ""; ByteBuf inBuf = new ByteBuf( b, 0, b.length ); ByteBuf encodedBuf = new ByteBuf(); // Translate to base 64 m_encoder.translate( inBuf, encodedBuf ); int nBytes = encodedBuf.length(); if ( nBytes > 0 ) { s = new String(encodedBuf.toBytes(), 0, nBytes); } return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/MimeBase64Decoder.java0000664001003300100330000001763310602743272030714 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; /** Implements a plaintext -> Base64 encoder. */ public final class MimeBase64Decoder extends MimeEncoder { static final long serialVersionUID = 797397585345375903L; private byte token[] = new byte[4]; // input buffer private byte bytes[] = new byte[3]; // output buffer private int token_length = 0; // input buffer length static private final byte NUL = 127; // must be out of range 0-64 static private final byte EOF = 126; // must be out of range 0-64 static private final byte map[] = { NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 000-007 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 010-017 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 020-027 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 030-037 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 040-047 !"#$%&' NUL, NUL, NUL, 62, NUL, NUL, NUL, 63, // 050-057 ()*+,-./ 52, 53, 54, 55, 56, 57, 58, 59, // 060-067 01234567 60, 61, NUL, NUL, NUL, EOF, NUL, NUL, // 070-077 89:;<=>? NUL, 0, 1, 2, 3, 4, 5, 6, // 100-107 @ABCDEFG 7, 8, 9, 10, 11, 12, 13, 14, // 110-117 HIJKLMNO 15, 16, 17, 18, 19, 20, 21, 22, // 120-127 PQRSTUVW 23, 24, 25, NUL, NUL, NUL, NUL, NUL, // 130-137 XYZ[\]^_ NUL, 26, 27, 28, 29, 30, 31, 32, // 140-147 `abcdefg 33, 34, 35, 36, 37, 38, 39, 40, // 150-157 hijklmno 41, 42, 43, 44, 45, 46, 47, 48, // 160-167 pqrstuvw 49, 50, 51, NUL, NUL, NUL, NUL, NUL, // 170-177 xyz{|}~ NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 200-207 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 210-217 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 220-227 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 230-237 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 240-247 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 250-257 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 260-267 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 270-277 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 300-307 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 310-317 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 320-327 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 330-337 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 340-347 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 350-357 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 360-367 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 370-377 }; // Fast routine that assumes full 4-char tokens with no '=' in them. // private final void decode_token(ByteBuf out) { int num = ((map[token[0]] << 18) | (map[token[1]] << 12) | (map[token[2]] << 6) | (map[token[3]])); bytes[0] = (byte) (0xFF & (num >> 16)); bytes[1] = (byte) (0xFF & (num >> 8)); bytes[2] = (byte) (0xFF & num); out.append(bytes); } // Hairier routine that deals with the final token, which can have fewer // than four characters, and that might be padded with '='. // private final void decode_final_token(ByteBuf out) { byte b0 = map[token[0]]; byte b1 = map[token[1]]; byte b2 = map[token[2]]; byte b3 = map[token[3]]; int eq_count = 0; if (b0 == EOF) { b0 = 0; eq_count++; } if (b1 == EOF) { b1 = 0; eq_count++; } if (b2 == EOF) { b2 = 0; eq_count++; } if (b3 == EOF) { b3 = 0; eq_count++; } int num = ((b0 << 18) | (b1 << 12) | (b2 << 6) | (b3)); // eq_count will be 0, 1, or 2. // No "=" padding means 4 bytes mapped to 3, the normal case, // not handled in this routine. // "xxx=" means 3 bytes mapped to 2. // "xx==" means 2 bytes mapped to 1. // "x===" can't happen, because "x" would then be encoding // only 6 bits, not 8, the minimum possible. out.append((byte) (num >> 16)); // byte 1, count = 0 or 1 or 2 if (eq_count <= 1) { out.append((byte) ((num >> 8) & 0xFF)); // byte 2, count = 0 or 1 if (eq_count == 0) { out.append((byte) (num & 0xFF)); // byte 3, count = 0 } } } /** Given a sequence of input bytes using the Base64 encoding, produces a sequence of unencoded output bytes. Note that some (small) amount of buffering may be necessary, if the input byte stream didn't fall on an appropriate boundary. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ public final void translate(ByteBuf in, ByteBuf out) { if (token == null) // already saw eof marker? return; byte inb[] = in.toBytes(); int in_length = in.length(); for (int i = 0; i < in_length; i++) { byte b = inb[i]; int x=(b&0xff); byte t = map[x]; if (t != NUL) token[token_length++] = b; if (t == EOF) { eof(out); return; } else if (token_length == 4) { decode_token(out); token_length = 0; } } } /** Tell the Base64 decoder that no more input data will be forthcoming. This may result in output, as a result of flushing the internal buffer. This object must not be used again after calling eof(). If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ public final void eof(ByteBuf out) { if (token != null && token_length != 0) { while (token_length < 4) token[token_length++] = (byte)'='; decode_final_token(out); } token_length = 0; token = new byte[4]; bytes = new byte[3]; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/MimeEncoder.java0000664001003300100330000000567610602743272027765 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; /** This abstract class is the parent of those classes which implement MIME encoding and decoding: base64. @see netscape.ldap.util.MimeBase64Encoder @see netscape.ldap.util.MimeBase64Decoder */ public abstract class MimeEncoder implements java.io.Serializable { static final long serialVersionUID = 5179250095383961512L; /** Given a sequence of input bytes, produces a sequence of output bytes. Note that some (small) amount of buffering may be necessary, if the input byte stream didn't fall on an appropriate boundary. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ abstract public void translate(ByteBuf in, ByteBuf out); /** Tell the decoder that no more input data will be forthcoming. This may result in output, as a result of flushing the internal buffer. This object must not be used again after calling eof(). If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ abstract public void eof(ByteBuf out); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/util/LDIFModDNContent.java0000664001003300100330000001377610602743272030531 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; /** * An object of this class represents the content of an LDIF record that * specifies changes to an RDN or the DN of an entry. This class * implements the LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFModDNContent. *

* * @version 1.0 * @see netscape.ldap.util.LDIFRecord#getContent */ public class LDIFModDNContent extends LDIFBaseContent { /** * Internal variables */ private String m_newParent = null; private String m_rdn = null; private boolean m_deleteOldRDN = false; static final long serialVersionUID = 1352504898614557791L; /** * Constructs an empty LDIFModDNContent object. * To specify the modifications to be made to the entry, use * the setRDN, setNewParent, * and setDeleteOldRDN methods. * @see netscape.ldap.util.LDIFModDNContent#setRDN * @see netscape.ldap.util.LDIFModDNContent#setNewParent * @see netscape.ldap.util.LDIFModDNContent#setDeleteOldRDN */ public LDIFModDNContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.MODDN_CONTENT). * @see netscape.ldap.util.LDIFRecord#getContent */ public int getType() { return MODDN_CONTENT; } /** * Sets the new RDN that should be assigned to the entry. * @param rdn the new RDN * @see netscape.ldap.util.LDIFModDNContent#getRDN */ public void setRDN(String rdn) { m_rdn = rdn; } /** * Returns the new RDN specified in the content of the LDIF record. * @return the new RDN. * @see netscape.ldap.util.LDIFModDNContent#setRDN */ public String getRDN() { return m_rdn; } /** * Sets the new parent DN that should be assigned to the entry. * @param parent the new parent DN for the entry * @see netscape.ldap.util.LDIFModDNContent#getNewParent */ public void setNewParent(String parent) { m_newParent = parent; } /** * Returns the entry's new parent DN, if specified in the content * of the LDIF record. * @return the new parent of the entry. * @see netscape.ldap.util.LDIFModDNContent#setNewParent */ public String getNewParent() { return m_newParent; } /** * Sets whether or not the old RDN should be removed as an * attribute in the entry. * @param bool if true, remove the attribute representing * the RDN. If false, leave the attribute in the entry. * @see netscape.ldap.util.LDIFModDNContent#getDeleteOldRDN */ public void setDeleteOldRDN(boolean bool) { m_deleteOldRDN = bool; } /** * Determines if the content of the LDIF record specifies that * the old RDN should be removed as an attribute in the entry. * @return true if the change specifies that the * the attribute representing the RDN should be removed, * false if the change specifies that the attribute * should be left in the entry. * @see netscape.ldap.util.LDIFModDNContent#setDeleteOldRDN */ public boolean getDeleteOldRDN() { return m_deleteOldRDN; } /** * Returns string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; if (m_newParent == null) s = s + "new parent() "; else s = s + "new parent( "+m_newParent+" ), "; if (m_deleteOldRDN) s = s + "deleteOldRDN( true ), "; else s = s + "deleteOldRDN( false ), "; if (m_rdn == null) s = s + "new rdn()"; else s = s + "new rdn( "+m_rdn+" )"; if ( getControls() != null ) { s += getControlString(); } return "LDIFModDNContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPMatchingRuleSchema.java0000664001003300100330000003737710602743270030766 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Ingo Schaefer (ingo.schaefer@fh-brandenburg.de) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * The definition of a matching rule in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of a matching rule. * According to the RFC, the description of a matching rule can * include the following information: *

* *

    *
  • an OID identifying the matching rule *
  • a name identifying the matching rule *
  • a description of the matching rule *
  • the syntax of the matching rule *
*

* * The LDAPMatchingRuleSchema class also specifies * the matching rule "use description", which describes the * attributes which can be used with the matching rule. *

* * When you construct an LDAPMatchingRuleSchema object, you can * specify these types of information as arguments to the constructor or * in the MatchingRuleDescription and MatchingRuleUseDescription formats * specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * You can get the name, OID, and description of this matching rule * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this matching rule definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines MatchingRuleDescription and MatchingRuleUseDescription * as follows: *

*

 *    MatchingRuleDescription = "(" whsp
 *        numericoid whsp  ; MatchingRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        "SYNTAX" numericoid
 *    whsp ")"
 *
 * Values of the matchingRuleUse list the attributes which are suitable
 * for use with an extensible matching rule.
 *
 *    MatchingRuleUseDescription = "(" whsp
 *        numericoid whsp  ; MatchingRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" ]
 *       "APPLIES" oids    ; AttributeType identifiers
 *    whsp ")"
 * 
*

* LDAPMatchingRuleSchema abstracts away from the two types and * manages their relationships transparently. * * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPMatchingRuleSchema extends LDAPAttributeSchema { static final long serialVersionUID = 6466155218986944131L; /** * Constructs a matching rule definition, using the specified * information. * @param name name of the matching rule * @param oid object identifier (OID) of the matching rule * in dotted-decimal format (for example, "1.2.3.4") * @param description description of the matching rule * @param attributes array of the OIDs of the attributes for which * the matching rule is applicable * @param syntax syntax of this matching rule. The value of this * argument can be one of the following: *

    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
*/ public LDAPMatchingRuleSchema( String name, String oid, String description, String[] attributes, int syntax ) { this( name, oid, description, attributes, cisString ); syntaxElement.syntax = syntax; String syntaxType = syntaxElement.internalSyntaxToString( syntax ); if ( syntaxType != null ) { syntaxElement.syntaxString = syntaxType; } setQualifier( SYNTAX, syntaxElement.syntaxString ); } /** * Constructs a matching rule definition, using the specified * information. * @param name name of the matching rule. * @param oid object identifier (OID) of the matching rule * in dotted-decimal format (for example, "1.2.3.4"). * @param description description of the matching rule. * @param attributes array of the OIDs of the attributes for which * the matching rule is applicable. * @param syntaxString syntax of this matching rule in dotted-decimal * format */ public LDAPMatchingRuleSchema( String name, String oid, String description, String[] attributes, String syntaxString ) { this( name, oid, description, attributes, syntaxString, null ); } /** * Constructs a matching rule definition, using the specified * information. * @param name name of the matching rule. * @param oid object identifier (OID) of the matching rule * in dotted-decimal format (for example, "1.2.3.4"). * @param description description of the matching rule. * @param attributes array of the OIDs of the attributes for which * the matching rule is applicable. * @param syntaxString syntax of this matching rule in dotted-decimal * format * @param aliases names which are to be considered aliases for this * matching rule; null if there are no aliases */ public LDAPMatchingRuleSchema( String name, String oid, String description, String[] attributes, String syntaxString, String[] aliases ) { if ( (oid == null) || (oid.trim().length() < 1) ) { throw new IllegalArgumentException( "OID required" ); } this.name = name; this.oid = oid; this.description = description; attrName = "matchingrules"; syntaxElement.syntax = syntaxElement.syntaxCheck( syntaxString ); syntaxElement.syntaxString = syntaxString; setQualifier( SYNTAX, syntaxElement.syntaxString ); this.attributes = new String[attributes.length]; for( int i = 0; i < attributes.length; i++ ) { this.attributes[i] = attributes[i]; } if ( (aliases != null) && (aliases.length > 0) ) { this.aliases = aliases; } } /** * Constructs a matching rule definition based on descriptions in * the MatchingRuleDescription format and MatchingRuleUseDescription * format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. For example, when * you search an LDAP server for its schema, the server returns an entry * with attributes that include "matchingrule" and "matchingruleuse". * The values of these attributes are matching rule descriptions * in this format. *

* * @param raw definition of the matching rule in the * MatchingRuleDescription format * @param use definition of the use of the matching rule in the * MatchingRuleUseDescription format */ public LDAPMatchingRuleSchema( String raw, String use ) { attrName = "matchingrules"; if ( raw != null ) { parseValue( raw ); } if ( use != null ) { parseValue( use ); } Object p = properties.get( "APPLIES" ); if ( p instanceof Vector ) { Vector v = (Vector) p; if ( v != null ) { attributes = new String[v.size()]; v.copyInto( attributes ); v.removeAllElements(); } } else if ( p instanceof String ) { attributes = new String[1]; attributes[0] = (String) p; } String val = (String)properties.get( "SYNTAX" ); if ( val != null ) { syntaxElement.syntaxString = val; syntaxElement.syntax = syntaxElement.syntaxCheck( val ); } } /** * Gets the list of the OIDs of the attribute types which can be used * with the matching rule. * @return array of the OIDs of the attribute types which can be used * with the matching rule. */ public String[] getAttributes() { return attributes; } /** * Prepare a value in RFC 2252 format for submitting to a server * * @param quotingBug true if SUP and SYNTAX values are to * be quoted; that is to satisfy bugs in certain LDAP servers. * @return a String ready to be submitted to an LDAP server */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); if ( syntaxElement.syntaxString != null ) { s += "SYNTAX "; if ( quotingBug ) { s += '\''; } s += syntaxElement.syntaxString; if ( quotingBug ) { s += '\''; } s += ' '; } String val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the matching rule definition in the string representation * of the MatchingRuleDescription data type defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of these formats). * This is the format that LDAP servers and clients use to exchange * schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "matchingrules" and "matchingruleuse". The * values of these attributes are matching rule description and * matching rule use description in these formats.) *

* * @return a string in a format that can be used as the value of * the matchingrule attribute (which describes * a matching rule in the schema) of a subschema object */ public String getValue() { return getValue( false ); } /** * Gets the matching rule use definition in the string representation * of the MatchingRuleUseDescription data type defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of these formats). * This is the format that LDAP servers and clients use to exchange * schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "matchingrules" and "matchingruleuse". The * values of these attributes are matching rule description and * matching rule use description in these formats.) *

* * @return a string in a format that can be used as the value of * the matchingruleuse attribute (which describes the use of * a matching rule in the schema) of a subschema object */ public String getUseValue() { String s = getValuePrefix(); if ( (attributes != null) && (attributes.length > 0) ) { s += "APPLIES ( "; for( int i = 0; i < attributes.length; i++ ) { if ( i > 0 ) s += " $ "; s += attributes[i]; } s += " ) "; } s += ')'; return s; } /** * Adds, removes or modifies the definition from a Directory. * @param ld an open connection to a Directory Server. Typically the * connection must have been authenticated to add a definition. * @param op type of modification to make * @param name name of attribute in the schema entry to modify. This * is ignored here. * @param dn the entry at which to update the schema * @exception LDAPException if the definition can't be added/removed */ protected void update( LDAPConnection ld, int op, String name, String dn ) throws LDAPException { LDAPAttribute[] attrs = new LDAPAttribute[2]; attrs[0] = new LDAPAttribute( "matchingRules", getValue() ); /* Must update the matchingRuleUse value as well */ attrs[1] = new LDAPAttribute( "matchingRuleUse", getUseValue() ); update( ld, op, attrs, dn ); } /** * Gets the definition of the matching rule in a user friendly format. * This is the format that the matching rule definition uses when * you print the matching rule or the schema. * @return definition of the matching rule in a user friendly format. */ public String toString() { String s = "Name: " + name + "; OID: " + oid + "; Type: "; s += syntaxElement.syntaxToString(); s += "; Description: " + description; if ( attributes != null ) { s += "; Applies to: "; for( int i = 0; i < attributes.length; i++ ) { if ( i > 0 ) s += ", "; s += attributes[i]; } } s += getQualifierString( EXPLICIT ); s += getAliasString(); return s; } // Qualifiers tracked explicitly static final String[] EXPLICIT = { OBSOLETE, SYNTAX }; private String[] attributes = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPReferralException.java0000664001003300100330000001474410602743270030675 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import java.io.*; /** * Represents the situation in which the LDAP server refers the client to * another LDAP server. This exception constructs a list of referral URLs from * the LDAP error message returned by the server. You can get this list by * using the getURLs method. * * @version 1.0 * @see netscape.ldap.LDAPException */ public class LDAPReferralException extends LDAPException { static final long serialVersionUID = 1771536577344289897L; private String m_referrals[] = null; /* modified for LDAPv3 */ /** * Constructs a default exception with no specific error information. */ public LDAPReferralException() { } /** * Constructs a default exception with a specified string as * additional information. This form is used for lower-level errors. * @param message the additional error information */ public LDAPReferralException( String message ) { super( message ); } /** * Constructs a default exception with a specified string as * additional information. This form is used for higher-level LDAP * operational errors. * @param message the additional error information * @param resultCode result code * @param serverErrorMessage error message */ public LDAPReferralException( String message, int resultCode, String serverErrorMessage ) { super(message, resultCode, serverErrorMessage); } /** * Constructs an exception with a list of LDAP URLs to other LDAP servers. * This list of referrals points the client to LDAP servers that may * contain the requested entries. * @param message the additional error information * @param resultCode result code * @param referrals array of LDAP URLs identifying other LDAP servers that * may contain the requested entries */ public LDAPReferralException( String message, int resultCode, String referrals[] ) { super(message, resultCode, null); m_referrals = referrals; } /** * Gets the list of referrals (LDAP URLs to other servers) returned by the LDAP server. * You can use this list to find the LDAP server that can fulfill your request. * * If you have set up your search constraints (or the LDAPConnection object) * to follow referrals automatically, any operation that results in a referral will use * this list to create new connections to the LDAP servers in this list. * * @return list of LDAP URLs to other LDAP servers. */ public LDAPUrl[] getURLs() { if (getLDAPErrorMessage() == null) { return constructsURL(m_referrals); } else { return constructsURL(extractReferrals(getLDAPErrorMessage())); } } private LDAPUrl[] constructsURL(String referrals[]) { if (referrals == null) { return null; } LDAPUrl u[] = new LDAPUrl[referrals.length]; if (u == null) { return null; } for (int i = 0; i < referrals.length; i++) { try { u[i] = new LDAPUrl(referrals[i]); } catch (Exception e) { return null; } } return u; } /** * Extract referral string from the error message. The * error string is based on "Referrals Within the * LDAPv2 Protocol". * @param error string */ private String[] extractReferrals(String error) { if (error == null) return null; StringTokenizer st = new StringTokenizer(error, "\n"); Vector v = new Vector(); boolean referrals = false; while (st.hasMoreTokens()) { String token = st.nextToken(); if (referrals) { v.addElement(token); } else { if (token.startsWith("Referral:")) referrals = true; } } if (v.size() == 0) return null; String res[] = new String[v.size()]; for (int i = 0; i < v.size(); i++) { res[i] = (String)v.elementAt(i); } return res; } /** * Gets the string representation of the referral exception, * which includes the result code, the message sent back * from the LDAP server and the list of referrals. * * @return string representation of exception. * @see netscape.ldap.LDAPException#errorCodeToString(int) */ public String toString() { String str = super.toString(); for (int i=0; i < m_referrals.length; i++) { str += "\n" + m_referrals[i]; } return str; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/0000775001003300100330000000000010667357326025232 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAnd.java0000664001003300100330000000452510602743270030374 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter And. *

 *   and [0] SET OF Filter
 * 
* * @version 1.0 */ public class JDAPFilterAnd extends JDAPFilterSet { /** * Constructs the filter. */ public JDAPFilterAnd() { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|0); } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterAnd {" + super.getParamString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSet.java0000664001003300100330000000651610602743270030427 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the base class of filter "and" and filter "or". * * @version 1.0 */ public abstract class JDAPFilterSet extends JDAPFilter { /** * Internal variables */ private int m_tag; private Vector m_set = new Vector(); /** * Constructs the filter set. * @param tag tag */ public JDAPFilterSet(int tag) { super(); m_tag = tag; } /** * Adds filter into the filter set. * @param filter adding filter */ public void addElement(JDAPFilter filter) { m_set.addElement(filter); } /** * Gets the ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { try { BERSet filters = new BERSet(); for (int i = 0; i < m_set.size(); i++) { JDAPFilter f = (JDAPFilter)m_set.elementAt(i); filters.addElement(f.getBERElement()); } BERTag element = new BERTag(m_tag, filters, true); return element; } catch (IOException e) { return null; } } /** * Gets the filter set parameters. * @return set parameters */ public String getParamString() { String s = ""; for (int i = 0; i < m_set.size(); i++) { if (i != 0) s = s + ","; JDAPFilter f = (JDAPFilter)m_set.elementAt(i); s = s + f.toString(); } return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterLessOrEqual.java0000664001003300100330000000474310602743270032073 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the less or equal filter. *
 * lessOrEqual [6] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterLessOrEqual extends JDAPFilterAVA { /** * Constructs less or equal filter. * @param ava attribute value assertion */ public JDAPFilterLessOrEqual(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|6, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterLessOrEqual {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterApproxMatch.java0000664001003300100330000000476010602743270032121 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the approximate match filter. *
 * approxMatch [8] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterApproxMatch extends JDAPFilterAVA { /** * Constructs approximate match filter. * @param ava attribute value assertion */ public JDAPFilterApproxMatch(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|8, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterApproximateMatch {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterPresent.java0000664001003300100330000000536310620653754031322 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter present. * See RFC 1777. *
 *   present [7] AttributeType
 * 
* * @version 1.0 */ public class JDAPFilterPresent extends JDAPFilter { /** * Internal variables */ private String m_type = null; /** * Constructs the filter. * @param type attribute type */ public JDAPFilterPresent(String type) { super(); m_type = type; } /** * Gets ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BEROctetString s = new BEROctetString(m_type); BERTag element = new BERTag(BERTag.CONTEXT|7, s, true); return element; } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterPresent {" + m_type + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterEqualityMatch.java0000664001003300100330000000477510620653754032462 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the equality match filter. * See RFC 1777. *
 * equalityMatch [3] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterEqualityMatch extends JDAPFilterAVA { /** * Constructs less or equal filter. * @param ava attribute value assertion */ public JDAPFilterEqualityMatch(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|3, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterEqualityMatch {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSubString.java0000664001003300100330000001236710620653754031624 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter substring. * See RFC 1777. *
 * [4] SEQUENCE {
 *   type AttributeType,
 *   SEQUENCE OF CHOICE {
 *     initial [0] LDAPString,
 *     any [1] LDAPString,
 *     final [2] LDAPString
 *   }
 *     }
 * 
* * @version 1.0 */ public class JDAPFilterSubString extends JDAPFilter { /** * Internal variables */ private String m_type = null; private Vector m_initial = new Vector(); private Vector m_any = new Vector(); private Vector m_final = new Vector(); /** * Constructs the filter. * @param type attribute type */ public JDAPFilterSubString(String type) { super(); m_type = type; } /** * Adds initial substring. * @param s initial substring */ public void addInitial(String s) { m_initial.addElement(s); } /** * Adds any substring. * @param s any substring */ public void addAny(String s) { m_any.addElement(s); } /** * Adds final substring. * @param s final substring */ public void addFinal(String s) { m_final.addElement(s); } /** * Gets ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_type)); BERSequence str_seq = new BERSequence(); for (int i = 0; i < m_initial.size(); i++) { String val = (String)m_initial.elementAt(i); if (val == null) continue; BERTag str = new BERTag(BERTag.CONTEXT|0, JDAPFilterOpers.getOctetString(val), true); str_seq.addElement(str); } for (int i = 0; i < m_any.size(); i++) { String val = (String)m_any.elementAt(i); if (val == null) continue; BERTag str = new BERTag(BERTag.CONTEXT|1, JDAPFilterOpers.getOctetString(val), true); str_seq.addElement(str); } for (int i = 0; i < m_final.size(); i++) { String val = (String)m_final.elementAt(i); if (val == null) continue; BERTag str = new BERTag(BERTag.CONTEXT|2, JDAPFilterOpers.getOctetString(val), true); str_seq.addElement(str); } seq.addElement(str_seq); BERTag element = new BERTag(BERTag.CONSTRUCTED|BERTag.CONTEXT|4, seq, true); return element; } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { String initial = ""; for (int i = 0; i < m_initial.size(); i++) { if (i != 0) initial = initial + ","; initial = initial + (String)m_initial.elementAt(i); } String any = ""; for (int i = 0; i < m_any.size(); i++) { if (i != 0) any = any + ","; any = any + (String)m_any.elementAt(i); } String s_final = ""; for (int i = 0; i < m_final.size(); i++) { if (i != 0) s_final = s_final + ","; s_final = s_final + (String)m_final.elementAt(i); } return "JDAPFilterSubString {type=" + m_type + ", initial=" + initial + ", any=" + any + ", final=" + s_final + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAVA.java0000664001003300100330000000534110602743270030276 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the attribute value assertion filter. * * @version 1.0 */ public abstract class JDAPFilterAVA extends JDAPFilter { /** * Internal variables */ private int m_tag; private JDAPAVA m_ava = null; /** * Constructs base filter for other attribute value assertion. * @param tag attribute tag * @param ava attribute value assertion */ public JDAPFilterAVA(int tag, JDAPAVA ava) { m_tag = tag; m_ava = ava; } /** * Get attribute value assertion. * @return value assertion */ public JDAPAVA getAVA() { return m_ava; } /** * Gets the ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BERTag element = new BERTag(m_tag, m_ava.getBERElement(), true); return element; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterGreaterOrEqual.java0000664001003300100330000000500610620653754032556 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the greater or equal filter. * See RFC 1777. *
 * greaterOrEqual [5] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterGreaterOrEqual extends JDAPFilterAVA { /** * Constructs greater or equal filter. * @param ava attribute value assertion */ public JDAPFilterGreaterOrEqual(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|5, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterGreaterOrEqual {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPBERTagDecoder.java0000664001003300100330000001374610620653754031072 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class is to help BER libraries to make decision * on how to decode an implicit object. */ public class JDAPBERTagDecoder extends BERTagDecoder { /** * Gets an application specific ber element from the stream. * @param decoder ber decoder to use * @param tag ber tag to get * @param stream input stream * @param bytes_read number of bytes read * @param implicit to indicate a tag implicit or not */ public BERElement getElement(BERTagDecoder decoder, int tag, InputStream stream, int[] bytes_read, boolean[] implicit) throws IOException { BERElement element = null; switch (tag) { case 0x60: /* [APPLICATION 0] For Bind Request */ case 0x61: /* [APPLICATION 1] Bind Response */ case 0x63: /* [APPLICATION 3] Search Request * If doing search without bind first, * x500.arc.nasa.gov returns tag [APPLICATION 3] * in Search Response. Gee. */ case 0x64: /* [APPLICATION 4] Search Response */ case 0x65: /* [APPLICATION 5] Search Result */ case 0x67: /* [APPLICATION 7] Modify Response */ case 0x69: /* [APPLICATION 9] Add Response */ case 0x6a: /* [APPLICATION 10] Del Request */ case 0x6b: /* [APPLICATION 11] Del Response */ case 0x6d: /* [APPLICATION 13] ModifyRDN Response */ case 0x6f: /* [APPLICATION 15] Compare Response */ case 0x78: /* [APPLICATION 23] Extended Response */ case 0x73: /* [APPLICATION 19] SearchResultReference */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; case 0x80: /* [APPLICATION 16] 64+16 */ element = new BERInteger(stream, bytes_read); implicit[0] = true; break; /* 16/02/97 MS specific */ case 0x85: /* Context Specific [5]: * (a) Handle Microsoft v3 referral bugs! (Response) * (b) Handle Microsoft v3 supportedVersion in Bind * response */ element = new BERInteger(stream, bytes_read); implicit[0] = true; break; case 0x87: /* Context Specific [7]: * Handle Microsoft Filter "present" in * search request. */ element = new BEROctetString(decoder, stream, bytes_read); implicit[0] = true; break; case 0x8a: /* Context Specific [10]: * Handle extended response */ element = new BEROctetString(decoder, stream, bytes_read); implicit[0] = true; break; case 0x8b: /* Context Specific [11]: * Handle extended response */ element = new BEROctetString(decoder, stream, bytes_read); implicit[0] = true; break; case 0xa3: /* Context Specific [3]: * Handle Microsoft v3 sasl bind request */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; case 0xa7: /* Context Specific [7]: * Handle Microsoft v3 serverCred in * bind response. MS encodes it as SEQUENCE OF * while it should be CHOICE OF. */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; case 0xa0: /* Context Specific [0]: * v3 Server Control. * SEQUENCE of SEQUENCE of {OID [critical] [value]} */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; default: throw new IOException(); } return element; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilter.java0000664001003300100330000002151310620653754027754 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter. *
 *   Filter ::= CHOICE {
 *     and [0] SET OF Filter,
 *     or [1] SET OF Filter,
 *     not [2] Filter,
 *     equalityMatch [3] AttributeValueAssertion,
 *     substrings [4] SubstringFilter,
 *     greaterOrEqual [5] AttributeValueAssertion,
 *     lessOrEqual [6] AttributeValueAssertion,
 *     present [7] AttributeType,
 *     approxMatch [8] AttributeValueAssertion
 *   }
 * 
* * @version 1.0 */ public abstract class JDAPFilter { /** * Constructs a empty filter. */ public JDAPFilter() { } /** * Constructs filter from filter string specified in RFC1558. *
     *  ::= '('  ')'
     *  ::=  |  |  | 
     *  ::= '&' 
     *  ::= '|' 
     *  ::= '!' 
     *  ::=  |  
     *  ::=  |  | 
     *  ::=   
     *  ::=  |  |  | 
     *  ::= '='
     *  ::= '~='
     *  ::= '>='
     *  ::= '<='
     *  ::=  '=*'
     *  ::=  '='   
     *  ::= NULL | 
     *  ::= '*' 
     *  ::= NULL |  '*' 
     *  ::= NULL | 
     * 
* @param filter filter string as specified in RFC1558 * @return filter */ public static JDAPFilter getFilter(String filter) { String f = new String(filter); f.trim(); if (f.startsWith("(") && f.endsWith(")")) { return getFilterComp(f.substring(1,f.length()-1)); } return getFilterComp(filter); } /** * Constructs the filter computation. * @param f filter string within brackets * @return filter */ public static JDAPFilter getFilterComp(String f) { f.trim(); if (f.startsWith("&")) { /* and */ JDAPFilter filters[] = getFilterList(f.substring(1, f.length())); if (filters == null) { throw new IllegalArgumentException("Bad search filter"); } JDAPFilterAnd and = new JDAPFilterAnd(); for (int i = 0; i < filters.length; i++) { and.addElement(filters[i]); } return and; } else if (f.startsWith("|")) { /* or */ JDAPFilter filters[] = getFilterList(f.substring(1, f.length())); if (filters == null) { throw new IllegalArgumentException("Bad search filter"); } JDAPFilterOr or = new JDAPFilterOr(); for (int i = 0; i < filters.length; i++) { or.addElement(filters[i]); } return or; } else if (f.startsWith("!")) { /* not */ JDAPFilter filter = getFilter(f.substring(1, f.length())); if (filter == null) { throw new IllegalArgumentException("Bad search filter"); } return new JDAPFilterNot(filter); } else { /* item */ return getFilterItem(f.substring(0, f.length())); } } /** * Parses a list of filters * @param list filter list (i.e. (filter)(filter)...) * @return list of filters */ public static JDAPFilter[] getFilterList(String list) { list.trim(); int level = 0; int start = 0; int end = 0; Vector v = new Vector(); for (int i = 0; i < list.length(); i++) { if (list.charAt(i) == '(') { if (level == 0) { start = i; } level++; } if (list.charAt(i) == ')') { level--; if (level == 0) { end = i; v.addElement(JDAPFilter.getFilter(list.substring(start, end+1))); } } } if (v.size() == 0) return null; JDAPFilter f[] = new JDAPFilter[v.size()]; for (int i = 0; i < v.size(); i++) { f[i] = (JDAPFilter)v.elementAt(i); } return f; } /** * Gets filter item. * @param item filter item string * @return filter */ public static JDAPFilter getFilterItem(String item) { item.trim(); int idx = item.indexOf('='); if (idx == -1) return null; String type = item.substring(0, idx).trim(); String value = item.substring(idx+1).trim(); /* skip = */ // Only values can contain escape sequences if (type.indexOf('\\') >= 0) { throw new IllegalArgumentException("Bad search filter"); } /* make decision by looking at the type */ type.trim(); if (type.endsWith("~")) { JDAPAVA ava = new JDAPAVA(type.substring(0, type.length()-1), value); return new JDAPFilterApproxMatch(ava); } else if (type.endsWith(">")) { JDAPAVA ava = new JDAPAVA(type.substring(0, type.length()-1), value); return new JDAPFilterGreaterOrEqual(ava); } else if (type.endsWith("<")) { JDAPAVA ava = new JDAPAVA(type.substring(0, type.length()-1), value); return new JDAPFilterLessOrEqual(ava); } else if (type.endsWith(":")) { return new JDAPFilterExtensible(type.substring(0, type.length()-1), value); } /* for those that are not simple */ if (value.startsWith("*") && value.length() == 1) { return new JDAPFilterPresent(type); } /* if value contains no '*', then it is equality */ if (value.indexOf('*') == -1) { JDAPAVA ava = new JDAPAVA(type, value); return new JDAPFilterEqualityMatch(ava); } /* must be substring at this point */ StringTokenizer st = new StringTokenizer(value, "*"); JDAPFilterSubString sub = new JDAPFilterSubString(type); String initial = null; if (!value.startsWith("*")) { initial = st.nextToken(); initial.trim(); } sub.addInitial(initial); while (st.hasMoreTokens()) { String any = st.nextToken(); any.trim(); if (st.hasMoreTokens()) { sub.addAny(any); } else { if (value.endsWith("*")) { sub.addAny(any); sub.addFinal(null); } else { sub.addFinal(any); } } } return sub; } /** * Gets the ber representation of filter. * @return ber representation of filter */ public abstract BERElement getBERElement(); /** * Retrieves the string representation of filter. * @return string representation of filter */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterOr.java0000664001003300100330000000454210620653754030260 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter And. * See RFC 1777. *
 *   or [1] SET OF Filter
 * 
* * @version 1.0 */ public class JDAPFilterOr extends JDAPFilterSet { /** * Constructs the filter. */ public JDAPFilterOr() { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|1); } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterOr {" + super.getParamString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterNot.java0000664001003300100330000000533510620653754030441 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter not. * See RFC 1777. *
 *   not [2] Filter
 * 
* * @version 1.0 */ public class JDAPFilterNot extends JDAPFilter { /** * Internal variables */ private JDAPFilter m_filter = null; /** * Constructs the filter. */ public JDAPFilterNot(JDAPFilter filter) { super(); m_filter = filter; } /** * Gets ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BERTag element = new BERTag(BERTag.CONSTRUCTED|BERTag.CONTEXT|2, m_filter.getBERElement(), false /* true */); return element; } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterNot {" + m_filter.toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/0000775001003300100330000000000010667357326026362 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPSearchResult.java0000664001003300100330000000571210602743271032260 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search result. This object * is sent from the ldap server to the interface. Note * that search response is separated into search response * and search result. The search response contains the * result from the server, while the research result indicates * the end of the search response sequence. *
 * resultCode [APPLICATION 5] LDAPResult
 * 
* * @version 1.0 */ public class JDAPSearchResult extends JDAPResult implements JDAPProtocolOp { /** * Constructs search result. * @param element ber element of search result */ public JDAPSearchResult(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.SEARCH_RESULT; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "SearchResult " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPSearchResponse.java0000664001003300100330000001144310602743271032576 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search response. This object * is sent from the ldap server to the interface. *
 * entry [APPLICATION 4] SEQUENCE {
 *   objectName LDAPDN,
 *   attributes SEQUENCE OF SEQUENCE {
 *     AttributeType,
 *     SET OF AttributeValue
 *   }
 * }
 * 
* * Note that the following is the LDAPv3 definition: *
 * SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
 *   objectName LDAPDN,
 *   attributes PartialAttributeList
 * }
 * PartialAttributeList ::= SEQUENCE OF SEQUENCE {
 *   type AttributeDescription,
 *   vals SET OF AttributeValue
 * }
 * 
* * @version 1.0 */ public class JDAPSearchResponse implements JDAPProtocolOp { /** * Internal variables */ protected String m_object_name = null; protected BERElement m_element = null; protected LDAPAttribute m_attributes[] = null; /** * Constructs search response. * @param element ber element of search response */ public JDAPSearchResponse(BERElement element) throws IOException { m_element = element; BERTag tag = (BERTag)element; BERSequence seq = (BERSequence)tag.getValue(); BEROctetString name = (BEROctetString)seq.elementAt(0); byte buf[] = null; buf = name.getValue(); if (buf == null) m_object_name = null; else { try{ m_object_name = new String(buf, "UTF8"); } catch(Throwable x) {} } BERSequence attrs = (BERSequence)seq.elementAt(1); if (attrs.size() > 0) { m_attributes = new LDAPAttribute[attrs.size()]; for (int i = 0; i < attrs.size(); i++) { m_attributes[i] = new LDAPAttribute(attrs.elementAt(i)); } } } /** * Retrieves ber representation of the result. * @return ber representation */ public BERElement getBERElement() { return m_element; } /** * Retrieves object name * @return object name */ public String getObjectName() { return m_object_name; } /** * Retrieves attributes * @return attributes */ public LDAPAttribute[] getAttributes() { return m_attributes; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.SEARCH_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { String s = ""; if (m_attributes != null) { for (int i = 0; i < m_attributes.length; i++) { if (i != 0) s = s + ","; s = s + m_attributes[i].toString(); } } return "SearchResponse {entry='" + m_object_name + "', attributes='" + s + "'}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPAddRequest.java0000664001003300100330000001215610620653755031724 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the add request. This object * is sent to the ldap server. See RFC 1777. *
 * AddRequest ::= [APPLICATION 8] SEQUENCE {
 *   entry LDAPDN,
 *   attrs SEQUENCE OF SEQUENCE {
 *     type AttributeType,
 *     values SET OF AttributeValue
 *   }
 * }
 * 
* * @version 1.0 */ public class JDAPAddRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; protected LDAPAttribute m_attrs[] = null; /** * Constructs add request. * @param dn distinguished name of adding entry * @param attrs list of attribute associated with entry */ public JDAPAddRequest(String dn, LDAPAttribute attrs[]) { m_dn = dn; m_attrs = attrs; } /** * Retrieves protocol operation type. * @return protcol type */ public int getType() { return JDAPProtocolOp.ADD_REQUEST; } /** * Sets the base dn component. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Gets the ber representation of add request. * @return ber representation of request */ public BERElement getBERElement() { /* Assumed that adding cn=patrick,o=ncware,c=ca with * following attributes: * cn: patrick * title: programmer * [*] umich-ldap-v3.3: * 0x68 0x46 ([APPLICATION8]) * 0x04 0x1a c n = p a t r i c k , 0x20 * o = n c w a r e , 0x20 c = * c a (entry - OctetString) * 0x30 0x28 (SEQUENCE) * 0x30 0x0f (SEQUENCE) * 0x04 0x02 c n (attribute type - OctetString) * 0x31 0x09 (SET OF) * 0x04 0x07 p a t r i c k (attribute value - OctetString) * 0x30 0x15 * 0x04 0x05 t i t l e * 0x31 0x0c (SET OF) * 0x04 0x0a p r o g r a m m e r */ BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString (m_dn)); BERSequence attrs_list = new BERSequence(); for (int i = 0; i < m_attrs.length; i++) { attrs_list.addElement(m_attrs[i].getBERElement()); } seq.addElement(attrs_list); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|8, seq, true); return element; } /** * Retrieves the string representation of add request parameters. * @return string representation of add request parameters */ public String getParamString() { String s = ""; for (int i = 0; i < m_attrs.length; i++) { if (i != 0) s = s + " "; s = s + m_attrs[i].toString(); } return "{entry='" + m_dn + "', attrs='" + s + "'}"; } /** * Retrieves the string representation of add request. * @return string representation of add request */ public String toString() { return "AddRequest " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPModifyRequest.java0000664001003300100330000001036110602743271032450 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modify request. *
 *   ModifyRequest ::= [APPLICATION 6] SEQUENCE {
 *     object LDAPDN,
 *     modification SEQUENCE OF SEQUENCE {
 *       operation ENUMERATED {
 *         add (0),
 *         delete (1),
 *         replace (2)
 *       },
 *       modification SEQUENCE {
 *         type AttributeType,
 *         values SET OF AttributeValue
 *       }
 *     }
 *   }
 * 
* * @version 1.0 */ public class JDAPModifyRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; protected LDAPModification m_mod[] = null; /** * Constructs the modify request * @param dn distinguished name of modifying * @param mod list of modifications */ public JDAPModifyRequest(String dn, LDAPModification mod[]) { m_dn = dn; m_mod = mod; } /** * Retrieves protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_REQUEST; } /** * Sets the base dn component. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Gets the ber representation of modify request. * @return ber representation of modify request */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_dn)); BERSequence mod_list = new BERSequence(); for (int i = 0; i < m_mod.length; i++) { mod_list.addElement(m_mod[i].getBERElement()); } seq.addElement(mod_list); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|6, seq, true); return element; } /** * Retrieves string representation of modify request. * @return string representation of request */ public String toString() { String s = ""; for (int i = 0; i < m_mod.length; i++) { if (i != 0) s = s + "+"; s = s + m_mod[i].toString(); } return "ModifyRequest {object=" + m_dn + ", modification=" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPBindResponse.java0000664001003300100330000000731310602743271032246 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the bind response. This object * is sent from the ldap server to the interface. *
 * BindResponse = [APPLICATION 1] LDAPResult
 * 
* * Note that LDAPv3.0 Bind Response is structured as follows: *
 * BindResponse ::= [APPLICATION 1] SEQUENCE {
 *   COMPONENTS OF LDAPResult,
 *   serverCreds [7] SaslCredentials OPTIONAL
 * }
 * 
* */ public class JDAPBindResponse extends JDAPResult implements JDAPProtocolOp { /** * Internal variables */ protected byte[] m_credentials = null; /** * Constructs bind response. * @param element ber element of bind response */ public JDAPBindResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); /* LDAPv3 Sasl Credentials support */ BERSequence s = (BERSequence)((BERTag)element).getValue(); if (s.size() <= 3) { return; } BERElement e = s.elementAt(3); if (e.getType() == BERElement.TAG) { BERElement el = ((BERTag)e).getValue(); if (el instanceof BERSequence) { el = ((BERSequence)el).elementAt(0); } BEROctetString str = (BEROctetString)el; try{ m_credentials = str.getValue(); } catch(Exception ex) {} } } /** * Retrieves Sasl Credentials. LDAPv3 support. * @return credentials */ public byte[] getCredentials() { return m_credentials; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.BIND_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "BindResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPBaseDNRequest.java0000664001003300100330000000460010602743271032314 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This is the base class for all the request that * has a base dn component. The existence of this * class is due to the JDAPReferralThread. * * @version 1.0 */ public abstract class JDAPBaseDNRequest { /** * Sets the base dn component in the request. * @param basedn base DN */ public abstract void setBaseDN(String basedn); /** * Gets the base dn component in the request. * @return base dn */ public abstract String getBaseDN(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPAbandonRequest.java0000664001003300100330000000644110620653755032576 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the abandon request. This object * is sent to the ldap server. See RFC 1777. *
 * AbandonRequest ::= [APPLICATION 16] MessageID
 * 
* * @version 1.0 */ public class JDAPAbandonRequest implements JDAPProtocolOp { /** * Internal variables */ protected int m_msgid; /** * Constructs abandon request. * @param msgid message identifier */ public JDAPAbandonRequest(int msgid) { m_msgid = msgid; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.ABANDON_REQUEST; } /** * Gets the ber representation of abandon request. * @return ber representation of request */ public BERElement getBERElement() { /* Assumed m_msgid = 1. The BER encoding output * should be * * [*] umich-ldap-v3.3: * 0x50 (implicit tagged integer) * 0x01 (length) * 0x01 (message id) */ BERInteger i = new BERInteger(m_msgid); BERTag element = new BERTag(BERTag.APPLICATION|16, i, true); return element; } /** * Retrieves the string representation of abandon request. * @return string representation */ public String toString() { return "AbandonRequest {msgid=" + m_msgid + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPModifyResponse.java0000664001003300100330000000541610620653755032632 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modify response. This object * is sent from the ldap server to the interface. See RFC * 1777. *
 * ModifyResponse ::= [APPLICATION 7] LDAPResult
 * 
* * @version 1.0 */ public class JDAPModifyResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs modify response. * @param element ber element of bind response */ public JDAPModifyResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "ModifyResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPModifyRDNRequest.java0000664001003300100330000001202510620653755033022 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modify rdn request. This * object is sent to the ldap server. *
 * ModifyRDNRequest ::= [APPLICATION 12] SEQUENCE {
 *   entry LDAPDN,
 *   newrdn RelativeLDAPDN,
 *   deleteoldrdn BOOLEAN
 * }
 * 
* * Note that LDAPv3 rename this object to JDAPModifyDNRequest * and has the following defintion: *
 * ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
 *   entry LDAPDN,
 *   newrdn RelativeLDAPDN,
 *   deleteoldrdn BOOLEAN,
 *   newSuperior [0] LDAPDN OPTIONAL
 * }
 * 
* * @version 1.0 */ public class JDAPModifyRDNRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_old_dn = null; protected String m_new_rdn = null; protected boolean m_delete_old_dn; protected String m_new_superior; /** * Constructs modify RDN request. * @param old_dn old distinguished name * @param new_rdn new distinguished name * @param delete_old_dn delete the old distinguished name */ public JDAPModifyRDNRequest(String old_dn, String new_rdn, boolean delete_old_dn) { m_old_dn = old_dn; m_new_rdn = new_rdn; m_delete_old_dn = delete_old_dn; m_new_superior = null; } /** * Constructs modify DN request. * @param old_dn old distinguished name * @param new_rdn new distinguished name * @param delete_old_dn delete the old distinguished name * @param new_superior parent dn */ public JDAPModifyRDNRequest(String old_dn, String new_rdn, boolean delete_old_dn, String new_superior) { m_old_dn = old_dn; m_new_rdn = new_rdn; m_delete_old_dn = delete_old_dn; m_new_superior = new_superior; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_RDN_REQUEST; } /** * Sets the base dn. * @param basedn base dn */ public void setBaseDN(String basedn) { m_old_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_old_dn; } /** * Gets the ber representation of the request. * @return ber representation */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_old_dn)); seq.addElement(new BEROctetString(m_new_rdn)); seq.addElement(new BERBoolean(m_delete_old_dn)); /* LDAPv3 new parent dn feature support */ if (m_new_superior != null) seq.addElement(new BERTag(BERTag.CONTEXT|0, new BEROctetString (m_new_superior), true)); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|12, seq, true); return element; } /** * Gets the string representation of the request. * @return string representation */ public String toString() { return "ModifyRDNRequest {entry=" + m_old_dn + ", newrdn=" + m_new_rdn + ", deleteoldrdn=" + m_delete_old_dn + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPDeleteResponse.java0000664001003300100330000000537510602743271032602 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the delete response. This object * is sent from the ldap server to the interface. *
 * DeleteResponse ::= [APPLICATION 11] LDAPResult
 * 
* * @version 1.0 */ public class JDAPDeleteResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs delete response. * @param element ber element of delete response */ public JDAPDeleteResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.DEL_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "DeleteResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPDeleteRequest.java0000664001003300100330000000705010602743271032424 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the delete request. This object * is sent to the ldap server. *
 * DelRequest ::= [APPLICATION 10] LDAPDN
 * 
* * @version 1.0 */ public class JDAPDeleteRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; /** * Constructs the delete request. * @param dn Distinguished name to delete */ public JDAPDeleteRequest(String dn) { m_dn = dn; } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.DEL_REQUEST; } /** * Sets the base dn. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Gets the ber representation of the delete request. * @return ber representation */ public BERElement getBERElement() { /* Assumed that deleteing "cn=patrick,o=ncware,c=ca" * [*] umich-ldap-v3.3 * 0x4a 0x18 (implicit OctetString) * c n = p a t r i c k , o = n c w a r e , c = c a */ BEROctetString s = new BEROctetString(m_dn); BERTag element = new BERTag(BERTag.APPLICATION|10, s, true); return element; } /** * Retrieves the string representation of the delete request. * @return string representation */ public String toString() { return "DeleteRequest {entry=" + m_dn + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPCompareResponse.java0000664001003300100330000000540710602743271032762 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the compare response. This object * is sent from the ldap server to the interface. *
 * CompareResponse ::= [APPLICATION 15] LDAPResult
 * 
* * @version 1.0 */ public class JDAPCompareResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs compare response. * @param element ber element of delete response */ public JDAPCompareResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.COMPARE_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "CompareResponse " + super.getParamString(); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPSearchResultReference.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPSearchResultReference0000664001003300100330000000720110620653755033161 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search result reference. See RFC 1777. *
 * SearchResultReference :: [APPLICATION 19] SEQUENCE OF LDAPURL
 * 
* * @version 1.0 */ public class JDAPSearchResultReference implements JDAPProtocolOp { /** * Internal variables */ protected String m_urls[] = null; protected BERElement m_element = null; /** * Constructs extended response. * @param element ber element of add response */ public JDAPSearchResultReference(BERElement element) throws IOException { m_element = element; BERSequence seq = (BERSequence)((BERTag)element).getValue(); if (seq.size() < 0) return; m_urls = new String[seq.size()]; for (int i=0; i < seq.size(); i++) { BEROctetString o = (BEROctetString)seq.elementAt(i); m_urls[i] = new String(o.getValue(), "UTF8"); } } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.SEARCH_RESULT_REFERENCE; } /** * Retrieves the BER representation of this object. */ public BERElement getBERElement() { return m_element; } /** * Retrieves a list of urls. */ public String[] getUrls() { return m_urls; } /** * Retrieve the string representation. * @return string representation */ public String toString() { String urls = ""; if (m_urls != null) { for (int i = 0; i < m_urls.length; i++) { if (i != 0) urls += ","; urls += m_urls[i]; } } return "SearchResultReference " + urls; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPBindRequest.java0000664001003300100330000001452610602743271032104 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the bind request. This object is * sent to the ldap server. *
 * BindRequest ::= [APPLICATION 0] SEQUENCE {
 *   version INTEGER(1..127) ,
 *   name LDAPDN,
 *   authentication CHOICE {
 *     simple [0] OCTET STRING,
 *     krbv42LDAP [1] OCTET STRING,
 *     krbv42DSA [2] OCTET STRING
 *   }
 * }
 * 
* * Note that LDAPv3 bind reuqest is structured as follows: *
 * BindRequest ::= [APPLICATION 0] SEQUENCE {
 *   version INTEGER (1..127)
 *   name LDAPDN,
 *   authentication AuthenticationChoice
 * }
 * AuthenticationChoice ::= CHOICE {
 *   simple [0] OCTET STRING,
 *          -- 1 and 2 reserved
 *   sasl [3] SaslCredentials
 * }
 * SaslCredentials ::= SEQUENCE {
 *   mechanism LDAPString,
 *   credentials OCTET STRING
 * }
 * 
* * @version 1.0 */ public class JDAPBindRequest implements JDAPProtocolOp { /** * Internal variables */ protected int m_version; protected String m_name = null; protected String m_password = null; protected String m_mechanism = null; protected byte m_credentials[] = null; /** * Constructs anonymous or simple bind request. * @param version version * @param name distinguished name * @param password password */ public JDAPBindRequest(int version, String name, String password) { m_version = version; m_name = name; m_password = password; } /** * Constructs a LDAP v3.0 SaslCredentials bind request. * @param version version * @param name distinguished name * @param mechanism mechanism (must not be null) * @param credentials credientials */ public JDAPBindRequest(int version, String name, String mechanism, byte credentials[]) { m_version = version; m_name = name; m_mechanism = mechanism; m_credentials = credentials; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.BIND_REQUEST; } /** * Retrieves the ber representation of the request. * @return ber representation */ public BERElement getBERElement() { /* anonymous bind * [*] umich-ldap-v3.3: * 0x60 0x07 (implicit [Application 0] Sequence) * 0x02 0x01 0x02 (Integer) * 0x04 0x00 (OctetString) * 0x80 0x00 (implicit OctetString) * [*] zoomit server v1.0: * 0x60 0x0b * 0x30 0x09 (sequece) * 0x02 0x01 0x02 * 0x04 0x00 * 0xa0 0x02 (explicit tag) * 0x04 0x00 * simple bind with "cn=root,o=ncware,c=ca", "password" * [*] umich-ldap-v3.3: * 0x60 0x24 ([APPLICATION 0]) * 0x02 0x01 0x02 (version - Integer) * 0x04 0x15 c n = r o o t , o = n c w a r e , * c = c a * 0x80 0x08 p a s s w o r d */ BERSequence seq = new BERSequence(); seq.addElement(new BERInteger(m_version)); seq.addElement(new BEROctetString(m_name)); BERTag auth = null; if (m_mechanism == null) { auth = new BERTag(BERTag.CONTEXT, new BEROctetString(m_password), true); } else { BERSequence sasl = new BERSequence(); sasl.addElement(new BEROctetString(m_mechanism)); if (m_credentials == null) { sasl.addElement(new BEROctetString((byte[])null)); } else { sasl.addElement(new BEROctetString(m_credentials, 0, m_credentials.length)); } auth = new BERTag(BERTag.SASLCONTEXT|3, /* SaslCredentials */ sasl, true); } seq.addElement(auth); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|0, seq, true); return element; } /** * Retrieves the string representation of the request parameters. * @return string representation parameters */ public String getParamString() { return "{version=" + m_version + ", name=" + m_name + ", authentication=" + ((m_password == null) ? m_password : "********") + "}"; } /** * Retrieves the string representation of the request. * @return string representation */ public String toString() { return "BindRequest " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPCompareRequest.java0000664001003300100330000000725310602743271032615 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the compare request. This object * is sent to the ldap server. *
 *   CompareRequest ::= [APPLICATION 14] SEQUENCE {
 *     entry LDAPDN,
 *     ava AttributeValueAssertion
 *   }
 * 
* * @version 1.0 */ public class JDAPCompareRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; protected JDAPAVA m_ava = null; /** * Constructs the compare request. * @param dn distinguished name of the entry to be compared * @param ava attribut value assertion */ public JDAPCompareRequest(String dn, JDAPAVA ava) { m_dn = dn; m_ava = ava; } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.COMPARE_REQUEST; } /** * Sets the base dn. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Retrieves the ber representation of the request. * @return ber request */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_dn)); seq.addElement(m_ava.getBERElement()); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|14, seq, true); return element; } /** * Retrieves the string representation of the request. * @return string representation */ public String toString() { return "CompareRequest {entry=" + m_dn + ", ava=" + m_ava.toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPExtendedRequest.java0000664001003300100330000000771410620653755033000 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the ExtendedRequest request. This object * is sent to the ldap server and is a v3 request. See RFC 1777. *
 * ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
 *   requestName  [0] LDAPOID,
 *   requestValue [1] OCTET STRING OPTIONAL
 * }
 * 
* * @version 1.0 */ public class JDAPExtendedRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_oid = null; protected byte m_value[] = null; /** * Constructs extended request. * @param oid object identifier * @param value request value */ public JDAPExtendedRequest(String oid, byte value[]) { m_oid = oid; m_value = value; } /** * Retrieves protocol operation type. * @return protcol type */ public int getType() { return JDAPProtocolOp.EXTENDED_REQUEST; } /** * Gets the ber representation of extended request. * @return ber representation of request */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BERTag(BERTag.CONTEXT|0, new BEROctetString (m_oid), true)); if (m_value != null) { seq.addElement(new BERTag(BERTag.CONTEXT|1, new BEROctetString (m_value, 0, m_value.length), true)); } BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|23, seq, true); return element; } /** * Retrieves the string representation of add request parameters. * @return string representation of add request parameters */ public String getParamString() { String s = ""; if (m_value != null) { try{ s = new String(m_value, "UTF8"); } catch(Throwable x) {} } return "{OID='" + m_oid + "', value='" + s + "'}"; } /** * Retrieves the string representation of add request. * @return string representation of add request */ public String toString() { return "ExtendedRequest " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPAddResponse.java0000664001003300100330000000537010620653755032072 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the add response. This object * is sent from the ldap server to the interface. See * RFC 1777. *
 * AddResponse ::= [APPLICATION 9] LDAPResult
 * 
* * @version 1.0 */ public class JDAPAddResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs add response. * @param element ber element of add response */ public JDAPAddResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.ADD_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "AddResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPExtendedResponse.java0000664001003300100330000001045010620653755033135 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the extended response. This object * is sent from the ldap server to the interface and is * a v3 response. See RFC 1777. *
 * ExtendedResponse :: [APPLICATION 23] SEQUENCE {
 *   COMPONENTS OF LDAPResult,
 *   responseName [10] LDAPOID OPTIONAL,
 *   response     [11] OCTET STRING OPTIONAL
 * }
 * 
* * @version 1.0 */ public class JDAPExtendedResponse extends JDAPResult implements JDAPProtocolOp { /** * Internal variables */ protected String m_oid = null; protected byte[] m_value = null; /** * Constructs extended response. * @param element ber element of add response */ public JDAPExtendedResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); BERSequence seq = (BERSequence)((BERTag)element).getValue(); for (int i = 0; i < seq.size(); i++) { try { BERElement el = seq.elementAt(i); if (el.getType() != BERElement.TAG) continue; BERTag t = (BERTag)el; switch (t.getTag()&0x0f) { case 10: BEROctetString oid = (BEROctetString)t.getValue(); try{ m_oid = new String(oid.getValue(), "UTF8"); } catch(Throwable x) {} break; case 11: BEROctetString value = (BEROctetString)t.getValue(); m_value = value.getValue(); break; } } catch (ClassCastException e) { } } } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.EXTENDED_RESPONSE; } /** * Retrieves the results of the extended operation. * @return extended operation results as byte array */ public byte[] getValue() { return m_value; } /** * Retrieves the oid of the extended operation. * @return extended operation oid. */ public String getID() { return m_oid; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "ExtendedResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPProtocolOp.java0000664001003300100330000000714410620653755031764 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This is the base interface for all protocol operation * that is embedded in a JDAPMessage (LDAP Message in RCF1777). * Each protocol operation must implement this interface. * * @version 1.0 */ public interface JDAPProtocolOp { /** * Protocol operation types */ public final static int BIND_REQUEST = 0; public final static int BIND_RESPONSE = 1; public final static int UNBIND_REQUEST = 2; public final static int SEARCH_REQUEST = 3; public final static int SEARCH_RESPONSE = 4; public final static int SEARCH_RESULT = 5; public final static int MODIFY_REQUEST = 6; public final static int MODIFY_RESPONSE = 7; public final static int ADD_REQUEST = 8; public final static int ADD_RESPONSE = 9; public final static int DEL_REQUEST = 10; public final static int DEL_RESPONSE = 11; public final static int MODIFY_RDN_REQUEST = 12; public final static int MODIFY_RDN_RESPONSE = 13; public final static int COMPARE_REQUEST = 14; public final static int COMPARE_RESPONSE = 15; public final static int ABANDON_REQUEST = 16; public final static int SEARCH_RESULT_REFERENCE = 19; public final static int EXTENDED_REQUEST = 23; public final static int EXTENDED_RESPONSE = 24; /** * Retrieves the protocol operation type. * @return protocol type */ public int getType(); /** * Retrieves the ber representation of the operation. * @return ber representation */ public BERElement getBERElement(); /** * Retrieves the string representation of the operation. * @return string representation */ public String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPSearchRequest.java0000664001003300100330000002046410602743271032433 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search request. This object is * sent to the ldap server. *
 * SearchRequest ::= [APPLICATION 3] SEQUENCE {
 *   baseObject LDAPDN,
 *   scope ENUMERATED {
 *     baseObject (0),
 *     singleLevel (1),
 *     wholeSubtree (2)
 *   },
 *   derefAliases ENUMERATED {
 *     neverDerefAliases (0),
 *     derefInSearching (1),
 *     DerefFindingBaseObj (2),
 *     DerefAlways (3)
 *   },
 *   sizeLimit INTEGER(0..maxInt),
 *   timeLimit INTEGER(0..maxInt),
 *   attrsOnly BOOLEAN,
 *   filter Filter,
 *   attributes SEQUENCE OF AttributeType
 * }
 * 
* * @version 1.0 */ public class JDAPSearchRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * search scope */ public final static int BASE_OBJECT = 0; public final static int SINGLE_LEVEL = 1; public final static int WHOLE_SUBTREE = 2; /** * alias dereference */ public final static int NEVER_DEREF_ALIASES = 0; public final static int DEREF_IN_SEARCHING = 1; public final static int DEREF_FINDING_BASE_OBJ = 2; public final static int DEREF_ALWAYS = 3; public final static String DEFAULT_FILTER = "(objectclass=*)"; /** * Private variables */ protected String m_base_dn = null; protected int m_scope; protected int m_deref; protected int m_size_limit; protected int m_time_limit; protected boolean m_attrs_only; protected String m_filter = null; protected JDAPFilter m_parsedFilter = null; protected String m_attrs[] = null; /** * Constructs search request. * @param base_dn base object entry relative to the search * @param scope scope of the search * @param deref how alias objects should be handled * @param size_limit maximum number of entries * @param time_limit maximum time (in time) allowed * @param attrs_only should return type only * @param filter string filter based on RFC1558 * @param attrs list of attribute types * @exception IllegalArgumentException if the filter has bad syntax * */ public JDAPSearchRequest(String base_dn, int scope, int deref, int size_limit, int time_limit, boolean attrs_only, String filter, String attrs[]) throws IllegalArgumentException { m_base_dn = base_dn; m_scope = scope; m_deref = deref; m_size_limit = size_limit; m_time_limit = time_limit; m_attrs_only = attrs_only; m_filter = (filter == null) ? DEFAULT_FILTER : filter; m_parsedFilter = JDAPFilter.getFilter( JDAPFilterOpers.convertLDAPv2Escape(m_filter)); if (m_parsedFilter == null){ throw new IllegalArgumentException("Bad search filter"); } m_attrs = attrs; } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.SEARCH_REQUEST; } /** * Sets the base dn component. * @param basedn base dn */ public void setBaseDN(String basedn) { m_base_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_base_dn; } /** * Gets the ber representation of search request. * @return ber representation of request. */ public BERElement getBERElement() { /* Assumed that searching with the following criteria: * base object = "c=ca" * filter = FilterPresent(objectClass) * [*] zoomit server v1.0 (search on c=ca) * 0x63 0x81 0x8d ([APPLICATION 3]) * 0x30 0x81 0x8a 0x04 0x00 (seq of) * 0x0a 0x01 0x02 * 0x0a 0x01 0x00 * 0x02 0x01 0x65 * 0x02 0x01 0x1e * 0x01 0x01 0x00 * 0xa0 0x3b * 0x30 0x39 0xa5 0x0d * 0x30 0x0b 0x04 0x07 P A G E _ D N * 0x04 0x00 * 0xa3 0x0e * 0x30 0x0c 0x04 0x08 P A G E _ K E Y * 0x04 0x00 0xa3 0x18 * 0x30 0x16 0x04 0x0e z c A n y A t t r i b u t e * 0x04 0x04 c = c a * 0x30 0x3a 0x04 0x0b O b j e c t C l a s s * 0x04 0x11 a l i a s e d O b j e c t N a m e * 0x04 0x07 d s e T y p e * 0x04 0x0f t e l e p h o n e N u m b e r * [*] umich-ldap-v3.3: * 0x63 0x24 ([APPLICATION 3]) * 0x04 0x04 c = c a (base object - OctetString) * 0x0a 0x01 0x00 (scope - Enumerated) * 0x0a 0x01 0x00 (derefAlias - Enumerated) * 0x02 0x01 0x00 (size limit - Integer) * 0x02 0x01 0x00 (time limit - Integer) * 0x01 0x01 0x00 (attr only - Boolean) * 0x87 0x0b o b j e c t C l a s s (filter) * 0x30 0x00 (attrs - Sequence of OctetString) */ BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_base_dn)); seq.addElement(new BEREnumerated(m_scope)); seq.addElement(new BEREnumerated(m_deref)); seq.addElement(new BERInteger(m_size_limit)); seq.addElement(new BERInteger(m_time_limit)); seq.addElement(new BERBoolean(m_attrs_only)); seq.addElement(m_parsedFilter.getBERElement()); BERSequence attr_type_list = new BERSequence(); if (m_attrs != null) { for (int i = 0; i < m_attrs.length; i++) { attr_type_list.addElement(new BEROctetString(m_attrs[i])); } } seq.addElement(attr_type_list); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|3, seq, true); return element; } /** * Retrieves the string representation of the request. * @return string representation */ public String toString() { String s = null; if (m_attrs != null) { s = ""; for (int i = 0; i < m_attrs.length; i++) { if (i != 0) s = s + "+"; s = s + m_attrs[i]; } } return "SearchRequest {baseObject=" + m_base_dn + ", scope=" + m_scope + ", derefAliases=" + m_deref + ",sizeLimit=" + m_size_limit + ", timeLimit=" + m_time_limit + ", attrsOnly=" + m_attrs_only + ", filter=" + m_filter + ", attributes=" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPUnbindRequest.java0000664001003300100330000000610710602743271032443 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the unbind request and is a protocol operation. * A protocol operation is embedded within JDAPMessage which is sent * between client and server. This object is sent to the ldap server. *
 * UnbindRequest ::= [APPLICATION 2] NULL
 * 
* * @version 1.0 */ public class JDAPUnbindRequest implements JDAPProtocolOp { /** * Constructs bind request. */ public JDAPUnbindRequest() { } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.UNBIND_REQUEST; } /** * Gets the ber representation of the unbind rquest. * @return ber representation */ public BERElement getBERElement() { /* * [*] umich-ldap-v3.3: * 0x42 0x00 * [*] umich-ldap-v3.0: */ BERNull n = new BERNull(); BERTag element = new BERTag(BERTag.APPLICATION|2, n, true); return element; } /** * Retrieves the string representation of unbind operation. * @return string representation */ public String toString() { return "UnbindRequest {}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPResult.java0000664001003300100330000002472310602743271031135 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the ldap result where stores * the request status. It is the base class for all * the response except search response. This object is * sent from the server to the client interface. *
 * LDAPResult ::= SEQUENCE {
 *   resultCode ENUMERATED {
 *     success (0),
 *     ...
 *   },
 *   matchedDN LDAPDN,
 *   errorMessage LDAPString
 * }
 * 
* * Note that LDAPv3 supports referral within the LDAP * Result. The added component is: * *
 * LDAPResult ::= SEQUENCE {
 *   ...
 *   errorMessage LDAPString,
 *   referral [3] Referral OPTIONAL
 * }
 * 
* */ public class JDAPResult { /** * Result code based on RFC1777 */ public final static int SUCCESS = 0; public final static int OPERATION_ERROR = 1; public final static int PROTOCOL_ERROR = 2; public final static int TIME_LIMIT_EXCEEDED = 3; public final static int SIZE_LIMIT_EXCEEDED = 4; public final static int COMPARE_FALSE = 5; public final static int COMPARE_TRUE = 6; public final static int AUTH_METHOD_NOT_SUPPORTED = 7; public final static int STRONG_AUTH_REQUIRED = 8; /* Referrals Within the LDAPv2 Protocol */ public final static int LDAP_PARTIAL_RESULTS = 9; /* Added for LDAPv3 - BEGIN */ public final static int REFERRAL = 10; public final static int ADMIN_LIMIT_EXCEEDED = 11; public final static int UNAVAILABLE_CRITICAL_EXTENSION = 12; public final static int CONFIDENTIALITY_REQUIRED = 13; public final static int SASL_BIND_IN_PROGRESS = 14; /* Added for LDAPv3 - END */ public final static int NO_SUCH_ATTRIBUTE = 16; public final static int UNDEFINED_ATTRIBUTE_TYPE = 17; public final static int INAPPROPRIATE_MATCHING = 18; public final static int CONSTRAINT_VIOLATION = 19; public final static int ATTRIBUTE_OR_VALUE_EXISTS = 20; public final static int INVALID_ATTRIBUTE_SYNTAX = 21; public final static int NO_SUCH_OBJECT = 32; public final static int ALIAS_PROBLEM = 33; public final static int INVALID_DN_SYNTAX = 34; public final static int IS_LEAF = 35; public final static int ALIAS_DEREFERENCING_PROBLEM = 36; public final static int INAPPROPRIATE_AUTHENTICATION = 48; public final static int INVALID_CREDENTIALS = 49; public final static int INSUFFICIENT_ACCESS_RIGHTS = 50; public final static int BUSY = 51; public final static int UNAVAILABLE = 52; public final static int UNWILLING_TO_PERFORM = 53; public final static int LOOP_DETECT = 54; public final static int NAMING_VIOLATION = 64; public final static int OBJECT_CLASS_VIOLATION = 65; public final static int NOT_ALLOWED_ON_NONLEAF = 66; public final static int NOT_ALLOWED_ON_RDN = 67; public final static int ENTRY_ALREADY_EXISTS = 68; public final static int OBJECT_CLASS_MODS_PROHIBITED = 69; public final static int AFFECTS_MULTIPLE_DSAS = 71; public final static int OTHER = 80; public final static int SERVER_DOWN = 81; public final static int PARAM_ERROR = 89; public final static int CONNECT_ERROR = 91; public final static int LDAP_NOT_SUPPORTED = 92; public final static int CONTROL_NOT_FOUND = 93; public final static int NO_RESULTS_RETURNED = 94; public final static int MORE_RESULTS_TO_RETURN = 95; public final static int CLIENT_LOOP = 96; public final static int REFERRAL_LIMIT_EXCEEDED = 97; /** * Private variable */ protected BERElement m_element = null; protected int m_result_code; protected String m_matched_dn = null; protected String m_error_message = null; protected String m_referrals[] = null; /** * Constructs ldap result. * @param element ber element */ public JDAPResult(BERElement element) throws IOException { /* Result from a successful bind request. * [*] umich-ldap-v3.3 * 0x0a 0x07 (implicit [APPLICATION 1] OctetString) * 0x0a 0x01 0x00 (result code) * 0x04 0x00 (matched dn) * 0x04 0x00 (error message) * Referrals in ldap-v2.0 * [*] umich-ldap-v3.3 * 0x65 0x2a * 0x0a 0x01 0x09 * 0x04 0x00 * 0x04 0x23 R e f e r r a l : 0x0a * l d a p : / / l d a p . * i t d . u m i c h . e d u */ m_element = element; BERSequence seq = (BERSequence)element; /* * Possible return from [x500.arc.nasa.gov]: * SEQUENCE {SEQUENCE {Enumerated{2} ... }} */ BERElement e = seq.elementAt(0); if (e.getType() == BERElement.SEQUENCE) seq = (BERSequence)e; m_result_code = ((BEREnumerated)seq.elementAt(0)).getValue(); byte buf[] = null; buf = ((BEROctetString)seq.elementAt(1)).getValue(); if (buf == null) m_matched_dn = null; else { try{ m_matched_dn = new String(buf, "UTF8"); } catch(Throwable x) {} } buf = ((BEROctetString)seq.elementAt(2)).getValue(); if (buf == null) m_error_message = null; else { try { m_error_message = new String(buf, "UTF8"); } catch(Throwable x) {} } /* 12/05/97 extract LDAPv3 referrals */ if (seq.size() >= 4) { BERTag t = (BERTag)seq.elementAt(3); BERElement v = t.getValue(); if (v.getType() == BERElement.INTEGER) { /* MS - [CONTEXT-5] Integer {3} */ /* TBD */ // else if this element is BERSequence which contains referral information } else if (v instanceof BERSequence) { /* Netscape */ BERSequence rseq = (BERSequence)v; if (rseq.size() > 0) { m_referrals = new String[rseq.size()]; for (int i = 0; i < rseq.size(); i++) { try{ m_referrals[i] = new String(((BEROctetString)rseq.elementAt(i)).getValue(), "UTF8"); } catch(Throwable x) {} } } } } } /** * Gets the result code. * @return result code */ public int getResultCode() { return m_result_code; } /** * Gets the matched dn. * @return matched dn */ public String getMatchedDN() { return m_matched_dn; } /** * Gets the error message. * @return error message */ public String getErrorMessage() { return m_error_message; } /** * Retrieves referrals from the LDAP Result. * @return list of referrals in URL format */ public String[] getReferrals() { return m_referrals; } /** * Retrieves the ber representation of the result. * @return ber representation of the result */ public BERElement getBERElement() { return m_element; } /** * Retrieves string representation of the result. Usually, * the inherited class calls this to retrieve the parameter * string. * @return string representation */ public String getParamString() { StringBuffer sb = new StringBuffer("{resultCode="); sb.append(m_result_code); if (m_matched_dn != null) { sb.append(", matchedDN="); sb.append(m_matched_dn); } if (m_error_message != null) { sb.append(", errorMessage="); sb.append(m_error_message); } if (m_referrals != null && m_referrals.length > 0) { sb.append(", referrals="); for (int i=0; i < m_referrals.length; i++) { sb.append((i==0 ? "" : " ")); sb.append(m_referrals[i]); } } sb.append("}"); return sb.toString(); } /** * Retrieves string representation of the result. * @return string representation */ public String toString() { return "Result " + getParamString(); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPModifyRDNResponse.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/opers/JDAPModifyRDNResponse.jav0000664001003300100330000000543610602743271033030 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client.opers; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modifyRDN response. This object * is sent from the ldap server to the interface. *
 * ModifyRDNResponse ::= [APPLICATION 13] LDAPResult
 * 
* * @version 1.0 */ public class JDAPModifyRDNResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs modifyRDN response. * @param element ber element of modifyRDN response */ public JDAPModifyRDNResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_RDN_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "ModifyRDNResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterExtensible.java0000664001003300100330000001201210602743270031762 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import netscape.ldap.ber.stream.*; import java.io.*; /** * This class implements the extended match filter. *
 * extensibleMatch [9] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterExtensible extends JDAPFilter { /** * Constructs extensible match filter. * @param match Matching rule assertion */ public JDAPFilterExtensible(String type, String match) { m_tag = BERTag.CONSTRUCTED|BERTag.CONTEXT|9; m_type = type; m_value = match; } /** * Gets ber representation of the filter. *
     * Extended filter:   [type] [':dn'][':'oid]':='value
     *
     * BER:   extensibleMatch    [9] MatchingRuleAssertion
     *        MatchingRuleAssertion ::= SEQUENCE {
     *             matchingRule    [1] MatchingRuleID OPTIONAL,
     *             type            [2] AttributeDescription OPTIONAL,
     *             matchValue      [3] AssertionValue,
     *             dnAttributes    [4] BOOLEAN DEFAULT FALSE
     *        }
     * 
* @return ber representation */ public BERElement getBERElement() { String value = m_value; String defs = m_type; /* Need either ':dn' or ':'oid */ int colonIndex = defs.lastIndexOf(':'); if ( colonIndex == -1 ) { return null; } /* Is it dn or oid? */ boolean isDN = false; String oid = null; if ( defs.regionMatches( true, colonIndex+1, "dn", 0, 2 ) ) isDN = true; else oid = defs.substring( colonIndex+1 ); /* Any more? */ defs = defs.substring( 0, colonIndex ); colonIndex = defs.lastIndexOf(':'); if ( colonIndex >= 0 ) { /* Is it dn or oid? */ if ( defs.regionMatches( true, colonIndex+1, "dn", 0, 2 ) ) isDN = true; else oid = defs.substring( colonIndex+1 ); } BERSequence seq = new BERSequence(); BERTag tag; /* Was there an oid? */ if ( oid != null ) { tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_OID, new BEROctetString(oid), true ); seq.addElement( tag ); } /* Was there an attribute description? */ if ( defs.length() > 0 ) { tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_TYPE, new BEROctetString(defs), true ); seq.addElement( tag ); } /* Got to have a value */ tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_VALUE, new BEROctetString(value), true ); seq.addElement( tag ); /* Was ':dn' specified? */ tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_DNATTRS, new BERBoolean(isDN), true ); seq.addElement( tag ); BERTag element = new BERTag( m_tag, seq, true ); return element; } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterExtensible {" + m_value + "}"; } private int m_tag; private String m_type = null; private String m_value = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPAVA.java0000664001003300100330000000664610602743270027141 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.*; import java.io.*; import netscape.ldap.ber.stream.*; /** * This class implements the attribute value assertion. * This object is used with filters. *
 * AttributeValueAssertion ::= SEQUENCE {
 *   attributType AttributeType,
 *   attributValue AttributeValue
 * }
 * 
* * @version 1.0 */ public class JDAPAVA { /** * Internal variables */ protected String m_type = null; protected String m_val = null; /** * Constructs the attribute value assertion. * @param type attribute type * @param val attribute value */ public JDAPAVA(String type, String val) { m_type = type; m_val = val; } /** * Retrieves the AVA type. * @return AVA type */ public String getType() { return m_type; } /** * Retrieves the AVA value. * @return AVA value */ public String getValue() { return m_val; } /** * Retrieves the ber representation. * @return ber representation */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_type)); seq.addElement(JDAPFilterOpers.getOctetString(m_val)); return seq; } /** * Retrieves the string representation parameters. * @return string representation parameters */ public String getParamString() { return "{type=" + m_type + ", value=" + m_val + "}"; } /** * Retrieves the string representation. * @return string representation */ public String toString() { return "JDAPAVA " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterOpers.java0000664001003300100330000001527410602743270030765 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.client; import java.util.Vector; import java.io.*; import netscape.ldap.ber.stream.*; /** * This class provides miscellaneous operations for JDAPFilter object. * It converts string with escape characters to the byte array. It also * returns the ber octet string for the specified string with escape * characters. */ public class JDAPFilterOpers { private static final String escapeKey = "\\"; private static final boolean m_debug = false; /** * Returns the octetString for the given string * @return The octetString for the given string */ static BEROctetString getOctetString(String str) { if (str.indexOf(escapeKey) >= 0) { byte[] byteVal = JDAPFilterOpers.getByteValues(str); return new BEROctetString(byteVal); } else return new BEROctetString(str); } /** * Preprocess the LDAPv2 RFC1960 style filter escape sequences (precede * a character with a a backslash) and convert them into the * LDAPv3 style RFC2254 escape sequences (encode a character as a backslash * followed by the two hex digits representing the character ASCII value). * * LDAPv3 style unescaping is done from the getByteValues()method. We must * process LDAPv2 escaped characters earlier to get rid of possible "\(" \)" * sequences which would make filter parsing in the JDAPFilter operate incorrectly. */ public static String convertLDAPv2Escape(String filter) { if (filter.indexOf('\\') < 0) { return filter; } StringBuffer sb = new StringBuffer(); int i=0, start=0, len=filter.length(); while(start < len && (i = filter.indexOf('\\', start)) >= 0 ) { sb.append(filter.substring(start, i+1)); // include also '\' try { char c = filter.charAt(i+1); if ((c >= ' ' && c < 127) && !isHexDigit(c)) { sb.append(Integer.toHexString(c)); } else { sb.append(c); } start = i + 2; } catch (IndexOutOfBoundsException e) { throw new IllegalArgumentException("Bad search filter"); } } if (start < len) { sb.append(filter.substring(start)); } return sb.toString(); } private static boolean isHexDigit(char c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } /** * This method converts the given string into bytes. It also handles * the escape characters embedded in the given string. * @param str The given string being converted into a byte array * @return A byte array */ static byte[] getByteValues(String str) { int pos = 0; Vector v = new Vector(); String val = new String(str); int totalSize = 0; // check if any escape character in the string while ((pos = val.indexOf(escapeKey)) >= 0) { String s1 = val.substring(0, pos); try { byte[] b = s1.getBytes("UTF8"); totalSize += b.length; v.addElement(b); } catch (UnsupportedEncodingException e) { printDebug(e.toString()); return null; } Integer num = null; // decode this number to integer, exception thrown when this is not the // hex try { String hex = "0x"+val.substring(pos+1, pos+3); num = Integer.decode(hex); } catch (IndexOutOfBoundsException e) { printDebug(e.toString()); throw new IllegalArgumentException("Bad search filter"); } catch (NumberFormatException e) { printDebug(e.toString()); throw new IllegalArgumentException("Bad search filter"); } byte[] b = {(byte)num.intValue()}; totalSize += b.length; v.addElement(b); // skip an escape and two chars after escape val = val.substring(pos+3); } if (val.length() > 0) { try { byte[] b = val.getBytes("UTF8"); totalSize += b.length; v.addElement(b); } catch (UnsupportedEncodingException e) { printDebug(e.toString()); return null; } } byte[] result = new byte[totalSize]; pos = 0; for (int i=0; iRFC 2252, Lightweight Directory Access Protocol (v3): * LDAP Subschema Attribute covers the types of information * to specify when defining a syntax. * The description of a syntax can include the following: *

* *

    *
  • an OID identifying the syntax *
  • a description of the attribute type *
*

* * When you construct an LDAPSyntaxSchema object, you can * specify these types of information as arguments to the constructor or * in the ldapSyntaxes format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* RFC 2252 defines SyntaxDescription as follows: *

*

 *     SyntaxDescription = "(" whsp
 *        numericoid whsp
 *        [ "DESC" qdstring ]
 *        whsp ")"
 * 
*

* Syntax definitions do not have a name, so the getName * method inherited from LDAPSchemaElement returns "". * To get the OID and description of this syntax type * definition, use the getOID and * getDescription methods inherited from the abstract class * LDAPSchemaElement. *

* * To add or remove this syntax type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. * * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPSyntaxSchema extends LDAPSchemaElement { static final long serialVersionUID = 3590667117475688132L; /** * Constructs a blank element. */ protected LDAPSyntaxSchema() { super(); } /** * Constructs a syntax type definition, using the specified * information. * @param oid object identifier (OID) of the syntax type * in dotted-string format (for example, "1.2.3.4") * @param description description of syntax type */ public LDAPSyntaxSchema( String oid, String description ) { super( "", oid, description ); attrName = "ldapSyntaxes"; syntaxElement.syntax = syntaxElement.syntaxCheck( oid ); syntaxElement.syntaxString = oid; } /** * Constructs a syntax type definition based on a description in * the ldapSyntaxes format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * LDAP Subschema Attribute. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the syntaxs "objectclasses" and "ldapSyntaxes". The * values of "ldapSyntaxes" are syntax type descriptions * in this format.) *

* * @param raw definition of the syntax type in the * ldapSyntaxes format */ public LDAPSyntaxSchema( String raw ) { attrName = "ldapSyntaxes"; parseValue( raw ); } /** * Gets the syntax of the schema element * @return one of the following values: *

    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
  • unknown (not a known syntax) *
*/ public int getSyntax() { return syntaxElement.syntax; } /** * Gets the syntax of the syntax type in dotted-decimal format, * for example "1.2.3.4.5" * @return The syntax syntax in dotted-decimal format. */ public String getSyntaxString() { return syntaxElement.syntaxString; } /** * Prepares a value in RFC 2252 format for submission to a server * * @return a String ready for submission to an LDAP server. */ public String getValue() { String s = getValuePrefix(); String val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the syntax type in a user friendly format. * This is the format that the syntax type definition uses when * printing the syntax type or the schema. * @return definition of the syntax type in a user friendly format. */ public String toString() { String s = "OID: " + oid; s += "; Description: " + description; s += getQualifierString( null ); return s; } protected LDAPSyntaxSchemaElement syntaxElement = new LDAPSyntaxSchemaElement(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSearchResults.java0000664001003300100330000004724710602743270030047 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import java.io.*; /** * The results of an LDAP search operation, represented as an enumeration. * Note that you can only iterate through this enumeration once: if you * need to use these results more than once, make sure to save the * results in a separate location. *

* * You can also use the results of a search in progress to abandon that search * operation. *

* * @version 1.0 * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchResults) */ public class LDAPSearchResults implements Enumeration, java.io.Serializable { static final long serialVersionUID = -501692208613904825L; private Vector entries = null; private LDAPSearchListener resultSource; private boolean searchComplete = false; private LDAPConnection connectionToClose; private LDAPConnection currConn; private boolean persistentSearch = false; private LDAPSearchConstraints currCons; private String currBase; private int currScope; private String currFilter; private String[] currAttrs; private boolean currAttrsOnly; private Vector referralResults = new Vector(); private Vector exceptions; private int msgID = -1; // only used for the persistent search private boolean firstResult = false; /** * Constructs an enumeration of search results. * Note that this does not actually generate the results; * you need to call LDAPConnection.search to * perform the search and get the results. * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) */ public LDAPSearchResults() { entries = new Vector(); connectionToClose = null; searchComplete = true; currCons = new LDAPSearchConstraints(); } LDAPSearchResults(LDAPConnection conn, LDAPSearchConstraints cons, String base, int scope, String filter, String[] attrs, boolean attrsOnly) { this(); currConn = conn; currCons = cons; currBase = base; currScope = scope; currFilter = filter; currAttrs = attrs; currAttrsOnly = attrsOnly; } /** * Constructs an enumeration of search results. Used when returning results * from a cache. * @param v the vector containing LDAPEntries * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) */ LDAPSearchResults(Vector v) { this(); entries = (Vector)v.clone(); if ((entries != null) && (entries.size() >= 1)) { // Each cache value is represented by a vector. The first element // represents the size of all the LDAPEntries. This needs to be // removed before we iterate through each LDAPEntry. entries.removeElementAt(0); } } LDAPSearchResults(Vector v, LDAPConnection conn, LDAPSearchConstraints cons, String base, int scope, String filter, String[] attrs, boolean attrsOnly) { this(v); currConn = conn; currCons = cons; currBase = base; currScope = scope; currFilter = filter; currAttrs = attrs; currAttrsOnly = attrsOnly; } /** * Add search entry of referral * @param msg LDAPSearchResult or LDAPsearchResultReference */ void add( LDAPMessage msg ) { if (msg instanceof LDAPSearchResult) { entries.addElement( ((LDAPSearchResult)msg).getEntry()); } else if (msg instanceof LDAPSearchResultReference) { /* convert to LDAPReferralException */ String urls[] = ((LDAPSearchResultReference)msg).getUrls(); if (urls != null) { if (exceptions == null) { exceptions = new Vector(); } exceptions.addElement(new LDAPReferralException(null, 0, urls)); } } } /** * Add exception * @param e exception */ void add(LDAPException e) { if (exceptions == null) { exceptions = new Vector(); } exceptions.addElement(e); } /** * Prepares to return asynchronous results from a search * @param l Listener which will provide results */ void associate( LDAPSearchListener l) { resultSource = l; searchComplete = false; } void associatePersistentSearch( LDAPSearchListener l) { resultSource = l; persistentSearch = true; searchComplete = false; firstResult = true; } void addReferralEntries(LDAPSearchResults res) { referralResults.addElement(res); } /** * For asynchronous search, this mechanism allows the programmer to * close a connection whenever the search completes. * @param toClose connection to close when the search terminates */ void closeOnCompletion (LDAPConnection toClose) { if (searchComplete) { try { toClose.disconnect(); } catch (LDAPException e) { } } else { connectionToClose = toClose; } } /** * Basic quicksort algorithm. */ void quicksort (LDAPEntry[] toSort, LDAPEntryComparator compare, int low, int high) { if (low >= high) { return; } LDAPEntry pivot = toSort[low]; int slow = low-1, shigh = high+1; while (true) { do { shigh--; } while (compare.isGreater (toSort[shigh], pivot)); do { slow++; } while (compare.isGreater (pivot, toSort[slow])); if (slow >= shigh) { break; } LDAPEntry temp = toSort[slow]; toSort[slow] = toSort[shigh]; toSort[shigh] = temp; } quicksort (toSort, compare, low, shigh); quicksort (toSort, compare, shigh+1, high); } /** * Sets the message ID for this search request. msgID is used * to retrieve response controls. * @param msgID Message ID for this search request */ void setMsgID(int msgID) { this.msgID = msgID; } /** * Returns the controls returned with this search result. If any control * is registered with LDAPControl, an attempt is made to * instantiate the control. If the instantiation fails, the control is * returned as a basic LDAPControl. * @return an array of type LDAPControl. * @see netscape.ldap.LDAPControl#register */ public LDAPControl[] getResponseControls() { return currConn.getResponseControls(msgID); } /** * Sorts the search results. *

* * The comparator (LDAPEntryComparator) determines the * sort order used. For example, if the comparator uses the uid * attribute for comparison, the search results are sorted according to * uid. *

* * The following section of code sorts results in ascending order, * first by surname and then by common name. * *

     * String[]  sortAttrs = {"sn", "cn"};
     * boolean[] ascending = {true, true};
     *
     * LDAPConnection ld = new LDAPConnection();
     * ld.connect( ... );
     * LDAPSearchResults res = ld.search( ... );
     * res.sort( new LDAPCompareAttrNames(sortAttrs, ascending) );
     * 
* NOTE: If the search results arrive asynchronously, the sort * method blocks until all the results are returned. *

* * If some of the elements of the Enumeration have already been fetched, * the cursor is reset to the (new) first element. *

* * @param compare comparator used to determine the sort order of the results * @see LDAPEntryComparator */ public synchronized void sort(LDAPEntryComparator compare) { while (!searchComplete) { fetchResult(); } // if automatic referral, then add to the entries, otherwise, dont do it // since the elements in referralResults are LDAPReferralException. if (currCons.getReferrals()) { while (referralResults.size() > 0) { Object obj = null; if ((obj=nextReferralElement()) != null) { if (obj instanceof LDAPException) { add((LDAPException)obj); // put it back } else { entries.addElement(obj); } } } } int numEntries = entries.size(); if (numEntries <= 0) { return; } LDAPEntry[] toSort = new LDAPEntry[numEntries]; entries.copyInto (toSort); if (toSort.length > 1) { quicksort (toSort, compare, 0, numEntries-1); } entries.removeAllElements(); for (int i = 0; i < numEntries; i++) { entries.addElement (toSort[i]); } } /** * Returns the next LDAP entry from the search results * and throws an exception if the next result is a referral, or * if a sizelimit or timelimit error occurred. *

* * You can use this method in conjunction with the * hasMoreElements method to iterate through * each entry in the search results. For example: *

     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *                         LDAPConnection.SCOPE_BASE, MY_FILTER,
     *                         null, false );
     * while ( res.hasMoreElements() ) {
     *   try {
     *     LDAPEntry findEntry = res.next();
     *   } catch ( LDAPReferralException e ) {
     *     LDAPUrl refUrls[] = e.getURLs();
     *     for ( int i = 0; i < refUrls.length; i++ ) {
     *     // Your code for handling referrals
     *     }
     *     continue;
     *   } catch ( LDAPException e ) {
     *     // Your code for handling errors on limits exceeded 
     *     continue; 
     *   } 
     *   ...
     * }
     * 
* @return the next LDAP entry in the search results. * @exception LDAPReferralException A referral (thrown * if the next result is a referral), or LDAPException * if a limit on the number of entries or the time was * exceeded. * @see netscape.ldap.LDAPSearchResults#hasMoreElements() */ public LDAPEntry next() throws LDAPException { Object o = nextElement(); if ((o instanceof LDAPReferralException) || (o instanceof LDAPException)) { throw (LDAPException)o; } if (o instanceof LDAPEntry) { return (LDAPEntry)o; } return null; } /** * Returns the next result from a search. You can use this method * in conjunction with the hasMoreElements method to * iterate through all elements in the search results. *

* * Make sure to cast the * returned element as the correct type. For example: *

     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *                         LDAPConnection.SCOPE_BASE, MY_FILTER,
     *                         null, false );
     * while ( res.hasMoreElements() ) {
     *   Object o = res.nextElement(); 
     *   if ( o instanceof LDAPEntry ) { 
     *     LDAPEntry findEntry = (LDAPEntry)o; 
     *     ... 
     *   } else if ( o instanceof LDAPReferralException ) { 
     *     LDAPReferralException e = (LDAPReferralException)o; 
     *     LDAPUrl refUrls[] = e.getURLs(); 
     *     ... 
     *   } else if ( o instanceof LDAPException ) { 
     *     LDAPException e = (LDAPException)o; 
     *     ... 
     *   } 
     * } 
     * 
* @return the next element in the search results. * @see netscape.ldap.LDAPSearchResults#hasMoreElements() */ public Object nextElement() { if ( entries.size() > 0 ) { Object obj = entries.elementAt(0); entries.removeElementAt(0); return obj; } if (referralResults.size() > 0) { return nextReferralElement(); } if ((exceptions != null) && (exceptions.size() > 0)) { Object obj = exceptions.elementAt(0); exceptions.removeElementAt(0); return obj; } return null; } Object nextReferralElement() { LDAPSearchResults res = (LDAPSearchResults)referralResults.elementAt(0); if ((!res.persistentSearch && res.hasMoreElements()) || (res.persistentSearch)) { Object obj = res.nextElement(); if (obj != null) { return obj; } if ((obj == null) || (!res.hasMoreElements())) { referralResults.removeElementAt(0); } } else { referralResults.removeElementAt(0); } return null; } /** * Returns true if there are more search results * to be returned. You can use this method in conjunction with the * nextElement or next methods to iterate * through each entry in the results. For example: *
     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *                         LDAPConnection.SCOPE_BASE, MY_FILTER,
     *                         null, false );
     * while ( res.hasMoreElements() ) {
     *   LDAPEntry findEntry = (LDAPEntry)res.nextElement();
     *   ...
     * }
     * 
* @return true if there are more search results. * @see netscape.ldap.LDAPSearchResults#nextElement() * @see netscape.ldap.LDAPSearchResults#next() */ public boolean hasMoreElements() { while ((entries.size() == 0) && (!searchComplete)) { fetchResult(); } if ((entries.size() == 0) && ((exceptions == null) || (exceptions.size() == 0))) { while (referralResults.size() > 0) { LDAPSearchResults res = (LDAPSearchResults)referralResults.elementAt(0); if (res.hasMoreElements()) return true; else referralResults.removeElementAt(0); } } return ((entries.size() > 0) || ((exceptions != null) && (exceptions.size() > 0))); } /** * Returns a count of queued search results immediately available for * processing. * A search result is either a search entry or an exception. If the * search is asynchronous (batch size not 0), this reports the number * of results received so far. * @return count of search results immediatly available for processing */ public int getCount() { while (resultSource != null && resultSource.getMessageCount() > 0) { fetchResult(); } int count = entries.size(); for ( int i = 0; i < referralResults.size(); i++ ) { LDAPSearchResults res = (LDAPSearchResults)referralResults.elementAt(i); count += res.getCount(); } if ( exceptions != null ) { count += exceptions.size(); } return count; } /** * Returns message ID. * @return Message ID. */ int getMessageID() { if ( resultSource == null ) { return -1; } return resultSource.getMessageID(); } /** * Fetchs the next result, for asynchronous searches. */ private synchronized void fetchResult() { /* Asynchronous case */ if ( resultSource != null ) { synchronized( this ) { if (searchComplete || firstResult) { firstResult = false; return; } LDAPMessage msg = null; try { msg = resultSource.nextMessage(); } catch (LDAPException e) { add(e); currConn.releaseSearchListener(resultSource); searchComplete = true; return; } if (msg == null) { // Request abandoned searchComplete = true; currConn.releaseSearchListener(resultSource); return; } else if (msg instanceof LDAPResponse) { try { // check response and see if we need to do referral // v2: referral stored in the JDAPResult currConn.checkSearchMsg(this, msg, currCons, currBase, currScope, currFilter, currAttrs, currAttrsOnly); } catch (LDAPException e) { add(e); } finally { currConn.releaseSearchListener(resultSource); } searchComplete = true; if (connectionToClose != null) { try { connectionToClose.disconnect (); } catch (LDAPException e) { } connectionToClose = null; } return; } else { try { currConn.checkSearchMsg(this, msg, currCons, currBase, currScope, currFilter, currAttrs, currAttrsOnly); } catch (LDAPException e) { add(e); } } } } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPModificationSet.java0000664001003300100330000001344210602743270030327 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * Represents a set of modifications to be made to attributes in an entry. * A set of modifications is made up of LDAPModification objects. *

* * After you specify a change to an attribute, you can execute the change * by calling the LDAPConnection.modify method and specifying * the DN of the entry that you want to modify. *

* * @version 1.0 * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPConnection#modify(java.lang.String, netscape.ldap.LDAPModificationSet) */ public class LDAPModificationSet implements java.io.Serializable { static final long serialVersionUID = 4650238666753391214L; private int current = 0; private Vector modifications; /** * Constructs a new, empty set of modifications. * You can add modifications to this set by calling the * LDAPModificationsSet.add method. */ public LDAPModificationSet() { modifications = new Vector(); current = 0; } /** * Retrieves the number of LDAPModification * objects in this set. * @return the number of LDAPModification * objects in this set. */ public int size () { return modifications.size(); } /** * Retrieves a particular LDAPModification object at * the position specified by the index. * @param index position of the LDAPModification * object that you want to retrieve. * @return LDAPModification object representing * a change to make to an attribute. */ public LDAPModification elementAt (int index) { return (LDAPModification)modifications.elementAt(index); } /** * Removes a particular LDAPModification object at * the position specified by the index. * @param index position of the LDAPModification * object that you want to remove */ public void removeElementAt( int index ) { modifications.removeElementAt(index); } /** * Specifies another modification to be added to the set of modifications. * @param op the type of modification to make. This can be one of the following: *

*

    *
  • LDAPModification.ADD (the value should be added to the attribute) *
  • LDAPModification.DELETE (the value should be removed from the attribute) *
  • LDAPModification.REPLACE (the value should replace the existing value of the attribute) *

* If you are working with a binary value (not a string value), you need to bitwise OR (|) the * modification type with LDAPModification.BVALUES. *

* * @param attr the attribute (possibly with values) to modify */ public synchronized void add( int op, LDAPAttribute attr ) { LDAPModification mod = new LDAPModification( op, attr ); modifications.addElement( mod ); } /** * Removes the first attribute with the specified name in the set of modifications. * @param name name of the attribute to remove */ public synchronized void remove( String name ) { for( int i = 0; i < modifications.size(); i++ ) { LDAPModification mod = (LDAPModification)modifications.elementAt( i ); LDAPAttribute attr = mod.getAttribute(); if ( name.equalsIgnoreCase( attr.getName() ) ) { modifications.removeElementAt( i ); break; } } } /** * Retrieves the string representation of the * modification set. * * @return string representation of the modification set. */ public String toString() { String s = "LDAPModificationSet: {"; for( int i = 0; i < modifications.size(); i++ ) { s += (LDAPModification)modifications.elementAt(i); if ( i < modifications.size()-1 ) { s += ", "; } } s += "}"; return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPMessageQueue.java0000664001003300100330000004445110602743270027643 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.Vector; /** * A queue of response messsages from the server. Multiple requests * can be multiplexed on the same queue. For synchronous LDAPConnection * requests, there will be only one request per queue. For asynchronous * LDAPConnection requests, the user can add multiple request to the * same queue. * * Superclass for LDAResponseListener and LDAPSearchListener * */ class LDAPMessageQueue implements java.io.Serializable { static final long serialVersionUID = -7163312406176592278L; /** * Request entry encapsulates request parameters */ private static class RequestEntry { int id; LDAPConnection connection; LDAPConnThread connThread; long timeToComplete; RequestEntry(int id, LDAPConnection connection, LDAPConnThread connThread, int timeLimit) { this.id= id; this.connection = connection; this.connThread = connThread; this.timeToComplete = (timeLimit == 0) ? Long.MAX_VALUE : (System.currentTimeMillis() + timeLimit); } } /** * Internal variables */ private /*LDAPMessage */ Vector m_messageQueue = new Vector(1); private /*RequestEntry*/ Vector m_requestList = new Vector(1); private LDAPException m_exception; /* For network errors */ private boolean m_asynchOp; // A flag whether there are time constrained requests private boolean m_timeConstrained; /** * Constructor * @param asynchOp a boolean flag that is true if the object is used * for asynchronous LDAP operations * @see netscape.ldap.LDAPAsynchronousConnection */ LDAPMessageQueue (boolean asynchOp) { m_asynchOp = asynchOp; } /** * Returns a flag whether the listener is used for asynchronous LDAP * operations * @return asynchronous operation flag. * @see netscape.ldap.LDAPAsynchronousConnection */ boolean isAsynchOp() { return m_asynchOp; } /** * Blocks until a response is available. * Used by LDAPConnection.sendRequest (synch ops) to test if the server * is really available after a request had been sent. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ synchronized void waitFirstMessage () throws LDAPException { while(m_requestList.size() != 0 && m_exception == null && m_messageQueue.size() == 0) { waitForMessage(); } // Network exception occurred ? if (m_exception != null) { LDAPException ex = m_exception; m_exception = null; throw ex; } } /** * Blocks until a response is available or until all operations * associated with the object have completed or been canceled. * @return LDAP message or null if there are no more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ synchronized LDAPMessage nextMessage () throws LDAPException { while(m_requestList.size() != 0 && m_exception == null && m_messageQueue.size() == 0) { waitForMessage(); } // Network exception occurred ? if (m_exception != null) { LDAPException ex = m_exception; m_exception = null; throw ex; } // Are there any outstanding requests left if (m_requestList.size() == 0) { return null; // No outstanding requests } // Dequeue the first entry LDAPMessage msg = (LDAPMessage) m_messageQueue.elementAt(0); m_messageQueue.removeElementAt(0); // Is the ldap operation completed? if (msg instanceof LDAPResponse) { removeRequest(msg.getMessageID()); } return msg; } /** * Wait for request to complete. This method blocks until a message of * type LDAPResponse has been received. Used by synchronous search * with batch size of zero (block until all results are received) * @return LDAPResponse message or null if there are no more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ synchronized LDAPResponse completeRequest () throws LDAPException { while (true) { while(m_requestList.size() != 0 && m_exception == null && m_messageQueue.size() == 0) { waitForMessage(); } // Network exception occurred ? if (m_exception != null) { LDAPException ex = m_exception; m_exception = null; throw ex; } // Are there any outstanding requests left? if (m_requestList.size() == 0) { return null; // No outstanding requests } // Search an instance of LDAPResponse for (int i= m_messageQueue.size()-1; i >=0; i--) { LDAPMessage msg = (LDAPMessage) m_messageQueue.elementAt(i); if (msg instanceof LDAPResponse) { // Dequeue the entry and return m_messageQueue.removeElementAt(i); return (LDAPResponse)msg; } } // Not found, wait for the next message waitForMessage(); } } /** * Wait for a response message. Process interrupts and honor * time limit if set for any request */ synchronized private void waitForMessage () throws LDAPException{ if (!m_timeConstrained) { try { wait (); return; } catch (InterruptedException e) { throw new LDAPInterruptedException("Interrupted LDAP operation"); } } /** * Perform time constrained wait */ long minTimeToComplete = Long.MAX_VALUE; long now = System.currentTimeMillis(); for (int i=0; i < m_requestList.size(); i++) { RequestEntry entry = (RequestEntry)m_requestList.elementAt(i); // time limit exceeded ? if (entry.timeToComplete <= now) { entry.connection.abandon(entry.id); throw new LDAPException("Time to complete operation exceeded", LDAPException.LDAP_TIMEOUT); } if (entry.timeToComplete < minTimeToComplete) { minTimeToComplete = entry.timeToComplete; } } long timeLimit = (minTimeToComplete == Long.MAX_VALUE)? 0 :(minTimeToComplete - now); try { m_timeConstrained = (timeLimit != 0); wait (timeLimit); } catch (InterruptedException e) { throw new LDAPInterruptedException("Interrupted LDAP operation"); } } /** * Merge two message queues. * Move/append the content from another message queue to this one. * * To be used for synchronization of asynchronous LDAP operations where * requests are sent by one thread but processed by another one * * A client may be implemented in such a way that one thread makes LDAP * requests and calls l.getMessageIDs(), while another thread is * responsible for * processing of responses (call l.getResponse()). Both threads are using * the same listener objects. In such a case, a race * condition may occur, where a LDAP response message is retrieved and * the request terminated (request ID removed) before the first thread * has a chance to execute l.getMessageIDs(). * The proper way to handle this scenario is to create a separate listener * for each new request, and after l.getMessageIDs() has been invoked, * merge the * new request with the existing one. * @param mq2 message queue to merge with this one */ void merge(LDAPMessageQueue mq2) { // Yield just in case the LDAPConnThread is in the process of // dispatching a message Thread.yield(); synchronized(this) { synchronized (mq2) { for (int i=0; i < mq2.m_messageQueue.size(); i++) { m_messageQueue.addElement(mq2.m_messageQueue.elementAt(i)); } if (mq2.m_exception != null) { m_exception = mq2.m_exception; } for (int i=0; i < mq2.m_requestList.size(); i++) { RequestEntry entry = (RequestEntry)mq2.m_requestList.elementAt(i); m_requestList.addElement(entry); // Notify LDAPConnThread to redirect mq2 designated responses to this mq entry.connThread.changeListener(entry.id, this); } mq2.reset(); notifyAll(); // notify for mq2 } notifyAll(); // notify this mq } } /** * Retrieves all messages currently in the queue without blocking * @return vector of messages. */ synchronized Vector getAllMessages() { Vector result = m_messageQueue; m_messageQueue = new Vector(1); return result; } /** * Queues the LDAP server's response. This causes anyone waiting * in nextMessage() to unblock. * @param msg response message */ synchronized void addMessage (LDAPMessage msg) { m_messageQueue.addElement(msg); // Mark conn as bound for asych bind operations if (isAsynchOp() && msg.getType() == msg.BIND_RESPONSE) { if (((LDAPResponse) msg).getResultCode() == 0) { getConnection(msg.getMessageID()).setBound(true); } } notifyAll (); } /** * Signals that a network exception occured while servicing the * request. This exception will be throw to any thread waiting * in nextMessage() * @param connThread LDAPConnThread on which the exception occurred * @param e exception */ synchronized void setException (LDAPConnThread connThread, LDAPException e) { m_exception = e; removeAllRequests(connThread); notifyAll (); } /** * Checks if response message is received. * @return true or false. */ boolean isMessageReceived() { return m_messageQueue.size() != 0; } /** * Returns the count of queued messages * @return message count. */ public int getMessageCount () { return m_messageQueue.size(); } /** * Remove all queued messages associated with the request ID * Called when a LDAP operation is abandoned * * Not synchronized as its private and can be called only by * abandon() and removeAllRequests() * * @return count of removed messages. */ private int removeAllMessages(int id) { int removeCount=0; for (int i=(m_messageQueue.size()-1); i>=0; i--) { LDAPMessage msg = (LDAPMessage)m_messageQueue.elementAt(i); if (msg.getMessageID() == id) { m_messageQueue.removeElementAt(i); removeCount++; } } return removeCount; } /** * Resets the state of this object, so it can be recycled. * Used by LDAPConnection synchronous operations. * @see netscape.ldap.LDAPConnection#getResponseListener * @see netscape.ldap.LDAPConnection#getSearchListener */ void reset () { m_exception = null; m_messageQueue.removeAllElements(); m_requestList.removeAllElements(); m_timeConstrained = false; } /** * Returns the connection associated with the specified request id * @param id request id * @return connection. */ synchronized LDAPConnection getConnection(int id) { for (int i=0; i < m_requestList.size(); i++) { RequestEntry entry = (RequestEntry)m_requestList.elementAt(i); if (id == entry.id) { return entry.connection; } } return null; } /** * Returns the connection thread associated with the specified request id * @param id request id. * @return connection thread. */ synchronized LDAPConnThread getConnThread(int id) { for (int i=0; i < m_requestList.size(); i++) { RequestEntry entry = (RequestEntry)m_requestList.elementAt(i); if (id == entry.id) { return entry.connThread; } } return null; } /** * Returns message ID of the last request * @return message ID. */ synchronized int getMessageID() { int reqCnt = m_requestList.size(); if ( reqCnt == 0) { return -1; } else { RequestEntry entry = (RequestEntry)m_requestList.elementAt(reqCnt-1); return entry.id; } } /** * Returns a list of message IDs for all outstanding requests * @return message ID array. */ synchronized int[] getMessageIDs() { int[] ids = new int[m_requestList.size()]; for (int i=0; i < ids.length; i++) { RequestEntry entry = (RequestEntry)m_requestList.elementAt(i); ids[i] = entry.id; } return ids; } /** * Registers a LDAP request * @param id LDAP request message ID * @param connection LDAP Connection for the message ID * @param connThread a physical connection to the server * @param timeLimit the maximum number of milliseconds to wait for * the request to complete */ synchronized void addRequest(int id, LDAPConnection connection, LDAPConnThread connThread, int timeLimit) { m_requestList.addElement(new RequestEntry(id, connection, connThread, timeLimit)); if (timeLimit != 0) { m_timeConstrained = true; } notifyAll(); } /** * Returns the number of outstanding requests. * @return outstanding request count. */ public int getRequestCount() { return m_requestList.size(); } /** * Remove request with the specified ID * Called when a LDAP operation is abandoned (called from * LDAPConnThread), or terminated (called by nextMessage() when * LDAPResponse message is received) * @return flag indicating whether the request was removed. */ synchronized boolean removeRequest(int id) { for (int i=0; i < m_requestList.size(); i++) { RequestEntry entry = (RequestEntry)m_requestList.elementAt(i); if (id == entry.id) { m_requestList.removeElementAt(i); removeAllMessages(id); notifyAll(); return true; } } return false; } /** * Remove all requests associated with the specified connThread * Called when a connThread has a network error * @return number of removed requests. */ synchronized int removeAllRequests(LDAPConnThread connThread) { int removeCount=0; for (int i=(m_requestList.size()-1); i>=0; i--) { RequestEntry entry = (RequestEntry)m_requestList.elementAt(i); if (connThread == entry.connThread) { m_requestList.removeElementAt(i); removeCount++; // remove all queued messages as well removeAllMessages(entry.id); } } notifyAll(); return removeCount; } /** * String representation of the object */ public String toString() { StringBuffer sb = new StringBuffer("LDAPMessageQueue:"); sb.append(" requestIDs={"); for (int i=0; i < m_requestList.size(); i++) { if (i>0) { sb.append(","); } sb.append(((RequestEntry)m_requestList.elementAt(i)).id); } sb.append("} messageCount="+m_messageQueue.size()); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/factory/0000775001003300100330000000000010667357327025424 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/factory/JSSSocketFactory.java0000664001003300100330000002010710602743272031412 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.factory; import java.net.*; import java.io.*; import netscape.ldap.*; import org.mozilla.jss.ssl.SSLSocket; import org.mozilla.jss.ssl.SSLCertificateApprovalCallback.ValidityStatus; import org.mozilla.jss.ssl.SSLCertificateApprovalCallback; import org.mozilla.jss.crypto.X509Certificate; import org.mozilla.jss.crypto.AlreadyInitializedException; import org.mozilla.jss.CryptoManager; /** * Creates an SSL socket connection to a server, using the Netscape/Mozilla * JSS package. * This class implements the LDAPSocketFactory * interface. *

* By default, the factory uses "secmod.db", "key*.db" and "cert*.db" * databases in the current directory. If you need to override this default * setting, then you should use the constructor JSSSocketFactory(certdbDir). * * @version 1.1 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(netscape.ldap.LDAPSocketFactory) */ public class JSSSocketFactory implements Serializable, LDAPTLSSocketFactory, SSLCertificateApprovalCallback { static final long serialVersionUID = -6926469178017736903L; /** * Constructs a new JSSSocketFactory, initializing the * JSS security system if it has not already been initialized. *

* The current directory is assumed to be the certificate database directory. * * @exception LDAPException on initialization error * @see netscape.ldap.factory.JSSSocketFactory#JSSSocketFactory(java.lang.String) */ public JSSSocketFactory() throws LDAPException{ initialize("."); } /** * Constructs a new JSSSocketFactory, initializing the * JSS security system if it has not already been initialized. * * @param certdbDir The full path, relative or absolute, of the certificate * database directory * @exception LDAPException on initialization error */ public JSSSocketFactory( String certdbDir ) throws LDAPException{ initialize( certdbDir ); } /** * Initialize the JSS security subsystem. *

* This method allows you to override the current directory as the * default certificate database directory. The directory is expected * to contain secmod.db, key*.db and * cert*.db files as the security module database, key database * and certificate database respectively. *

* The method may be called only once, before the first instance of * JSSSocketFactory is created. When creating the first * instance, the constructor will automatically initialize the JSS * security subsystem using the defaults, unless it is already initialized. *

* @param certdbDir The full path, relative or absolute, of the certificate * database directory. * @exception LDAPException on initialization error * @see netscape.ldap.factory.JSSSocketFactory#JSSSocketFactory(String) */ public static void initialize( String certdbDir ) throws LDAPException { try { CryptoManager.initialize( certdbDir ); } catch (AlreadyInitializedException e) { // This is ok } catch (Exception e) { throw new LDAPException("Failed to initialize JSSSocketFactory: " + e.getMessage(), LDAPException.OTHER); } } /** * Creates an SSL socket * * @param host Host name or IP address of SSL server * @param port Port numbers of SSL server * @return A socket for an encrypted session * @exception LDAPException on error creating socket */ public Socket makeSocket( String host, int port ) throws LDAPException { SSLSocket socket = null; try { socket = new SSLSocket( host, // address port, // port null, // localAddress 0, // localPort this, // certApprovalCallback null // clientCertSelectionCallback ); socket.forceHandshake(); } catch (UnknownHostException e) { throw new LDAPException("JSSSocketFactory.makeSocket - Unknown host: " + host, LDAPException.CONNECT_ERROR); } catch (Exception e) { throw new LDAPException("JSSSocketFactory.makeSocket " + host + ":" + port + ", " + e.getMessage(), LDAPException.CONNECT_ERROR); } return socket; } /** * The default implementation of the SSLCertificateApprovalCallback * interface. *

* This default implementation always returns true. If you need to * verify the server certificate validity, then you should override * this method. *

* @param serverCert X509 Certificate * @param status The validity of the server certificate * @return true, by default we trust the certificate */ public boolean approve(X509Certificate serverCert, ValidityStatus status) { return true; } /** * Creates an SSL socket layered over an existing socket. * * Used for the startTLS implementation (RFC2830). * * @param s An existing non-SSL socket * @return A SSL socket layered over the input socket * @exception LDAPException on error creating socket * @since LDAPJDK 4.17 */ public Socket makeSocket(Socket s) throws LDAPException { SSLSocket socket = null; String host = s.getInetAddress().getHostName(); int port = s.getPort(); try { socket = new SSLSocket( s, host, this, // certApprovalCallback null // clientCertSelectionCallback ); socket.forceHandshake(); } catch (Exception e) { throw new LDAPException("JSSSocketFactory - start TLS, " + e.getMessage(), LDAPException.TLS_NOT_SUPPORTED); } return socket; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/factory/JSSESocketFactory.java0000664001003300100330000001350710620653755031533 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.factory; import java.net.*; import java.io.*; import javax.net.ssl.*; import netscape.ldap.*; /** * Creates an SSL socket connection to a server, using the JSSE package * from Sun. This class implements the LDAPSocketFactory * interface. *

* * @version 1.0 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(netscape.ldap.LDAPSocketFactory) */ public class JSSESocketFactory implements LDAPTLSSocketFactory, java.io.Serializable { static final long serialVersionUID = 6834205777733266610L; protected SSLSocketFactory factory = null; // Optional explicit cipher suites to use protected String[] suites = null; /** * Default factory constructor */ public JSSESocketFactory() { this.factory = (SSLSocketFactory) SSLSocketFactory.getDefault(); } /** * Factory constructor * * @param suites Cipher suites to attempt to use with the server; * if null, use any cipher suites available in the * JSSE package */ public JSSESocketFactory( String[] suites ) { this.suites = suites; this.factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); } /** * Factory constructor * @param factory the SSL socketfactory to use */ public JSSESocketFactory( SSLSocketFactory factory) { this.factory = factory; } /** * Factory constructor * @param suites Cipher suites to attempt to use with the server; * if null, use any cipher suites available in the * JSSE package * @param factory the SSL socketfactory to use */ public JSSESocketFactory( String[] suites, SSLSocketFactory factory) { this.suites = suites; this.factory = factory; } /** * Creates an SSL socket. * * @param host Host name or IP address of SSL server * @param port Port numbers of SSL server * @return A socket for an encrypted session * @exception LDAPException on error creating socket */ public Socket makeSocket(String host, int port) throws LDAPException { SSLSocket sock = null; try { sock = (SSLSocket)factory.createSocket(host, port); if (suites != null) { sock.setEnabledCipherSuites(suites); } // Start handshake manually to immediately expose potential // SSL errors as exceptions. Otherwise, handshake will take // place first time the data are written to the socket. sock.startHandshake(); } catch (UnknownHostException e) { throw new LDAPException("JSSESocketFactory.makeSocket - Unknown host: " + host, LDAPException.CONNECT_ERROR); } catch (IOException f) { throw new LDAPException("JSSESocketFactory.makeSocket " + host + ":" + port + ", " + f.getMessage(), LDAPException.CONNECT_ERROR); } return sock; } /** * Creates an SSL socket layered over an existing socket. * * Used for the startTLS implementation (RFC2830). * * @param s An existing non-SSL socket * @return A SSL socket layered over the input socket * @exception LDAPException on error creating socket * @since LDAPJDK 4.17 */ public Socket makeSocket(Socket s) throws LDAPException { SSLSocket sock = null; String host = s.getInetAddress().getHostName(); int port = s.getPort(); try { sock = (SSLSocket)factory.createSocket(s, host, port, /*autoClose=*/ true); if (suites != null) { sock.setEnabledCipherSuites(suites); } sock.startHandshake(); } catch (IOException f) { throw new LDAPException("JSSESocketFactory - start TLS, " + f.getMessage(), LDAPException.TLS_NOT_SUPPORTED); } return sock; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPCompareAttrNames.java0000664001003300100330000003225710620653754030467 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.text.*; /** * Compares LDAP entries based on one or more attribute values. *

* * To use this comparison for sorting search results, pass * an object of this class to the sort method in * LDAPSearchResults. *

* * @version 1.0 * @see LDAPEntryComparator * @see LDAPSearchResults#sort */ public class LDAPCompareAttrNames implements LDAPEntryComparator, java.io.Serializable { static final long serialVersionUID = -2567450425231175944L; private String m_attrs[]; private boolean m_ascending[]; private Locale m_locale = null; private Collator m_collator = null; private boolean m_sensitive = true; /** * Constructs a comparator that compares the string values of * a named attribute in LDAP entries and sorts the entries in * ascending order. *

* * @param attribute name of attribute for comparisons */ public LDAPCompareAttrNames (String attribute) { m_attrs = new String[1]; m_attrs[0] = attribute; m_ascending = new boolean[1]; m_ascending[0] = true; } /** * Constructs a comparator that compares the string values of * a named attribute in LDAP entries and that allows you to sort * entries either in ascending or descending order. *

* * @param attribute name of attribute for comparisons * @param ascendingFlag if true, sort in ascending order */ public LDAPCompareAttrNames (String attribute, boolean ascendingFlag) { m_attrs = new String[1]; m_attrs[0] = attribute; m_ascending = new boolean[1]; m_ascending[0] = ascendingFlag; } /** * Constructs a comparator that compares the string values of * a set of named attributes in LDAP entries and that sort * the entries in ascending order. *

* * Use an array of strings to specify the set of attributes * to use for sorting. If the values of the first attribute * (the name specified in attribute[0]) are equal, * then the values of the next attribute are compared. *

* * For example, if attributes[0] = "cn" and * attributes[1]="uid", results are first sorted * by the cn attribute. If two entries have the * same value for cn, then the uid * attribute is used to sort the entries. *

* * @param attributes array of the attribute names used for comparisons */ public LDAPCompareAttrNames (String[] attributes) { m_attrs = attributes; m_ascending = new boolean[attributes.length]; for( int i = 0; i < attributes.length; i++ ) m_ascending[i] = true; } /** * Constructs a comparator that compares the string values of * a set of named attributes in LDAP entries and allows you * to sort the entries in ascending or descending order. *

* * Use an array of strings to specify the set of attributes * to use for sorting. If the values of the first attribute * (the name specified in attribute[0]) * are equal, then the values of the next attribute are compared. *

* * For example, if attributes[0] = "cn" and * attributes[1]="uid", results are first sorted * by the cn attribute. If two entries have the * same value for cn, then the uid * attribute is used to sort the entries. *

* * Use an array of boolean values to specify whether each attribute * should be sorted in ascending or descending order. For example, * suppose that attributes[0] = "cn" and * attributes[1]="roomNumber". If * ascendingFlags[0]=true and * ascendingFlags[1]=false, attributes are sorted first by * cn in ascending order, then by roomNumber * in descending order. *

* * If the size of the array of attribute names is not the same as * the size of the array of boolean values, an * LDAPException is thrown. *

* * @param attributes array of the attribute names to use for comparisons * @param ascendingFlags array of boolean values specifying ascending * or descending order to use for each attribute name. If * true, the attributes are sorted in ascending order. */ public LDAPCompareAttrNames (String[] attributes, boolean[] ascendingFlags) { m_attrs = attributes; m_ascending = ascendingFlags; if ( m_ascending == null ) { m_ascending = new boolean[attributes.length]; for( int i = 0; i < attributes.length; i++ ) m_ascending[i] = true; } } /** * Gets the locale, if any, used for collation. If the locale is null, * an ordinary string comparison is used for sorting. * * @return the locale used for collation, or null. */ public Locale getLocale() { return m_locale; } /** * Set the locale, if any, used for collation. If the locale is null, * an ordinary string comparison is used for sorting. If sorting * has been set to case-insensitive, the collation strength is set * to Collator.PRIMARY, otherwise to Collator.IDENTICAL. If a * different collation strength setting is required, use the signature * that takes a collation strength parameter. * * @param locale the locale used for collation, or null. */ public void setLocale( Locale locale ) { if ( m_sensitive ) { setLocale( locale, Collator.IDENTICAL ); } else { setLocale( locale, Collator.PRIMARY ); } } /** * Sets the locale, if any, used for collation. If the locale is null, * an ordinary string comparison is used for sorting. * * @param locale the locale used for collation, or null. * @param strength collation strength: Collator.PRIMARY, * Collator.SECONDARY, Collator.TERTIARY, or Collator.IDENTICAL */ public void setLocale( Locale locale, int strength ) { m_locale = locale; if ( m_locale == null ) { m_collator = null; } else { m_collator = Collator.getInstance( m_locale ); m_collator.setStrength(strength); } } /** * Gets the state of the case-sensitivity flag. This only applies to * Unicode sort order; for locale-specific sorting, case-sensitivity * is controlled by the collation strength. * * @return true for case-sensitive sorting; this is * the default */ public boolean getCaseSensitive() { return m_sensitive; } /** * Sets the state of the case-sensitivity flag. This only applies to * Unicode sort order; for locale-specific sorting, case-sensitivity * is controlled by the collation strength. * * @param sensitive true for case-sensitive sorting; * this is the default */ public void setCaseSensitive( boolean sensitive ) { m_sensitive = sensitive; } /** * Returns true if the value of the attribute in the first entry is greater * than the value of the attribute in the second entry. *

* * If one of the entries is missing the attribute, the other is * considered greater. By default, the first entry is greater. *

* * If either entry contains multiple values, only the first value * is used for comparisons. *

* * @param greater entry against which to test * @param less entry to test * @return true if (greater > less). */ public boolean isGreater (LDAPEntry greater, LDAPEntry less) { if (greater.equals (less)) return false; return attrGreater (greater, less, 0); } /** * Compares a particular attribute in both entries. If equal, * moves on to the next. * @param greater greater arg from isGreater * @param less less arg from isGreater * @param attrPos the index in an array of attributes, indicating * the attribute to compare * @return (greater > less) */ boolean attrGreater (LDAPEntry greater, LDAPEntry less, int attrPos) { Enumeration greaterAttrSet = greater.getAttributeSet().getAttributes(); Enumeration lessAttrSet = less.getAttributeSet().getAttributes(); String greaterValue = null; String lessValue = null; String attrName = m_attrs[attrPos]; boolean ascending = m_ascending[attrPos]; try { while (lessAttrSet.hasMoreElements()) { LDAPAttribute currAttr = (LDAPAttribute)(lessAttrSet.nextElement()); if (!attrName.equalsIgnoreCase (currAttr.getName())) continue; lessValue = (String)(currAttr.getStringValues().nextElement()); break; } while (greaterAttrSet.hasMoreElements()) { LDAPAttribute currAttr = (LDAPAttribute)(greaterAttrSet.nextElement()); if (!attrName.equalsIgnoreCase (currAttr.getName())) continue; greaterValue = (String)(currAttr.getStringValues().nextElement()); break; } } catch (ClassCastException cce) { // i.e. one of the enumerations did not contain the // right type !? return false; } catch (NoSuchElementException nse) { // i.e. one of the attributes had no values !? return false; } if ((lessValue == null) ^ (greaterValue == null)) return greaterValue != null; // Check for equality if ( (lessValue == null) || ((m_collator != null) && (m_collator.compare( greaterValue, lessValue ) == 0) ) || ((m_collator == null) && m_sensitive && lessValue.equals(greaterValue)) || ((m_collator == null) && !m_sensitive && lessValue.equalsIgnoreCase(greaterValue)) ) { if (attrPos == m_attrs.length - 1) { return false; } else { return attrGreater (greater, less, attrPos+1); } } // Not equal, check for order if ( ascending ) { if ( m_collator != null ) { return ( m_collator.compare( greaterValue, lessValue ) > 0 ); } else if ( m_sensitive ) { return (greaterValue.compareTo (lessValue) > 0); } else { return (greaterValue.toLowerCase().compareTo ( lessValue.toLowerCase()) > 0); } } else { if ( m_collator != null ) { return ( m_collator.compare( greaterValue, lessValue ) < 0 ); } else if ( m_sensitive ) { return (greaterValue.compareTo (lessValue) < 0); } else { return (greaterValue.toLowerCase().compareTo ( lessValue.toLowerCase()) < 0); } } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPv3.java0000664001003300100330000002224710602743270025601 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import java.io.*; /** * Specifies additional features available in version 3 of the * LDAP protocol. (To view preliminary information on this work * in progress, see the LDAP v3 internet draft. You can find the * latest version of this document listed under the Internet-Drafts * section of the * ASID home page.) * * @version 1.0 */ public interface LDAPv3 extends LDAPv2 { /** * Connects and authenticates to the LDAP server using the specified version of the * LDAP protocol. * @param version requested version of the LDAP protocol: currently 2 or 3 * @param host hostname of the LDAP server * @param port port number of the LDAP server. To specify the * default port, use DEFAULT_PORT. * @param dn distinguished name to use for authentication * @param passwd password for authentication * @exception LDAPException Failed to connect and authenticate to the server. */ public void connect(int version, String host, int port, String dn, String passwd) throws LDAPException; /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name, password, and version * of the LDAP protocol. If the server does not support the requested * protocol version, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * @param version requested LDAP protocol version: currently 2 or 3. * @param dn if non-null and non-empty, specifies that the * connection and all operations through it should * authenticate with dn as the distinguished name * @param passwd if non-null and non-empty, specifies that the * connection and all operations through it should * authenticated with passwd as password * @exception LDAPException Failed to authenticate to the LDAP server. */ public void authenticate(int version, String dn, String passwd) throws LDAPException; /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name, password, and version of the * LDAP protocol. If the server does not support the requested * version of the protocol, an exception is thrown. If the * object has been disconnected from an LDAP server, this method * attempts to reconnect to the server. If the object had already * authenticated, the old authentication is discarded. * @param version requested LDAP protocol version: currently 2 or 3. * @param dn if non-null and non-empty, specifies that the * connection and all operations through it should authenticate * with dn as the distinguished name * @param passwd if non-null and non-empty, specifies that the * connection and all operations through it should authenticate * with passwd as password * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind(int version, String dn, String passwd) throws LDAPException; /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol. *

* * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see LDAPExtendedOperation */ public LDAPExtendedOperation extendedOperation( LDAPExtendedOperation op ) throws LDAPException; /** * Renames and moves an entry in the directory. * @param DN original distinguished name (DN) for the entry * @param newRDN new relative distinguished name (RDN) for the entry * @param newParentDN distinguished name of the new parent entry of the * specified entry * @param deleteOldRDN specifies whether or not to remove the old RDN * when renaming and moving the entry. If true, the old RDN will be deleted. * @exception LDAPException Failed to rename the specified entry. */ public void rename( String DN, String newRDN, String newParentDN, boolean deleteOldRDN ) throws LDAPException; /** * Renames and moves an entry in the directory. * @param DN original distinguished name (DN) for the entry * @param newRDN new relative distinguished name (RDN) for the entry * @param newParentDN distinguished name of the new parent entry of the * specified entry * @param deleteOldRDN specifies whether or not to remove the old RDN * when renaming and moving the entry. If true, the old RDN will be deleted. * @param cons the constraints set for the rename operation * @exception LDAPException Failed to rename the specified entry. */ public void rename( String DN, String newRDN, String newParentDN, boolean deleteOldRDN, LDAPConstraints cons ) throws LDAPException; /** * Returns an array of the latest controls (if any) from the server. * @return an array of the controls returned by an operation, * or null if none. * @see netscape.ldap.LDAPControl */ public LDAPControl[] getResponseControls(); /** * Option specifying client controls for LDAP operations. These * controls are interpreted by the client and are not passed * to the LDAP server. * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int CLIENTCONTROLS = 11; /** * Option specifying server controls for LDAP operations. These * controls are passed to the LDAP server. They may also be returned by * the server. * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int SERVERCONTROLS = 12; /** * Attribute type that you can specify in the LDAPConnection * search method if you don't want to retrieve any of the * attribute types for entries found by the search. * @see netscape.ldap.LDAPConnection#search */ public static final String NO_ATTRS = "1.1"; /** * Attribute type that you can specify in the LDAPConnection * search method if you want to retrieve all attribute types. * You can use this if you want to retrieve all attributes in * addition to an operational attribute. For example: *

* *

     * ...
     * String [] MY_ATTRS = { LDAPv3.ALL_USER_ATTRS, "modifiersName",
     *     "modifyTimestamp" };
     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *     LDAPConnection.SCOPE_SUB, MY_FILTER, MY_ATTRS, false, cons );
     * ...
     * 
* @see netscape.ldap.LDAPConnection#search */ public static final String ALL_USER_ATTRS = "*"; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPDITStructureRuleSchema.java0000664001003300100330000002501210602743270031554 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * The definition of a DIT structure rule in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Structure Rule Description covers the types of information * to specify when defining a DIT structure rule. According to the RFC, * the description of a DIT structure rule can include the following: *

* *

    *
  • an OID identifying the attribute type *
  • a name identifying the attribute type *
  • a description of the attribute type *
  • the name of the parent attribute type *
  • the syntax used by the attribute (for example, * cis or int) *
  • an indication of whether the attribute type is single-valued * or multi-valued *
*

* * When you construct an LDAPDITStructureRuleSchema object, you can * specify these types of information as arguments to the constructor or * in the AttributeTypeDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * There are a number of additional optional description fields which * are not explicitly accessible through LDAPDITStructureRuleSchema, but which * can be managed with setQualifier, getQualifier, and getQualifierNames: *

* *

    *
  • OBSOLETE *
*

* * To get the name, OID, and description of this DIT structure rule * , use the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this attribute type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines DITStructureRuleDescription as follows: *

*

 *      DITStructureRuleDescription = "(" whsp
 *        ruleidentifier whsp            ; DITStructureRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        "FORM" woid whsp               ; NameForm
 *        [ "SUP" ruleidentifiers whsp ] ; superior DITStructureRules
 *    ")"
 * 
* * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPDITStructureRuleSchema extends LDAPSchemaElement { static final long serialVersionUID = -2823317246039655811L; /** * Constructs a blank element. */ protected LDAPDITStructureRuleSchema() { super(); } /** * Constructs a DIT structure rule definition, using the specified * information. * @param name name of the attribute type * @param ruleID unique identifier of the structure rule.
* NOTE: this is an integer, not a dotted numerical identifier. * Structure rules aren't identified by OID. * @param description description of attribute type * @param obsolete true if the rule is obsolete * @param nameForm either the identifier or name of a name form. * This is used to indirectly refer to the object class that this * structure rule applies to. * @param superiors list of superior structure rules - specified * by their integer ID. The object class specified by this structure * rule (via the nameForm parameter) may only be subordinate in * the DIT to object classes of those represented by the structure * rules here. */ public LDAPDITStructureRuleSchema( String name, int ruleID, String description, boolean obsolete, String nameForm, String[] superiors ) { super( name, "", description, null ); this.nameForm = nameForm; this.ruleID = ruleID; if ( obsolete ) { setQualifier( OBSOLETE, "" ); } if ( (superiors != null) && (superiors.length > 0) ) { setQualifier( SUPERIOR, superiors ); } } /** * Constructs a DIT structure rule definition based on a description in * the DITStructureRuleDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Structure Rule Description. This is the format that * LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of "attributetypes" are attribute type descriptions * in this format.) *

* * @param raw definition of the DIT structure rule in the * DITStructureRuleDescription format */ public LDAPDITStructureRuleSchema( String raw ) { attrName = "ditStructureRules"; parseValue( raw ); Object o = properties.get( FORM ); if ( o != null ) { nameForm = (String)o; } try { ruleID = Integer.parseInt( oid ); } catch ( Exception e ) { } } /** * Returns a list of all structure rules that are superior to this * structure rule. To resolve to an object class, you need to first * resolve the superior id to another structure rule, then call * getNameForm().getObjectClass() on that structure rule. * @return the structure rules that are superior to this * structure rule. */ public String[] getSuperiors() { return getQualifier( SUPERIOR ); } /** * Returns the rule ID for this structure rule. Note that this returns * an integer rather than a dotted decimal OID. Objects of this class do * not have an OID, thus getID will return null. * * @return the rule ID for this structure rule. */ public int getRuleID() { return ruleID; } /** * Returns the NameForm that this structure rule controls. You can get * the actual object class that this structure rule controls by calling * getNameForm().getObjectClass(). * * @return the NameForm that this structure rule controls. */ public String getNameForm() { return nameForm; } /** * Prepares a value in RFC 2252 format for submission to a server * * @return a String ready for submission to an LDAP server. */ public String getValue() { String s = "( " + ruleID + ' '; if ( name != null ) { s += "NAME " + '\'' + name + "\' "; } if ( description != null ) { s += "DESC \'" + description + "\' "; } if ( isObsolete() ) { s += OBSOLETE + ' '; } s += FORM + " " + nameForm + ' '; String val = getValue( SUPERIOR, false ); if ( (val != null) && (val.length() > 1) ) { s += val + ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the rule in a user friendly format. * This is the format that the rule definition uses when * printing the attribute type or the schema. * @return definition of the rule in a user friendly format. */ public String toString() { String s = "Name: " + name + "; ruleID: " + ruleID + "; "; s += "Description: " + description; if ( isObsolete() ) { s += "; OBSOLETE"; } String[] superiors = getSuperiors(); if ( superiors != null ) { for( int i = 0; i < superiors.length; i++ ) { s += superiors[i]; if ( i < (superiors.length-1) ) { s += ", "; } } } s += "Name form: " + nameForm + "; "; s += getQualifierString( IGNOREVALS ); return s; } public final static String FORM = "FORM"; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { OBSOLETE, FORM, "SUP" }; private String nameForm = null; private int ruleID = 0; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPMessage.java0000664001003300100330000002454410602743270026637 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.opers.*; import netscape.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * Base class for LDAP request and response messages. * This class represents the LDAPMessage in RFC2251. The * message is the entity that got transferred back and * fro between the server and the client interface. Each * message has a protocol operation. The protocol operation * indicates if it is a request or response. *

 * LDAPMessage ::= SEQUENCE {
 *   messageID MessageID,
 *   protocolOp CHOICE {
 *     bindRequest BindRequest,
 *     ...
 *   }
 *   controls [0] Controls OPTIONAL
 * }
 * 
* * @version 1.0 */ public class LDAPMessage implements java.io.Serializable { static final long serialVersionUID = -1364094245850026720L; public final static int BIND_REQUEST = 0; public final static int BIND_RESPONSE = 1; public final static int UNBIND_REQUEST = 2; public final static int SEARCH_REQUEST = 3; public final static int SEARCH_RESPONSE = 4; public final static int SEARCH_RESULT = 5; public final static int MODIFY_REQUEST = 6; public final static int MODIFY_RESPONSE = 7; public final static int ADD_REQUEST = 8; public final static int ADD_RESPONSE = 9; public final static int DEL_REQUEST = 10; public final static int DEL_RESPONSE = 11; public final static int MODIFY_RDN_REQUEST = 12; public final static int MODIFY_RDN_RESPONSE = 13; public final static int COMPARE_REQUEST = 14; public final static int COMPARE_RESPONSE = 15; public final static int ABANDON_REQUEST = 16; public final static int SEARCH_RESULT_REFERENCE = 19; public final static int EXTENDED_REQUEST = 23; public final static int EXTENDED_RESPONSE = 24; /** * Internal variables */ private int m_msgid; private JDAPProtocolOp m_protocolOp = null; private LDAPControl m_controls[] = null; /** * Constructs a ldap message. * @param msgid message identifier * @param op operation protocol */ LDAPMessage(int msgid, JDAPProtocolOp op) { m_msgid = msgid; m_protocolOp = op; } LDAPMessage(int msgid, JDAPProtocolOp op, LDAPControl controls[]) { m_msgid = msgid; m_protocolOp = op; m_controls = controls; /* LDAPv3 additions */ } /** * Creates a ldap message from a BERElement. This method is used * to parse LDAP response messages * * @param element ber element constructed from incoming byte stream */ static LDAPMessage parseMessage(BERElement element) throws IOException { int l_msgid; JDAPProtocolOp l_protocolOp = null; LDAPControl l_controls[] = null; if (element.getType() != BERElement.SEQUENCE) throw new IOException("SEQUENCE in jdap message expected"); BERSequence seq = (BERSequence)element; BERInteger msgid = (BERInteger)seq.elementAt(0); l_msgid = msgid.getValue(); BERElement protocolOp = (BERElement)seq.elementAt(1); if (protocolOp.getType() != BERElement.TAG) { throw new IOException("TAG in protocol operation is expected"); } BERTag tag = (BERTag)protocolOp; switch (tag.getTag()&0x1f) { case JDAPProtocolOp.BIND_RESPONSE: l_protocolOp = new JDAPBindResponse(protocolOp); break; case JDAPProtocolOp.SEARCH_RESPONSE: l_protocolOp = new JDAPSearchResponse(protocolOp); break; /* * If doing search without bind, * x500.arc.nasa.gov returns tag SEARCH_REQUEST tag * in SEARCH_RESULT. */ case JDAPProtocolOp.SEARCH_REQUEST: case JDAPProtocolOp.SEARCH_RESULT: l_protocolOp = new JDAPSearchResult(protocolOp); break; case JDAPProtocolOp.MODIFY_RESPONSE: l_protocolOp = new JDAPModifyResponse(protocolOp); break; case JDAPProtocolOp.ADD_RESPONSE: l_protocolOp = new JDAPAddResponse(protocolOp); break; case JDAPProtocolOp.DEL_RESPONSE: l_protocolOp = new JDAPDeleteResponse(protocolOp); break; case JDAPProtocolOp.MODIFY_RDN_RESPONSE: l_protocolOp = new JDAPModifyRDNResponse(protocolOp); break; case JDAPProtocolOp.COMPARE_RESPONSE: l_protocolOp = new JDAPCompareResponse(protocolOp); break; case JDAPProtocolOp.SEARCH_RESULT_REFERENCE: l_protocolOp = new JDAPSearchResultReference(protocolOp); break; case JDAPProtocolOp.EXTENDED_RESPONSE: l_protocolOp = new JDAPExtendedResponse(protocolOp); break; default: throw new IOException("Unknown protocol operation"); } /* parse control */ if (seq.size() >= 3) { tag = (BERTag)seq.elementAt(2); if ( tag.getTag() == (BERTag.CONSTRUCTED|BERTag.CONTEXT|0) ) { BERSequence controls = (BERSequence)tag.getValue(); l_controls = new LDAPControl[controls.size()]; for (int i = 0; i < controls.size(); i++) { l_controls[i] = LDAPControl.parseControl(controls.elementAt(i)); } } } if (l_protocolOp instanceof JDAPSearchResponse) { return new LDAPSearchResult(l_msgid, (JDAPSearchResponse) l_protocolOp, l_controls); } else if (l_protocolOp instanceof JDAPSearchResultReference) { return new LDAPSearchResultReference(l_msgid, (JDAPSearchResultReference) l_protocolOp, l_controls); } else if (l_protocolOp instanceof JDAPExtendedResponse) { return new LDAPExtendedResponse(l_msgid, (JDAPExtendedResponse) l_protocolOp, l_controls); } else { return new LDAPResponse(l_msgid, l_protocolOp, l_controls); } } /** * Returns the message identifer. * @return message identifer. */ public int getMessageID(){ return m_msgid; } /** * Returns the LDAP operation type of the message * @return message type. */ public int getType(){ return m_protocolOp.getType(); } /** * Retrieves the protocol operation. * @return protocol operation. */ JDAPProtocolOp getProtocolOp() { return m_protocolOp; } /** * Retrieves list of controls. * @return controls. */ public LDAPControl[] getControls() { return m_controls; } /** * Writes the ber encoding to stream. * @param s output stream */ void write(OutputStream s) throws IOException { BERSequence seq = new BERSequence(); BERInteger i = new BERInteger(m_msgid); seq.addElement(i); BERElement e = m_protocolOp.getBERElement(); if (e == null) { throw new IOException("Bad BER element"); } seq.addElement(e); if (m_controls != null) { /* LDAPv3 additions */ BERSequence c = new BERSequence(); for (int j = 0; j < m_controls.length; j++) { c.addElement(m_controls[j].getBERElement()); } BERTag t = new BERTag(BERTag.CONTEXT|BERTag.CONSTRUCTED|0, c, true); seq.addElement(t); } seq.write(s); } /** * Returns string representation of an LDAP message. * @return LDAP message. */ public String toString() { StringBuffer sb = new StringBuffer("[LDAPMessage] "); sb.append(m_msgid); sb.append(" "); sb.append(m_protocolOp.toString()); for (int i =0; m_controls != null && i < m_controls.length; i++) { sb.append(" "); sb.append(m_controls[i].toString()); } return sb.toString(); } /** * Returns string representation of a ldap message with * the time stamp. Used for message trace * @return ldap message with the time stamp */ StringBuffer toTraceString() { StringBuffer sb = new StringBuffer(" op="); sb.append(m_msgid); sb.append(" "); sb.append(m_protocolOp.toString()); for (int i =0; m_controls != null && i < m_controls.length; i++) { sb.append(" "); sb.append(m_controls[i].toString()); } return sb; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPDITContentRuleSchema.java0000664001003300100330000003357010602743270031176 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * The definition of a DIT content rule in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Content Rule Description covers the types of information * to specify when defining a DIT content rule. According to the RFC, * the description of a DIT content rule can include the following: *

* *

    *
  • an OID identifying the attribute type *
  • a name identifying the attribute type *
  • a description of the attribute type *
  • the name of the parent attribute type *
  • the syntax used by the attribute (for example, * cis or int) *
  • an indication of whether the attribute type is single-valued * or multi-valued *
*

* * When you construct an LDAPDITContentRuleSchema object, you can * specify these types of information as arguments to the constructor or * in the AttributeTypeDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * There are a number of additional optional description fields which * are not explicitly accessible through LDAPDITContentRuleSchema, but which * can be managed with setQualifier, getQualifier, and getQualifierNames: *

* *

    *
  • OBSOLETE *
*

* * To get the name, OID, and description of this DIT content rule * , use the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this attribute type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines DITContentRuleDescription as follows: *

*

 *    DITContentRuleDescription = "("
 *        numericoid   ; Structural ObjectClass identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" ]
 *        [ "AUX" oids ]    ; Auxiliary ObjectClasses
 *        [ "MUST" oids ]   ; AttributeType identifiers
 *        [ "MAY" oids ]    ; AttributeType identifiers
 *        [ "NOT" oids ]    ; AttributeType identifiers
 *       ")"
 * 
* * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPDITContentRuleSchema extends LDAPSchemaElement { static final long serialVersionUID = -8588488481097270056L; /** * Constructs a blank element. */ protected LDAPDITContentRuleSchema() { super(); } /** * Constructs a DIT content rule definition, using the specified * information. * @param name name of the attribute type * @param oid object identifier (OID) of the attribute type * in dotted-string format (for example, "1.2.3.4") * @param description description of attribute type * @param obsolete true if the rule is obsolete * @param auxiliary a list of auxiliary object classes * allowed for an entry to which this content rule applies. * These may either be specified by name or numeric oid. * @param required a list of user attribute types that an entry * to which this content rule applies must contain in addition to * its normal set of mandatory attributes. These may either be * specified by name or numeric oid. * @param optional a list of user attribute types that an entry * to which this content rule applies may contain in addition to * its normal set of optional attributes. These may either be * specified by name or numeric oid. * @param precluded a list consisting of a subset of the optional * user attribute types of the structural and auxiliary object * classes which are precluded from an entry to which this content rule * applies. These may either be specified by name or numeric oid. */ public LDAPDITContentRuleSchema( String name, String oid, String description, boolean obsolete, String[] auxiliary, String[] required, String[] optional, String[] precluded ) { super( name, oid, description, null ); if ( required != null ) { for( int i = 0; i < required.length; i++ ) { must.addElement( required[i] ); } } if ( optional != null ) { for( int i = 0; i < optional.length; i++ ) { may.addElement( optional[i] ); } } if ( auxiliary != null ) { for( int i = 0; i < auxiliary.length; i++ ) { aux.addElement( auxiliary[i] ); } } if ( precluded != null ) { for( int i = 0; i < precluded.length; i++ ) { not.addElement( precluded[i] ); } } if ( obsolete ) { setQualifier( OBSOLETE, "" ); } } /** * Constructs a DIT content rule definition based on a description in * the DITContentRuleDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Content Rule Description. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of "attributetypes" are attribute type descriptions * in this format.) *

* * @param raw definition of the DIT content rule in the * DITContentRuleDescription format */ public LDAPDITContentRuleSchema( String raw ) { attrName = "ditContentRules"; parseValue( raw ); Object o = properties.get( MAY ); if ( o != null ) { if ( o instanceof Vector ) { may = (Vector)o; } else { may.addElement( o ); } } o = properties.get( MUST ); if ( o != null ) { if ( o instanceof Vector ) { must = (Vector)o; } else { must.addElement( o ); } } o = properties.get( NOT ); if ( o != null ) { if ( o instanceof Vector ) { not = (Vector)o; } else { not.addElement( o ); } } o = properties.get( AUX ); if ( o != null ) { if ( o instanceof Vector ) { aux = (Vector)o; } else { aux.addElement( o ); } } } /** * Gets the names of the required attributes for * this content rule. * @return the names of the required attributes * for this content rule. */ public String[] getRequiredAttributes() { String[] vals = new String[must.size()]; must.copyInto( vals ); return vals; } /** * Gets the names of optional attributes allowed * in this content rule. * @return the names of optional attributes * allowed in this content rule. */ public String[] getOptionalAttributes() { String[] vals = new String[may.size()]; may.copyInto( vals ); return vals; } /** * Gets the names of the precluded attributes for * this content rule. * @return the names of the precluded attributes * for this content rule. */ public String[] getPrecludedAttributes() { String[] vals = new String[not.size()]; not.copyInto( vals ); return vals; } /** * Gets the names of the auxiliary object classes allowed * in this content rule. * @return the names of auxiliary object classes * allowed in this content rule. */ public String[] getAuxiliaryClasses() { String[] vals = new String[aux.size()]; aux.copyInto( vals ); return vals; } /** * Prepares a value in RFC 2252 format for submission to a server * * @return a String ready for submission to an LDAP server. */ public String getValue() { String s = getValuePrefix(); String val; val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } if ( aux.size() > 0 ) { s += AUX + " " + vectorToList( aux ); s += ' '; } if ( must.size() > 0 ) { s += MUST + " " + vectorToList( must ); s += ' '; } if ( may.size() > 0 ) { s += MAY + " " + vectorToList( may ); s += ' '; } if ( not.size() > 0 ) { s += NOT + " " + vectorToList( not ); s += ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Creates a list within parentheses, with $ as delimiter * * @param vals values for list * @return a String with a list of values. */ protected String vectorToList( Vector vals ) { String val = "( "; for( int i = 0; i < vals.size(); i++ ) { val += (String)vals.elementAt(i) + ' '; if ( i < (vals.size() - 1) ) { val += "$ "; } } val += ')'; return val; } /** * Gets the definition of the rule in a user friendly format. * This is the format that the rule definition uses when * printing the attribute type or the schema. * @return definition of the rule in a user friendly format. */ public String toString() { String s = "Name: " + name + "; OID: " + oid; s += "; Description: " + description + "; Required: "; int i = 0; Enumeration e = must.elements(); while( e.hasMoreElements() ) { if ( i > 0 ) s += ", "; i++; s += (String)e.nextElement(); } s += "; Optional: "; e = may.elements(); i = 0; while( e.hasMoreElements() ) { if ( i > 0 ) s += ", "; i++; s += (String)e.nextElement(); } s += "; Auxiliary: "; e = aux.elements(); i = 0; while( e.hasMoreElements() ) { if ( i > 0 ) s += ", "; i++; s += (String)e.nextElement(); } s += "; Precluded: "; e = not.elements(); i = 0; while( e.hasMoreElements() ) { if ( i > 0 ) s += ", "; i++; s += (String)e.nextElement(); } if ( isObsolete() ) { s += "; OBSOLETE"; } s += getQualifierString( IGNOREVALS ); return s; } public final static String AUX = "AUX"; public final static String MUST = "MUST"; public final static String MAY = "MAY"; public final static String NOT = "NOT"; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { OBSOLETE, AUX, MUST, MAY, NOT }; private Vector must = new Vector(); private Vector may = new Vector(); private Vector aux = new Vector(); private Vector not = new Vector(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPDN.java0000664001003300100330000001467110602743270025554 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.util.*; import java.io.*; /** * Represents a distinguished name in LDAP. *

* * You can use objects of this class to split a distinguished name * (DN) into its individual components. You can also escape the * characters in a DN. *

* * @version 1.0 */ public class LDAPDN { /** * Returns the individual components of a distinguished name (DN). * @param dn distinguished name of which you want to get the components. * @param noTypes if true, returns only the values of the * components and not the names (such as 'cn=') * @return an array of strings representing the components of the DN. * @see netscape.ldap.LDAPDN#explodeRDN(java.lang.String, boolean) */ public static String[] explodeDN (String dn, boolean noTypes) { DN name = new DN(dn); return name.explodeDN(noTypes); } /** * Returns the individual components of a relative distinguished name (RDN). * @param rdn relative distinguished name of which you want to get the components. * @param noTypes if true, returns only the values of the * components and not the names (such as 'cn=') * @return an array of strings representing the components of the RDN. * @see netscape.ldap.LDAPDN#explodeDN(java.lang.String, boolean) */ public static String[] explodeRDN (String rdn, boolean noTypes) { RDN name = new RDN(rdn); if ( noTypes ) { return name.getValues(); } else { String[] str = new String[1]; str[0] = name.toString(); return str; } } /** * Returns the RDN after escaping the characters specified * by netscape.ldap.util.DN.ESCAPED_CHAR. *

* * @param rdn the RDN to escape * @return the RDN with the characters escaped. * @see netscape.ldap.util.DN#ESCAPED_CHAR * @see netscape.ldap.LDAPDN#unEscapeRDN(java.lang.String) */ public static String escapeRDN(String rdn) { RDN name = new RDN(rdn); String[] val = name.getValues(); if (val == null) return rdn; StringBuffer[] buffer = new StringBuffer[val.length]; StringBuffer retbuf = new StringBuffer(); String[] types = name.getTypes(); for (int j = 0; j < val.length; j++ ) { buffer[j] = new StringBuffer(val[j]); int i=0; while (i 0) ? " + " : "") + types[j] + "=" + ( new String( buffer[j] ) ) ); } return new String( retbuf ); } /** * Returns the RDN after unescaping any escaped characters. * For a list of characters that are typically escaped in a * DN, see netscape.ldap.LDAPDN.ESCAPED_CHAR. *

* * @param rdn the RDN to unescape * @return the unescaped RDN. * @see netscape.ldap.util.DN#ESCAPED_CHAR * @see netscape.ldap.LDAPDN#escapeRDN(java.lang.String) */ public static String unEscapeRDN(String rdn) { RDN name = new RDN(rdn); String[] vals = name.getValues(); if ( (vals == null) || (vals.length < 1) ) return rdn; StringBuffer buffer = new StringBuffer(vals[0]); StringBuffer copy = new StringBuffer(); int i=0; while (iRFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of a name form. * According to the RFC, the description of a name form can * include the following information: *

* *

    *
  • an OID identifying the name form *
  • a name identifying the name form *
  • a description of the name form *
  • the structural object class of this name form *
  • the list of attribute types that are required in this name form *
  • the list of attribute types that are allowed (optional) in this * name form *
*

* * When you construct an LDAPNameFormSchema object, * you can specify * these types of information as arguments to the constructor or in the * NameFormDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * You can get the name, OID, and description of this name form * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this name form definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines NameFormDescription as follows: *

*

 *    NameFormDescription = "(" whsp
 *        numericoid whsp      ; NameForm identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        "OC" woid            ; Structural ObjectClass
 *        [ "MUST" oids ]      ; AttributeTypes
 *        [ "MAY" oids ]       ; AttributeTypes
 *    whsp ")"
 * 
* * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPNameFormSchema extends LDAPSchemaElement { static final long serialVersionUID = 1665316286199590403L; /** * Constructs a name form definition, using the specified * information. * @param name name of the name form * @param oid object identifier (OID) of the name form * in dotted-string format (for example, "1.2.3.4") * @param description description of the name form * @param obsolete true if the rule is obsolete * @param objectClass the object to which this name form applies. * This may either be specified by name or numeric oid. * @param required array of names of attributes required * in this name form * @param optional array of names of optional attributes * allowed in this name form */ public LDAPNameFormSchema( String name, String oid, String description, boolean obsolete, String objectClass, String[] required, String[] optional ) { super( name, oid, description, null ); attrName = "nameforms"; if ( obsolete ) { setQualifier( OBSOLETE, "" ); } this.objectClass = objectClass; if ( required != null ) { for( int i = 0; i < required.length; i++ ) { must.addElement( required[i] ); } } if ( optional != null ) { for( int i = 0; i < optional.length; i++ ) { may.addElement( optional[i] ); } } } /** * Constructs a name form definition based on a description in * the NameFormDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of the "objectclasses" attribute are name form descriptions * in this format.) *

* * @param raw definition of the object in the NameFormDescription * format */ public LDAPNameFormSchema( String raw ) { attrName = "objectclasses"; parseValue( raw ); Object o = properties.get( "MAY" ); if ( o != null ) { if ( o instanceof Vector ) { may = (Vector)o; } else { may.addElement( o ); } } o = properties.get( "MUST" ); if ( o != null ) { if ( o instanceof Vector ) { must = (Vector)o; } else { must.addElement( o ); } } o = properties.get( "OC" ); if ( o != null ) { objectClass = (String)o; } } /** * Gets the names of the required attributes for * this name form. * @return the names of the required attributes * for this name form. */ public String[] getRequiredNamingAttributes() { String[] vals = new String[must.size()]; must.copyInto( vals ); return vals; } /** * Gets the names of optional attributes allowed * in this name form. * @return the names of optional attributes * allowed in this name form. */ public String[] getOptionalNamingAttributes() { String[] vals = new String[may.size()]; may.copyInto( vals ); return vals; } /** * Returns the name of the object class that this name form applies to. * * @return the name of the object class that this name form applies to. */ public String getObjectClass() { return objectClass; } /** * Prepares a value in RFC 2252 format for submitting to a server. * * @param quotingBug true if SUP and SYNTAX values are to * be quoted. That is to satisfy bugs in certain LDAP servers. * @return a String ready for submission to an LDAP server. */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); String val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } s += "OC " + objectClass + ' '; if ( must.size() > 0 ) { s += "MUST " + vectorToList( must ); s += ' '; } if ( may.size() > 0 ) { s += "MAY " + vectorToList( may ); s += ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the name form in a user friendly format. * This is the format that the name form definition uses when * you print the name form or the schema. * @return definition of the name form in a user friendly format. */ public String toString() { String s = "Name: " + name + "; OID: " + oid; s += "; Description: " + description + "; Required: "; String[] vals = getRequiredNamingAttributes(); for( int i = 0; i < vals.length; i++ ) { if ( i > 0 ) s += ", "; s += vals[i]; } s += "; Optional: "; vals = getOptionalNamingAttributes(); for( int i = 0; i < vals.length; i++ ) { if ( i > 0 ) s += ", "; s += vals[i]; } if ( isObsolete() ) { s += "; OBSOLETE"; } s += getQualifierString( IGNOREVALS ); return s; } /** * Creates a list within parentheses, with $ as delimiter * * @param vals values for list * @return a String with a list of values. */ protected String vectorToList( Vector vals ) { String val = "( "; for( int i = 0; i < vals.size(); i++ ) { val += (String)vals.elementAt(i) + ' '; if ( i < (vals.size() - 1) ) { val += "$ "; } } val += ')'; return val; } private Vector must = new Vector(); private Vector may = new Vector(); private String objectClass = null; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { "MUST", "MAY", "OBJECTCLASS", "OBSOLETE"}; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPRebind.java0000664001003300100330000000724610602743270026456 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; /** * Specifies how to retrieve authentication information automatically * for referrals. If you have set up the search constraints (or the options * in the LDAPConnection object) to use automatic referral, * you must define a class that implements this interface. *

* * If no class implements this interface, clients that follow automatic * referrals are authenticated anonymously to subsequent LDAP servers. * The following example is a simple class that implements this interface. * Objects of the myLDAPRebind class check the host and port of the * referred LDAP server. If the host and port are "alway.mcom.com:389", * the directory manager's name and password are used to authenticate. * For all other LDAP servers, anonymous authentication is used. * *

 * public class myLDAPRebind implements netscape.ldap.LDAPRebind
 * {
 *  private String myDN;
 *  private String myPW;
 *  private LDAPRebindAuth myRebindInfo;

 *  public myLDAPRebind () {
 *    myDN = "c=Directory Manager,o=Universal Exports,c=UK";
 *    myPW = "alway4444";
 *  }
 *
 *  public LDAPRebindAuth getRebindAuthentication( String host, int port ) {
 *    if ( host.equalsIgnoreCase( "alway.mcom.com" ) && ( port == 389 ) ) {
 *      myRebindInfo = new LDAPRebindAuth( myDN, myPW );
 *    } else {
 *      myRebindInfo = new LDAPRebindAuth( "", "" );
 *    }
 *    return myRebindInfo;
 *  }
 * } 
* * * @version 1.0 */ public interface LDAPRebind { /** * Returns an LDAPRebindAuth object, which the calling function * can use to get the DN and password to use for authentication (if the client * is set up to follow referrals automatically). * @return LDAPRebindAuth object containing authentication information. * @see netscape.ldap.LDAPRebindAuth */ public LDAPRebindAuth getRebindAuthentication(String host, int port); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPModification.java0000664001003300100330000001335510602743270027656 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import netscape.ldap.ber.stream.*; /** * Specifies changes to be made to the values of an attribute. The change is * specified in terms of the following aspects: *

* *

    *
  • the type of modification (add, replace, or delete the value of an attribute) *
  • the type of value being modified (string or binary) *
  • the name of the attribute being modified *
  • the actual value *
*

* * After you specify a change to an attribute, you can execute the change * by calling the LDAPConnection.modify method and specifying * the DN of the entry that you want to modify. *

* * @version 1.0 * @see netscape.ldap.LDAPConnection#modify(java.lang.String, netscape.ldap.LDAPModification) */ public class LDAPModification implements java.io.Serializable { static final long serialVersionUID = 4836472112866826595L; /** * Specifies that a value should be added to an attribute. */ public static final int ADD = 0; /** * Specifies that a value should be removed from an attribute. */ public static final int DELETE = 1; /** * Specifies that a value should replace the existing value in an attribute. */ public static final int REPLACE = 2; /** * Internal variables */ private int operation; private LDAPAttribute attribute; /** * Specifies a modification to be made to an attribute. * @param op the type of modification to make. This can be one of the following: *

*

    *
  • LDAPModification.ADD (the value should be added to the attribute) *
  • LDAPModification.DELETE (the value should be removed from the attribute) *
  • LDAPModification.REPLACE (the value should replace the existing value of the attribute) *

* @param attr the attribute (possibly with values) to modify * @see netscape.ldap.LDAPAttribute */ public LDAPModification( int op, LDAPAttribute attr ) { operation = op; attribute = attr; } /** * Returns the type of modification specified by this object. * @return one of the following types of modifications: *

*

    *
  • LDAPModification.ADD (the value should be added to the attribute) *
  • LDAPModification.DELETE (the value should be removed from the attribute) *
  • LDAPModification.REPLACE (the value should replace the existing value of the attribute) *

*/ public int getOp() { return operation; } /** * Returns the attribute (possibly with values) to be modified. * @return the attribute to be modified. * @see netscape.ldap.LDAPAttribute */ public LDAPAttribute getAttribute() { return attribute; } /** * Retrieves the BER (Basic Encoding Rules) representation * of the current modification. * @return BER representation of the modification. */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEREnumerated(operation)); seq.addElement(attribute.getBERElement()); return seq; } /** * Retrieves the string representation of the current * modification. For example: * *

     * LDAPModification: REPLACE, LDAPAttribute {type='mail', values='babs@ace.com'}
     * LDAPModification: ADD, LDAPAttribute {type='description', values='This entry was modified with the modattrs program'}
     * 
* * @return string representation of the current modification. */ public String toString() { String s = "LDAPModification: "; if ( operation == ADD ) s += "ADD, "; else if ( operation == DELETE ) s += "DELETE, "; else if ( operation == REPLACE ) s += "REPLACE, "; else s += "INVALID OP, "; s += attribute; return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPControl.java0000664001003300100330000004471410602743270026674 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.io.*; import java.util.*; import java.lang.reflect.*; import netscape.ldap.ber.stream.*; import netscape.ldap.client.*; import netscape.ldap.util.*; import netscape.ldap.controls.*; /** * Represents arbitrary control data that can be used with a * a particular LDAP operation. LDAP controls are part of version 3 * of the LDAP protocol. *

* * LDAP controls allow you to extend the functionality of * an LDAP operation. For example, you can use an LDAP control * for the search operation to sort search results on an LDAP server. *

* * An LDAP control can be either a server control or * a client control: *

*

    *
  • Server controls can be sent to the LDAP server or returned * by the server on any operation. *
  • Client controls are intended to affect only the client side * of the operation. *
*

* * An LDAP control consists of the following information: *

*

    *
  • A unique object ID (OID) that identifies the control.

    *

  • A "criticality" field, which indicates whether or * not the control is critical to the operation. (If the control is * critical to the operation and the server does not support the control, * the server should not execute the operation.)

    *

  • Data pertaining to the control.

    *

*

* * To determine which server controls are supported by a particular server, * you need to search for the root DSE (DSA-specific entry, where DSA is * another term for "LDAP server") and find the values of the * supportedControl attribute. This attribute contains the * object IDs (OIDs) of the controls supported by this server. *

* * The following section of code demonstrates how to get the list * of the server controls supported by an LDAP server. *

* *

 * public static void main( String[] args )
 * {
 *   LDAPConnection ld = new LDAPConnection();
 *   try {
 *     String MY_HOST = "localhost";
 *     int MY_PORT = 389;
 *     ld.connect( MY_HOST, MY_PORT );
 *     try {
 *       ld.authenticate( 3, "cn=Directory Manager", "23skidoo" );
 *     } catch( LDAPException e ) {
 *       System.out.println( "LDAP server does not support v3." );
 *       ld.disconnect();
 *       System.exit(1);
 *     }
 *
 *     String MY_FILT = "(objectclass=*)";
 *     String MY_BASE = "";
 *     String getAttrs[] = { "supportedControl" };
 *     LDAPSearchResults res = ld.search( MY_BASE,
 *       LDAPConnection.SCOPE_BASE, MY_FILT, getAttrs, false );
 *
 *     while ( res.hasMoreElements() ) {
 *       LDAPEntry findEntry = (LDAPEntry)res.nextElement();
 *       LDAPAttributeSet findAttrs = findEntry.getAttributeSet();
 *       Enumeration enumAttrs = findAttrs.getAttributes();
 *
 *         while ( enumAttrs.hasMoreElements() ) {
 *           LDAPAttribute anAttr = (LDAPAttribute)enumAttrs.nextElement();
 *           String attrName = anAttr.getName();
 *           System.out.println( attrName );
 *           Enumeration enumVals = anAttr.getStringValues();
 *
 *           while ( enumVals.hasMoreElements() ) {
 *             String aVal = ( String )enumVals.nextElement();
 *             System.out.println( "\t" + aVal );
 *           }
 *         }
 *      }
 *   }
 *   catch( LDAPException e ) {
 *     System.out.println( "Error: " + e.toString() );
 *   }
 *   try {
 *     ld.disconnect();
 *   }
 *   catch( LDAPException e ) {
 *     System.exit(1);
 *   }
 *   System.exit(0);
 * }
 * 
*

* * If you compile and run this example against an LDAP server that * supports v3 of the protocol, you might receive the following results: *

* *

 * supportedcontrol
 *   2.16.840.1.113730.3.4.2
 *   2.16.840.1.113730.3.4.3
 *   2.16.840.1.113730.3.4.4
 *   2.16.840.1.113730.3.4.5
 *   1.2.840.113556.1.4.473
 * 
*

* * For more information on LDAP controls, see the Internet-Draft on * the LDAP v3 protocol. (Note that this internet draft is still a * work in progress. You can find the latest draft at the ASID home page. *

* * @version 1.0 * @see netscape.ldap.LDAPv3#CLIENTCONTROLS * @see netscape.ldap.LDAPv3#SERVERCONTROLS * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPConnection#getResponseControls * @see netscape.ldap.LDAPConstraints#getClientControls * @see netscape.ldap.LDAPConstraints#getServerControls * @see netscape.ldap.LDAPConstraints#setClientControls * @see netscape.ldap.LDAPConstraints#setServerControls */ public class LDAPControl implements Cloneable, java.io.Serializable { static final long serialVersionUID = 5149887553272603753L; public final static String MANAGEDSAIT = "2.16.840.1.113730.3.4.2"; /* Password information sent back to client */ public final static String PWEXPIRED = "2.16.840.1.113730.3.4.4"; public final static String PWEXPIRING = "2.16.840.1.113730.3.4.5"; /** * Default constructor for the LDAPControl class. */ public LDAPControl() { } /** * Constructs a new LDAPControl object using the * specified object ID (OID), "criticality" field, and * data to be used by the control. *

* * @param id the object ID (OID) identifying the control * @param critical true if the LDAP operation should be * cancelled when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @param vals control-specific data * @see netscape.ldap.LDAPConstraints#setClientControls * @see netscape.ldap.LDAPConstraints#setServerControls */ public LDAPControl(String id, boolean critical, byte vals[]) { m_oid = id; m_critical = critical; m_value = vals; } /** * Gets the object ID (OID) of the control. * @return object ID (OID) of the control. */ public String getID() { return m_oid; } /** * Specifies whether or not the control is critical to the LDAP operation. * @return true if the LDAP operation should be cancelled when * the server does not support this control. */ public boolean isCritical() { return m_critical; } /** * Gets the data in the control. * @return the data in the control as a byte array. */ public byte[] getValue() { return m_value; } /** * Gets the ber representation of control. * @return ber representation of control. */ BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString (m_oid)); seq.addElement(new BERBoolean (m_critical)); if ( (m_value == null) || (m_value.length < 1) ) seq.addElement(new BEROctetString ((byte[])null)); else { seq.addElement(new BEROctetString (m_value, 0, m_value.length)); } return seq; } /** * Associates a class with an oid. This class must be an extension of * LDAPControl, and should implement the LDAPControl( * String oid, boolean critical, byte[] value) constructor to * instantiate the control. * @param oid the string representation of the oid * @param controlClass the class that instantatiates the control associated * with oid * @exception netscape.ldap.LDAPException If the class parameter is not * a subclass of LDAPControl or the class parameter does not * implement the LDAPControl(String oid, boolean critical, byte[] value) * constructor. */ public static void register(String oid, Class controlClass) throws LDAPException { if (controlClass == null) { return; } // 1. make sure controlClass is a subclass of LDAPControl Class superClass = controlClass; while (superClass != LDAPControl.class && superClass != null) { superClass = superClass.getSuperclass(); } if (superClass == null) throw new LDAPException("controlClass must be a subclass of " + "LDAPControl", LDAPException.PARAM_ERROR); // 2. make sure controlClass has the proper constructor Class[] cparams = { String.class, boolean.class, byte[].class }; try { controlClass.getConstructor(cparams); } catch (NoSuchMethodException e) { throw new LDAPException("controlClass does not implement the " + "correct contstructor", LDAPException.PARAM_ERROR); } // 3. check if the hash table exists if (m_controlClassHash == null) { m_controlClassHash = new Hashtable(); } // 4. add the controlClass m_controlClassHash.put(oid, controlClass); } /** * Returns the Class that has been registered to oid. * @param oid a String that associates the control class to a control * @return a Class that can instantiate a control of the * type specified by oid. * @see netscape.ldap.LDAPControl#register * */ protected static Class lookupControlClass(String oid) { if (m_controlClassHash == null) { return null; } return (Class)m_controlClassHash.get(oid); } /** * Returns a LDAPControl object instantiated by the Class * associated by LDAPControl.register to the oid. If * no Class is found for the given control, or an exception occurs when * attempting to instantiate the control, a basic LDAPControl * is instantiated using the parameters. * @param oid the oid of the control to instantiate * @param critical true if this is a critical control * @param value the byte value for the control * @return a newly instantiated LDAPControl. * @see netscape.ldap.LDAPControl#register */ protected static LDAPControl createControl(String oid, boolean critical, byte[] value) { Class controlClass = lookupControlClass(oid); if (controlClass == null) { return new LDAPControl(oid, critical, value); } Class[] cparams = { String.class, boolean.class, byte[].class }; Constructor creator = null; try { creator = controlClass.getConstructor(cparams); } catch (NoSuchMethodException e) { //shouldn't happen, but... System.err.println("Caught java.lang.NoSuchMethodException while" + " attempting to instantiate a control of type " + oid); return new LDAPControl(oid, critical, value); } Object[] oparams = { oid, new Boolean(critical), value } ; LDAPControl returnControl = null; try { returnControl = (LDAPControl)creator.newInstance(oparams); } catch (Exception e) { String eString = null; if (e instanceof InvocationTargetException) { eString = ((InvocationTargetException) e).getTargetException().toString(); } else { eString = e.toString(); } System.err.println("Caught " + eString + " while attempting to" + " instantiate a control of type " + oid); returnControl = new LDAPControl(oid, critical, value); } return returnControl; } /** * Returns a LDAPControl object instantiated by the Class * associated by LDAPControl.register to the oid. If * no Class is found for the given control, or an exception occurs when * attempting to instantiate the control, a basic LDAPControl * is instantiated using the parameters. * @param el the BERElement containing the control * @return a newly instantiated LDAPControl. * @see netscape.ldap.LPAPControl#register * * Note: * This code was extracted from JDAPControl(BERElement el) * constructor. */ static LDAPControl parseControl(BERElement el) { BERSequence s = (BERSequence)el; String oid = null; boolean critical = false; byte[] value = null; try{ oid = new String(((BEROctetString)s.elementAt(0)).getValue(), "UTF8"); } catch(Throwable x) {} Object obj = s.elementAt(1); if (obj instanceof BERBoolean) { critical = ((BERBoolean)obj).getValue(); } else { value = ((BEROctetString)obj).getValue(); } if (s.size() >= 3) { value = ((BEROctetString)s.elementAt(2)).getValue(); } return createControl(oid, critical, value); } /** * Instantiates all of the controls contained within the LDAP message * fragment specified by data and returns them in an LDAPControl * array. This fragment can be either the entire LDAP message or just the * control section of the message. *

* If an exception occurs when instantiating a control, that control is * returned as a basic LDAPControl. * @param data the LDAP message fragment in raw BER format * @return an LDAPControl array containing all of the controls * from the message fragment. * @exception java.lang.IOException If the data passed to this method * is not a valid LDAP message fragment. * @see netscape.ldap.LDAPControl#register */ public static LDAPControl[] newInstance(byte[] data) throws IOException { int[] bread = { 0 }; BERElement el = BERElement.getElement(new JDAPBERTagDecoder(), new ByteArrayInputStream(data), bread); LDAPControl[] jc = null; try { // see if data is a LDAP message LDAPMessage msg = LDAPMessage.parseMessage(el); return msg.getControls(); } catch (IOException e) { // that didn't work; let's see if its just the controls BERTag tag = (BERTag)el; if ( tag.getTag() == (BERTag.CONSTRUCTED|BERTag.CONTEXT|0) ) { BERSequence controls = (BERSequence)tag.getValue(); jc = new LDAPControl[controls.size()]; for (int i = 0; i < controls.size(); i++) { jc[i] = parseControl(controls.elementAt(i)); } } } return jc; } /** * Creates a copy of the control. * @return copy of the control. */ public Object clone() { byte[] vals = null; if ( m_value != null ) { vals = new byte[m_value.length]; for( int i = 0; i < m_value.length; i++ ) vals[i] = m_value[i]; } LDAPControl control = new LDAPControl( m_oid, m_critical, vals ); return control; } /** * Create a "flattened" BER encoding from a BER, * and return it as a byte array. * @param ber a BER encoded sequence * @return the byte array of encoded data. */ protected byte[] flattenBER( BERSequence ber ) { /* Suck out the data and return it */ ByteArrayOutputStream outStream = new ByteArrayOutputStream(); try { ber.write( outStream ); } catch ( IOException e ) { return null; } return outStream.toByteArray(); } /** * Return a string representation of the control for debugging * * @return a string representation of the control. */ public String toString() { if (getID().equals(MANAGEDSAIT)) { return "{MANAGEDSITControl: isCritical=" + isCritical() + "}"; } String s = getID() + ' ' + isCritical(); if ( m_value != null ) { s += ' ' + LDIF.toPrintableString( m_value ); } return "LDAPControl {" + s + '}'; } private String m_oid; protected boolean m_critical = false; protected byte[] m_value = null; static private Hashtable m_controlClassHash = null; static { try { LDAPControl.register( LDAPPasswordExpiringControl.EXPIRING, LDAPPasswordExpiringControl.class ); LDAPControl.register( LDAPPasswordExpiredControl.EXPIRED, LDAPPasswordExpiredControl.class ); LDAPControl.register( LDAPEntryChangeControl.ENTRYCHANGED, LDAPEntryChangeControl.class ); LDAPControl.register( LDAPSortControl.SORTRESPONSE, LDAPSortControl.class ); LDAPControl.register( LDAPVirtualListResponse.VIRTUALLISTRESPONSE, LDAPVirtualListResponse.class ); } catch (LDAPException e) { } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java0000664001003300100330000007025010620653754027767 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * * Abstract class representing an element (such as an object class * definition, an attribute type definition, or a matching rule * definition) in the schema. The specific types of elements are * represented by the LDAPObjectClassSchema, * LDAPAttributeSchema, and LDAPMatchingRuleSchema * subclasses. *

* * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of an object class, * attribute type, or matching rule. All of these schema elements * can specify the following information: *

* *

    *
  • a name identifying the element *
  • an OID identifying the element *
  • a description of the element *
  • a qualifier "OBSOLETE" *
*

* * In addition, there are optional standard qualifiers for attribute * types (see LDAPAttributeSchema), and implementation-specific * qualifiers may be added. Non-standard qualifiers must have names * starting with X-, e.g. "X-OWNER 'John Jacobson'". Optional and * non-standard qualifiers can be accessed with getQualifier and * setQualifier, and enumerated with * getQualifierNames. *

* * The LDAPSchemaElement class implements methods that * you can use with different types of schema elements (object class * definitions, attribute type definitions, and matching rule definitions). * You can do the following: *

    *
  • get the name of a schema element *
  • get the OID of a schema element *
  • get the description of a schema element *
  • add an element to the schema *
  • remove an element from the schema *
*

* * @see netscape.ldap.LDAPObjectClassSchema * @see netscape.ldap.LDAPAttributeSchema * @see netscape.ldap.LDAPMatchingRuleSchema * @version 1.0 **/ public abstract class LDAPSchemaElement implements java.io.Serializable { static final long serialVersionUID = -3972153461950418863L; /** * Constructs a blank element. */ protected LDAPSchemaElement() { } /** * Constructs a definition explicitly. * @param name name of element * @param oid dotted-string object identifier * @param description description of element */ protected LDAPSchemaElement( String name, String oid, String description ) { this( name, oid, description, null ); } /** * Constructs a definition explicitly. * @param name name of element * @param oid dotted-string object identifier * @param description description of element * @param aliases names which are to be considered aliases for this * element; null if there are no aliases */ protected LDAPSchemaElement( String name, String oid, String description, String[] aliases ) { if ( oid == null ) { throw new IllegalArgumentException( "OID required" ); } this.name = name; this.oid = oid; this.description = description; if ( (aliases != null) && (aliases.length > 0) ) { this.aliases = aliases; } } /** * Gets the name of the object class, attribute type, or matching rule. * @return the name of the object class, attribute type, or * matching rule. */ public String getName() { return name; } /** * Gets the object ID (OID) of the object class, attribute type, * or matching rule in dotted-string format (for example, "1.2.3.4"). * @return the OID of the object class, attribute type, * or matching rule. */ public String getID() { return oid; } /** * Gets the object ID (OID) of the object class, attribute type, * or matching rule in dotted-string format (for example, "1.2.3.4"). * @return the OID of the object class, attribute type, * or matching rule. * @deprecated Use LDAPSchemaElement.getID() */ public String getOID() { return getID(); } /** * Gets the description of the object class, attribute type, * or matching rule. * @return the description of the object class, attribute type, * or matching rule. */ public String getDescription() { return description; } /** * Adds, removes or modifies the definition from a Directory. * @param ld an open connection to a Directory Server. Typically the * connection must have been authenticated to add a definition. * @param op type of modification to make * @param attr attribute in the schema entry to modify * @exception LDAPException if the definition can't be added/removed */ protected void update( LDAPConnection ld, int op, LDAPAttribute attr, String dn ) throws LDAPException { LDAPAttribute[] attrs = new LDAPAttribute[1]; attrs[0] = attr; update( ld, op, attrs, dn ); } /** * Adds, removes or modifies the definition from a Directory. * @param ld an open connection to a Directory Server. Typically the * connection must have been authenticated to add a definition. * @param op type of modification to make * @param attrs attributes in the schema entry to modify * @exception LDAPException if the definition can't be added/removed. */ protected void update( LDAPConnection ld, int op, LDAPAttribute[] attrs, String dn ) throws LDAPException { LDAPModificationSet mods = new LDAPModificationSet(); for( int i = 0; i < attrs.length; i++ ) { mods.add( op, attrs[i] ); } String entryName = LDAPSchema.getSchemaDN( ld, dn ); ld.modify( entryName, mods ); } /** * Adds, removes or modifies the definition from a Directory. * @param ld an open connection to a Directory Server. Typically the * connection must have been authenticated to add a definition. * @param op type of modification to make * @param name name of attribute in the schema entry to modify * @exception LDAPException if the definition can't be added/removed */ protected void update( LDAPConnection ld, int op, String name, String dn ) throws LDAPException { boolean quotingBug = !LDAPSchema.isAttributeSyntaxStandardsCompliant( ld ); LDAPAttribute attr = new LDAPAttribute( name, getValue( quotingBug ) ); update( ld, op, attr, dn ); } /** * Adds the current object class, attribute type, or matching rule * definition to the schema. Typically, most servers * will require you to authenticate before allowing you to * edit the schema. * @param ld the LDAPConnection object representing * a connection to an LDAP server * @param dn the entry at which to add the schema definition * @exception LDAPException if the specified definition cannot be * added to the schema */ public void add( LDAPConnection ld, String dn ) throws LDAPException { update( ld, LDAPModification.ADD, attrName, dn ); } /** * Adds the current object class, attribute type, or matching rule * definition to the schema at the root DSE. Typically, most servers * will require you to authenticate before allowing you to * edit the schema. * @param ld the LDAPConnection object representing * a connection to an LDAP server * @exception LDAPException if the specified definition cannot be * added to the schema. */ public void add( LDAPConnection ld ) throws LDAPException { add( ld, "" ); } /** * Replaces a single value of the object class, attribute type, * or matching rule definition in the schema. Typically, most servers * will require you to authenticate before allowing you to * edit the schema. * @param ld the LDAPConnection object representing * a connection to an LDAP server * @param newValue the new value * @param dn the entry at which to modify the schema definition * @exception LDAPException if the specified definition cannot be * modified. */ public void modify( LDAPConnection ld, LDAPSchemaElement newValue, String dn ) throws LDAPException { boolean quotingBug = !LDAPSchema.isAttributeSyntaxStandardsCompliant( ld ); LDAPModificationSet mods = new LDAPModificationSet(); mods.add( LDAPModification.DELETE, new LDAPAttribute( attrName, getValue( quotingBug ) ) ); mods.add( LDAPModification.ADD, new LDAPAttribute( attrName, newValue.getValue( quotingBug ) ) ); String entryName = LDAPSchema.getSchemaDN( ld, dn ); ld.modify( entryName, mods ); } /** * Replaces a single value of the object class, attribute type, * or matching rule definition in the schema at the root DSE. * Typically, most servers * will require you to authenticate before allowing you to * edit the schema. * @param ld the LDAPConnection object representing * a connection to an LDAP server * @param newValue the new value * @exception LDAPException if the specified definition cannot be * modified. */ public void modify( LDAPConnection ld, LDAPSchemaElement newValue ) throws LDAPException { modify( ld, newValue, "" ); } /** * Removes the current object class, attribute type, or matching rule * definition from the schema. Typically, most servers * will require you to authenticate before allowing you to * edit the schema. * @param ld the LDAPConnection object representing * a connection to an LDAP server * @param dn the entry at which to remove the schema definition * @exception LDAPException if the specified definition cannot be * removed from the schema. */ public void remove( LDAPConnection ld, String dn ) throws LDAPException { update( ld, LDAPModification.DELETE, attrName, dn ); } /** * Removes the current object class, attribute type, or matching rule * definition from the schema at the root DSE. Typically, most servers * will require you to authenticate before allowing you to * edit the schema. * @param ld the LDAPConnection object representing * a connection to an LDAP server * @exception LDAPException if the specified definition cannot be * removed from the schema */ public void remove( LDAPConnection ld ) throws LDAPException { remove( ld, "" ); } /** * Reports if the element is marked as obsolete. * @return true if the element is defined as obsolete. */ public boolean isObsolete() { return (properties == null) ? false : properties.containsKey(OBSOLETE); } /** * Parses a raw schema value into OID, name, description, and * a Hashtable of other qualifiers and values. * * @param raw a raw schema definition */ protected void parseValue( String raw ) { if ( properties == null ) { properties = new Hashtable(); } int l = raw.length(); // Processing is faster in char array than in String char[] ch = new char[l]; raw.getChars( 0, l, ch, 0 ); // Trim leading and trailing space l--; while( ch[l] == ' ' ) { l--; } int start = 0; while( ch[start] == ' ' ) { start++; } // Skip past "( " and ")" to start of OID start += 2; // Find end of OID int ind = start + 1; while( ch[ind] != ' ' ) { ind++; } oid = new String( ch, start, ind - start ); ind = ind + 1; String s; String val; while ( ind < l ) { // Skip past blanks to start of next token while( ch[ind] == ' ' ) { ind++; } // Find end of token int last = ind + 1; while( (last < l) && (ch[last] != ' ') ) last++; if ( last < l ) { // Found a token s = new String( ch, ind, last-ind ); ind = last; if ( novalsTable.containsKey( s ) ) { properties.put( s, "" ); continue; } } else { // Reached end of string with no end of token s = ""; ind = l; break; } // Find the start of the value of the token while( (ind < l) && (ch[ind] == ' ') ) { ind++; } last = ind + 1; if ( ind >= l ) { break; } boolean quoted = false; boolean list = false; if ( ch[ind] == '\'' ) { // The value is quoted quoted = true; ind++; while( (last < l) && (ch[last] != '\'') ) { last++; } } else if ( ch[ind] == '(' ) { // The value is a list list = true; ind++; while( (last < l) && (ch[last] != ')') ) { last++; } } else { // The value is not quoted while( (last < l) && (ch[last] != ' ') ) { last++; } } if ( (ind < last) && (last <= l) ) { if ( list ) { Vector v = new Vector(); if ( ch[ind] == ' ' ) { ind++; } val = new String( ch, ind, last-ind-1 ); // Is this a quoted list? If so, use ' as delimiter, // otherwise use ' '. The space between quoted // values will be returned as tokens containing only // white space. White space is not valid in a list // value, so we just remove all tokens containing // only white space. String delim = (val.indexOf( '\'' ) >= 0) ? "'" : " "; StringTokenizer st = new StringTokenizer( val, delim ); while ( st.hasMoreTokens() ) { String tok = st.nextToken().trim(); if ( (tok.length() > 0) && !tok.equals( "$" ) ) { v.addElement( tok ); } } properties.put( s, v ); } else { val = new String( ch, ind, last-ind ); if ( s.equals( "NAME" ) ) { name = val; } else if ( s.equals( "DESC" ) ) { description = val; } else { properties.put( s, val ); } if ( quoted ) { last++; } } } ind = last + 1; } // Aliases end up as values of NAME String[] vals = getQualifier( "NAME" ); if ( (vals != null) && (vals.length > 0) ) { name = vals[0]; if ( vals.length > 1 ) { aliases = new String[vals.length-1]; System.arraycopy( vals, 1, aliases, 0, aliases.length ); } } } /** * Formats a String in the format defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of this format). * This is the format that LDAP servers and clients use to exchange * schema information. For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of the "attributetypes" attribute are attribute type * descriptions in this format. *

* @return a formatted String for defining a schema element. */ public String getValue() { return getValue( false ); } String getValue( boolean quotingBug ) { return null; } /** * Prepares the initial common part of a schema element value in * RFC 2252 format for submitting to a server * * @return the OID, name, description, and possibly OBSOLETE * fields of a schema element definition. */ String getValuePrefix() { String s = "( " + oid + ' '; if ( (name != null) && (name.length() > 0) ) { s += "NAME "; if ( aliases != null ) { s += "( " + '\'' + name + "\' "; for( int i = 0; i < aliases.length; i++ ) { s += '\'' + aliases[i] + "\' "; } s += ") "; } else { s += '\'' + name + "\' "; } } if ( description != null ) { s += "DESC \'" + description + "\' "; } if ( isObsolete() ) { s += OBSOLETE + ' '; } return s; } /** * Gets qualifiers which may or may not be present * * @param names list of qualifiers to look up * @return String in RFC 2252 format containing any values * found, not terminated with ' '. */ protected String getOptionalValues( String[] names ) { String s = ""; for( int i = 0; i < names.length; i++ ) { String[] vals = getQualifier( names[i] ); if ( (vals != null) && (vals.length > 0) ) { s += names[i] + ' ' + vals[0]; } } return s; } /** * Gets any qualifiers marked as custom (starting with "X-") * * @return string in RFC 2252 format, without a terminating * ' '. */ protected String getCustomValues() { String s = ""; Enumeration en = properties.keys(); while( en.hasMoreElements() ) { String key = (String)en.nextElement(); if ( !key.startsWith( "X-" ) ) { continue; } s += getValue( key, true, false ) + ' '; } // Strip trailing ' ' if ( (s.length() > 0) && (s.charAt( s.length() - 1 ) == ' ') ) { s = s.substring( 0, s.length() - 1 ); } return s; } /** * Gets a qualifier's value or values, if present, and formats * the String according to RFC 2252 * * @param key the qualifier to get * @param doQuote true if values should be enveloped * with single quotes * @param doDollar true if a list of values should use * " $ " as separator; that is true for object class attribute lists * @return String in RFC 2252 format, without a terminating * ' '. */ String getValue( String key, boolean doQuote, boolean doDollar ) { String s = ""; Object o = properties.get( key ); if ( o == null ) { return s; } if ( o instanceof String ) { if ( ((String)o).length() > 0 ) { s += key + ' '; if ( doQuote ) { s += '\''; } s += (String)o; if ( doQuote ) { s += '\''; } } } else { s += key + " ( "; Vector v = (Vector)o; for( int i = 0; i < v.size(); i++ ) { if ( doQuote ) { s += '\''; } s += (String)v.elementAt(i); if ( doQuote ) { s += '\''; } s += ' '; if ( doDollar && (i < (v.size() - 1)) ) { s += "$ "; } } s += ')'; } return s; } /** * Gets a qualifier's value or values, if present, and format * the String according to RFC 2252. * * @param key the qualifier to get * @param doQuote true if values should be enveloped * with single quotes * @return String in RFC 2252 format, without a terminating * ' '. */ String getValue( String key, boolean doQuote ) { return getValue( key, doQuote, true ); } /** * Keeps track of qualifiers which are not predefined. * @param name name of qualifier * @param value value of qualifier. "" for no value, null * to remove the qualifier */ public void setQualifier( String name, String value ) { if ( properties == null ) { properties = new Hashtable(); } if ( value != null ) { properties.put( name, value ); } else { properties.remove( name ); } } /** * Keeps track of qualifiers which are not predefined. * @param name name of qualifier * @param values array of values */ public void setQualifier( String name, String[] values ) { if ( values == null ) { return; } if ( properties == null ) { properties = new Hashtable(); } Vector v = new Vector(); for( int i = 0; i < values.length; i++ ) { v.addElement( values[i] ); } properties.put( name, v ); } /** * Gets the value of a qualifier which is not predefined. * @param name name of qualifier * @return value or values of qualifier; null if not * present, a zero-length array if present but with no value. */ public String[] getQualifier( String name ) { if ( properties == null ) { return null; } Object o = properties.get( name ); if ( o == null ) { return null; } if ( o instanceof Vector ) { Vector v = (Vector)o; String[] vals = new String[v.size()]; v.copyInto( vals ); return vals; } String s = (String)o; if ( s.length() < 1 ) { return new String[0]; } else { return new String[] { s }; } } /** * Gets an enumeration of all qualifiers which are not predefined. * @return enumeration of qualifiers. */ public Enumeration getQualifierNames() { return properties.keys(); } /** * Gets the aliases of the attribute, if any * @return the aliases of the attribute, or null if * it does not have any aliases */ public String[] getAliases() { return aliases; } /** * Creates a string for use in toString with any qualifiers of the element. * * @param ignore any qualifiers to NOT include * @return a String with any known qualifiers. */ String getQualifierString( String[] ignore ) { Hashtable toIgnore = null; if ( ignore != null ) { toIgnore = new Hashtable(); for( int i = 0; i < ignore.length; i++ ) { toIgnore.put( ignore[i], ignore[i] ); } } String s = ""; Enumeration en = getQualifierNames(); while( en.hasMoreElements() ) { String qualifier = (String)en.nextElement(); if ( (toIgnore != null) && toIgnore.containsKey( qualifier ) ) { continue; } s += "; " + qualifier; String[] vals = getQualifier( qualifier ); if ( vals == null ) { s += ' '; continue; } s += ": "; for( int i = 0; i < vals.length; i++ ) { s += vals[i] + ' '; } } // Strip trailing ' ' if ( (s.length() > 0) && (s.charAt( s.length() - 1 ) == ' ') ) { s = s.substring( 0, s.length() - 1 ); } return s; } /** * Gets any aliases for this element * * @return a string with any aliases, for use in toString() */ String getAliasString() { if ( aliases != null ) { String s = "; aliases:"; for( int i = 0; i < aliases.length; i++ ) { s += ' ' + aliases[i]; } return s; } return ""; } // Constants for known syntax types public static final int unknown = 0; public static final int cis = 1; public static final int binary = 2; public static final int telephone = 3; public static final int ces = 4; public static final int dn = 5; public static final int integer = 6; protected static final String cisString = "1.3.6.1.4.1.1466.115.121.1.15"; protected static final String binaryString = "1.3.6.1.4.1.1466.115.121.1.5"; protected static final String telephoneString = "1.3.6.1.4.1.1466.115.121.1.50"; protected static final String cesString = "1.3.6.1.4.1.1466.115.121.1.26"; protected static final String intString = "1.3.6.1.4.1.1466.115.121.1.27"; protected static final String dnString = "1.3.6.1.4.1.1466.115.121.1.12"; // Predefined qualifiers which apply to any schema element type public static final String OBSOLETE = "OBSOLETE"; public static final String SUPERIOR = "SUP"; // Predefined qualifiers public static final String SYNTAX = "SYNTAX"; // Properties which are common to all schema elements protected String oid = null; protected String name = ""; protected String description = ""; protected String attrName = null; protected String rawValue = null; protected String[] aliases = null; // Additional qualifiers protected Hashtable properties = null; // Qualifiers known to not have values static protected Hashtable novalsTable = new Hashtable(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPBind.java0000664001003300100330000000542410602743270026123 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Performs explicit bind processing on a referral. A client may * specify an instance of this class for use on a single operation * (through the LDAPConstraints object) or all operations * (through LDAPConnection.setOption()). It is typically used * to control the authentication mechanism used on implicit referral * handling. */ public interface LDAPBind { /** * This method is called by LDAPConnection when * authenticating. An implementation of LDAPBind may access * the host, port, credentials, and other information in the * LDAPConnection in order to decide on an appropriate * authentication mechanism.
* The bind method can also interact with a user or external module. * @exception netscape.ldap.LDAPException * @see netscape.ldap.LDAPConnection#bind * @param conn an established connection to an LDAP server */ public void bind(LDAPConnection conn) throws LDAPException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSortKey.java0000664001003300100330000001500710602743270026645 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Represents sorting instructions for a particular attribute. * * @version 1.0 */ public class LDAPSortKey implements java.io.Serializable { static final long serialVersionUID = -7044232342344864405L; public final static int REVERSE = 0x81; /** * Constructs a new LDAPSortKey object that will * sort based on the specified instructions. * @param keyDescription a single attribute specification by which to sort * If preceded by a hyphen ("-"), the attribute is sorted in reverse order. * You can also specify the object ID (OID) of a matching rule after * a colon (":"). For example: *

*

    *
  • "cn" (sort by the cn attribute)

    *

  • "-cn" (sort by the cn attribute in * reverse order)

    *

  • "-cn:1.2.3.4" (sort by the cn * attribute in reverse order and use the matching rule identified * by the OID 1.2.3.4)

    *

* @see netscape.ldap.controls.LDAPSortControl * @see netscape.ldap.controls.LDAPVirtualListControl */ public LDAPSortKey( String keyDescription ) { if ( (keyDescription != null) && (keyDescription.length() > 0) ) { if ( keyDescription.charAt( 0 ) == '-' ) { m_reverse = true; m_key = keyDescription.substring( 1 ); } else { m_reverse = false; m_key = keyDescription; } int colonIndex = m_key.indexOf( ':' ); if ( colonIndex == 0 ) m_key = null; else if ( colonIndex > 0 ) { m_matchRule = m_key.substring( colonIndex+1 ); m_key = m_key.substring( 0, colonIndex ); } } } /** * Constructs a new LDAPSortKey object that will * sort based on the specified attribute and sort order. * @param key a single attribute by which to sort. For example: *

*

    *
  • "cn" (sort by the cn attribute) *
  • "givenname" (sort by the givenname * attribute) *
* @param reverse if true, the sorting is done in * descending order * @see netscape.ldap.controls.LDAPSortControl * @see netscape.ldap.controls.LDAPVirtualListControl */ public LDAPSortKey( String key, boolean reverse) { m_key = key; m_reverse = reverse; m_matchRule = null; } /** * Constructs a new LDAPSortKey object that will * sort based on the specified attribute, sort order, and matching * rule. * @param key a single attribute by which to sort. For example: *

*

    *
  • "cn" (sort by the cn attribute) *
  • "givenname" (sort by the givenname * attribute) *
* @param reverse if true, the sorting is done in * descending order * @param matchRule object ID (OID) of the matching rule for * the attribute (for example, 1.2.3.4) * @see netscape.ldap.controls.LDAPSortControl * @see netscape.ldap.controls.LDAPVirtualListControl */ public LDAPSortKey( String key, boolean reverse, String matchRule) { m_key = key; m_reverse = reverse; m_matchRule = matchRule; } /** * Returns the attribute by which to sort. * @return a single attribute by which to sort. */ public String getKey() { return m_key; } /** * Returns true if sorting is to be done in descending order. * @return true if sorting is to be done in descending order. */ public boolean getReverse() { return m_reverse; } /** * Returns the object ID (OID) of the matching rule used for sorting. * If no matching rule is specified, null is returned. * @return the object ID (OID) of the matching rule, or null * if the sorting instructions specify no matching rule. */ public String getMatchRule() { return m_matchRule; } public String toString() { StringBuffer sb = new StringBuffer("{SortKey:"); sb.append(" key="); sb.append(m_key); sb.append(" reverse="); sb.append(m_reverse); if (m_matchRule != null) { sb.append(" matchRule="); sb.append(m_matchRule); } sb.append("}"); return sb.toString(); } private String m_key; private boolean m_reverse; private String m_matchRule; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPObjectClassSchema.java0000664001003300100330000004130310602743270030560 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * The definition of an object class in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of an object class. * According to the RFC, the description of an object class can * include the following information: *

* *

    *
  • an OID identifying the object class *
  • a name identifying the object class *
  • a description of the object class *
  • the name of the parent object class *
  • the list of attribute types that are required in this object class *
  • the list of attribute types that are allowed (optional) in this * object class *
*

* * When you construct an LDAPObjectSchema object, you can specify * these types of information as arguments to the constructor or in the * ObjectClassDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * RFC 2252 also notes that you can specify whether or not an object class * is abstract, structural, or auxiliary in the object description. * Abstract object classes are used only to derive other object classes. * Entries cannot belong to an abstract object class. top * is an abstract object class. Entries must belong to a structural * object class, so most object classes are structural object classes. * Objects of the LDAPObjectClassSchema class are structural * object classes by default. Auxiliary object classes can be used to * add attributes to entries of different types. For example, an * auxiliary object class might be used to specify personal preference * attributes. An entry can not contain just that object class, but may * include it along with a structural object class, for example * inetOrgPerson. * If the definition of an object (in ObjectClassDescription format) * specifies the AUXILIARY keyword, an LDAPObjectClassSchema * object created from that description represents an auxiliary object class. *

* * You can get the name, OID, and description of this object class * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this object class definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines ObjectClassDescription as follows: *

*

 *    ObjectClassDescription = "(" whsp
 *        numericoid whsp      ; ObjectClass identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        [ "SUP" oids ]       ; Superior ObjectClasses
 *        [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
 *                             ; default structural
 *        [ "MUST" oids ]      ; AttributeTypes
 *        [ "MAY" oids ]       ; AttributeTypes
 *    whsp ")"
 * 
* * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPObjectClassSchema extends LDAPSchemaElement { static final long serialVersionUID = -1732784695071118656L; /** * Constructs an object class definition, using the specified * information. The type of the object class will be STRUCTURAL. * @param name name of the object class * @param oid object identifier (OID) of the object class * in dotted-string format (for example, "1.2.3.4") * @param description description of the object class * @param superior name of the parent object class * (the object class that the new object class inherits from) * @param required array of names of attributes required * in this object class * @param optional array of names of optional attributes * allowed in this object class */ public LDAPObjectClassSchema( String name, String oid, String superior, String description, String[] required, String[] optional ) { this( name, oid, superior, description, required, optional, null ); } /** * Constructs an object class definition, using the specified * information. * @param name name of the object class * @param oid object identifier (OID) of the object class * in dotted-string format (for example, "1.2.3.4") * @param description description of the object class * @param superiors names of parent object classes * (the object classes that this object class inherits from) * @param required array of names of attributes required * in this object class * @param optional array of names of optional attributes * allowed in this object class * @param type either ABSTRACT, STRUCTURAL, or AUXILIARY * @param aliases names which are to be considered aliases for this * object class; null if there are no aliases */ public LDAPObjectClassSchema( String name, String oid, String[] superiors, String description, String[] required, String[] optional, int type, String[] aliases ) { this( name, oid, ((superiors != null) && (superiors.length > 0)) ? superiors[0] : null, description, required, optional, aliases ); if ( (superiors != null) && (superiors.length > 1) ) { setQualifier( SUPERIOR, superiors ); } setQualifier( TYPE, typeToString( type ) ); } /** * Constructs an object class definition, using the specified * information. The type of the object class will be STRUCTURAL. * @param name name of the object class * @param oid object identifier (OID) of the object class * in dotted-string format (for example, "1.2.3.4") * @param description description of the object class * @param superior name of the parent object class * (the object class that the new object class inherits from) * @param required array of names of attributes required * in this object class * @param optional array of names of optional attributes * allowed in this object class */ protected LDAPObjectClassSchema( String name, String oid, String superior, String description, String[] required, String[] optional, String[] aliases ) { super( name, oid, description, aliases ); attrName = "objectclasses"; setQualifier( SUPERIOR, superior ); if ( required != null ) { for( int i = 0; i < required.length; i++ ) { must.addElement( required[i] ); } } if ( optional != null ) { for( int i = 0; i < optional.length; i++ ) { may.addElement( optional[i] ); } } } /** * Constructs an object class definition based on a description in * the ObjectClassDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of the "objectclasses" attribute are object class descriptions * in this format.) *

* * @param raw definition of the object in the ObjectClassDescription * format */ public LDAPObjectClassSchema( String raw ) { attrName = "objectclasses"; parseValue( raw ); setQualifier( TYPE, typeToString( getType() ) ); Object o = properties.get( "MAY" ); if ( o != null ) { if ( o instanceof Vector ) { may = (Vector)o; } else { may.addElement( o ); } } o = properties.get( "MUST" ); if ( o != null ) { if ( o instanceof Vector ) { must = (Vector)o; } else { must.addElement( o ); } } } /** * Gets the name of the object class from which this class inherits. * @return the name of the object class from which this class * inherits. If it inherits from more than one class, only one * is returned. * @see netscape.ldap.LDAPObjectClassSchema#getSuperiors */ public String getSuperior() { String[] superiors = getSuperiors(); return (superiors != null) ? superiors[0] : null; } /** * Gets the names of all object classes that this class inherits * from. Typically only one, but RFC 2252 allows multiple * inheritance. * @return the names of the object classes from which this class * inherits. */ public String[] getSuperiors() { return getQualifier( SUPERIOR ); } /** * Gets an enumeration of the names of the required attributes for * this object class. * @return an enumeration of the names of the required attributes * for this object class. */ public Enumeration getRequiredAttributes() { return must.elements(); } /** * Gets an enumeration of names of optional attributes allowed * in this object class. * @return an enumeration of the names of optional attributes * allowed in this object class. */ public Enumeration getOptionalAttributes() { return may.elements(); } /** * Gets the type of the object class. * @return STRUCTURAL, ABSTRACT, or AUXILIARY. */ public int getType() { int type = STRUCTURAL; if ( properties.containsKey( "AUXILIARY" ) ) { type = AUXILIARY; } else if ( properties.containsKey( "ABSTRACT" ) ) { type = ABSTRACT; } return type; } /** * Prepares a value in RFC 2252 format for submitting to a server. * * @param quotingBug true if SUP and SYNTAX values are to * be quoted. That is to satisfy bugs in certain LDAP servers. * @return a String ready for submission to an LDAP server. */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); String val = getValue( SUPERIOR, quotingBug ); if ( (val != null) && (val.length() > 0) ) { s += val + ' '; } String[] vals = getQualifier( TYPE ); if ( (vals != null) && (vals.length > 0) ) { s += vals[0] + ' '; } val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } if ( must.size() > 0 ) { s += "MUST " + vectorToList( must ); s += ' '; } if ( may.size() > 0 ) { s += "MAY " + vectorToList( may ); s += ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the object class in a user friendly format. * This is the format that the object class definition uses when * you print the object class or the schema. * @return definition of the object class in a user friendly format. */ public String toString() { String s = "Name: " + name + "; OID: " + oid + "; Superior: "; String[] superiors = getSuperiors(); if ( superiors != null ) { for( int i = 0; i < superiors.length; i++ ) { s += superiors[i]; if ( i < (superiors.length-1) ) { s += ", "; } } } s += "; Description: " + description + "; Required: "; int i = 0; Enumeration e = getRequiredAttributes(); while( e.hasMoreElements() ) { if ( i > 0 ) s += ", "; i++; s += (String)e.nextElement(); } s += "; Optional: "; e = getOptionalAttributes(); i = 0; while( e.hasMoreElements() ) { if ( i > 0 ) s += ", "; i++; s += (String)e.nextElement(); } String[] vals = getQualifier( TYPE ); if ( (vals != null) && (vals.length > 0) ) { s += "; " + vals[0]; } if ( isObsolete() ) { s += "; OBSOLETE"; } s += getQualifierString( IGNOREVALS ); s += getAliasString(); return s; } /** * Creates a list within parentheses, with $ as delimiter * * @param vals values for list * @return a String with a list of values. */ protected String vectorToList( Vector vals ) { String val = "( "; for( int i = 0; i < vals.size(); i++ ) { val += (String)vals.elementAt(i) + ' '; if ( i < (vals.size() - 1) ) { val += "$ "; } } val += ')'; return val; } /** * Returns the object class type as a String * * @param type one of STRUCTURAL, ABSTRACT, or AUXILIARY * @return one of "STRUCTURAL", "ABSTRACT", "AUXILIARY", or null */ protected String typeToString( int type ) { switch( type ) { case STRUCTURAL: return "STRUCTURAL"; case ABSTRACT: return "ABSTRACT"; case AUXILIARY: return "AUXILIARY"; default: return null; } } public static final int STRUCTURAL = 0; public static final int ABSTRACT = 1; public static final int AUXILIARY = 2; private Vector must = new Vector(); private Vector may = new Vector(); private int type = STRUCTURAL; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "ABSTRACT", "STRUCTURAL", "AUXILIARY", "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { "ABSTRACT", "STRUCTURAL", "AUXILIARY", "MUST", "MAY", "SUP", "OBSOLETE"}; // Key for type in the properties Hashtable static final String TYPE = "TYPE"; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPAsynchronousConnection.java0000664001003300100330000005336410620653754031777 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; /** * Encapsulates a connection to an LDAP server, providing access to the input queue * for messages received. * * @version 1.0 */ public interface LDAPAsynchronousConnection { /** * Adds an entry to the directory. * * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPSearchListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPEntry * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener add(LDAPEntry entry, LDAPResponseListener listener) throws LDAPException; /** * Adds an entry to the directory and allows you to specify constraints * for this LDAP add operation by using an LDAPConstraints * object. For example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPEntry * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener add(LDAPEntry entry, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Authenticates to the LDAP server (that the object is currently * connected to) using the specified name and password. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener bind(String dn, String passwd, LDAPResponseListener listener) throws LDAPException; /** * Authenticates to the LDAP server (that the object is currently * connected to) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener bind(String dn, String passwd, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Deletes the entry for the specified DN from the directory. * * @param dn distinguished name of the entry to delete * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener delete(String dn, LDAPResponseListener listener) throws LDAPException; /** * Deletes the entry for the specified DN from the directory. * * @param dn distinguished name of the entry to delete * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener delete(String dn, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Makes a single change to an existing entry in the directory. * For example, changes the value of an attribute, adds a new attribute * value, or removes an existing attribute value.
* The LDAPModification object specifies both the change to be made and * the LDAPAttribute value to be changed. * * @param dn distinguished name of the entry to modify * @param mod a single change to make to an entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener modify(String dn, LDAPModification mod, LDAPResponseListener listener) throws LDAPException; /** * Makes a single change to an existing entry in the directory. * For example, changes the value of an attribute, adds a new attribute * value, or removes an existing attribute value.
* The LDAPModification object specifies both the change to be made and * the LDAPAttribute value to be changed. * * @param dn distinguished name of the entry to modify * @param mod a single change to make to an entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener modify(String dn, LDAPModification mod, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Makes a set of changes to an existing entry in the directory. * For example, changes attribute values, adds new attribute values, or * removes existing attribute values. *

* @param dn distinguished name of the entry to modify * @param mods a set of modifications to make to the entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModificationSet * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener modify(String dn, LDAPModificationSet mods, LDAPResponseListener listener) throws LDAPException; /** * Makes a set of changes to an existing entry in the directory. * For example, changes attribute values, adds new attribute values, or * removes existing attribute values. * * @param dn distinguished name of the entry to modify * @param mods a set of modifications to make to the entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModificationSet * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener modify(String dn, LDAPModificationSet mods, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Renames an existing entry in the directory. * * @param dn current distinguished name of the entry * @param newRdn new relative distinguished name for the entry * @param deleteOldRdn if true, the old name is not retained as an * attribute value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener rename(String dn, String newRdn, boolean deleteOldRdn, LDAPResponseListener listener) throws LDAPException; /** * Renames an existing entry in the directory. * * @param dn current distinguished name of the entry * @param newRdn new relative distinguished name for the entry * @param deleteOldRdn if true, the old name is not retained as an * attribute value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener rename(String dn, String newRdn, boolean deleteOldRdn, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Performs the search specified by the criteria that you enter.

* To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPv2.SCOPE_BASE (search only the base DN)

    *

  • LDAPv2.SCOPE_ONE * (search only those entries that are one level below the base DN)

    *

  • LDAPv2.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes to return in the search results * @param typesOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values of the * attributes found. * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPSearchListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPAsynchronousConnection#abandon(netscape.ldap.LDAPSearchListener) */ public LDAPSearchListener search(String base, int scope, String filter, String attrs[], boolean typesOnly, LDAPSearchListener listener) throws LDAPException; /** * Performs the search specified by the criteria that you enter. * This method also allows you to specify constraints for the search * (such as the maximum number of entries to find or the * maximum time to wait for search results).

* To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPv2.SCOPE_BASE (search only the base DN)

    *

  • LDAPv2.SCOPE_ONE * (search only those entries that are one level below the base DN)

    *

  • LDAPv2.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes to return in the search results * @param typesOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found. * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to this search (for example, the * maximum number of entries to return) * @return LDAPSearchListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPAsynchronousConnection#abandon(netscape.ldap.LDAPSearchListener) */ public LDAPSearchListener search(String base, int scope, String filter, String attrs[], boolean typesOnly, LDAPSearchListener listener, LDAPSearchConstraints cons) throws LDAPException; /** * Compares an attribute value with one in the directory. The result * is obtained by calling getResultCode on the * LDAPResponse from the LDAPResponseListener. * The code will be LDAPException.COMPARE_TRUE or * LDAPException.COMPARE_FALSE. * * @param dn distinguished name of the entry to compare * @param attr attribute with a value to compare * @param listener handler for messages returned from a server in response * to the specified request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to the specified request. * @exception LDAPException Failed to send request. */ public LDAPResponseListener compare(String dn, LDAPAttribute attr, LDAPResponseListener listener) throws LDAPException; /** * Compares an attribute value with one in the directory. The result * is obtained by calling getResultCode on the * LDAPResponse from the LDAPResponseListener. * The code will be LDAPException.COMPARE_TRUE or * LDAPException.COMPARE_FALSE. * * @param dn distinguished name of the entry to compare * @param attr attribute with a value to compare * @param listener handler for messages returned from a server in response * to the specified request. If it is null, a listener object is created internally. * @param cons constraints specific to this operation * @return LDAPResponseListener handler for messages returned from a server * in response to the specified request. * @exception LDAPException Failed to send request. */ public LDAPResponseListener compare(String dn, LDAPAttribute attr, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException; /** * Cancels the ldap request with the specified id and discards * any results already received. * * @param id an LDAP request ID * @exception LDAPException Failed to send request. */ public void abandon(int id) throws LDAPException; /** * Cancels all outstanding search requests associated with this * LDAPSearchListener object and discards any results already received. * * @param searchlistener a search listener returned from a search * @exception LDAPException Failed to send request. */ public void abandon(LDAPSearchListener searchlistener) throws LDAPException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSSLSocketFactory.java0000664001003300100330000003242110602743270030406 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.io.*; import java.net.*; /** * Creates an SSL socket connection to an LDAP Server. This class * implements the LDAPSSLSocketFactoryExt interface. *

* * To construct an object of this class, you need to specify the * name of a class that implements the javax.net.ssl.SSLSocket * interface. If you do not specify a class name, the class * netscape.net.SSLSocket is used by default. This * class is included with Netscape Communicator 4.05 and up. *

* * If you are using a Java VM that provides certificate database * management (such as Netscape Communicator), you can authenticate * your client to a secure LDAP server by using certificates. *

* * @version 1.0 * @see LDAPSSLSocketFactoryExt * @see LDAPConnection#LDAPConnection(netscape.ldap.LDAPSocketFactory) */ public class LDAPSSLSocketFactory implements LDAPSSLSocketFactoryExt, java.io.Serializable { static final long serialVersionUID = -3331456736649381427L; /** * Indicates if client authentication is on. */ private boolean m_clientAuth = false; /** * Name of class implementing SSLSocket. */ private String m_packageName = "netscape.net.SSLSocket"; /** * The cipher suites */ private Object m_cipherSuites = null; /** * Constructs an LDAPSSLSocketFactory object using * the default SSL socket implementation, * netscape.net.SSLSocket. (This class is provided * with Netscape Communicator 4.05 and higher.) */ public LDAPSSLSocketFactory() { } /** * Constructs an LDAPSSLSocketFactory object using * the default SSL socket implementation, * netscape.net.SSLSocket. (This class is provided * with Netscape Communicator 4.05 and up.) * @param clientAuth true if certificate-based client * authentication is desired. By default, client authentication is * not used. */ public LDAPSSLSocketFactory(boolean clientAuth) { m_clientAuth = clientAuth; } /** * Constructs an LDAPSSLSocketFactory object using * the specified class. The class must implement the interface * javax.net.ssl.SSLSocket. * @param className the name of a class implementing * the javax.net.ssl.SSLSocket interface. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. */ public LDAPSSLSocketFactory(String className) { m_packageName = new String(className); } /** * Constructs an LDAPSSLSocketFactory object using * the specified class. The class must implement the interface * javax.net.ssl.SSLSocket. * @param className the name of a class implementing * the javax.net.ssl.SSLSocket interface. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. * @param clientAuth true if certificate-based client * authentication is desired. By default, client authentication is * not used. */ public LDAPSSLSocketFactory(String className, boolean clientAuth) { m_packageName = new String(className); m_clientAuth = clientAuth; } /** * The constructor with the specified package for security and the specified * cipher suites. * @param className the name of a class implementing the interface * javax.net.ssl.SSLSocket. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. * @param cipherSuites the cipher suites to use for SSL connections */ public LDAPSSLSocketFactory(String className, Object cipherSuites) { m_packageName = new String(className); m_cipherSuites = cipherSuites; } /** * The constructor with the specified package for security and the specified * cipher suites. * @param className the name of a class implementing the interface * javax.net.ssl.SSLSocket. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. * @param cipherSuites the cipher suites to use for SSL connections * @param clientAuth true if certificate-based client * authentication is desired. By default, client authentication is * not used. */ public LDAPSSLSocketFactory(String className, Object cipherSuites, boolean clientAuth) { m_packageName = new String(className); m_cipherSuites = cipherSuites; m_clientAuth = clientAuth; } /** * Enables certificate-based client authentication for an * application. The application must be running in a Java VM * that provides transparent certificate database management * (for example, Netscape Communicator's Java VM). * Call this method before you call makeSocket. * @see netscape.ldap.LDAPSSLSocketFactory#isClientAuth * @see netscape.ldap.LDAPSSLSocketFactory#makeSocket * Note: enableClientAuth() is deprecated. This method is replaced * by any one of the following constructors: *

* LDAPSSLSocketFactory(boolean) * LDAPSSLSocketFactory(java.lang.String, boolean) * LDAPSSLSocketFactory(java.lang.String, java.lang.Object, boolean) */ public void enableClientAuth() { m_clientAuth = true; } /** * This method is currently not implemented. * Enables client authentication for an application that uses * an external (file-based) certificate database. * Call this method before you call makeSocket. * @param certdb the pathname for the certificate database * @param keydb the pathname for the private key database * @param keypwd the password for the private key database * @param certnickname the alias for the certificate * @param keynickname the alias for the key * @see netscape.ldap.LDAPSSLSocketFactory#isClientAuth * @see netscape.ldap.LDAPSSLSocketFactory#makeSocket * @exception LDAPException Since this method is not yet implemented, * calling this method throws an exception. * Note: enableClientAuth(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) is deprecated. * This method is replaced by any one of the following constructors: *

* LDAPSSLSocketFactory(boolean) * LDAPSSLSocketFactory(java.lang.String, boolean) * LDAPSSLSocketFactory(java.lang.String, java.lang.Object, boolean) */ public void enableClientAuth(String certdb, String keydb, String keypwd, String certnickname, String keynickname) throws LDAPException { throw new LDAPException("Client auth not supported now"); } /** * Returns true if client authentication is enabled. * @see netscape.ldap.LDAPSSLSocketFactory */ public boolean isClientAuth() { return m_clientAuth; } /** * Returns the name of the class that implements SSL sockets for this factory. * * @return the name of the class that implements SSL sockets for this factory. */ public String getSSLSocketImpl() { return m_packageName; } /** * Returns the suite of ciphers used for SSL connections made through * sockets created by this factory. * * @return the suite of ciphers used. */ public Object getCipherSuites() { return m_cipherSuites; } /** * Returns a socket to the LDAP server with the specified * host name and port number. * @param host the host to connect to * @param port the port number * @return the socket to the host name and port number. * @exception LDAPException A socket to the specified host and port * could not be created. * @see netscape.ldap.LDAPSSLSocketFactory */ public Socket makeSocket(String host, int port) throws LDAPException { Socket s = null; if (m_clientAuth) { try { /* Check if running in Communicator; if so, enable client auth */ String[] types = { "java.lang.String" }; java.lang.reflect.Method m = DynamicInvoker.getMethod( "netscape.security.PrivilegeManager", "enablePrivilege", types ); if (m != null) { Object[] args = new Object[1]; args[0] = new String("ClientAuth"); m.invoke( null, args); } } catch (Exception e) { String msg = "LDAPSSLSocketFactory.makeSocket: invoking " + "enablePrivilege: " + e.toString(); throw new LDAPException(msg, LDAPException.PARAM_ERROR); } } try { String cipherClassName = null; if (m_cipherSuites != null) cipherClassName = m_cipherSuites.getClass().getName(); /* Instantiate the SSLSocketFactory implementation, and find the right constructor */ Class c = Class.forName(m_packageName); java.lang.reflect.Constructor[] m = c.getConstructors(); for (int i = 0; i < m.length; i++) { /* Check if the signature is right: String, int */ Class[] params = m[i].getParameterTypes(); if ( (m_cipherSuites == null) && (params.length == 2) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int")) ) { Object[] args = new Object[2]; args[0] = host; args[1] = new Integer(port); s = (Socket)(m[i].newInstance(args)); return s; } else if ( (m_cipherSuites != null) && (params.length == 3) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int")) && (params[2].getName().equals(cipherClassName)) ) { Object[] args = new Object[3]; args[0] = host; args[1] = new Integer(port); args[2] = m_cipherSuites; s = (Socket)(m[i].newInstance(args)); return s; } } throw new LDAPException("No appropriate constructor in " + m_packageName, LDAPException.PARAM_ERROR); } catch (ClassNotFoundException e) { throw new LDAPException("Class " + m_packageName + " not found", LDAPException.PARAM_ERROR); } catch (Exception e) { throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSSLSocketFactoryExt.java0000664001003300100330000000511510602743270031067 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Represents an SSL socket connection that you can use to connect to an * LDAP server. This interface extends the base interface LDAPSocketFactory * and provides SSL-specific methods. *

* * @version 1.0 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(netscape.ldap.LDAPSocketFactory) */ public interface LDAPSSLSocketFactoryExt extends LDAPSocketFactory { /** * Returns the suite of ciphers used for SSL connections. These connections * are made through sockets created by the LDAPSSLSocketFactory. * * @return the suite of ciphers used. */ public Object getCipherSuites(); /** * Returns true if client authentication is enabled. * @see netscape.ldap.LDAPSSLSocketFactory#enableClientAuth */ public boolean isClientAuth(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/errors/0000775001003300100330000000000010667357327025271 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/errors/ErrorCodes_fr.props0000664001003300100330000000306707572776372031130 0ustar viveklvivekl0=Succés 1=Erreur d'opérations 2=Erreur de protocole 3=Délai dépassé 4=Taille dépassée 5=Comparaison fausse 6=Comparaison vraie 7=Authentification forte non prise en charge 8=Authentification forte requise 9=Références et résultats partiels trouvés 10=Références trouvés 11=Limite dépassée 12=Extension critique non disponible 13=Confidentialité requise 14=Liaison SASL en cours 16=Aucun attribut de ce type 17=Type d'attribut non défini 18=Correspondance inadéquate 19=Violation de contrainte 20=Type ou valeur existant 21=Syntaxe non valide 32=Aucun objet de ce type 33=Problème d'alias 34=Syntaxe DN non valide 35=L'objet est une feuille 36=Problème de suppression d'une référence à un alias 48=Authentification inadéquate 49=Références non valides 50=Accès insuffisant 51=Le serveur LDAP est occupé 52=Le serveur LDAP n'est pas disponible 53=Le serveur LDAP ne veut pas traiter la demande 54=Boucle détectée 64=Violation d'attribution de nom 65=Violation de classe d'objet 66=Opération non autorisée sur un noeud 67=Opération non autorisée sur RDN 68=Existe déjà 69=Impossible de modifier la classe d'objet 71=Concerne plusieurs serveurs LDAP 80=Erreur inconnue 81=Impossible de contacter le serveur LDAP 85=Client délai dépassé 89=Mauvais paramètre attribué à une méthode LDAP 91=Impossible d'établir une connexion au serveur LDAP 92=Non pris en charge par cette version du protocole LDAP 93=Commande LDAP demandée introuvable 94=Aucun résultat renvoyé 95=Autres résultats à venir 96=Client a détecté la boucle 97=Nombre de rebonds sur référence trop grand 112=Impossible d'activer TLS ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/errors/ErrorCodes.props0000664001003300100330000000252407572776371030435 0ustar viveklvivekl0=Success 1=Operations error 2=Protocol error 3=Timelimit exceeded 4=Sizelimit exceeded 5=Compare false 6=Compare true 7=Strong authentication not supported 8=Strong authentication required 9=Partial results and referral received 10=Referral received 11=Administrative limit exceeded 12=Critical extension unavailable 13=Confidentiality required 14=SASL bind in progress 16=No such attribute 17=Undefined attribute type 18=Inappropriate matching 19=Constraint violation 20=Type or value exists 21=Invalid syntax 32=No such object 33=Alias problem 34=Invalid DN syntax 35=Object is a leaf 36=Alias dereferencing problem 48=Inappropriate authentication 49=Invalid credentials 50=Insufficient access 51=LDAP server is busy 52=LDAP server is unavailable 53=LDAP server is unwilling to perform 54=Loop detected 64=Naming violation 65=Object class violation 66=Operation not allowed on nonleaf 67=Operation not allowed on RDN 68=Already exists 69=Cannot modify object class 71=Affects multiple LDAP servers 80=Unknown error 81=Cannot contact LDAP server 85=Client Timelimit exceeded 89=Bad parameter to an LDAP method 91=Cannot connect to the LDAP server 92=Not supported by this version of the LDAP protocol 93=Requested LDAP control not found 94=No results returned 95=More results to return 96=Client detected loop 97=Referral hop limit exceeded 112=Cannot start TLS ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/errors/ErrorCodes_de.props0000664001003300100330000000342007572776371031101 0ustar viveklvivekl0=Erfolg 1=Fehler bei Operation 2=Protokollfehler 3=Zeitbeschränkung überschritten 4=Größenbeschränkung überschritten 5=Vergleich meldet Ergebnis FALSCH 6=Vergleich meldet Ergebnis WAHR 7=Intensive Echtheitsprüfung wird nicht unterstützt 8=Intensive Echtheitsprüfung erforderlich 9=Teilergebnisse und Referenze empfangen 10=Referenze empfangen 11=Verwaltungsbeschränkung überschritten 12=Kritische Erweiterung nicht verfügbar 13=Vertraulichkeit erforderlich 14=SASL-Bindung läuft 16=Attribut nicht vorhanden 17=Nicht definierter Attributtyp 18=Keine geeignete Übereinstimmung 19=Verstoß gegen Beschränkung 20=Typ oder Wert ist vorhanden 21=Ungültige Syntax 32=Objekt nicht vorhanden 33=Alias-Problem 34=Ungültige DN-Syntax 35=Objekt ist ein Blattobjekt 36=Problem beim Auflösen einer Alias-Referenz 48=Unpassende Echtheitsprüfung 49=Ungültige Echtheitsnachweise 50=Ungenügender Zugriff 51=LDAP-Server ist belegt 52=LDAP-Server ist nicht verfügbar 53=LDAP-Server ist nicht zur Durchführung bereit 54=Schleife festgestellt 64=Verstoß gegen Benennungsregeln 65=Verstoß gegen Objektklasse 66=Operation ist nur bei Blattobjekten zulässig 67=Operation nicht für RDN zulässig 68=Bereits vorhanden 69=Objektklasse kann nicht geändert werden 71=Wirkt sich auf mehrere LDAP-Servers aus 80=Unbekannter Fehler 81=Verbindung zu LDAP-Server nicht möglich 85=Client-Zeitbeschränkung überschritten 89=Falscher Parameter für LDAP-Methode 91=Verbindung zu LDAP-Server nicht möglich 92=Wird von dieser Version des LDAP-Protokolls nicht unterstützt 93=Angeforderte LDAP-Steuerung wurde nicht gefunden 94=Es wurden keine Ergebnisse zurückgegeben 95=Es stehen noch weitere Ergebnisse zur Verfügung 96=Client stellte Schleife fest 97=Beschränkung für Zwischenschritte bei Referenz überschritten 112=TLS kann nicht activiert werden ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/errors/ErrorCodes_ja.props0000664001003300100330000001030307572776372031102 0ustar viveklvivekl0=\u6210\u529F 1=\u30AA\u30DA\u30EC\u30FC\u30B7\u30E7\u30F3 \u30A8\u30E9\u30FC 2=\u30D7\u30ED\u30C8\u30B3\u30EB \u30A8\u30E9\u30FC 3=\u5236\u9650\u6642\u9593\u3092\u8D85\u904E\u3057\u307E\u3057\u305F 4=\u5BB9\u91CF\u306E\u9650\u754C\u3092\u8D85\u904E\u3057\u307E\u3057\u305F 5=\u6BD4\u8F03\u7D50\u679C false 6=\u6BD4\u8F03\u7D50\u679C true 7=\u53B3\u5BC6\u306A\u8A8D\u8A3C\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 8=\u53B3\u5BC6\u306A\u8A8D\u8A3C\u304C\u5FC5\u8981\u3067\u3059\u3002 9=\u90E8\u5206\u7684\u306A\u7D50\u679C\u3068\u30EC\u30D5\u30A7\u30E9\u30EB\u3092\u53D7\u4FE1\u3057\u307E\u3057\u305F 10=\u30EC\u30D5\u30A7\u30E9\u30EB\u3092\u53D7\u4FE1\u3057\u307E\u3057\u305F\u3002 11=\u7BA1\u7406\u306E\u7BC4\u56F2\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002 12=\u5FC5\u9808\u306E\u30A8\u30AF\u30B9\u30C6\u30F3\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093 13=\u6A5F\u5BC6\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002 14=SASL \u30D0\u30A4\u30F3\u30C9\u4E2D\u3067\u3059\u3002 16=\u305D\u306E\u3088\u3046\u306A\u5C5E\u6027\u306F\u3042\u308A\u307E\u305B\u3093\u3002 17=\u5C5E\u6027\u306E\u7A2E\u985E\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 18=\u30DE\u30C3\u30C1\u30F3\u30B0\u304C\u4E0D\u9069\u5207\u3067\u3059\u3002 19=\u5236\u7D04\u9055\u53CD\u3067\u3059\u3002 20=\u30BF\u30A4\u30D7\u307E\u305F\u306F\u5024\u304C\u5B58\u5728\u3057\u307E\u3059\u3002 21=\u69CB\u6587\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002 32=\u305D\u306E\u3088\u3046\u306A\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\u3002 33=\u30A8\u30A4\u30EA\u30A2\u30B9\u306B\u554F\u984C\u304C\u3042\u308A\u307E\u3059\u3002 34=DN \u306E\u69CB\u6587\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002 35=\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30EA\u30FC\u30D5\u30CE\u30FC\u30C9\u3067\u3059\u3002 36=\u30A8\u30A4\u30EA\u30A2\u30B9 \u30C7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u306B\u554F\u984C\u304C\u3042\u308A\u307E\u3059\u3002 48=\u8A8D\u8A3C\u304C\u4E0D\u9069\u5F53\u3067\u3059\u3002 49=\u8A3C\u660E\u66F8\u304C\u7121\u52B9\u3067\u3059\u3002 50=\u30A2\u30AF\u30BB\u30B9\u6A29\u304C\u3042\u308A\u307E\u305B\u3093\u3002 51=DSA \u304C\u30D3\u30B8\u30FC\u72B6\u614B\u3067\u3059\u3002 52=DSA \u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002 53=DSA \u304C\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3002 54=\u30EB\u30FC\u30D7\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002 64=\u540D\u524D\u4ED8\u3051\u9055\u53CD 65=\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8 \u30AF\u30E9\u30B9\u9055\u53CD 66=\u30EA\u30FC\u30D5\u30CE\u30FC\u30C9\u4EE5\u5916\u3067\u30AA\u30DA\u30EC\u30FC\u30B7\u30E7\u30F3\u3092\u884C\u3046\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002 67=RDN \u3067\u30AA\u30DA\u30EC\u30FC\u30B7\u30E7\u30F3\u3092\u884C\u3046\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002 68=\u65E2\u306B\u5B58\u5728\u3057\u3066\u3044\u307E\u3059\u3002 69=\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8 \u30AF\u30E9\u30B9\u3092\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002 71=\u8907\u6570\u306E DSA \u306B\u5F71\u97FF\u3057\u307E\u3059 80=\u539F\u56E0\u4E0D\u660E\u306E\u30A8\u30E9\u30FC 81=LDAP \u30B5\u30FC\u30D0\u3068\u901A\u4FE1\u3067\u304D\u307E\u305B\u3093 85=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C\u5236\u9650\u6642\u9593\u3092\u8D85\u904E\u3057\u307E\u3057\u305F 89=LDAP \u30E1\u30BD\u30C3\u30C9\u306B\u4E0D\u6B63\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u6E21\u3055\u308C\u307E\u3057\u305F 91=LDAP \u30B5\u30FC\u30D0\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093 92=\u3053\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E LDAP \u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 93=\u8981\u6C42\u3055\u308C\u305F LDAP \u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 94=\u7D50\u679C\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3002 95=\u3055\u3089\u306B\u7D50\u679C\u304C\u8FD4\u3055\u308C\u307E\u3059\u3002 96=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C\u30EB\u30FC\u30D7\u3092\u691C\u51FA\u3057\u307E\u3057\u305F\u3002 97=\u30EC\u30D5\u30A7\u30E9\u30EB \u30DB\u30C3\u30D7 \u30EA\u30DF\u30C3\u30C8\u3092\u8D85\u904E\u3057\u307E\u3057\u305F\u3002 112=TLS\u3092\u-6a75\u59cb\u3067\u304d\u307e\u305b\u3093\u3002 ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPException.java0000664001003300100330000011040210602743270027176 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import java.io.*; /** * Indicates that an error has occurred. An LDAPException * can result from physical problems (such as network errors) as well as * problems with LDAP operations (for example, if the LDAP add operation * fails because of duplicate entry). *

* * Most errors that occur throw this type of exception. In order to determine * the cause of the error, you can call the getLDAPResultCode() * method to get the specific result code and compare this code against * the result codes defined as fields in this class. (For example, if * the result code matches the value of the field * LDAPException.TIME_LIMIT_EXCEEDED, the time limit passed * before the search operation could be completed.) *

* * This exception includes methods for getting an error message that * corresponds to the LDAP result code (for example, "Timelimit exceeded" * for LDAPException.TIME_LIMIT_EXCEEDED). These error * messages are specified in the following files: *

netscape/ldap/errors/ErrorCodes_locale_string.props
* where locale_string is the name of the locale that includes * the language and country, but not the variant. *

* * For example: *

netscape/ldap/errors/ErrorCodes_en_US.props
* * The LDAP Java classes get this locale name by calling the * java.util.Locale.toString method for the specified * locale and ignoring the variant. If no locale is specified, the * LDAP Java classes use the java.util.Locale.getDefault * method to get the locale of the local host system. *

* * In order to get error messages for different locales, you need to * provide files containing the error messages for those locales. * The files should be located in the netscape/ldap/errors * directory and should use the naming convention specified above. *

* * The following is a list of LDAP result codes: *

 * Result
 *  Code   Defined Value
 * ======  =============
 *   0     SUCCESS
 *   1     OPERATION_ERROR
 *   2     PROTOCOL_ERROR
 *   3     TIME_LIMIT_EXCEEDED
 *   4     SIZE_LIMIT_EXCEEDED
 *   5     COMPARE_FALSE
 *   6     COMPARE_TRUE
 *   7     AUTH_METHOD_NOT_SUPPORTED
 *   8     STRONG_AUTH_REQUIRED
 *   9     LDAP_PARTIAL_RESULTS
 *  10     REFERRAL (LDAP v3)
 *  11     ADMIN_LIMIT_EXCEEDED (LDAP v3)
 *  12     UNAVAILABLE_CRITICAL_EXTENSION (LDAP v3)
 *  13     CONFIDENTIALITY_REQUIRED (LDAP v3)
 *  14     SASL_BIND_IN_PROGRESS (LDAP v3)
 *  16     NO_SUCH_ATTRIBUTE
 *  17     UNDEFINED_ATTRIBUTE_TYPE
 *  18     INAPPROPRIATE_MATCHING
 *  19     CONSTRAINT_VIOLATION
 *  20     ATTRIBUTE_OR_VALUE_EXISTS
 *  21     INVALID_ATTRIBUTE_SYNTAX
 *  32     NO_SUCH_OBJECT
 *  33     ALIAS_PROBLEM
 *  34     INVALID_DN_SYNTAX
 *  35     IS_LEAF
 *  36     ALIAS_DEREFERENCING_PROBLEM
 *  48     INAPPROPRIATE_AUTHENTICATION
 *  49     INVALID_CREDENTIALS
 *  50     INSUFFICIENT_ACCESS_RIGHTS
 *  51     BUSY
 *  52     UNAVAILABLE
 *  53     UNWILLING_TO_PERFORM
 *  54     LOOP_DETECT
 *  64     NAMING_VIOLATION
 *  65     OBJECT_CLASS_VIOLATION
 *  66     NOT_ALLOWED_ON_NONLEAF
 *  67     NOT_ALLOWED_ON_RDN
 *  68     ENTRY_ALREADY_EXISTS
 *  69     OBJECT_CLASS_MODS_PROHIBITED
 *  71     AFFECTS_MULTIPLE_DSAS (LDAP v3)
 *  80     OTHER
 *  81     SERVER_DOWN
 *  85     LDAP_TIMEOUT
 *  89     PARAM_ERROR
 *  91     CONNECT_ERROR
 *  92     LDAP_NOT_SUPPORTED
 *  93     CONTROL_NOT_FOUND
 *  94     NO_RESULTS_RETURNED
 *  95     MORE_RESULTS_TO_RETURN
 *  96     CLIENT_LOOP
 *  97     REFERRAL_LIMIT_EXCEEDED
 * 112     TLS_NOT_SUPPORTED (LDAP v3) 
 * 
*

* * @version 1.0 * @see netscape.ldap.LDAPReferralException */ public class LDAPException extends java.lang.Exception implements java.io.Serializable { static final long serialVersionUID = -9215007872184847925L; /** * (0) The operation completed successfully. */ public final static int SUCCESS = 0; /** * (1) An internal error occurred in the LDAP server. */ public final static int OPERATION_ERROR = 1; /** * (2) A LDAP server could not correctly interpret the request * sent by your client because the request does not strictly * comply with the LDAP protocol. (For example, the data * was not correctly BER-encoded, or a specified value -- such * as the search scope or modification type -- does not * comply with the LDAP protocol. If you invent your own * search scope, for instance, this result code might be returned.

*/ public final static int PROTOCOL_ERROR = 2; /** * (3) The search operation could not be completed within * the maximum time limit. You can specify the maximum time * limit by calling the LDAPConnection.setOption * method or the LDAPSearchConstraints.setServerTimeLimit * method.

* * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPSearchConstraints#setServerTimeLimit */ public final static int TIME_LIMIT_EXCEEDED = 3; /** * (4) The search found more than the maximum number of results. * You can specify the maximum number of results by calling the * LDAPConnection.setOption method or the * LDAPSearchConstraints.setSizeLimit method.

* * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPSearchConstraints#setMaxResults */ public final static int SIZE_LIMIT_EXCEEDED = 4; /** * (5) Value returned by an LDAP compare operation if the * specified attribute and value is not found in the entry * (no matching value found). * * @see netscape.ldap.LDAPConnection#compare */ public final static int COMPARE_FALSE = 5; /** * (6) Value returned by an LDAP compare operation if the * specified attribute and value is found in the entry * (matching value found). * * @see netscape.ldap.LDAPConnection#compare */ public final static int COMPARE_TRUE = 6; /** * (7) The specified authentication method is not supported * by the LDAP server that you are connecting to. The * LDAPConnection class is implemented so that * LDAPConnection.authenticate always * uses the LDAP_AUTH_SIMPLE method of authentication. * (LDAPConnection.authenticate does not * allow you to select the method of authentication.)

*/ public final static int AUTH_METHOD_NOT_SUPPORTED = 7; /** * (8) A stronger authentication method (more than LDAP_AUTH_SIMPLE) * is required by the LDAP server that you are connecting to. * The LDAPConnection class is implemented so that * LDAPConnection.authenticate always * uses the LDAP_AUTH_SIMPLE method of authentication. * (LDAPConnection.authenticate does not * allow you to select the method of authentication.)

*/ public final static int STRONG_AUTH_REQUIRED = 8; /** * (9) The LDAP server is referring your client to another * LDAP server. If you set up the LDAPConnection * options or the LDAPConstraints options * for automatic referral, your client will automatically * connect and authenticate to the other LDAP server. * (This LDAPException will not be raised.) *

* * (To set up automatic referrals in an LDAPConnection * object, set the LDAPConnection.REFERRALS option * to true and the LDAPConnection.REFERRALS_REBIND_PROC * option to the object containing the method for retrieving * authentication information (in other words, the distinguished * name and password to use when authenticating to other LDAP servers). *

* * If instead you set LDAPConnection.REFERRALS * to false (or if you set * LDAPConstraints.setReferrals to false, * an LDAPReferralException is raised. *

* * If an error occurs during the referral process, an * LDAPException with this result code * (LDAP_PARTIAL_RESULTS) is raised. *

* * @see netscape.ldap.LDAPConnection#setOption * @see netscape.ldap.LDAPConstraints#setReferrals * @see netscape.ldap.LDAPConstraints#setRebindProc * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPRebindAuth * @see netscape.ldap.LDAPReferralException */ public final static int LDAP_PARTIAL_RESULTS = 9; /** * (10) [LDAP v3] The server does not hold the requested entry. * The referral field of the server's response contains a * reference to another server (or set of servers), which * your client can access through LDAP or other protocols. * Typically, these references are LDAP URLs that identify * the server that may contain the requested entry. *

* * When this occurs, a LDAPReferralException * is thrown. You can catch this exception and call the * getURLs method to get the list of LDAP * URLs from the exception. *

* * @see netscape.ldap.LDAPReferralException */ public final static int REFERRAL = 10; /** * (11) [LDAP v3] The adminstrative limit on the * maximum number of entries to return was exceeded. * In the Netscape Directory Server 3.0, this * corresponds to the "look through limit" for * the server. This is the maximum number of * entries that the server will check through * when determining which entries match the * search filter and scope. *

*/ public final static int ADMIN_LIMIT_EXCEEDED = 11; /** * (12) [LDAP v3] The server received an LDAP v3 control * that is marked critical and either (1) is not * recognized or supported by the server, or * (2) is inappropriate for the operation requested. * The Netscape Directory Server 3.0 also returns * this result code if the client specifies a * matching rule that is not supported by the server. *

* * @see netscape.ldap.LDAPControl */ public final static int UNAVAILABLE_CRITICAL_EXTENSION = 12; /** * (13) [LDAP v3] A secure connection is required for * this operation. */ public final static int CONFIDENTIALITY_REQUIRED = 13; /** * (14) [LDAP v3] While authenticating your client * by using a SASL (Simple Authentication Security Layer) * mechanism, the server requires the client to send * a new SASL bind request (specifying the same SASL * mechanism) to continue the authentication process. */ public final static int SASL_BIND_IN_PROGRESS = 14; /** * (16) The specified attribute could not be found. */ public final static int NO_SUCH_ATTRIBUTE = 16; /** * (17) The specified attribute is not defined. */ public final static int UNDEFINED_ATTRIBUTE_TYPE = 17; /** * (18) An inappropriate type of matching was used. */ public final static int INAPPROPRIATE_MATCHING = 18; /** * (19) An internal error occurred in the LDAP server. */ public final static int CONSTRAINT_VIOLATION = 19; /** * (20) The value that you are adding to an attribute * already exists in the attribute. */ public final static int ATTRIBUTE_OR_VALUE_EXISTS = 20; /** * (21) The request contains invalid syntax. */ public final static int INVALID_ATTRIBUTE_SYNTAX = 21; /** * (32) The entry specified in the request does not exist. */ public final static int NO_SUCH_OBJECT = 32; /** * (33) An problem occurred with an alias. */ public final static int ALIAS_PROBLEM = 33; /** * (34) The specified distinguished name (DN) uses invalid syntax. */ public final static int INVALID_DN_SYNTAX = 34; /** * (35) The specified entry is a "leaf" entry (it has no entries * beneath it in the directory tree). */ public final static int IS_LEAF = 35; /** * (36) An error occurred when dereferencing an alias. */ public final static int ALIAS_DEREFERENCING_PROBLEM = 36; /** * (48) The authentication presented to the server is inappropriate. * This result code might occur, for example, if your client * presents a password and the corresponding entry has no * userpassword attribute. */ public final static int INAPPROPRIATE_AUTHENTICATION = 48; /** * (49) The credentials presented to the server for authentication * are not valid. (For example, the password sent to the server * does not match the user's password in the directory.) */ public final static int INVALID_CREDENTIALS = 49; /** * (50) The client is authenticated as a user who does not have the * access privileges to perform this operation. */ public final static int INSUFFICIENT_ACCESS_RIGHTS = 50; /** * (51) The LDAP server is busy. */ public final static int BUSY = 51; /** * (52) The LDAP server is unavailable. */ public final static int UNAVAILABLE = 52; /** * (53) The LDAP server is unable to perform the specified operation. */ public final static int UNWILLING_TO_PERFORM = 53; /** * (54) A loop has been detected. */ public final static int LOOP_DETECT = 54; /** * (60) The "server-side sorting" control * was not included with the "virtual list view" * control in the search request. */ public final static int SORT_CONTROL_MISSING = 60; /** * (61) An index range error occurred. */ public final static int INDEX_RANGE_ERROR = 61; /** * (64) A naming violation has occurred. */ public final static int NAMING_VIOLATION = 64; /** * (65) The requested operation will add or change * data so that the data no longer complies with * the schema. */ public final static int OBJECT_CLASS_VIOLATION = 65; /** * (66) The requested operation can only be performed * on an entry that has no entries beneath it in the * directory tree (in other words, a "leaf" entry). *

* * For example, you cannot delete or rename an entry * if the entry has subentries beneath it. *

*/ public final static int NOT_ALLOWED_ON_NONLEAF = 66; /** * (67) The specified operation cannot be performed on * a relative distinguished name (RDN). */ public final static int NOT_ALLOWED_ON_RDN = 67; /** * (68) The specified entry already exists. You might receive * this error if, for example, you attempt to add an entry * that already exists or if you attempt to change the name * of an entry to the name of an entry that already exists. */ public final static int ENTRY_ALREADY_EXISTS = 68; /** * (69) You cannot modify the specified object class. */ public final static int OBJECT_CLASS_MODS_PROHIBITED = 69; /** * (71) [LDAP v3] The client attempted to move an entry * from one LDAP server to another by requesting a "modify * DN" operation. In general, clients should not be able * to arbitrarily move entries and subtrees between servers. *

* * @see netscape.ldap.LDAPConnection#rename(java.lang.String, java.lang.String, java.lang.String, boolean) * @see netscape.ldap.LDAPConnection#rename(java.lang.String, java.lang.String, java.lang.String, boolean, LDAPConstraints) */ public final static int AFFECTS_MULTIPLE_DSAS = 71; /** * (80) General result code for other types of errors * that may occur. */ public final static int OTHER = 80; /** * (81) The LDAP server cannot be contacted. */ public final static int SERVER_DOWN = 0x51; /** * (85) The operation could not be completed within the * maximum time limit. You can specify the maximum time limit * by calling the LDAPConstraints.setTimeLimit * method.

* * @see netscape.ldap.LDAPConstraints#setTimeLimit */ public final static int LDAP_TIMEOUT = 0x55; /** * (89) When calling a constructor or method from your client, * one or more parameters were incorrectly specified. */ public final static int PARAM_ERROR = 0x59; /** * (91) Your LDAP client failed to connect to the LDAP server. */ public final static int CONNECT_ERROR = 0x5b; /** * (92) The request is not supported by this version of the LDAP protocol. */ public final static int LDAP_NOT_SUPPORTED = 0x5c; /** * (93) The requested control is not found. *

* * @see netscape.ldap.LDAPControl */ public final static int CONTROL_NOT_FOUND = 0x5d; /** * (94) No results have been returned from the server. */ public final static int NO_RESULTS_RETURNED = 0x5e; /** * (95) More results are being returned from the server. */ public final static int MORE_RESULTS_TO_RETURN = 0x5f; /** * (96) Your LDAP client detected a loop in the referral. */ public final static int CLIENT_LOOP = 0x60; /** * (97) The number of sequential referrals (for example, * the client may be referred first from LDAP server A to * LDAP server B, then from LDAP server B to LDAP server C, * and so on) has exceeded the maximum number of referrals * (the LDAPv2.REFERRALS_HOP_LIMIT option). *

* * @see netscape.ldap.LDAPv2#REFERRALS_HOP_LIMIT * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public final static int REFERRAL_LIMIT_EXCEEDED = 0x61; /** * (112) The socket factory of the connection is not capable * of initiating a TLS session. *

* * @see netscape.ldap.LDAPConnection#startTLS */ public final static int TLS_NOT_SUPPORTED = 0x70; /** * Internal variables */ private int resultCode = -1; private String errorMessage = null; private String extraMessage = null; private String matchedDN = null; private Locale m_locale = Locale.getDefault(); private static Hashtable cacheResource = new Hashtable(); private static final String baseName = "netscape/ldap/errors/ErrorCodes"; /** * Constructs a default exception with no specific error information. */ public LDAPException() { } /** * Constructs a default exception with a specified string of * additional information. This string appears if you call * the toString() method. *

* * This form is used for lower-level errors. * It is recommended that you always use one of the constructors * that takes a result code as a parameter. (If your exception is * thrown, any code that catches the exception may need to extract * the result code from the exception.) *

* @param message the additional error information * @see netscape.ldap.LDAPException#toString() */ public LDAPException( String message ) { super( message ); } /** * Constructs a default exception with a result code and * a specified string of additional information. This string * appears if you call the toString() method. * The result code that you set is accessible through the * getLDAPResultCode() method. *

* * @param message the additional error information to specify * @param resultCode the result code returned from the * operation that caused this exception * @see netscape.ldap.LDAPException#toString() * @see netscape.ldap.LDAPException#getLDAPResultCode() */ public LDAPException( String message, int resultCode ) { super( message ); this.resultCode = resultCode; } /** * Constructs a default exception with a result code, a specified * string of additional information, and a string containing * information passed back from the server. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • The first string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getLDAPResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

*

* * Use this form of the constructor * for higher-level LDAP operational errors. * @param message the additional error information to specify * @param resultCode the result code returned from the * operation that caused this exception * @param serverErrorMessage error message specifying additional * information returned from the server * @see netscape.ldap.LDAPException#toString() * @see netscape.ldap.LDAPException#getLDAPResultCode() * @see netscape.ldap.LDAPException#getLDAPErrorMessage() */ public LDAPException( String message, int resultCode, String serverErrorMessage ) { super( message ); this.resultCode = resultCode; this.errorMessage = serverErrorMessage; } /** * Constructs a default exception with a result code, a specified * string of additional information, a string containing * information passed back from the server, and the DN of the * closest matching entry, if the exception was thrown because * an entry could not be found (for example, if cn=Babs Jensen, * ou=People, c=Airius.com could not be found but * ou=People, c=Airius.com is a valid directory entry, * the "matched DN" is ou=People, c=Airius.com. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • This string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getLDAPResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

  • The matched DN that you set is accessible through the * getMatchedDN method.

    *

*

* * This form is used for higher-level LDAP operational errors. * @param message the additional error information * @param resultCode the result code returned * @param serverErrorMessage error message specifying additional information * returned from the server * @param matchedDN maximal subset of a specified DN which could be * matched by the server * @see netscape.ldap.LDAPException#toString() * @see netscape.ldap.LDAPException#getLDAPResultCode() * @see netscape.ldap.LDAPException#getLDAPErrorMessage() * @see netscape.ldap.LDAPException#getMatchedDN() */ public LDAPException( String message, int resultCode, String serverErrorMessage, String matchedDN ) { super( message ); this.resultCode = resultCode; this.errorMessage = serverErrorMessage; this.matchedDN = matchedDN; } /** * Returns the result code from the last error that occurred. * This result code is defined as a public final static int member * of this class. Note that this value is not always valid. * -1 indicates that the result code is invalid. * @return the LDAP result code of the last operation. */ public int getLDAPResultCode () { return resultCode; } /** * Returns the error message from the last error, if this message * is available (that is, if this message was set). If the message * was not set, this method returns null. *

* * Note that this message is rarely set. (In order to set this message, * the code constructing this exception must have called the constructor * LDAPException(String, int, String). The last argument, * which is additional error information returned from the server, * is the string returned by getLDAPErrorMessage. *

* * In most cases, if you want information about * the error generated, you should call the toString() * method instead. *

* * @return the error message of the last error (or null * if no message was set). * @see netscape.ldap.LDAPException#toString() */ public String getLDAPErrorMessage () { return errorMessage; } /** * Adds additional explanation to the error message */ void setExtraMessage (String msg) { if (extraMessage == null) { extraMessage = msg; } else { extraMessage += "; " + msg; } } /** * Returns the maximal subset of a DN which could be matched by the * server. * * The method should be used if the server returned one of the * following errors: *

    *
  • NO_SUCH_OBJECT *
  • ALIAS_PROBLEM *
  • INVALID_DN_SYNTAX *
  • ALIAS_DEREFERENCING_PROBLEM *
* For example, if the DN cn=Babs Jensen, o=People, c=Airius.com * could not be found by the DN o=People, c=Airius.com * could be found, the matched DN is * o=People, c=Airius.com. *

* * If the exception does not specify a matching DN, * this method returns null. * @return the maximal subset of a DN which could be matched, * or null if the error is not one of the above. */ public String getMatchedDN () { return matchedDN; } /** * Gets the string representation of the exception, which * includes the result code, the message sent back from * the LDAP server, the portion of the DN that the server * could find in the directory (if applicable), and the * error message corresponding to this result code. *

* * For example: * *

netscape.ldap.LDAPException: error result (32); server error message; matchedDN = ou=people,o=airius.com; No such object
* * In this example, error result is the string of * additional information specified in the exception, 32 is * the result code, server error message is the additional * information from the server specified in the exception, the * matched DN is ou=people,o=airius.com, and the error message * corresponding to the result code 32 is No such * object. *

* * The error message corresponding to the error code can also be * retrieved by using the errorCodeToString method. * Note that this method can generate error messages specific to * a current locale. *

* * @return string representation of exception. * @see netscape.ldap.LDAPException#errorCodeToString(int) */ public String toString() { String str = super.toString() + " (" + resultCode + ")" ; if ( (errorMessage != null) && (errorMessage.length() > 0) ) { str += "; " + errorMessage; } if ( (matchedDN != null) && (matchedDN.length() > 0) ) { str += "; matchedDN = " + matchedDN; } String errorStr = errorCodeToString(m_locale); if ((errorStr != null) && (errorStr.length() > 0)) { str += "; " + errorStr; } if (extraMessage != null) { str += "; " + extraMessage; } return str; } /** * Returns the error message describing the error code (for this * exception). The error message is specific to the default locale * for this system. (The LDAP Java classes determine the default * locale by calling the java.util.Locale.getDefault * method and retrieve the error messages from the following file: *

netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @return the error message describing the error code for this * exception in the default locale. */ public String errorCodeToString() { return errorCodeToString(resultCode, m_locale); } /** * Returns the error message describing the error code for this * exception. The error message for the specified locale is retrieved * from the following file: *
netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @param l the java.util.Locale object representing the * locale of the error message to retrieve * @return the error message describing the current error code * in the specified locale. */ public String errorCodeToString(Locale l) { return errorCodeToString(resultCode, l); } /** * Returns the error message describing the specified error code. * The error message is specific to the default locale * for this system. (The LDAP Java classes determine the default * locale by calling the java.util.Locale.getDefault * method and retrieve the error messages from the following file: *
netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @param code the error code for which to get the * corresponding error message * @return error message describing the specified error code for * the default locale. */ public static String errorCodeToString(int code) { return errorCodeToString(code, Locale.getDefault()); } /** * Returns the error message describing the specified error code. * The error message for the specified locale is retrieved from * the following file: *
netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @param code the error code for which to get the * corresponding error * @param locale the java.util.Locale object representing the * locale of the error message that you want to retrieve * @return error message describing the specified error code for * the specified locale. */ public synchronized static String errorCodeToString(int code, Locale locale) { try { String localeStr = locale.toString(); PropertyResourceBundle p = (PropertyResourceBundle)cacheResource.get(localeStr); if (p == null) { p = LDAPResourceBundle.getBundle(baseName); if (p != null) cacheResource.put(localeStr, p); } if (p != null) { return (String)p.handleGetObject(Integer.toString(code)); } } catch (IOException e) { System.out.println("Cannot open resource file for LDAPException "+ baseName); } return null; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPResponseListener.java0000664001003300100330000001056510602743270030555 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Represents the message queue associated with a particular LDAP * operation or operations. * */ public class LDAPResponseListener extends LDAPMessageQueue{ static final long serialVersionUID = 901897097111294329L; /** * Constructor * @param asynchOp a boolean flag that is true if the object is used for * asynchronous LDAP operations * @see netscape.ldap.LDAPAsynchronousConnection */ LDAPResponseListener(boolean asynchOp) { super(asynchOp); } /** * Blocks until a response is available, or until all operations * associated with the object have completed or been canceled, and * returns the response. * * @return a response for an LDAP operation or null if there are no * more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ public LDAPResponse getResponse() throws LDAPException { return (LDAPResponse)nextMessage(); } /** * Merge two response listeners. * Move/append the content from another response listener to this one. *

* To be used for synchronization of asynchronous LDAP operations where * requests are sent by one thread but processed by another one. *

* A client may be implemented in such a way that one thread makes LDAP * requests and calls l.getMessageIDs(), while another thread * is responsible for processing of responses (call l.getResponse()). * Both threads are using * the same listener objects. In such a case, a race * condition may occur, where a LDAP response message is retrieved and * the request terminated (request ID removed) before the first thread * has a chance to execute l.getMessageIDs(). * The proper way to handle this scenario is to create a separate listener * for each new request, and after l.getMessageIDs() has been invoked, merge the * new request with the existing one. * @param listener2 the listener with which to merge */ public void merge(LDAPResponseListener listener2) { super.merge(listener2); } /** * Reports true if a response has been received from the server. * * @return a flag indicating whether the response message queue is empty. */ public boolean isResponseReceived() { return super.isMessageReceived(); } /** * Returns message IDs for all outstanding requests * @return message ID array. */ public int[] getMessageIDs() { return super.getMessageIDs(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/0000775001003300100330000000000010667357327025620 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPSortControl.java0000664001003300100330000005133410602743272031405 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import java.io.*; import netscape.ldap.LDAPControl; import netscape.ldap.LDAPSortKey; import netscape.ldap.client.JDAPBERTagDecoder; import netscape.ldap.LDAPException; import netscape.ldap.ber.stream.*; /** * Represents an LDAP v3 server control that specifies that you want * the server to return sorted search results. (The OID for this * control is 1.2.840.113556.1.4.473.) *

* * When constructing an LDAPSortControl object, you can * specify the order in which you want the results sorted. * You can also specify whether or not this control is critical * to the search operation. *

* * To specify the sort order, you construct an LDAPSortKey * object and pass it to the LDAPSortControl constructor. * The LDAPSortKey object represents a list of the attribute * types used for sorting (a "sort key list"). *

* * You can include the control in a search request by constructing * an LDAPSearchConstraints object and calling the * setServerControls method. You can then pass this * LDAPSearchConstraints object to the search * method of an LDAPConnection object. *

* * For example: *

 * ...
 * LDAPConnection ld = new LDAPConnection();
 * try {
 *     // Connect to server.
 *     ld.connect( 3, hostname, portnumber, "", "" );
 *
 *     // Create a sort key that specifies the sort order.
 *     LDAPSortKey sortOrder = new LDAPSortKey( attrname );
 *
 *     // Create a "critical" server control using that sort key.
 *     LDAPSortControl sortCtrl = new LDAPSortControl(sortOrder,true);
 *
 *     // Create search constraints to use that control.
 *     LDAPSearchConstraints cons = new LDAPSearchConstraints();
 *     cons.setServerControls( sortCtrl );
 *
 *     // Send the search request.
 *     LDAPSearchResults res = ld.search( "o=Airius.com",
 *        LDAPv3.SCOPE_SUB, "(cn=Barbara*)", null, false, cons );
 *
 *     ...
 *
 * 
* * The LDAP server sends back a sort response control to indicate * the result of the sorting operation. (The OID for this control * is 1.2.840.113556.1.4.474.) *

* * This control contains: *

* *

    *
  • the result code from the sorting operation *
  • optionally, the first attribute type in the sort key list * that resulted in an error (for example, if the attribute does * not exist) *
*

* * To retrieve the data from this control, use the getResultCode * and getFailedAttribute methods. *

* * The following table lists what kinds of results to expect from the * LDAP server under different situations: *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Does the Server Support the Sorting Control?Is the Sorting Control Marked As Critical?Other ConditionsResults from LDAP Server
* No * * Yes * * None * *
    *
  • The server does not send back any entries. *
  • An LDAPException.UNAVAILABLE_CRITICAL_EXTENSION * exception is thrown. *
*
* No * * None * *
    *
  • The server ignores the sorting control and * returns the entries unsorted. *
*

*

* Yes * * Yes * * The server cannot sort the results using the specified * sort key list. * *
    *
  • The server does not send back any entries. *
  • An LDAPException.UNAVAILABLE_CRITICAL_EXTENSION * exception is thrown. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt and (optionally) * the attribute type that caused the error. *
*
* No * *
    *
  • The server returns the entries unsorted. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt and (optionally) * the attribute type that caused the error. *
*
* N/A (could either be marked as critical or not) * * The server successfully sorted the entries. * *
    *
  • The server sends back the sorted entries. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt * (LDAPException.SUCCESS). *
*
* The search itself failed (for any reason). * *
    *
  • The server sends back a result code for the search * operation. *
  • The server does not send back the sorting response control. *
*
*

* * @version 1.0 * @see netscape.ldap.LDAPSortKey * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConstraints * @see netscape.ldap.LDAPSearchConstraints * @see netscape.ldap.LDAPConstraints#setServerControls(LDAPControl) */ public class LDAPSortControl extends LDAPControl { public final static String SORTREQUEST = "1.2.840.113556.1.4.473"; public final static String SORTRESPONSE = "1.2.840.113556.1.4.474"; // Response varibales private String m_failedAttribute = null; private int m_resultCode = 0; // Request variables private LDAPSortKey[] m_keys; /** * Constructs a sort response LDAPSortControl object. * This constructor is used by LDAPControl.register to * instantiate sort response controls. *

* To retrieve the result code of the sort operation, call * getResultCode. *

* To retrieve the attribute that caused the sort operation to fail, call * getFailedAttribute. * @param oid the oid for this control. This must be * LDAPSortControl.SORTRESPONSE or an LDAPException * is thrown. * @param critical true if this control is critical to the operation * @param value the value associated with this control * @exception netscape.ldap.LDAPException If oid is not * LDAPSortControl.SORTRESPONSE. * @exception java.io.IOException If value contains an invalid BER sequence. * @see netscape.ldap.LDAPControl#register */ public LDAPSortControl( String oid, boolean critical, byte[] value ) throws LDAPException, IOException { super( oid, critical, value ); if ( !oid.equals( SORTRESPONSE )) { throw new LDAPException( "oid must be LDAPSortControl.SORTRESPONSE", LDAPException.PARAM_ERROR); } ByteArrayInputStream inStream = new ByteArrayInputStream( value ); BERSequence ber = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nRead = { 0 }; /* A sequence */ BERSequence seq = (BERSequence)BERElement.getElement(decoder, inStream, nRead ); /* First is result code */ m_resultCode = ((BEREnumerated)seq.elementAt( 0 )).getValue(); /* Then, possibly an attribute that failed sorting */ if(seq.size() == 1) { return; } /* If this is not an octet string, let there be an exception */ BEROctetString t = (BEROctetString)seq.elementAt(1); try { m_failedAttribute = new String(t.getValue(), "UTF8"); } catch (UnsupportedEncodingException e) { } } /** * @return the attribute that caused the sort operation to fail. */ public String getFailedAttribute() { return m_failedAttribute; } /** * @return the result code from the search operation. */ public int getResultCode() { return m_resultCode; } /** * Constructs an LDAPSortControl object with a single * sorting key. * @param key a single attribute by which to sort * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPSortKey */ public LDAPSortControl(LDAPSortKey key, boolean critical) { super( SORTREQUEST, critical, null ); LDAPSortKey[] keys = new LDAPSortKey[1]; keys[0] = key; m_value = createSortSpecification( m_keys = keys ); } /** * Constructs an LDAPSortControl object with an array of * sorting keys. * @param keys the attributes by which to sort * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPSortKey */ public LDAPSortControl(LDAPSortKey[] keys, boolean critical) { super( SORTREQUEST, critical, null ); m_value = createSortSpecification( m_keys = keys ); } /** * Parses the sorting response control sent by the server and * retrieves the result code from the sorting operation and * the attribute that caused sorting to fail (if specified by * the server). *

* * You can get the controls returned by the server by using the * getResponseControls method of the * LDAPConnection class. *

* * This method returns the attribute that caused the sort operation * to fail (or null, if the server did not specify any attribute). * The result code of the sorting operation is returned in the * results argument. This argument is an array of * integers; the result code is specified in the first element of * this array. *

* * For example: *

     * ...
     * LDAPConnection ld = new LDAPConnection();
     * try {
     *     // Connect to the server, set up the sorting control,
     *     // and set up the search constraints.
     *     ...
     *
     *     // Search the directory.
     *     LDAPSearchResults res = ld.search( "o=Airius.com",
     *         LDAPv3.SCOPE_SUB, "(cn=Barbara*)", attrs, false, cons );
     *
     *     // Determine if the server sent a control back to you.
     *     LDAPControl[] returnedControls = ld.getResponseControls();
     *     if ( returnedControls != null ) {
     *         int[] resultCodes = new int[1];
     *         String failedAttr = LDAPSortControl.parseResponse(
     *             returnedControls, resultCodes );
     *
     *         // Check if the result code indicated an error occurred.
     *         if ( resultCodes[0] != 0 ) {
     *             System.out.println( "Result code: " + resultCodes[0] );
     *             if ( failedAttr != null ) {
     *                 System.out.println( "Sorting operation failed on " +
     *                     failedAttr );
     *             } else {
     *                 System.out.println( "Server did not indicate which " +
     *                     "attribute caused sorting to fail." );
     *             }
     *         }
     *     }
     *     ...
     * }
     * ...
     *
     * 
* * The following table lists some of the possible result codes * for the sorting operation. *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* LDAPException.SUCCESS * * The server successfully sorted the results. *
* LDAPException.OPERATION_ERROR * * An internal server error occurred. *
* LDAPException.TIME_LIMIT_EXCEEDED * * The maximum time allowed for a search was exceeded * before the server finished sorting the results. *
* LDAPException.STRONG_AUTH_REQUIRED * * The server refused to send back the sorted search * results because it requires you to use a stronger * authentication method. *
* LDAPException.ADMIN_LIMIT_EXCEEDED * * There are too many entries for the server to sort. *
* LDAPException.NO_SUCH_ATTRIBUTE * * The sort key list specifies an attribute that does not exist. *
* LDAPException.INAPPROPRIATE_MATCHING * * The sort key list specifies a matching rule that is * not recognized or appropriate *
* LDAPException.INSUFFICIENT_ACCESS_RIGHTS * * The server did not send the sorted results because the * client has insufficient access rights. *
* LDAPException.BUSY * * The server is too busy to sort the results. *
* LDAPException.UNWILLING_TO_PERFORM * * The server is unable to sort the results. *
* LDAPException.OTHER * * This general result code indicates that the server * failed to sort the results for a reason other than * the ones listed above. *
*

* * @param controls an array of LDAPControl objects, * representing the controls returned by the server * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @param results an array of integers. The first element of this array * specifies the result code of the sorting operation. * @return the attribute that caused the error, or null if the server did * not specify which attribute caused the error. * @see netscape.ldap.LDAPConnection#getResponseControls * @deprecated LDAPSortControl response controls are now automatically * instantiated. */ public static String parseResponse( LDAPControl[] controls, int[] results ) { String attr = null; LDAPControl sort = null; /* See if there is a sort control in the array */ for( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i].getID().equals( SORTRESPONSE ) ) { sort = controls[i]; break; } } if ( sort != null ) { /* Suck out the data and return it */ ByteArrayInputStream inStream = new ByteArrayInputStream( sort.getValue() ); BERSequence ber = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nRead = new int[1]; nRead[0] = 0; try { /* A sequence */ BERSequence seq = (BERSequence)BERElement.getElement( decoder, inStream, nRead ); /* First is result code */ int result = ((BEREnumerated)seq.elementAt( 0 )).getValue(); if ( (results != null) && (results.length > 0) ) results[0] = result; /* Then, possibly an attribute that failed sorting */ /* If this is not an octet string, let there be an exception */ BEROctetString t = (BEROctetString)seq.elementAt(1); attr = new String(t.getValue(), "UTF8"); } catch(Exception x) { } } return attr; } /** * Create a "flattened" BER encoding of the requested sort keys, * and return it as a byte array. * @param keys the attributes by which to sort * @return the byte array of encoded data. */ private byte[] createSortSpecification( LDAPSortKey[] keys ) { /* A sequence of sequences */ BERSequence ber = new BERSequence(); /* Add each sort key as a sequence */ for( int i = 0; i < keys.length; i++ ) { BERSequence seq = new BERSequence(); /* The attribute name */ seq.addElement(new BEROctetString(keys[i].getKey())); /* Optional matching rule */ if ( keys[i].getMatchRule() != null ) seq.addElement(new BERTag( BERTag.CONTEXT|0, new BEROctetString(keys[i].getMatchRule()), true)); /* Optional reverse-order sort */ if ( keys[i].getReverse() ) seq.addElement(new BERTag( BERTag.CONTEXT|1, new BEREnumerated(LDAPSortKey.REVERSE), true)); ber.addElement( seq ); } /* Suck out the data and return it */ return flattenBER( ber ); } public String toString() { return (getID() == SORTREQUEST) ? reqToString() : rspToString(); } String reqToString() { StringBuffer sb = new StringBuffer("{SortCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" "); for (int i=0; i < m_keys.length; i++) { sb.append(m_keys[i]); } sb.append("}"); return sb.toString(); } String rspToString() { StringBuffer sb = new StringBuffer("{SortResponseCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); if (m_failedAttribute != null) { sb.append(" failedAttr="); sb.append(m_failedAttribute); } sb.append(" resultCode="); sb.append(m_resultCode); sb.append("}"); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPStringControl.java0000664001003300100330000001022510602743272031716 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import netscape.ldap.LDAPControl; /** * Represents an LDAP v3 server control that contains a string as its * only value. This is to be used as a base class by real such controls. */ abstract class LDAPStringControl extends LDAPControl { protected String m_msg = null; LDAPStringControl() { super(); } /** * Constructs an LDAPStringControl object, and stores the * value as a string. To retrieve this string value, use * getMsg(). * @param oid the oid of this control * @param critical true if this control is critical to the search * @param value the value associated with this control * @see netscape.ldap.LDAPcontrol */ public LDAPStringControl( String oid, boolean critical, byte[] value ) { super( oid, critical, value ); if ( value != null ) { try { m_msg = new String( value, "UTF8" ); } catch ( java.io.IOException e ) { } } } /** * Parses a response control sent by the server and * retrieves a string. *

* * You can get the controls returned by the server by using the * getResponseControls method of the * LDAPConnection class. *

* * @param controls an array of LDAPControl objects, * representing the controls returned by the server * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @param type the OID of the control to look for * @return a message string, or null if the server did * not return a string. * @see netscape.ldap.LDAPConnection#getResponseControls */ public static String parseResponse( LDAPControl[] controls, String type ) { String msg = null; LDAPControl cont = null; /* See if there is a password control in the array */ for( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i].getID().equals( type ) ) { cont = controls[i]; break; } } if ( cont != null ) { /* Suck out the data and return it */ try { msg = new String( cont.getValue(), "UTF8" ); } catch ( Exception e ) { } } return msg; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPPersistSearchControl.java0000664001003300100330000005027110602743272033234 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import java.io.*; import netscape.ldap.client.JDAPBERTagDecoder; import netscape.ldap.LDAPControl; import netscape.ldap.ber.stream.*; /** * Represents an LDAP v3 server control that specifies a persistent * search (an ongoing search operation), which allows your LDAP client * to get notification of changes to the directory. (The OID for this * control is 2.16.840.1.113730.3.4.3.) You can use this control in * conjunction with an "entry change notification" control (represented * by LDAPEntryChangeControl object. *

* * To use persistent searching for change notification, you create a * "persistent search" control that specifies the types of changes that * you want to track. You include the control in a search request. * If an entry in the directory is changed, the server determines if * the entry matches the search criteria in your request and if the * change is the type of change that you are tracking. If both of * these are true, the server sends the entry to your client. *

* * The server can also include an "entry change notification" control * with the entry. (The OID for this control is 2.16.840.1.113730.3.4.7.) * This control contains additional information about the * change made to the entry, including the type of change made, * the change number (which corresponds to an item in the server's * change log, if the server supports a change log), and, if the * entry was renamed, the old DN of the entry. *

* * When constructing an LDAPPersistSearchControl object, * you can specify the following information: *

* *

    *
  • the type of change you want to track (added, modified, deleted, * or renamed entries) *
  • a preference indicating whether or not you want the server to * return all entries that initially matched the search criteria * (rather than only the entries that change) *
  • a preference indicating whether or not you want entry change * notification controls included with every entry returned by the * server *
*

* * For example: *

 * ...
 * LDAPConnection ld = new LDAPConnection();
 *
 * try {
 *     // Connect to server.
 *     ld.connect( 3, hostname, portnumber, "", "" );
 *
 *     // Create a persistent search control.
 *     int op = LDAPPersistSearchControl.ADD |
 *         LDAPPersistSearchControl.MODIFY |
 *         LDAPPersistSearchControl.DELETE |
 *         LDAPPersistSearchControl.MODDN;
 *     boolean changesOnly = true;
 *     boolean returnControls = true;
 *     boolean isCritical = true;
 *     LDAPPersistSearchControl persistCtrl = new
 *         LDAPPersistSearchControl( op, changesOnly,
 *         returnControls, isCritical );
 *
 *     // Set the search constraints to use that control.
 *     LDAPSearchConstraints cons = ld.getSearchConstraints();
 *     cons.setBatchSize( 1 );
 *     cons.setServerControls( persistCtrl );
 *
 *     // Start the persistent search.
 *     LDAPSearchResults res = ld.search( "o=Airius.com",
 *               LDAPv3.SCOPE_SUB, "(cn=Barbara*)", null, false, cons );
 *
 *     // Loop through the incoming results.
 *     while ( res.hasMoreElements() ) {
 *     ...
 *     }
 * ...
 * }
 * 
* * @see netscape.ldap.LDAPControl * @see netscape.ldap.controls.LDAPEntryChangeControl */ public class LDAPPersistSearchControl extends LDAPControl { /** * Default constructor */ public LDAPPersistSearchControl() { super(PERSISTENTSEARCH, true, null); } /** * Constructs an LDAPPersistSearchControl object * that specifies a persistent search. * * @param changeTypes the change types to monitor. You can perform * a bitwise OR on any of the following values and specify the result as * the change types: *
    *
  • LDAPPersistSearchControl.ADD (to track new entries * added to the directory) *
  • LDAPPersistSearchControl.DELETE (to track entries * removed from the directory) *
  • LDAPPersistSearchControl.MODIFY (to track entries * that have been modified) *
  • LDAPPersistSearchControl.MODDN (to track entries * that have been renamed) *
* @param changesOnly true if you do not want the server * to return all existing entries in the directory that match the * search criteria. (Use this if you just want the changed entries * to be returned.) * @param returnControls true if you want the server to return * entry change controls with each entry in the search results * @param isCritical true if this control is critical to * the search operation. (If the server does not support * this control, you may not want the server to perform the search * at all.) * @see netscape.ldap.LDAPControl * @see netscape.ldap.controls.LDAPEntryChangeControl */ public LDAPPersistSearchControl(int changeTypes, boolean changesOnly, boolean returnControls, boolean isCritical) { super(PERSISTENTSEARCH, isCritical, null); m_value = createPersistSearchSpecification(changeTypes, changesOnly, returnControls); m_changeTypes = changeTypes; m_changesOnly = changesOnly; m_returnECs = returnControls; } /** * Gets the change types monitored by this control. * @return integer representing the change types to monitor. * This value can be the bitwise OR of ADD, DELETE, MODIFY, * and/or MODDN. If the change type is unknown, * this method returns -1. * @see netscape.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public int getChangeTypes() { return m_changeTypes; } /** * Indicates whether you want the server to send any existing * entries that already match the search criteria or only the * entries that have changed. * @return if true, the server returns only the * entries that have changed. If false, the server * also returns any existing entries that match the search criteria * but have not changed. * @see netscape.ldap.controls.LDAPPersistSearchControl#setChangesOnly */ public boolean getChangesOnly() { return m_changesOnly; } /** * Indicates whether or not the server includes an "entry change * notification" control with each entry it sends back to the client * during the persistent search. * @return true if the server includes "entry change * notification" controls with the entries it sends during the * persistent search. * @see netscape.ldap.controls.LDAPEntryChangeControl * @see netscape.ldap.controls.LDAPPersistSearchControl#setReturnControls */ public boolean getReturnControls() { return m_returnECs; } /** * Sets the change types that you want monitored by this control. * @param types integer representing the change types to monitor * This value can be the bitwise OR of ADD, DELETE, MODIFY, * and/or MODDN. * @see netscape.ldap.controls.LDAPPersistSearchControl#getChangeTypes */ public void setChangeTypes(int types) { m_changeTypes = types; } /** * Specifies whether you want the server to send any existing * entries that already match the search criteria or only the * entries that have changed. * @param changesOnly if true, the server returns only the * entries that have changed. If false, the server * also returns any existing entries that match the search criteria * but have not changed. * @see netscape.ldap.controls.LDAPPersistSearchControl#getChangesOnly */ public void setChangesOnly(boolean changesOnly) { m_changesOnly = changesOnly; } /** * Specifies whether you want the server to include an "entry change * notification" control with each entry it sends back to the client * during the persistent search. * @param returnControls if true, the server includes * "entry change notification" controls with the entries it sends * during the persistent search * @see netscape.ldap.controls.LDAPEntryChangeControl * @see netscape.ldap.controls.LDAPPersistSearchControl#setReturnControls */ public void setReturnControls(boolean returnControls) { m_returnECs = returnControls; } /** * Takes an input byte array and extracts the ber elements, assigning * them to appropriate fields in the entry change control. * * @param c byte array that contains BER elements * @return the entry change control. * @deprecated LDAPEntryChangeControl controls are now automatically * instantiated. */ public LDAPEntryChangeControl parseResponse(byte[] c) { LDAPEntryChangeControl con = new LDAPEntryChangeControl(); ByteArrayInputStream inStream = new ByteArrayInputStream(c); BERSequence seq = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] numRead = new int[1]; numRead[0] = 0; try { /* a sequence */ BERSequence s = (BERSequence)BERElement.getElement(decoder, inStream, numRead); BEREnumerated itr = (BEREnumerated)s.elementAt(0); con.setChangeType(itr.getValue()); if (s.size() > 1) { if (s.elementAt(1) instanceof BEROctetString) { BEROctetString str = (BEROctetString)s.elementAt(1); con.setPreviousDN(new String(str.getValue(), "UTF8")); } else if (s.elementAt(1) instanceof BERInteger) { BERInteger num = (BERInteger)s.elementAt(1); con.setChangeNumber(num.getValue()); } } if (s.size() > 2) { BERInteger num = (BERInteger)s.elementAt(2); con.setChangeNumber(num.getValue()); } } catch (Exception e) { return null; } return con; } /** * Returns an "entry change notification" control if the control is in * the specified array of controls. Use this method to retrieve an "entry * change notification" control included with an entry sent by the server. *

* * You can get the controls returned by the server by using the * getResponseControls method of the * LDAPConnection class. *

* * For example: *

     * ...
     * LDAPConnection ld = new LDAPConnection();
     * try {
     *     // Connect to the server, set up the persistent search control,
     *     // and set up the search constraints.
     *     ...
     *
     *     // Search the directory.
     *     LDAPSearchResults res = ld.search( "o=Airius.com",
     *         LDAPv3.SCOPE_SUB, "(cn=Barbara*)", attrs, false, cons );
     *
     *     // Determine if the server sent a control back to you.
     *     LDAPControl[] returnedControls = ld.getResponseControls();
     *     if ( returnedControls != null ) {
     *
     *         // Get the entry change control.
     *         LDAPEntryChangeControl entryCtrl = null;
     *         for ( int i = 0; i < returnedControls.length; i++ ) {
     *             if ( returnedControls[i] instanceof LDAPEntryChangeControl ) {
     *                 entryCtrl = (LDAPEntryChangeControl)returnedControls[i];
     *                 break;
     *             }
     *         }
     *         if ( entryCtrl != null ) {
     *
     *             // Get and print the type of change made to the entry.
     *             int changeType = entryCtrl.getChangeType();
     *             if ( changeType != -1 ) {
     *                 System.out.print( "Change made: " );
     *                 switch ( changeType ) {
     *                 case LDAPPersistSearchControl.ADD:
     *                     System.out.println( "Added new entry." );
     *             break;
     *                 case LDAPPersistSearchControl.MODIFY:
     *                     System.out.println( "Modified entry." );
     *             break;
     *                 case LDAPPersistSearchControl.DELETE:
     *                     System.out.println( "Deleted entry." );
     *             break;
     *                 case LDAPPersistSearchControl.MODDN:
     *                     System.out.println( "Renamed entry." );
     *             break;
     *                 }
     *             }
     *
     *             // Get and print the change number corresponding
     *             // to the change.
     *             int changeNumber = entryCtrl.getChangeNumber();
     *             if ( changeNumber != -1 )
     *                 System.out.println( "Change log number: " + changeNumber);
     *
     *             // Get and print the previous DN of the entry,
     *             // if the entry was renamed.
     *             LDAPDN oldDN = entryCtrl.getPreviousDN();
     *             if ( oldDN != null )
     *                     System.out.println( "Previous DN: " + oldDN );
     *
     *         } else {
     *
     *             System.out.println( "No entry change control." );
     *         }
     *     }
     *     ...
     * }
     * ...
     *
     * 
* * @param controls an array of LDAPControl objects, * representing the controls returned by the server * with an entry. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @return an LDAPEntryChangeControl object representing * the entry change control sent by the server. If no entry change * control was sent, this method returns null. * @see netscape.ldap.controls.LDAPEntryChangeControl * @see netscape.ldap.LDAPConnection#getResponseControls * @deprecated LDAPEntryChangeControl controls are now automatically * instantiated. */ public static LDAPEntryChangeControl parseResponse(LDAPControl[] controls) { LDAPPersistSearchControl con = new LDAPPersistSearchControl(); for (int i=0; (controls != null) && (i < controls.length); i++) { // get the entry change control if (controls[i].getID().equals(LDAPEntryChangeControl.ENTRYCHANGED)) { return con.parseResponse(controls[i].getValue()); } } return null; } /** * Creates a "flattened" BER encoding of the persistent search * specifications and returns it as a byte array. * @param changeTypes the change types to monitor on the server * @param changesOnly true to skip the initial search * @param returnECs true if entry change controls are to be * returned with the search results * @return the BER-encoded data. */ private byte[] createPersistSearchSpecification(int changeTypes, boolean changesOnly, boolean returnECs) { /* A sequence */ BERSequence seq = new BERSequence(); seq.addElement(new BERInteger(changeTypes)); seq.addElement(new BERBoolean(changesOnly)); seq.addElement(new BERBoolean(returnECs)); /* return a byte array */ return flattenBER( seq ); } public String toString() { StringBuffer sb = new StringBuffer("{PersistSearchCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" returnEntryChangeCtrls="); sb.append(m_returnECs); sb.append(" changesOnly="); sb.append(m_changesOnly); sb.append(" changeTypes="); sb.append(typesToString(m_changeTypes)); sb.append("}"); return sb.toString(); } /** * This method is also used by LDAPentryChangeControl.toString() */ static String typesToString(int changeTypes) { String types = ""; if ((changeTypes & ADD) != 0) { types += (types.length() > 0) ? "+ADD" : "ADD"; } if ((changeTypes & DELETE) != 0) { types += (types.length() > 0) ? "+DEL" : "DEL"; } if ((changeTypes & MODIFY) != 0) { types += (types.length() > 0) ? "+MOD" : "MOD"; } if ((changeTypes & MODDN) != 0) { types += (types.length() > 0) ? "+MODDN" : "MODDN"; } return types; } private int m_changeTypes = 1; private boolean m_changesOnly = false; private boolean m_returnECs = false; /** * Change type specifying that you want to track additions of new * entries to the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see netscape.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see netscape.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int ADD = 1; /** * Change type specifying that you want to track removals of * entries from the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see netscape.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see netscape.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int DELETE = 2; /** * Change type specifying that you want to track modifications of * entries in the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see netscape.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see netscape.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int MODIFY = 4; /** * Change type specifying that you want to track modifications of the * DNs of entries in the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see netscape.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see netscape.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int MODDN = 8; public final static String PERSISTENTSEARCH = "2.16.840.1.113730.3.4.3"; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPEntryChangeControl.java0000664001003300100330000002230610602743272032662 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import java.io.*; import netscape.ldap.ber.stream.*; import netscape.ldap.client.JDAPBERTagDecoder; import netscape.ldap.*; /** * Represents an LDAP v3 server control that specifies information * about a change to an entry in the directory. (The OID for this * control is 2.16.840.1.113730.3.4.7.) You need to use this control in * conjunction with a "persistent search" control (represented * by LDAPPersistentSearchControl object. *

* * To use persistent searching for change notification, you create a * "persistent search" control that specifies the types of changes that * you want to track. When an entry is changed, the server sends that * entry back to your client and may include an "entry change notification" * control that specifies additional information about the change. *

* * Typically, you use the getResponseControls method of * the LDAPConnection object to get any * LDAPEntryChangeControl objects returned by the server. *

* * Once you retrieve an LDAPEntryChangeControl object from * the server, you can get the following additional information about * the change made to the entry: *

* *

    *
  • The type of change made (add, modify, delete, or modify DN) *
  • The change number identifying the record of the change in the * change log (if the server supports change logs) *
  • If the entry was renamed, the old DN of the entry *
*

* * @see netscape.ldap.controls.LDAPPersistSearchControl * @see netscape.ldap.LDAPConnection#getResponseControls */ public class LDAPEntryChangeControl extends LDAPControl { /** * Constructs a new LDAPEntryChangeControl object. * @see netscape.ldap.LDAPControl * @see netscape.ldap.controls.LDAPPersistSearchControl */ public LDAPEntryChangeControl() { super(ENTRYCHANGED, false, null); } /** * Contructs an LDAPEntryChangedControl object. * This constructor is used by LDAPControl.register to * instantiate entry change controls. * @param oid this parameter must be * LDAPEntryChangeControl.ENTRYCHANGED * or an LDAPException is thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception netscape.ldap.LDAPException If oid is not * LDAPEntryChangeControl.ENTRYCHANGED. * @exception java.io.IOException If value is not a valid BER sequence. * @see netscape.ldap.LDAPControl#register */ public LDAPEntryChangeControl(String oid, boolean critical, byte[] value) throws LDAPException, IOException { super(ENTRYCHANGED, false, value); if (!oid.equals( ENTRYCHANGED )) { throw new LDAPException("oid must be LDAPEntryChangeControl." + "ENTRYCHANGED", LDAPException.PARAM_ERROR); } ByteArrayInputStream inStream = new ByteArrayInputStream(m_value); BERSequence seq = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] numRead = new int[1]; numRead[0] = 0; BERSequence s = (BERSequence)BERElement.getElement(decoder, inStream, numRead); BEREnumerated itr = (BEREnumerated)s.elementAt(0); m_changeTypes = itr.getValue(); if (s.size() > 1) { if (s.elementAt(1) instanceof BEROctetString) { BEROctetString str = (BEROctetString)s.elementAt(1); try { m_previousDN = new String(str.getValue(), "UTF8"); } catch (UnsupportedEncodingException e) { } } else if (s.elementAt(1) instanceof BERInteger) { BERInteger num = (BERInteger)s.elementAt(1); m_changeNumber = num.getValue(); } } if (s.size() > 2) { BERInteger num = (BERInteger)s.elementAt(2); m_changeNumber = num.getValue(); } } /** * Sets the change number (which identifies the record of the change * in the server's change log) in this "entry change notification" * control. * @param num change number to set * @see netscape.ldap.controls.LDAPEntryChangeControl#getChangeNumber */ public void setChangeNumber(int num) { m_changeNumber = num; } /** * Sets the change type (which identifies the type of change * that occurred) in this "entry change notification" control. * @param num change type to set. This can be one of * the following values: *

* *

    *
  • LDAPPersistSearchControl.ADD (a new entry was * added to the directory) *
  • LDAPPersistSearchControl.DELETE (an entry was * removed from the directory) *
  • LDAPPersistSearchControl.MODIFY (an entry was * modified) *
  • LDAPPersistSearchControl.MODDN (an entry was * renamed) *
*

* * @see netscape.ldap.controls.LDAPEntryChangeControl#getChangeType */ public void setChangeType(int num) { m_changeTypes = num; } /** * Sets the previous DN of the entry (if the entry was renamed) * in the "entry change notification control". * @param dn the previous distinguished name of the entry * @see netscape.ldap.controls.LDAPEntryChangeControl#getPreviousDN */ public void setPreviousDN(String dn) { m_previousDN = dn; } /** * Gets the change number, which identifies the record of the change * in the server's change log. * @return change number identifying the change made. * @see netscape.ldap.controls.LDAPEntryChangeControl#setChangeNumber */ public int getChangeNumber() { return m_changeNumber; } /** * Gets the change type, which identifies the type of change * that occurred. * @return change type identifying the type of change that * occurred. This can be one of the following values: *

* *

    *
  • LDAPPersistSearchControl.ADD (a new entry was * added to the directory) *
  • LDAPPersistSearchControl.DELETE (an entry was * removed from the directory) *
  • LDAPPersistSearchControl.MODIFY (an entry was * modified) *
  • LDAPPersistSearchControl.MODDN (an entry was * renamed) *
*

* * @see netscape.ldap.controls.LDAPEntryChangeControl#setChangeType */ public int getChangeType() { return m_changeTypes; } /** * Gets the previous DN of the entry (if the entry was renamed). * @return the previous distinguished name of the entry. * @see netscape.ldap.controls.LDAPEntryChangeControl#setPreviousDN */ public String getPreviousDN() { return m_previousDN; } public String toString() { StringBuffer sb = new StringBuffer("{EntryChangedCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" changeTypes="); sb.append(LDAPPersistSearchControl.typesToString(m_changeTypes)); sb.append(" previousDN="); sb.append(m_previousDN); sb.append(" changeNumber="); sb.append(m_changeNumber); sb.append("}"); return sb.toString(); } private int m_changeNumber = -1; private int m_changeTypes = -1; private String m_previousDN = null; public final static String ENTRYCHANGED = "2.16.840.1.113730.3.4.7"; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPProxiedAuthControl.java0000664001003300100330000001217310602743272032710 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import java.io.*; import netscape.ldap.LDAPControl; import netscape.ldap.LDAPSortKey; import netscape.ldap.client.JDAPBERTagDecoder; import netscape.ldap.ber.stream.*; /** * Represents an LDAP v3 server control that specifies that you want * the server to use the specified DN's identity for this operation. * (The OID for this control is 2.16.840.1.113730.3.4.12.) *

* * You can include the control in any request by constructing * an LDAPSearchConstraints object and calling the * setServerControls method. You can then pass this * LDAPSearchConstraints object to the search * or other request method of an LDAPConnection object. *

* * For example: *

 * ...
 * LDAPConnection ld = new LDAPConnection();
 * try {
 *     // Connect to server.
 *     ld.connect( 3, hostname, portnumber, "", "" );
 *
 *     // Create a "critical" proxied auth server control using
 *     // the DN "uid=charlie,ou=people,o=acme.com".
 *     LDAPProxiedAuthControl ctrl =
 *         new LDAPProxiedAuthControl( "uid=charlie,ou=people,o=acme.com",
 *                                     true );
 *
 *     // Create search constraints to use that control.
 *     LDAPSearchConstraints cons = new LDAPSearchConstraints();
 *     cons.setServerControls( sortCtrl );
 *
 *     // Send the search request.
 *     LDAPSearchResults res = ld.search( "o=Airius.com",
 *        LDAPv3.SCOPE_SUB, "(cn=Barbara*)", null, false, cons );
 *
 *     ...
 *
 * 
* *

* * @version 1.0 * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConstraints * @see netscape.ldap.LDAPSearchConstraints * @see netscape.ldap.LDAPConstraints#setServerControls(LDAPControl) */ public class LDAPProxiedAuthControl extends LDAPControl { public final static String PROXIEDAUTHREQUEST = "2.16.840.1.113730.3.4.12"; private String m_dn; /** * Constructs an LDAPProxiedAuthControl object with a * DN to use as identity. * @param dn DN to use as identity for execution of a request * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @see netscape.ldap.LDAPControl */ public LDAPProxiedAuthControl( String dn, boolean critical) { super( PROXIEDAUTHREQUEST, critical, null ); m_value = createSpecification( m_dn = dn ); } /** * Create a "flattened" BER encoding of the requested contents, * and return it as a byte array. * @param dn the DN to use as an identity * @return the byte array of encoded data. */ private byte[] createSpecification( String dn ) { /* A sequence */ BERSequence ber = new BERSequence(); /* Add the DN as a string value */ ber.addElement( new BEROctetString( dn ) ); /* Suck out the data and return it */ return flattenBER( ber ); } public String toString() { StringBuffer sb = new StringBuffer("{ProxiedAuthCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" dn="); sb.append(m_dn); sb.append("}"); return sb.toString(); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPPasswordExpiringControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPPasswordExpiringControl.j0000664001003300100330000001176510602743272033302 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import netscape.ldap.LDAPControl; import netscape.ldap.LDAPException; /** * Represents an LDAP v3 server control that may be returned if a * password is about to expire, and password policy is enabled on the server. * The OID for this control is 2.16.840.1.113730.3.4.5. *

* * @version 1.0 * @see netscape.ldap.LDAPControl */ public class LDAPPasswordExpiringControl extends LDAPStringControl { public final static String EXPIRING = "2.16.840.1.113730.3.4.5"; /** * Contructs an LDAPPasswordExpiringControl object. * This constructor is used by LDAPControl.register to * instantiate password expiring controls. *

* To retrieve the number of seconds until this password expires, * call getSecondsToExpiration. * @param oid this parameter must be * LDAPPasswordExpiringControl.EXPIRING * or an LDAPException is thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception netscape.ldap.LDAPException If oid is not * LDAPPasswordExpiringControl.EXPIRING. * @see netscape.ldap.LDAPControl#register */ public LDAPPasswordExpiringControl( String oid, boolean critical, byte[] value ) throws LDAPException { super( EXPIRING, critical, value ); if ( !oid.equals( EXPIRING )) { throw new LDAPException( "oid must be LDAPPasswordExpiringControl" + ".EXPIRING", LDAPException.PARAM_ERROR ); } } /** * Gets the number of seconds until the password expires returned by the * server. * @return int the number of seconds until the password expires. * @exception java.lang.NumberFormatException If the server returned an * undecipherable message. In this case, use getMessage to * retrieve the message as a string. */ public int getSecondsToExpiration() { return Integer.parseInt( m_msg ); } /** * Gets the value associated with this control parsed as a string. * @return the value associated with this control parsed as a string. */ public String getMessage() { return m_msg; } /** * @param controls an array of LDAPControl objects, * representing the controls returned by the server. * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @return an error message string, or null if none is in the control. * @see netscape.ldap.LDAPConnection#getResponseControls * @deprecated LDAPPasswordExpiringControl controls are now automatically * instantiated. */ public static String parseResponse( LDAPControl[] controls ) { return LDAPStringControl.parseResponse( controls, EXPIRING ); } public String toString() { StringBuffer sb = new StringBuffer("{PasswordExpiringCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" msg="); sb.append(m_msg); sb.append("}"); return sb.toString(); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPPasswordExpiredControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPPasswordExpiredControl.ja0000664001003300100330000001073110602743272033246 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import netscape.ldap.LDAPControl; import netscape.ldap.LDAPException; /** * Represents an LDAP v3 server control that may be returned if a * password has expired, and password policy is enabled on the server. * The OID for this control is 2.16.840.1.113730.3.4.4. *

* * @version 1.0 * @see netscape.ldap.LDAPControl */ public class LDAPPasswordExpiredControl extends LDAPStringControl { public final static String EXPIRED = "2.16.840.1.113730.3.4.4"; /** * Contructs an LDAPPasswordExpiredControl object. * This constructor is used by LDAPControl.register to * instantiate password expired controls. *

* To retrieve the message from the server, call getMessage. * @param oid this parameter must be equal to * LDAPPasswordExpiredControl.EXPIRED * or an LDAPException is thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception netscape.ldap.LDAPException If oid is not * LDAPPasswordExpiredControl.EXPIRED. * @see netscape.ldap.LDAPControl#register */ public LDAPPasswordExpiredControl( String oid, boolean critical, byte[] value ) throws LDAPException { super( EXPIRED, critical, value ); if ( !oid.equals( EXPIRED )) { throw new LDAPException( "oid must be LDAPPasswordExpiredControl." + "PWEXPIRED", LDAPException.PARAM_ERROR); } } /** * @param controls an array of LDAPControl objects, * representing the controls returned by the server * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @return an error message string, or null if none is in the control. * @see netscape.ldap.LDAPConnection#getResponseControls * @deprecated LDAPPasswordExpiredControl controls are now automatically * instantiated. */ public static String parseResponse( LDAPControl[] controls ) { return LDAPStringControl.parseResponse( controls, EXPIRED ); } /** * Gets the message returned by the server with this control. * @return the message returned by the server. */ public String getMessage() { return m_msg; } public String toString() { StringBuffer sb = new StringBuffer("{PasswordExpiredCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" msg="); sb.append(m_msg); sb.append("}"); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPVirtualListControl.java0000664001003300100330000004200310602743272032731 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import java.io.*; import netscape.ldap.client.JDAPBERTagDecoder; import netscape.ldap.LDAPControl; import netscape.ldap.ber.stream.*; /** * Represents control data for returning paged results from a search. * * Example of usage, with JFC: *


 *  // Call this to initialize the list box, whenever the search
 *  // conditions change.
 *  // "filter" may be "objectclass=person", for example
 *  void initListBox( String host, int port, String base, String filter ) {
 *
 *  // Create list box if not already done
 *   if ( _dataList == null ) {
 *       _dataList = new JList();
 *       JScrollPane scrollPane = new JScrollPane(_dataList);
 *       add( scrollPane );
 *   }
 *
 *   // Create a virtual data model
 *   vlistModel model = new vlistModel( host, port, base, filter );
 *   // Keep a buffer of one page before and one after
 *   model.setPageSize( getScrollVisibleSize() );
 *   _dataList.setModel( model );
 *  }
 *

* // Data model to supply buffer list data *class vlistModel extends AbstractListModel { * vlistModel( String host, int port, String base, String filter ) { * _base = base; * _filter = filter; * * // Connect to the server * try { * _ldc = new LDAPConnection(); * System.out.println( "Connecting to " + host + * ":" + port ); * _ldc.connect( host, port ); * } catch ( LDAPException e ) { * System.out.println( e ); * _ldc = null; * } * } * * // Called by JList to get virtual list size * public int getSize() { * if ( !_initialized ) { * _initialized = true; * _pageControls = new LDAPControl[2]; * // Paged results also require a sort control * _pageControls[0] = * new LDAPSortControl( new LDAPSortKey("cn"), * true ); * // Do an initial search to get the virtual list size * // Keep one page before and one page after the start * _beforeCount = _pageSize; * _afterCount = _pageSize; * // Create the initial paged results control * LDAPVirtualListControl cont = * new LDAPVirtualListControl( "A", * _beforeCount, * _afterCount ); * _pageControls[1] = cont; * _vlc = (LDAPVirtualListControl)_pageControls[1]; * getPage( 0 ); * } * return _size; * } * * // Get a page starting at first (although we may also fetch * // some preceding entries) * boolean getPage( int first ) { * _vlc.setRange( first, _beforeCount, _afterCount ); * return getPage(); * } * * boolean getEntries() { * // Specify necessary controls for vlv * if ( _pageControls != null ) { * try { * _ldc.setOption( _ldc.SERVERCONTROLS, _pageControls ); * } catch ( LDAPException e ) { * System.out.println( e + ", setting vlv control" ); * } * } * // Empty the buffer * _entries.removeAllElements(); * // Do a search * try { * String[] attrs = { "cn" }; * LDAPSearchResults result = * _ldc.search( _base, * LDAPConnection.SCOPE_SUB, * _filter, * attrs, false ); * while ( result.hasMoreElements() ) { * LDAPEntry entry = (LDAPEntry)result.nextElement(); * LDAPAttribute attr = entry.getAttribute( attrs[0] ); * if ( attr != null ) { * Enumeration en = attr.getStringValues(); * while( en.hasMoreElements() ) { * String name = (String)en.nextElement(); * _entries.addElement( name ); * } * } * } * } catch ( LDAPException e ) { * System.out.println( e + ", searching" ); * return false; * } * return true; * } * * // Fetch a buffer * boolean getPage() { * // Get the actual entries * if ( !getEntries() ) * return false; * * // Check if we have a control returned * LDAPControl[] c = _ldc.getResponseControls(); * LDAPVirtualListResponse nextCont = null; * for ( int i = 0; i < c.length; i++ ) { * if ( c[i] instanceof LDAPVirtualListResponse ) { * nextCont = (LDAPVirtualListResponse)c[i]; * break; * } * } * if ( nextCont != null ) { * _selectedIndex = nextCont.getFirstPosition() - 1; * _top = Math.max( 0, _selectedIndex - _beforeCount ); * // Now we know the total size of the virtual list box * _size = nextCont.getContentCount(); * _vlc.setListSize( _size ); * } else { * System.out.println( "Null response control" ); * } * return true; * } * * // Called by JList to fetch data to paint a single list item * public Object getElementAt(int index) { * if ( (index < _top) || (index >= _top + _entries.size()) ) { * getPage( index ); * } * int offset = index - _top; * if ( (offset < 0) || (offset >= _entries.size()) ) * return new String( "No entry at " + index ); * else * return _entries.elementAt( offset ); * } * * // Called by application to find out the virutal selected index * public int getSelectedIndex() { * return _selectedIndex; * } * * // Called by application to find out the top of the buffer * public int getFirstIndex() { * return _top; * } * * public void setPageSize( int size ) { * _pageSize = size; * } * * Vector _entries = new Vector(); * protected boolean _initialized = false; * private int _top = 0; * protected int _beforeCount; * protected int _afterCount; * private int _pageSize = 10; * private int _selectedIndex = 0; * protected LDAPControl[] _pageControls = null; * protected LDAPVirtualListControl _vlc = null; * protected int _size = -1; * private String _base; * private String _filter; * private LDAPConnection _ldc; *} *

*
 *   VirtualListViewRequest ::= SEQUENCE {
 *            beforeCount    INTEGER (0 .. maxInt),
 *            afterCount     INTEGER (0 .. maxInt),
 *            CHOICE {
 *                byIndex [0] SEQUENCE {
 *                    index           INTEGER,
 *                    contentCount    INTEGER
 *                }
 *                byFilter [1] jumpTo    Substring
 *            },
 *            contextID     OCTET STRING OPTIONAL
 *  }
 * 
* * @version 1.0 */ public class LDAPVirtualListControl extends LDAPControl { public final static String VIRTUALLIST = "2.16.840.1.113730.3.4.9"; /** * Blank constructor for internal use in LDAPVirtualListControl. * @see netscape.ldap.LDAPControl */ LDAPVirtualListControl() { super( VIRTUALLIST, true, null ); } /** * Constructs a new LDAPVirtualListControl object. Use this * constructor on an initial search operation, specifying the first * entry to be matched, or the initial part of it. * @param jumpTo an LDAP search expression defining the result set * @param beforeCount the number of results before the top/center to * return per page * @param afterCount the number of results after the top/center to * return per page * @see netscape.ldap.LDAPControl */ public LDAPVirtualListControl( String jumpTo, int beforeCount, int afterCount ) { super( VIRTUALLIST, true, null ); setRange( jumpTo, beforeCount, afterCount ); } public LDAPVirtualListControl( String jumpTo, int beforeCount, int afterCount, String context ) { this( jumpTo, beforeCount, afterCount ); m_context = context; } /** * Constructs a new LDAPVirtualListControl object. Use this * constructor on a subsquent search operation, after we know the * size of the virtual list, to fetch a subset. * @param startIndex the index into the virtual list of an entry to * return * @param beforeCount the number of results before the top/center to * return per page * @param afterCount the number of results after the top/center to * return per page * @see netscape.ldap.LDAPControl */ public LDAPVirtualListControl( int startIndex, int beforeCount, int afterCount, int contentCount ) { super( VIRTUALLIST, true, null ); m_listSize = contentCount; setRange( startIndex, beforeCount, afterCount ); } public LDAPVirtualListControl( int startIndex, int beforeCount, int afterCount, int contentCount, String context ) { this( startIndex, beforeCount, afterCount, contentCount ); m_context = context; } /** * Sets the starting index, and the number of entries before and after * to return. Apply this method to a control returned from a previous * search, to specify what result range to return on the next search. * @param startIndex the index into the virtual list of an entry to * return * @param beforeCount the number of results before startIndex to * return per page * @param afterCount the number of results after startIndex to * return per page * @see netscape.ldap.LDAPControl */ public void setRange( int startIndex, int beforeCount, int afterCount ) { m_beforeCount = beforeCount; m_afterCount = afterCount; m_listIndex = startIndex; m_value = createPageSpecification( m_listIndex, m_listSize, m_beforeCount, m_afterCount ); } /** * Sets the search expression, and the number of entries before and after * to return. * @param jumpTo an LDAP search expression defining the result set * return. * @param beforeCount the number of results before startIndex to * return per page * @param afterCount the number of results after startIndex to * return per page * @see netscape.ldap.LDAPControl */ public void setRange( String jumpTo, int beforeCount, int afterCount ) { m_beforeCount = beforeCount; m_afterCount = afterCount; m_value = createPageSpecification( jumpTo, m_beforeCount, m_afterCount ); } /** * Gets the size of the virtual result set. * @return the size of the virtual result set, or -1 if not known. */ public int getIndex() { return m_listIndex; } /** * Gets the size of the virtual result set. * @return the size of the virtual result set, or -1 if not known. */ public int getListSize() { return m_listSize; } /** * Sets the size of the virtual result set. * @param listSize the virtual result set size */ public void setListSize( int listSize ) { m_listSize = listSize; } /** * Gets the number of results before the top/center to return per page. * @return the number of results before the top/center to return per page. */ public int getBeforeCount() { return m_beforeCount; } /** * Gets the number of results after the top/center to return per page. * @return the number of results after the top/center to return per page. */ public int getAfterCount() { return m_afterCount; } /** * Gets the optional context cookie. * @return the optional context cookie. */ public String getContext() { return m_context; } /** * Sets the optional context cookie. * @param context the optional context cookie */ public void setContext( String context ) { m_context = context; } /** * Creates a "flattened" BER encoding of the requested page * specifications and return it as a byte array. * @param subFilter filter expression for generating the results * @param beforeCount number of entries before first match to return * @param afterCount number of entries after first match to return * @return the byte array of encoded data. */ private byte[] createPageSpecification( String subFilter, int beforeCount, int afterCount ) { /* A sequence */ BERSequence seq = new BERSequence(); seq.addElement( new BERInteger( beforeCount ) ); seq.addElement( new BERInteger( afterCount ) ); seq.addElement( new BERTag(BERTag.CONTEXT|TAG_BYFILTER, new BEROctetString(subFilter), true) ); if ( m_context != null ) { seq.addElement( new BEROctetString(m_context) ); } /* Suck out the data and return it */ return flattenBER( seq ); } /** * Creates a "flattened" BER encoding of the requested page * specifications and return it as a byte array. * @param listIndex the center or starting entry to return * @param listSize the virtual list size * @param beforeCount number of entries before the first match to return * @param afterCount number of entries after the first match to return * @return the byte array of encoded data. */ private byte[] createPageSpecification( int listIndex, int listSize, int beforeCount, int afterCount ) { /* A sequence */ BERSequence seq = new BERSequence(); seq.addElement( new BERInteger( beforeCount ) ); seq.addElement( new BERInteger( afterCount ) ); /* A sequence of list index and list size */ BERSequence indexSeq = new BERSequence(); indexSeq.addElement( new BERInteger(listIndex) ); indexSeq.addElement( new BERInteger(listSize) ); seq.addElement( new BERTag(BERTag.CONTEXT|BERTag.CONSTRUCTED|TAG_BYINDEX, indexSeq,true) ); if ( m_context != null ) { seq.addElement( new BEROctetString(m_context) ); } /* Suck out the data and return it */ return flattenBER( seq ); } public String toString() { StringBuffer sb = new StringBuffer("{VirtListCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" beforeCount="); sb.append(m_beforeCount); sb.append(" afterCount="); sb.append(m_afterCount); sb.append(" listIndex="); sb.append(m_listIndex); sb.append(" listSize="); sb.append(m_listSize); if (m_context != null) { sb.append(" conext="); sb.append(m_context); } sb.append("}"); return sb.toString(); } private final static int TAG_BYINDEX = 0; private final static int TAG_BYFILTER = 1; private int m_beforeCount = 0; private int m_afterCount = 0; private int m_listIndex = -1; private int m_listSize = 0; private String m_context = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/controls/LDAPVirtualListResponse.java0000664001003300100330000002030510602743272033110 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.controls; import java.io.*; import netscape.ldap.client.JDAPBERTagDecoder; import netscape.ldap.LDAPControl; import netscape.ldap.ber.stream.*; import netscape.ldap.LDAPException; /** * Represents control data for returning paged results from a search. * * @version 1.0 * *
 *   VirtualListViewResponse ::= SEQUENCE {
 *       targetPosition   INTEGER (0 .. maxInt),
 *       contentCount     INTEGER (0 .. maxInt),
 *       virtualListViewResult ENUMERATED {
 *           success                  (0),
 *           operatonsError           (1),
 *           timeLimitExceeded        (3),
 *           adminLimitExceeded       (11),
 *           insufficientAccessRights (50),
 *           busy                     (51),
 *           unwillingToPerform       (53),
 *           sortControlMissing       (60),
 *           offsetRangeError         (61),
 *           other                    (80)
 *       },
 *       contextID     OCTET STRING OPTIONAL 
 *  }
 *
*/ public class LDAPVirtualListResponse extends LDAPControl { public final static String VIRTUALLISTRESPONSE = "2.16.840.1.113730.3.4.10"; /** * Blank constructor for internal use in LDAPVirtualListResponse. * @see netscape.ldap.LDAPControl */ LDAPVirtualListResponse() { super( VIRTUALLISTRESPONSE, true, null ); } /** * Contructs an LDAPVirtualListResponse object. * @param oid this parameter must be equal to * LDAPVirtualListResponse.VIRTUALLISTRESPONSE or an * LDAPExceptionis thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception netscape.ldap.LDAPException If oid is not * LDAPVirtualListResponse.VIRTUALLISTRESPONSE. * @see netscape.ldap.LDAPControl#register */ public LDAPVirtualListResponse( String oid, boolean critical, byte[] value ) throws LDAPException { super( VIRTUALLISTRESPONSE, critical, value ); if ( !oid.equals( VIRTUALLISTRESPONSE ) ) { throw new LDAPException( "oid must be LDAPVirtualListResponse." + "VIRTUALLISTRESPONSE", LDAPException.PARAM_ERROR); } parseResponse(); } /** * Constructs a new LDAPVirtualListResponse object. * @param value a BER encoded byte array * @see netscape.ldap.LDAPControl */ public LDAPVirtualListResponse( byte[] value ) { super( VIRTUALLISTRESPONSE, true, null ); m_value = value; parseResponse(); } /** * Gets the size of the virtual result set. * @return the size of the virtual result set, or -1 if not known. */ public int getContentCount() { return m_contentCount; } /** * Gets the index of the first entry returned. * @return the index of the first entry returned. */ public int getFirstPosition() { return m_firstPosition; } /** * Gets the result code. * @return the result code. */ public int getResultCode() { return m_resultCode; } /** * Gets the context cookie, if any. * @return the result context cookie. */ public String getContext() { return m_context; } /** * Returns a control useful for subsequent paged results searches. * "this" should be a control returned on a previous paged results * search, so it contains information on the virtual result set * size. * @return a control useful for subsequent paged results searches. */ private void parseResponse() { /* Suck out the data and parse it */ ByteArrayInputStream inStream = new ByteArrayInputStream( getValue() ); BERSequence ber = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nRead = new int[1]; nRead[0] = 0; try { /* A sequence */ BERSequence seq = (BERSequence)BERElement.getElement( decoder, inStream, nRead ); /* First is firstPosition */ m_firstPosition = ((BERInteger)seq.elementAt( 0 )).getValue(); m_contentCount = ((BERInteger)seq.elementAt( 1 )).getValue(); m_resultCode = ((BEREnumerated)seq.elementAt( 2 )).getValue(); if( seq.size() > 3 ) { BEROctetString str = (BEROctetString)seq.elementAt( 3 ); m_context = new String(str.getValue(), "UTF8"); } } catch(Exception x) { m_firstPosition = m_contentCount = m_resultCode = -1; m_context = null; } } /** * Returns a control returned on a VLV search. * @param controls an array of controls that may include a VLV * results control * @return the control, if any; otherwise null. * @deprecated LDAPVirtualListResponse controls are now automatically * instantiated. */ public static LDAPVirtualListResponse parseResponse( LDAPControl[] controls ) { LDAPVirtualListResponse con = null; /* See if there is a VLV response control in the array */ for( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i].getID().equals( VIRTUALLISTRESPONSE ) ) { con = new LDAPVirtualListResponse( controls[i].getValue() ); con.parseResponse(); break; } } if ( con != null ) { con.parseResponse(); } return con; } public String toString() { StringBuffer sb = new StringBuffer("{VirtListResponseCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" firstPosition="); sb.append(m_firstPosition); sb.append(" contentCount="); sb.append(m_contentCount); sb.append(" resultCode="); sb.append(m_resultCode); if (m_context != null) { sb.append(" conext="); sb.append(m_context); } sb.append("}"); return sb.toString(); } private int m_firstPosition = 0; private int m_contentCount = 0; private int m_resultCode = -1; private String m_context = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSyntaxSchemaElement.java0000664001003300100330000001264110602743270031167 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * Helper class supporting schema elements that include syntax * definitions - attributes and matching rules * * @version 1.0 * @see netscape.ldap.LDAPAttributeSchema * @see netscape.ldap.LDAPMatchingRuleSchema **/ class LDAPSyntaxSchemaElement extends LDAPSchemaElement { static final long serialVersionUID = 6086340702503710702L; /** * Construct a blank element. */ LDAPSyntaxSchemaElement() { super(); } /** * Gets the syntax of the schema element * @return One of the following values: *
    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
  • unknown (not a known syntax) *
*/ int getSyntax() { return syntax; } /** * Gets the syntax of the attribute type in dotted-decimal format, * for example "1.2.3.4.5" * @return The attribute syntax in dotted-decimal format. */ String getSyntaxString() { return syntaxString; } /** * Convert from enumerated syntax types to an OID * @param syntax One of the enumerated syntax types * @return The OID corresponding to the internal type */ static String internalSyntaxToString( int syntax ) { String s; if ( syntax == cis ) { s = cisString; } else if ( syntax == binary ) { s = binaryString; } else if ( syntax == ces ) { s = cesString; } else if ( syntax == telephone ) { s = telephoneString; } else if ( syntax == dn ) { s = dnString; } else if ( syntax == integer ) { s = intString; } else { s = null; } return s; } /** * Convert from enumerated syntax type to a user-friendly * string * @param syntax One of the enumerated syntax types * @return A user-friendly syntax description */ String syntaxToString() { String s; if ( syntax == cis ) { s = "case-insensitive string"; } else if ( syntax == binary ) { s = "binary"; } else if ( syntax == integer ) { s = "integer"; } else if ( syntax == ces ) { s = "case-exact string"; } else if ( syntax == telephone ) { s = "telephone"; } else if ( syntax == dn ) { s = "distinguished name"; } else { s = syntaxString; } return s; } /** * Convert from an OID to one of the enumerated syntax types * @param syntax A dotted-decimal OID * @return The internal enumerated type corresponding to the * OID; unknown if it is not one of the known * types */ int syntaxCheck( String syntax ) { int i = unknown; if ( syntax == null ) { } else if ( syntax.equals( cisString ) ) { i = cis; } else if ( syntax.equals( binaryString ) ) { i = binary; } else if ( syntax.equals( cesString ) ) { i = ces; } else if ( syntax.equals( intString ) ) { i = integer; } else if ( syntax.equals( telephoneString ) ) { i = telephone; } else if ( syntax.equals( dnString ) ) { i = dn; } return i; } int syntax = unknown; String syntaxString = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPResponse.java0000664001003300100330000000674610602743270027055 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import netscape.ldap.client.opers.JDAPProtocolOp; import netscape.ldap.client.opers.JDAPResult; /** * Represents the response to a particular LDAP operation. * * @version 1.0 */ public class LDAPResponse extends LDAPMessage { static final long serialVersionUID = 5822205242593427418L; /** * Constructor * * @param msgid message identifier * @param rsp operation response * @param controls array of controls or null */ LDAPResponse(int msgid, JDAPProtocolOp rsp, LDAPControl controls[]) { super(msgid, rsp, controls); } /** * Returns any error message in the response. * * @return the error message of the last error (or null * if no message was set). */ public String getErrorMessage() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getErrorMessage(); } /** * Returns the partially matched DN field, if any, in a server response. * * @return the maximal subset of a DN to match, * or null. */ public String getMatchedDN() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getMatchedDN(); } /** * Returns all referrals, if any, in a server response. * * @return a list of referrals or null. */ public String[] getReferrals() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getReferrals(); } /** * Returns the result code in a server response. * * @return the result code. */ public int getResultCode() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getResultCode(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPMatchingRuleUseSchema.java0000664001003300100330000002155710602743270031434 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * The definition of a matching rule use in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of a matching rule use. * According to the RFC, the description of a matching rule use can * include the following information: *

* *

    *
  • an OID identifying the matching rule *
  • a name identifying the matching rule use *
  • a description of the matching rule use *
  • a list of attributes the matching rule applies to *
*

* * When you construct an LDAPMatchingRuleUseSchema object, you can * specify these types of information as arguments to the constructor or * in the MatchingRuleUseDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with values in this * format. *

* * You can get the name, OID, and description of this matching rule use * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this matching rule definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines MatchingRuleUseDescription follows: *

*

 * Values of the matchingRuleUse list the attributes which are suitable
 * for use with an extensible matching rule.
 *
 *    MatchingRuleUseDescription = "(" whsp
 *        numericoid whsp  ; MatchingRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" ]
 *       "APPLIES" oids    ; AttributeType identifiers
 *    whsp ")"
 * 
*

* * @version 1.0 * @see netscape.ldap.LDAPSchemaElement * @see netscape.ldap.LDAPMatchingRuleSchema **/ public class LDAPMatchingRuleUseSchema extends LDAPAttributeSchema { /** * Constructs a matching rule use definition, using the specified * information. * @param name name of the matching rule * @param oid object identifier (OID) of the matching rule * in dotted-decimal format (for example, "1.2.3.4") * @param description description of the matching rule * @param attributes array of the OIDs of the attributes for which * the matching rule is applicable */ public LDAPMatchingRuleUseSchema( String name, String oid, String description, String[] attributes ) { if ( (oid == null) || (oid.trim().length() < 1) ) { throw new IllegalArgumentException( "OID required" ); } this.name = name; this.oid = oid; this.description = description; attrName = "matchingruleuse"; this.attributes = new String[attributes.length]; for( int i = 0; i < attributes.length; i++ ) { this.attributes[i] = attributes[i]; } } /** * Constructs a matching rule use definition based on descriptions in * the MatchingRuleUseDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. For example, when * you search an LDAP server for its schema, the server returns an entry * with attributes that include "matchingrule" and "matchingruleuse". * The values of these attributes are matching rule descriptions * in this format. *

* * @param use definition of the use of the matching rule in the * MatchingRuleUseDescription format */ public LDAPMatchingRuleUseSchema( String use ) { attrName = "matchingruleuse"; parseValue( use ); Object p = properties.get( "APPLIES" ); if ( p instanceof Vector ) { Vector v = (Vector)p; if ( v != null ) { attributes = new String[v.size()]; v.copyInto( attributes ); v.removeAllElements(); } } else if ( p instanceof String ) { attributes = new String[1]; attributes[0] = (String)p; } } /** * Gets the list of the OIDs of the attribute types which can be used * with the matching rule. * @return array of the OIDs of the attribute types which can be used * with the matching rule. */ public String[] getApplicableAttributes() { return attributes; } /** * Gets the matching rule use definition in the string representation * of the MatchingRuleUseDescription data type defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of these formats). * This is the format that LDAP servers and clients use to exchange * schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "matchingrules" and "matchingruleuse". The * values of these attributes are matching rule description and * matching rule use description in these formats.) *

* * @return a string in a format that can be used as the value of * the matchingruleuse attribute (which describes the use of * a matching rule in the schema) of a subschema object */ public String getValue() { String s = getValuePrefix(); if ( (attributes != null) && (attributes.length > 0) ) { s += "APPLIES ( "; for( int i = 0; i < attributes.length; i++ ) { if ( i > 0 ) s += " $ "; s += attributes[i]; } s += " ) "; } s += ')'; return s; } /** * Gets the definition of the matching rule use in a user friendly format. * This is the format that the matching rule use definition uses when * you print the matching rule or the schema. * @return definition of the matching rule in a user friendly format. */ public String toString() { String s = "Name: " + name + "; OID: " + oid; s += "; Description: " + description; if ( attributes != null ) { s += "; Applies to: "; for( int i = 0; i < attributes.length; i++ ) { if ( i > 0 ) s += ", "; s += attributes[i]; } } s += getQualifierString( EXPLICIT ); return s; } // Qualifiers tracked explicitly static final String[] EXPLICIT = { OBSOLETE }; private String[] attributes = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPConnection.java0000664001003300100330000066475310620653754027375 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import netscape.ldap.ber.stream.*; import netscape.ldap.util.*; import java.io.*; import java.net.*; /** * Represents a connection to an LDAP server.

* * Use objects of this class to perform LDAP operations (such as * search, modify, and add) on an LDAP server.

* * To perform an LDAP operation on a server, you need to follow * these steps:

* *

    *
  1. Create a new LDAPConnection object. *
  2. Use the connect method to connect to the * LDAP server. *
  3. Use the authenticate method to authenticate * to server. *
  4. Perform the LDAP operation. *
  5. Use the disconnect method to disconnect from * the server when done. *
*

* * All operations block until completion (with the exception of * the search method in which the results may not all return at * the same time). *

* * This class also specifies a default set of constraints * (such as the maximum length of time to allow for an operation before timing out) * which apply to all operations. To get and set these constraints, * use the getOption and setOption methods. * To override these constraints for an individual operation, * define a new set of constraints by creating a LDAPConstraints * object and pass the object to the method for the operation. For search * operations, additional constraints are defined in LDAPSearchConstraints * (a subclass of LDAPConstraints). To override the default search * constraints, create an LDAPSearchConstraints object and pass it * to the search method. *

* * If you set up your client to follow referrals automatically, * an operation that results in a referral will create a new connection * to the LDAP server identified in the referral. In order to have * your client authenticate to that LDAP server automatically, you need * to define a class that implements the LDAPRebind interface. * In your definition of the class, you need to define a * getRebindAuthentication method that creates an LDAPRebindAuth * object containing the distinguished name and password to use for reauthentication. *

* * Most errors that occur raise the same exception (LDAPException). * In order to determine the exact problem that occurred, you can retrieve the * result code from this exception and compare its value against a set of defined * result codes. *

* * @version 1.0 * @see netscape.ldap.LDAPConstraints * @see netscape.ldap.LDAPSearchConstraints * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPRebindAuth * @see netscape.ldap.LDAPException */ public class LDAPConnection implements LDAPv3, LDAPAsynchronousConnection, Cloneable, Serializable { static final long serialVersionUID = -8698420087475771145L; /** * Version of the LDAP protocol used by default. * LDAP_VERSION is 2, so your client will * attempt to authenticate to LDAP servers as an LDAP v2 client. * The following is an example of some code that prints the * value of this variable: *

* *

     * LDAPConnection ld = new LDAPConnection();
     * System.out.println( "The default LDAP protocol version used is "
     *                      ld.LDAP_VERSION );
     * 
* * If you want to authenticate as an LDAP v3 client, * use the authenticate(int version, String dn, String passwd) method. * For example: *

* *

     * ld.authenticate( 3, myDN, myPW );
     * 
* * @see netscape.ldap.LDAPConnection#authenticate(int, java.lang.String, java.lang.String) */ public final static int LDAP_VERSION = 2; /** * Name of the property specifying the version of the SDK.

* * To get the version number, pass this name to the * getProperty method. The SDK version number * is of the type Float. For example:

*

     *      ...
     *      Float sdkVersion = ( Float )myConn.getProperty( myConn.LDAP_PROPERTY_SDK );
     *      System.out.println( "SDK version: " + sdkVersion );
     *      ... 
* @see netscape.ldap.LDAPConnection#getProperty(java.lang.String) */ public final static String LDAP_PROPERTY_SDK = "version.sdk"; /** * Name of the property specifying the highest supported version of * the LDAP protocol.

* * To get the version number, pass this name to the * getProperty method. The LDAP protocol version number * is of the type Float. For example:

*

     *      ...
     *      Float LDAPVersion = ( Float )myConn.getProperty( myConn.LDAP_PROPERTY_PROTOCOL );
     *      System.out.println( "Highest supported LDAP protocol version: " + LDAPVersion );
     *      ... 
* @see netscape.ldap.LDAPConnection#getProperty(java.lang.String) */ public final static String LDAP_PROPERTY_PROTOCOL = "version.protocol"; /** * Name of the property specifying the types of authentication allowed by this * API (for example, anonymous authentication and simple authentication).

* * To get the supported types, pass this name to the * getProperty method. The value of this property is * of the type String. For example:

*

     *      ...
     *      String authTypes = ( String )myConn.getProperty( myConn.LDAP_PROPERTY_SECURITY );
     *      System.out.println( "Supported authentication types: " + authTypes );
     *      ... 
* @see netscape.ldap.LDAPConnection#getProperty(java.lang.String) */ public final static String LDAP_PROPERTY_SECURITY = "version.security"; /** * Name of the property to enable/disable LDAP message trace.

* * The property can be specified either as a system property * (java -D command line option), or programmatically with the * setProperty method. *

* When -D command line option is used, defining the property with * no value will send the trace output to the standard error. If the * value is defined, it is assumed to be the name of an output file. * If the file name is prefixed with a '+' character, the file is * opened in append mode. *

* When the property is set with the getProperty method, * the property value must be either a String (represents a file name) * an OutputStream or an instance of LDAPTraceWriter. To stop tracing, * null should be passed as the property value. * * @see netscape.ldap.LDAPConnection#setProperty(java.lang.String, java.lang.Object) */ public final static String TRACE_PROPERTY = "com.netscape.ldap.trace"; /** * Specifies the serial connection setup policy when a list of hosts is * passed to the connect method. * @see netscape.ldap.LDAPConnection#setConnSetupDelay(int) */ public final static int NODELAY_SERIAL = -1; /** * Specifies the parallel connection setup policy with no delay when a * list of hosts is passed to the connect method. * For each host in the list, a separate thread is created to attempt * to connect to the host. All threads are started simultaneously. * @see netscape.ldap.LDAPConnection#setConnSetupDelay(int) */ public final static int NODELAY_PARALLEL = 0; /** * Constants */ private final static String defaultFilter = "(objectClass=*)"; /** * Internal variables */ private LDAPSearchConstraints m_defaultConstraints = new LDAPSearchConstraints(); // A clone of constraints for the successful bind. Used by // "smart failover" for the automatic rebind private LDAPConstraints m_rebindConstraints; private Vector m_responseListeners; private Vector m_searchListeners; private String m_boundDN; private String m_boundPasswd; private int m_protocolVersion = LDAP_VERSION; private LDAPConnSetupMgr m_connMgr; private int m_connSetupDelay = -1; private int m_connectTimeout = 0; private LDAPSocketFactory m_factory; // A flag if m_factory is used to start TLS private boolean m_isTLSFactory; /* m_thread does all socket i/o for the object and any clones */ private transient LDAPConnThread m_thread = null; /* To manage received server controls on a per-thread basis */ private Hashtable m_responseControlTable = new Hashtable(); private LDAPCache m_cache = null; // A flag set if startTLS() called successfully private boolean m_useTLS; // OID for the extended operation startTLS final static String OID_startTLS = "1.3.6.1.4.1.1466.20037"; private Object m_security = null; private LDAPSaslBind m_saslBinder = null; private Properties m_securityProperties; private Hashtable m_properties = new Hashtable(); private LDAPConnection m_referralConnection; /** * Properties */ private final static Float SdkVersion = new Float(4.18f); private final static Float ProtocolVersion = new Float(3.0f); private final static String SecurityVersion = new String("none,simple,sasl"); private final static Float MajorVersion = new Float(4.0f); private final static Float MinorVersion = new Float(0.18f); private final static String DELIM = "#"; private final static String PersistSearchPackageName = "netscape.ldap.controls.LDAPPersistSearchControl"; final static String EXTERNAL_MECHANISM = "external"; private final static String EXTERNAL_MECHANISM_PACKAGE = "com.netscape.sasl"; final static String DEFAULT_SASL_PACKAGE = "com.netscape.sasl"; final static String SCHEMA_BUG_PROPERTY = "com.netscape.ldap.schema.quoting"; final static String SASL_PACKAGE_PROPERTY = "com.netscape.ldap.saslpackage"; /** * Constructs a new LDAPConnection object, * which represents a connection to an LDAP server.

* * Calling the constructor does not actually establish * the connection. To connect to the LDAP server, use the * connect method. * * @see netscape.ldap.LDAPConnection#connect(java.lang.String, int) * @see netscape.ldap.LDAPConnection#authenticate(java.lang.String, java.lang.String) */ public LDAPConnection () { super(); m_factory = null; m_properties.put(LDAP_PROPERTY_SDK, SdkVersion); m_properties.put(LDAP_PROPERTY_PROTOCOL, ProtocolVersion); m_properties.put(LDAP_PROPERTY_SECURITY, SecurityVersion); m_properties.put("version.major", MajorVersion); m_properties.put("version.minor", MinorVersion); } /** * Constructs a new LDAPConnection object that * will use the specified socket factory class to create * socket connections. The socket factory class must implement * the LDAPSocketFactory interface.
* (For example, the LDAPSSLSocketFactory * class implements this interface.) *

* * Note that calling the LDAPConnection constructor * does not actually establish a connection to an LDAP server. * To connect to an LDAP server, use the * connect method. The socket connection will be * constructed when this method is called. *

* * @see netscape.ldap.LDAPSocketFactory * @see netscape.ldap.LDAPSSLSocketFactory * @see netscape.ldap.LDAPConnection#connect(java.lang.String, int) * @see netscape.ldap.LDAPConnection#authenticate(java.lang.String, java.lang.String) * @see netscape.ldap.LDAPConnection#getSocketFactory * @see netscape.ldap.LDAPConnection#setSocketFactory(netscape.ldap.LDAPSocketFactory) */ public LDAPConnection ( LDAPSocketFactory factory ) { this(); m_factory = factory; } /** * Finalize method, which disconnects from the LDAP server. * @exception LDAPException Thrown when the connection cannot be disconnected. */ public void finalize() throws LDAPException { if (isConnected()) { disconnect(); } } /** * Sets the specified LDAPCache object as the * cache for the LDAPConnection object. *

* * @param cache the LDAPCache object representing * the cache that the current connection should use * @see netscape.ldap.LDAPCache * @see netscape.ldap.LDAPConnection#getCache */ public void setCache(LDAPCache cache) { if (m_cache != null) { m_cache.removeReference(); } if (cache != null) { cache.addReference(); } m_cache = cache; if ( m_thread != null ) { m_thread.setCache( cache ); } } /** * Gets the LDAPCache object associated with * the current LDAPConnection object. *

* * @return the LDAPCache object representing * the cache that the current connection should use * @see netscape.ldap.LDAPCache * @see netscape.ldap.LDAPConnection#setCache(netscape.ldap.LDAPCache) */ public LDAPCache getCache() { return m_cache; } /** * Gets a property of a connection.

* * You can get the following properties for a given connection:

*

    *
  • LDAP_PROPERTY_SDK

    * To get the version of this SDK, get this property. The value of * this property is of the type Float.

    *

  • LDAP_PROPERTY_PROTOCOL

    * To get the highest supported version of the LDAP protocol, get * this property. * The value of this property is of the type Float.

    *

  • LDAP_PROPERTY_SECURITY

    * To get a comma-separated list of the types of authentication * supported, get this property. The value of this property is of the * type String.

    *

*

* * For example, the following section of code gets the version of * the SDK.

* *

     *       ...
     *       Float sdkVersion = ( Float )myConn.getProperty( myConn.LDAP_PROPERTY_SDK );
     *       System.out.println( "SDK version: " + sdkVersion );
     *       ... 
* * @param name name of the property (for example, LDAP_PROPERTY_SDK)

* * @return the value of the property.

* * Since the return value is an object, you should recast it as the appropriate type. * (For example, when getting the LDAP_PROPERTY_SDK property, * recast the return value as a Float.)

* * If you pass this method an unknown property name, the method * returns null.

* * @exception LDAPException Unable to get the value of the * specified property.

* * @see netscape.ldap.LDAPConnection#LDAP_PROPERTY_SDK * @see netscape.ldap.LDAPConnection#LDAP_PROPERTY_PROTOCOL * @see netscape.ldap.LDAPConnection#LDAP_PROPERTY_SECURITY */ public Object getProperty(String name) throws LDAPException { return m_properties.get( name ); } /** * Change a property of a connection.

* * The following properties are defined:
* com.netscape.ldap.schema.quoting - "standard" or "NetscapeBug"
* Note: if this property is not set, the SDK will query the server * to determine if attribute syntax values and objectclass superior * values must be quoted when adding schema.
* com.netscape.ldap.saslpackage - the default is "com.netscape.sasl"
*

* * @param name name of the property to set * @param val value to set * @exception LDAPException Unable to set the value of the specified * property. */ public void setProperty(String name, Object val) throws LDAPException { if ( name.equalsIgnoreCase( SCHEMA_BUG_PROPERTY ) ) { m_properties.put( SCHEMA_BUG_PROPERTY, val ); } else if ( name.equalsIgnoreCase( SASL_PACKAGE_PROPERTY ) ) { m_properties.put( SASL_PACKAGE_PROPERTY, val ); } else if ( name.equalsIgnoreCase( "debug" ) ) { debug = ((String)val).equalsIgnoreCase( "true" ); } else if ( name.equalsIgnoreCase( TRACE_PROPERTY ) ) { Object traceOutput = null; if (val == null) { m_properties.remove(TRACE_PROPERTY); } else { if (m_thread != null) { traceOutput = createTraceOutput(val); } m_properties.put( TRACE_PROPERTY, val ); } if (m_thread != null) { m_thread.setTraceOutput(traceOutput); } // This is used only by the ldapjdk test cases to simulate a // server problem and to test fail-over and rebind } else if ( name.equalsIgnoreCase( "breakConnection" ) ) { m_connMgr.breakConnection(); } else { throw new LDAPException("Unknown property: " + name); } } /** * Evaluate the TRACE_PROPERTY value and create output stream. * The value can be of type String, OutputStream or LDAPTraceWriter. * The String value represents output file name. If the name is an empty * string, the output is sent to System.err. If the file name is * prefixed with a '+' character, the file is opened in append mode. * * @param out Trace output specifier. A file name, an output stream * or an instance of LDAPTraceWriter * @return An output stream or an LDAPTraceWriter instance */ Object createTraceOutput(Object out) throws LDAPException { if (out instanceof String) { // trace file name OutputStream os = null; String file = (String)out; if (file.length() == 0) { os = System.err; } else { try { boolean appendMode = (file.charAt(0) == '+'); if (appendMode) { file = file.substring(1); } FileOutputStream fos = new FileOutputStream(file, appendMode); os = new BufferedOutputStream(fos); } catch (IOException e) { throw new LDAPException( "Can not open output trace file " + file + " " + e); } } return os; } else if (out instanceof OutputStream) { return out; } else if (out instanceof LDAPTraceWriter) { return out; } else { throw new LDAPException(TRACE_PROPERTY + " must be an OutputStream, a file name or an instance of LDAPTraceWriter" ); } } /** * Sets the LDAP protocol version that your client prefers to use when * connecting to the LDAP server. *

* * @param version the LDAP protocol version that your client uses */ private void setProtocolVersion(int version) { m_protocolVersion = version; } /** * Returns the host name of the LDAP server to which you are connected. * @return host name of the LDAP server. */ public String getHost () { if (m_connMgr != null) { return m_connMgr.getHost(); } return null; } /** * Returns the port number of the LDAP server to which you are connected. * @return port number of the LDAP server. */ public int getPort () { if (m_connMgr != null) { return m_connMgr.getPort(); } return -1; } /** * Returns the distinguished name (DN) used for authentication over * this connection. * @return distinguished name used for authentication over this connection. */ public String getAuthenticationDN () { return m_boundDN; } /** * Returns the password used for authentication over this connection. * @return password used for authentication over this connection. */ public String getAuthenticationPassword () { return m_boundPasswd; } /** * Returns the maximum time to wait for the connection to be established. * @return the maximum connect time in seconds or 0 (unlimited) * @see netscape.ldap.LDAPConnection#setConnectTimeout */ public int getConnectTimeout () { return m_connectTimeout; } /** * Specifies the maximum time to wait for the connection to be established. * If the value is 0, the time is not limited. * @param timeout the maximum connect time in seconds or 0 (unlimited) */ public void setConnectTimeout (int timeout) { if (timeout < 0) { throw new IllegalArgumentException("Timeout value can not be negative"); } m_connectTimeout = timeout; if (m_connMgr != null) { m_connMgr.setConnectTimeout(m_connectTimeout); } } /** * Returns the delay in seconds when making concurrent connection attempts to * multiple servers. * @return the delay in seconds between connection attempts:
* NODELAY_SERIAL The serial connection setup policy is enabled * (no concurrency).
* NODELAY_PARALLEL The parallel connection setup policy with no delay * is enabled.
* delay > 0 The parallel connection setup policy with the delay of * delay seconds is enabled. * @see netscape.ldap.LDAPConnection#setConnSetupDelay */ public int getConnSetupDelay () { return m_connSetupDelay; } /** * Specifies the delay in seconds when making concurrent connection attempts to * multiple servers. *

Effectively, selects the connection setup policy when a list of hosts is passed * to the connect method. * *
If the serial policy is selected, the default one, an attempt is made to * connect to the first host in the list. The next entry in * the list is tried only if the attempt to connect to the current host fails. * This might cause your application to block for unacceptably long time if a host is down. * *
If the parallel policy is selected, multiple connection attempts may run * concurrently on a separate thread. A new connection attempt to the next entry * in the list can be started with or without delay. *

You must set the ConnSetupDelay before making the call to the * connect method. * * @param delay the delay in seconds between connection attempts. Possible values are:
* NODELAY_SERIAL Use the serial connection setup policy.
* NODELAY_PARALLEL Use the parallel connection setup policy with no delay. * Start all connection setup threads immediately.
* delay > 0 Use the parallel connection setup policy with delay. * Start another connection setup thread after delay seconds.
* @see netscape.ldap.LDAPConnection#NODELAY_SERIAL * @see netscape.ldap.LDAPConnection#NODELAY_PARALLEL * @see netscape.ldap.LDAPConnection#connect(java.lang.String, int) */ public void setConnSetupDelay (int delay) { m_connSetupDelay = delay; if (m_connMgr != null) { m_connMgr.setConnSetupDelay(delay); } } /** * Gets the object representing the socket factory used to establish * a connection to the LDAP server or for the start TLS operation. *

* * @return the object representing the socket factory used to * establish a connection to a server or for the start TLS operation. * @see netscape.ldap.LDAPSocketFactory * @see netscape.ldap.LDAPSSLSocketFactory * @see netscape.ldap.LDAPConnection#setSocketFactory(netscape.ldap.LDAPSocketFactory) * @see netscape.ldap.LDAPConnection#startTLS */ public LDAPSocketFactory getSocketFactory () { return m_factory; } /** * Specifies the object representing the socket factory that you * want to use to establish a connection to a server or for the * start TLS operation. *

* If the socket factory is to be used to establish a connection * setSocketFactory() must be called before * connect(). For the start TLS operation * setSocketFactory() must be called after connect(). * @param factory the object representing the socket factory that * you want to use to establish a connection to a server or for * the start TLS operation. * @see netscape.ldap.LDAPSocketFactory * @see netscape.ldap.LDAPSSLSocketFactory * @see netscape.ldap.LDAPConnection#getSocketFactory * @see netscape.ldap.LDAPConnection#startTLS */ public void setSocketFactory (LDAPSocketFactory factory) { m_factory = factory; m_isTLSFactory = false; } /** * Indicates whether the connection represented by this object * is open at this time. * @return true if connected to an LDAP server over this connection. * If not connected to an LDAP server, returns false. */ public synchronized boolean isConnected() { return m_thread != null && m_thread.isConnected(); } /** * Indicates whether this client has authenticated to the LDAP server * @return true,, if authenticated. If not * authenticated, or if authenticated as an anonymous user (with * either a blank name or password), returns false. */ public boolean isAuthenticated () { boolean bound = false; synchronized (this) { bound = (m_thread != null) && m_thread.isBound(); } return bound; } /** * Mark the connection bind state */ synchronized void setBound(boolean bound) { if (m_thread != null) { if (!bound) { m_thread.setBound(false); } // sasl bind else if (m_saslBinder != null) { m_thread.setBound(true); } // simple bind else { m_thread.setBound(!isAnonymousUser()); } } } boolean isAnonymousUser() { return (m_boundDN == null) || m_boundDN.equals("") || (m_boundPasswd == null) || m_boundPasswd.equals(""); } /** * Connects to the specified host and port. If this LDAPConnection object * represents an open connection, the connection is closed first * before the new connection is opened. *

* * For example, the following section of code establishes a connection with * the LDAP server running on the host ldap.netscape.com and the port 389. *

* *

     * String ldapHost = "ldap.netscape.com";
     * int ldapPort = 389;
     * LDAPConnection myConn = new LDAPConnection();
     * try {
     *     myConn.connect( ldapHost, ldapPort );
     * } catch ( LDAPException e ) {
     *     System.out.println( "Unable to connect to " + ldapHost +
     *                         " at port " + ldapPort );
     *     return;
     * }
     * System.out.println( "Connected to " + ldapHost + " at port " + ldapPort )
     * 
*

* You can limit the time spent waiting for the connection to be established * by calling setConnectTimeout before connect. *

* @param host host name of the LDAP server to which you want to connect. * This value can also be a space-delimited list of hostnames or * hostnames and port numbers (using the syntax * hostname:portnumber). For example, you can specify * the following values for the host argument:
*

     *   myhost
     *   myhost hishost:389 herhost:5000 whathost
     *   myhost:686 myhost:389 hishost:5000 whathost:1024
     *
* If multiple servers are specified in the host list, the connection * setup policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently. *

* @param port port number of the LDAP server to which you want to connect. * This parameter is ignored for any host in the host * parameter which includes a colon and port number. * @exception LDAPException The connection failed. * @see netscape.ldap.LDAPConnection#setConnSetupDelay * @see netscape.ldap.LDAPConnection#setConnectTimeout */ public void connect(String host, int port) throws LDAPException { connect( host, port, null, null, m_defaultConstraints, false ); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server. If this LDAPConnection object * represents an open connection, the connection is closed first * before the new connection is opened. *

* * For example, the following section of code establishes a connection * with the LDAP server running on ldap.netscape.com at port 389. The * example also attempts to authenticate the client as Barbara Jensen. *

* *

     * String ldapHost = "ldap.netscape.com";
     * int ldapPort = 389;
     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String myPW = "hifalutin";
     * LDAPConnection myConn = new LDAPConnection();
     * try {
     *     myConn.connect( ldapHost, ldapPort, myDN, myPW );
     * } catch ( LDAPException e ) {
     *     switch( e.getLDAPResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified user does not exist." );
     *             break;
     *         case e.INVALID_CREDENTIALS:
     *             System.out.println( "Invalid password." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getLDAPResultCode() );
     *             System.out.println( "Failed to connect to " + ldapHost + " at port " + ldapPort );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Connected to " + ldapHost + " at port " + ldapPort );
     * 
*

* You can limit the time spent waiting for the connection to be established * by calling setConnectTimeout before connect. *

* @param host host name of the LDAP server to which you want to connect. * This value can also be a space-delimited list of hostnames or * hostnames and port numbers (using the syntax * hostname:portnumber). For example, you can specify * the following values for the host argument:
*

     *   myhost
     *   myhost hishost:389 herhost:5000 whathost
     *   myhost:686 myhost:389 hishost:5000 whathost:1024
     *
* If multiple servers are specified in the host list, the connection * setup policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently. *

* @param port port number of the LDAP server to which you want to connect. * This parameter is ignored for any host in the host * parameter which includes a colon and port number. * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException The connection or authentication failed. * @see netscape.ldap.LDAPConnection#setConnSetupDelay * @see netscape.ldap.LDAPConnection#setConnectTimeout */ public void connect(String host, int port, String dn, String passwd) throws LDAPException { connect(host, port, dn, passwd, m_defaultConstraints, true); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server. If this LDAPConnection object * represents an open connection, the connection is closed first * before the new connection is opened. This method allows the user to * specify the preferences for the bind operation. *

* You can limit the time spent waiting for the connection to be established * by calling setConnectTimeout before connect. *

* @param host host name of the LDAP server to which you want to connect. * This value can also be a space-delimited list of hostnames or * hostnames and port numbers (using the syntax * hostname:portnumber). For example, you can specify * the following values for the host argument:
*

     *   myhost
     *   myhost hishost:389 herhost:5000 whathost
     *   myhost:686 myhost:389 hishost:5000 whathost:1024
     *
* If multiple servers are specified in the host list, the connection * setup policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently. *

* @param port port number of the LDAP server to which you want to connect. * This parameter is ignored for any host in the host * parameter which includes a colon and port number. * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException The connection or authentication failed. * @see netscape.ldap.LDAPConnection#setConnSetupDelay * @see netscape.ldap.LDAPConnection#setConnectTimeout */ public void connect(String host, int port, String dn, String passwd, LDAPConstraints cons) throws LDAPException { connect(host, port, dn, passwd, cons, true); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void connect(String host, int port, String dn, String passwd, LDAPSearchConstraints cons) throws LDAPException { connect(host, port, dn, passwd, (LDAPConstraints)cons); } private void connect(String host, int port, String dn, String passwd, LDAPConstraints cons, boolean doAuthenticate) throws LDAPException { if ( isConnected() ) { disconnect (); } if ((host == null) || (host.equals(""))) { throw new LDAPException ( "no host for connection", LDAPException.PARAM_ERROR ); } /* Parse the list of hosts */ int defaultPort = port; StringTokenizer st = new StringTokenizer( host ); String hostList[] = new String[st.countTokens()]; int portList[] = new int[st.countTokens()]; int i = 0; while( st.hasMoreTokens() ) { String s = st.nextToken(); int colon = s.indexOf( ':' ); if ( colon > 0 ) { hostList[i] = s.substring( 0, colon ); portList[i] = Integer.parseInt( s.substring( colon+1 ) ); } else { hostList[i] = s; portList[i] = defaultPort; } i++; } /* Create the Connection Setup Manager */ m_connMgr = new LDAPConnSetupMgr(hostList, portList, m_isTLSFactory ? null : m_factory); m_connMgr.setConnSetupDelay(m_connSetupDelay); m_connMgr.setConnectTimeout(m_connectTimeout); connect(); if (doAuthenticate) { authenticate(dn, passwd, cons); } } void connect(LDAPUrl[] urls) throws LDAPException { m_connMgr = new LDAPConnSetupMgr(urls, m_factory); m_connMgr.setConnSetupDelay(m_connSetupDelay); m_connMgr.setConnectTimeout(m_connectTimeout); connect(); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server, with the specified LDAP * protocol version. If the server does not support the requested * protocol version, an exception is thrown. If this LDAPConnection * object represents an open connection, the connection is closed first * before the new connection is opened. This is equivalent to * connect(host, port) followed by authenticate(version, dn, passwd).

* * @param version requested version of LDAP: currently 2 or 3 * @param host a hostname to which to connect or a dotted string representing * the IP address of this host. * Alternatively, this can be a space-delimited list of host names. * Each host name may include a trailing colon and port number. In the * case where more than one host name is specified, the connection setup * policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently.

* *

     *   Examples:
     *      "directory.knowledge.com"
     *      "199.254.1.2"
     *      "directory.knowledge.com:1050 people.catalog.com 199.254.1.2"
     * 
* @param port the TCP or UDP port number to which to connect or contact. * The default LDAP port is 389. "port" is ignored for any host name which * includes a colon and port number. * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name and passwd as password. * @exception LDAPException The connection or authentication failed. * @see netscape.ldap.LDAPConnection#setConnSetupDelay */ public void connect(int version, String host, int port, String dn, String passwd) throws LDAPException { connect(version, host, port, dn, passwd, m_defaultConstraints); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server, with the specified LDAP * protocol version. If the server does not support the requested * protocol version, an exception is thrown. This method allows the user * to specify preferences for the bind operation. If this LDAPConnection * object represents an open connection, the connection is closed first * before the new connection is opened. This is equivalent to * connect(host, port) followed by authenticate(version, dn, passwd).

* * @param version requested version of LDAP: currently 2 or 3 * @param host a hostname to which to connect or a dotted string representing * the IP address of this host. * Alternatively, this can be a space-delimited list of host names. * Each host name may include a trailing colon and port number. In the * case where more than one host name is specified, the connection setup * policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently.

* *

     *   Examples:
     *      "directory.knowledge.com"
     *      "199.254.1.2"
     *      "directory.knowledge.com:1050 people.catalog.com 199.254.1.2"
     * 
* @param port the TCP or UDP port number to which to connect or contact. * The default LDAP port is 389. "port" is ignored for any host name which * includes a colon and port number. * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param cons preferences for the bind operation * @exception LDAPException The connection or authentication failed. * @see netscape.ldap.LDAPConnection#setConnSetupDelay */ public void connect(int version, String host, int port, String dn, String passwd, LDAPConstraints cons) throws LDAPException { setProtocolVersion(version); connect(host, port, dn, passwd, cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void connect(int version, String host, int port, String dn, String passwd, LDAPSearchConstraints cons) throws LDAPException { connect(version, host, port, dn, passwd, (LDAPConstraints)cons); } /** * Internal routine to connect with internal params * @exception LDAPException failed to connect */ private synchronized void connect () throws LDAPException { if ( isConnected() ) { return; } if (m_connMgr == null) { throw new LDAPException ( "no connection parameters", LDAPException.PARAM_ERROR ); } if (m_thread == null) { m_thread = new LDAPConnThread(m_connMgr, m_cache, getTraceOutput()); } m_thread.connect(this); checkClientAuth(); } /** * Returns the trace output object if set by the user */ Object getTraceOutput() throws LDAPException { // Check first if trace output has been set using setProperty() Object traceOut = m_properties.get(TRACE_PROPERTY); if (traceOut != null) { return createTraceOutput(traceOut); } // Check if the property has been set with java -Dcom.netscape.ldap.trace // If the property does not have a value, send the trace to the System.err, // otherwise use the value as the output file name try { traceOut = System.getProperty(TRACE_PROPERTY); if (traceOut != null) { return createTraceOutput(traceOut); } } catch (Exception e) { ;// In browser access to property might not be allowed } return null; } /** * Performs certificate-based authentication if client authentication was * specified at construction time. * @exception LDAPException if certificate-based authentication fails. */ private void checkClientAuth() throws LDAPException { // if this is SSL if ((m_factory != null) && (m_factory instanceof LDAPSSLSocketFactoryExt)) { if (((LDAPSSLSocketFactoryExt)m_factory).isClientAuth()) { authenticate(null, EXTERNAL_MECHANISM, EXTERNAL_MECHANISM_PACKAGE, null, null); } } } /** * Abandons a current search operation, notifying the server not * to send additional search results. * * @param searchResults the search results returned when the search * was started * @exception LDAPException Failed to notify the LDAP server. * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) * @see netscape.ldap.LDAPSearchResults */ public void abandon( LDAPSearchResults searchResults ) throws LDAPException { if ( (!isConnected()) || (searchResults == null) ) { return; } int id = searchResults.getMessageID(); if ( id != -1 ) { abandon( id ); } } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password. * If you are not connected to the LDAP server, this * method attempts to reconnect to the server. *

* * For example, the following section of code authenticates the * client as Barbara Jensen. The code assumes that the client * has already established a connection with an LDAP server. *

* *

     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String myPW = "hifalutin";
     * try {
     *     myConn.authenticate( myDN, myPW );
     * } catch ( LDAPException e ) {
     *     switch( e.getLDAPResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified user does not exist." );
     *             break;
     *         case e.INVALID_CREDENTIALS:
     *             System.out.println( "Invalid password." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getLDAPResultCode() );
     *             System.out.println( "Failed to authentice as " + myDN );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Authenticated as " + myDN );
     * 
* * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException Failed to authenticate to the LDAP server. */ public void authenticate(String dn, String passwd) throws LDAPException { authenticate(m_protocolVersion, dn, passwd, m_defaultConstraints); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password. The * default protocol version (version 2) is used. If the server * doesn't support the default version, an LDAPException is thrown * with the error code PROTOCOL_ERROR. This method allows the * user to specify the preferences for the bind operation. * * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ public void authenticate(String dn, String passwd, LDAPConstraints cons) throws LDAPException { authenticate(m_protocolVersion, dn, passwd, cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void authenticate(String dn, String passwd, LDAPSearchConstraints cons) throws LDAPException { authenticate(dn, passwd, (LDAPConstraints)cons); } /** * Authenticates to the LDAP server (that you are currently * connected to) using the specified name and password, and * requesting that the server use at least the specified * protocol version. If the server doesn't support that * level, an LDAPException is thrown with the error code * PROTOCOL_ERROR. * * @param version required LDAP protocol version * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException Failed to authenticate to the LDAP server. */ public void authenticate(int version, String dn, String passwd) throws LDAPException { authenticate(version, dn, passwd, m_defaultConstraints); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password, and * requesting that the server use at least the specified * protocol version. If the server doesn't support that * level, an LDAPException is thrown with the error code * PROTOCOL_ERROR. This method allows the user to specify the * preferences for the bind operation. * * @param version required LDAP protocol version * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ public void authenticate(int version, String dn, String passwd, LDAPConstraints cons) throws LDAPException { m_protocolVersion = version; m_boundDN = dn; m_boundPasswd = passwd; forceNonSharedConnection(); simpleBind(cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void authenticate(int version, String dn, String passwd, LDAPSearchConstraints cons) throws LDAPException { authenticate(version, dn, passwd, (LDAPConstraints)cons); } /** * Authenticates to the LDAP server (that the object is currently * connected to) using the specified name and whatever SASL mechanisms * are supported by the server. Each supported mechanism in turn * is tried until authentication succeeds or an exception is thrown. * If the object has been disconnected from an LDAP server, this * method attempts to reconnect to the server. If the object had * already authenticated, the old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param cbh a class which the SASL framework can call to obtain * additional required information * @exception LDAPException Failed to authenticate to the LDAP server. */ public void authenticate(String dn, Hashtable props, /*CallbackHandler*/ Object cbh) throws LDAPException { // Get the list of mechanisms from the server String[] attrs = { "supportedSaslMechanisms" }; LDAPEntry entry = read( "", attrs ); LDAPAttribute attr = entry.getAttribute( attrs[0] ); if ( attr == null ) { throw new LDAPException( "Not found in root DSE: " + attrs[0], LDAPException.NO_SUCH_ATTRIBUTE ); } authenticate( dn, attr.getStringValueArray(), props, cbh ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param mechanisms a list of acceptable mechanisms. The first one * for which a Mechanism Driver can be instantiated is returned. * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. * @see netscape.ldap.LDAPConnection#authenticate(java.lang.String, * java.util.Hashtable, java.lang.Object) */ public void authenticate(String dn, String[] mechanisms, Hashtable props, /*CallbackHandler*/ Object cbh) throws LDAPException { authenticate( dn, mechanisms, DEFAULT_SASL_PACKAGE, props, cbh ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param mechanism a single mechanism name, e.g. "GSSAPI" * @param packageName a package containing a SASL ClientFactory, * e.g. "myclasses.SASL". If null, a system default is used. * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. * @deprecated Please use authenticate without packageName * instead. */ public void authenticate(String dn, String mechanism, String packageName, Hashtable props, /*CallbackHandler*/ Object cbh) throws LDAPException { authenticate( dn, new String[] {mechanism}, packageName, props, cbh ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param mechanisms a list of acceptable mechanisms. The first one * for which a Mechanism Driver can be instantiated is returned. * @param packageName a package containing a SASL ClientFactory, * e.g. "myclasses.SASL". If null, a system default is used. * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. * @deprecated Please use authenticate without packageName * instead. */ public void authenticate(String dn, String[] mechanisms, String packageName, Hashtable props, /*CallbackHandler*/ Object cbh) throws LDAPException { forceNonSharedConnection(); m_boundDN = null; m_protocolVersion = 3; // Must be 3 for SASL if ( props == null ) { props = new Hashtable(); } m_saslBinder = new LDAPSaslBind( dn, mechanisms, packageName, props, cbh ); m_saslBinder.bind( this ); m_boundDN = dn; } /** * Authenticates to the LDAP server (that the object is currently * connected to) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param version Required LDAP protocol version. * @param dn If non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name. * @param passwd If non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name and passwd as password. * @param listener Handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons Constraints specific to the operation. * @return LDAPResponseListener Handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener authenticate(int version, String dn, String passwd, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ if (cons == null) { cons = m_defaultConstraints; } m_boundDN = dn; m_boundPasswd = passwd; m_protocolVersion = version; forceNonSharedConnection(); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } sendRequest(new JDAPBindRequest(version, m_boundDN, m_boundPasswd), listener, cons); return listener; } /** * Authenticates to the LDAP server (that the object is currently * connected to) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param version Required LDAP protocol version. * @param dn If non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name. * @param passwd If non-null and non-empty, specifies that the connection * and all operations through it should be authenticated with dn as the * distinguished name and passwd as password. * @param listener Handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener Handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener authenticate(int version, String dn, String passwd, LDAPResponseListener listener) throws LDAPException{ return authenticate( version, dn, passwd, listener, m_defaultConstraints ); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password. * If you are not already connected to the LDAP server, this * method attempts to reconnect to the server. *

* * For example, the following section of code authenticates the * client as Barbara Jensen. The code assumes that the client * has already established a connection with an LDAP server. *

* *

     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String myPW = "hifalutin";
     * try {
     *     myConn.bind( myDN, myPW );
     * } catch ( LDAPException e ) {
     *     switch( e.getLDAPResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified user does not exist." );
     *             break;
     *         case e.INVALID_CREDENTIALS:
     *             System.out.println( "Invalid password." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getLDAPResultCode() );
     *             System.out.println( "Failed to authentice as " + myDN );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Authenticated as " + myDN );
     * 
* * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind(String dn, String passwd) throws LDAPException { authenticate(m_protocolVersion, dn, passwd, m_defaultConstraints); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password. The * default protocol version (version 2) is used. If the server * doesn't support the default version, an LDAPException is thrown * with the error code PROTOCOL_ERROR. This method allows the * user to specify the preferences for the bind operation. * * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind(String dn, String passwd, LDAPConstraints cons) throws LDAPException { authenticate(m_protocolVersion, dn, passwd, cons); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password, and * requests that the server use at least the specified * protocol version. If the server doesn't support that * level, an LDAPException is thrown with the error code * PROTOCOL_ERROR. * * @param version required LDAP protocol version * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind(int version, String dn, String passwd) throws LDAPException { authenticate(version, dn, passwd, m_defaultConstraints); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password, and * requesting that the server use at least the specified * protocol version. If the server doesn't support that * level, an LDAPException is thrown with the error code * PROTOCOL_ERROR. This method allows the user to specify the * preferences for the bind operation. * * @param version required LDAP protocol version * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind(int version, String dn, String passwd, LDAPConstraints cons) throws LDAPException { authenticate(version, dn, passwd, cons); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and whatever SASL mechanisms * are supported by the server. Each supported mechanism in turn * is tried until authentication succeeds or an exception is thrown. * If the object has been disconnected from an LDAP server, this * method attempts to reconnect to the server. If the object had * already authenticated, the old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind(String dn, Hashtable props, /*CallbackHandler*/ Object cbh) throws LDAPException { authenticate(dn, props, cbh); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param mechanisms a list of acceptable mechanisms. The first one * for which a Mechanism Driver can be instantiated is returned. * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. * @see netscape.ldap.LDAPConnection#bind(java.lang.String, * java.util.Hashtable, java.lang.Object) */ public void bind(String dn, String[] mechanisms, Hashtable props, /*CallbackHandler*/ Object cbh) throws LDAPException { authenticate(dn, mechanisms, props, cbh); } /** * Begin using the Transport Layer Security (TLS) protocol for session * privacy. *

* Before startTLS() is called, a socket factory of type * LDAPTLSSocketFactory must be set for the connection. * The factory must be set after the connect() call. *

*

     * LDAPConnection ldc = new LDAPConnection();
     * try {
     *     ldc.connect(host, port);
     *     ldc.setSocketFactory(new JSSSocketFactory());
     *     ldc.startTLS();
     *     ldc.autheticate(3, userdn, userpw);
     * }
     * catch (LDAPException e) {
     * ...
     * }
     * 
*

* If the socket factory of the connection is not capable of initiating a * TLS session , an LDAPException is thrown with the error code * TLS_NOT_SUPPORTED. *

* If the server does not support the transition to a TLS session, an * LDAPException is thrown with the error code returned by the server. * If there are outstanding LDAP operations on the connection or the * connection is already in the secure mode, an LDAPException is thrown. * * @exception LDAPException Failed to convert to a TLS session. * @see netscape.ldap.LDAPTLSSocketFactory * @see netscape.ldap.LDAPConnection#setSocketFactory(netscape.ldap.LDAPSocketFactory) * @see netscape.ldap.LDAPConnection#isTLS * @since LDAPJDK 4.17 */ public void startTLS() throws LDAPException { if (m_useTLS) { throw new LDAPException("Already using TLS", LDAPException.OTHER); } if (m_factory == null || !( m_factory instanceof LDAPTLSSocketFactory)) { throw new LDAPException("No socket factory for the startTLS operation", LDAPException.OTHER); } // Denote that m_factory is to be used from now on used for TLS and not for // SSL connections. m_isTLSFactory = true; checkConnection(/*rebind=*/true); // If some requests still in progress, throw exception synchronized (this) { if (isConnected() && m_thread.getRequestCount() != 0) { throw new LDAPException( "Connection has outstanding LDAP operations", LDAPException.OTHER); } } // Send startTLS extended op try { LDAPExtendedOperation response = extendedOperation(new LDAPExtendedOperation(OID_startTLS, null), m_defaultConstraints); } catch (LDAPException ex) { ex.setExtraMessage("Cannot start TLS"); throw ex; } /** * Server accepted startTLS request, try to initiate TLS over the * current socket. */ try { m_thread.layerSocket((LDAPTLSSocketFactory)m_factory); m_useTLS = true; } catch (LDAPException ex) { ex.setExtraMessage("Failed to start TLS"); throw ex; } catch (Exception ex) { throw new LDAPException("Failed to start TLS", LDAPException.OTHER); } } /** * Indicates if the session is currently protected by TLS. * @return true if TLS was activated. * @since LDAPJDK 4.17 * @see netscape.ldap.LDAPConnection#startTLS */ public boolean isTLS() { return m_useTLS; } /** * If this connection is cloned (the physical connection is shared), * create a new physical connection. */ void forceNonSharedConnection() throws LDAPException{ checkConnection(/*rebind=*/false); if (m_thread != null && m_thread.getClientCount() > 1) { reconnect(/*rebind=*/false); } } /** * Internal routine. Binds to the LDAP server. * @exception LDAPException failed to bind */ private void simpleBind (LDAPConstraints cons) throws LDAPException { m_saslBinder = null; LDAPResponseListener myListener = new LDAPResponseListener ( /*asynchOp=*/false ); try { if (m_referralConnection != null && m_referralConnection.isConnected()) { m_referralConnection.disconnect(); } m_referralConnection = null; setBound(false); sendRequest(new JDAPBindRequest(m_protocolVersion, m_boundDN, m_boundPasswd), myListener, cons); checkMsg( myListener.getResponse() ); setBound(true); m_rebindConstraints = (LDAPConstraints)cons.clone(); } catch (LDAPReferralException e) { m_referralConnection = createReferralConnection(e, cons); } } /** * Send a request to the server */ synchronized void sendRequest(JDAPProtocolOp oper, LDAPMessageQueue myListener, LDAPConstraints cons) throws LDAPException { boolean requestSent=false; boolean restoreTried=false; while (!requestSent) { try { m_thread.sendRequest(this, oper, myListener, cons); /** * In Java, a lost socket connected is often not detected until * a read is attempted following a write. Wait for the response * from the server to be sure the connection is really there. */ if (!myListener.isAsynchOp()) { myListener.waitFirstMessage(); } requestSent=true; } catch (IllegalArgumentException e) { throw new LDAPException(e.getMessage(), LDAPException.PARAM_ERROR); } catch(NullPointerException e) { if (isConnected() || restoreTried) { break; // give up } // else try to restore the connection } catch (LDAPException e) { if (e.getLDAPResultCode() != e.SERVER_DOWN || restoreTried) { throw e; // give up } // else try to restore the connection } // Try to restore the connection if needed, but no more then once if (!requestSent && !restoreTried) { restoreTried = true; myListener.reset(); boolean rebind = !(oper instanceof JDAPBindRequest); restoreConnection(rebind); } } if (!requestSent) { throw new LDAPException("Failed to send request", LDAPException.OTHER); } } /** * Check and restore the connection if needed. * This method is used by the "smart failover" feature. If a server * or network error has occurred, an attempt is made to automatically * restore the connection on the next ldap operation request * @param rebind true if needs rebind after reconnect */ private void checkConnection(boolean rebind) throws LDAPException { if (isConnected()) { return; } // If the user has invoked disconnect() no attempt is made // to restore the connection if (m_connMgr == null) { throw new LDAPException("not connected", LDAPException.OTHER); } restoreConnection(rebind); } /** * Reconnect and reauthenticate */ private void restoreConnection(boolean rebind) throws LDAPException { connect(); if (m_useTLS) { m_useTLS = false; startTLS(); } if (!rebind) { return; } if (m_saslBinder != null) { m_saslBinder.bind(this, false); } else if (m_rebindConstraints != null) { //Needs bind simpleBind(m_rebindConstraints); } } /** * Gets the authentication method used to bind:
* "none", "simple", or "sasl" * * @return the authentication method, or "none" */ public String getAuthenticationMethod() { if (!isAuthenticated()) { return "none"; } else { return (m_saslBinder == null) ? "simple" : "sasl"; } } /** * Disconnect from the server and then reconnect using the current * credentials and authentication method.

* If TLS was enabled with the startTLS() call, reenable TLS after * reconnect. * @exception LDAPException if not previously connected, or if * there is a failure on disconnecting or on connecting */ public void reconnect() throws LDAPException { reconnect(/*rebind=*/true); } void reconnect(boolean rebind) throws LDAPException { // Save connect parameters that get cleared by disconnect() boolean useTLS = m_useTLS; LDAPConnSetupMgr connMgr = m_connMgr; LDAPConstraints rebindCons = m_rebindConstraints; disconnect(); m_useTLS = useTLS; m_connMgr = connMgr; m_rebindConstraints = rebindCons; restoreConnection(rebind); } /** * Disconnects from the LDAP server. Before you can perform LDAP operations * again, you need to reconnect to the server by calling * connect. * @exception LDAPException Failed to disconnect from the LDAP server. * @see netscape.ldap.LDAPConnection#connect(java.lang.String, int) * @see netscape.ldap.LDAPConnection#connect(java.lang.String, int, java.lang.String, java.lang.String) */ public synchronized void disconnect() throws LDAPException { if (!isConnected()) { return; } m_thread.deregister(this); if (m_referralConnection != null && m_referralConnection.isConnected()) { m_referralConnection.disconnect(); } m_referralConnection = null; if (m_cache != null) { m_cache.removeReference(); m_cache = null; } m_responseControlTable.clear(); m_rebindConstraints = null; m_thread = null; m_connMgr = null; m_useTLS = false; } /** * Reads the entry for the specified distiguished name (DN) and retrieves all * attributes for the entry. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves all attributes for that entry. *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * try {
     *     foundEntry = myConn.read( findDN );
     * } catch ( LDAPException e ) {
     *     switch( e.getLDAPResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified entry does not exist." );
     *             break;
     *         case e.LDAP_PARTIAL_RESULTS:
     *             System.out.println( "Entry served by a different LDAP server." );
     *             break;
     *         case e.INSUFFICIENT_ACCESS_RIGHTS:
     *             System.out.println( "You do not have the access rights to perform this operation." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getLDAPResultCode() );
     *             System.out.println( "Could not read the specified entry." );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Found the specified entry." );
     * 
* * @param DN distinguished name of the entry to retrieve * @exception LDAPException Failed to find or read the specified entry * from the directory. * @return LDAPEntry returns the specified entry or raises an exception * if the entry is not found. */ public LDAPEntry read (String DN) throws LDAPException { return read (DN, null, m_defaultConstraints); } /** * Reads the entry for the specified distiguished name (DN) and retrieves all * attributes for the entry. This method allows the user to specify the * preferences for the read operation. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves all attributes for that entry. *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * try {
     *     foundEntry = myConn.read( findDN );
     * } catch ( LDAPException e ) {
     *     switch( e.getLDAPResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified entry does not exist." );
     *             break;
     *         case e.LDAP_PARTIAL_RESULTS:
     *             System.out.println( "Entry served by a different LDAP server." );
     *             break;
     *         case e.INSUFFICIENT_ACCESS_RIGHTS:
     *             System.out.println( "You do not have the access rights to perform this operation." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getLDAPResultCode() );
     *             System.out.println( "Could not read the specified entry." );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Found the specified entry." );
     * 
* * @param DN distinguished name of the entry to retrieve * @param cons preferences for the read operation * @exception LDAPException Failed to find or read the specified entry * from the directory. * @return LDAPEntry returns the specified entry or raises an exception * if the entry is not found. */ public LDAPEntry read (String DN, LDAPSearchConstraints cons) throws LDAPException { return read (DN, null, cons); } /** * Reads the entry for the specified distinguished name (DN) and * retrieves only the specified attributes from the entry. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves only the cn and * sn attributes. * The example prints out all attributes that have been retrieved * (the two specified attributes). *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * String getAttrs[] = { "cn", "sn" };
     * try {
     *      foundEntry = myConn.read( findDN, getAttrs );
     * } catch ( LDAPException e ) {
     *      switch( e.getLDAPResultCode() ) {
     *           case e.NO_SUCH_OBJECT:
     *               System.out.println( "The specified entry does not exist." );
     *               break;
     *           case e.LDAP_PARTIAL_RESULTS:
     *               System.out.println( "Entry served by a different LDAP server." );
     *               break;
     *           case e.INSUFFICIENT_ACCESS_RIGHTS:
     *               System.out.println( "You do not have the access " +
     *                                   "rights to perform this operation." );
     *               break;
     *           default:
     *               System.out.println( "Error number: " + e.getLDAPResultCode() );
     *               System.out.println( "Could not read the specified entry." );
     *               break;
     *      }
     *      return;
     * }
     *
     * LDAPAttributeSet foundAttrs = foundEntry.getAttributeSet();
     * int size = foundAttrs.size();
     * Enumeration itrAttrs = foundAttrs.getAttributes();
     * System.out.println( "Attributes: " );
     *
     * while ( itrAttrs.hasMoreElements() ) {
     *      LDAPAttribute anAttr = ( LDAPAttribute )itrAttrs.nextElement();
     *      String attrName = anAttr.getName();
     *      System.out.println( "\t" + attrName );
     *      Enumeration itrVals = anAttr.getStringValues();
     *      while ( itrVals.hasMoreElements() ) {
     *           String aVal = ( String )itrVals.nextElement();
     *           System.out.println( "\t\t" + aVal );
     *      }
     * }
     * 
* * @param DN distinguished name of the entry to retrieve * @param attrs names of attributes to retrieve * @return LDAPEntry returns the specified entry (or raises an * exception if the entry is not found). * @exception LDAPException Failed to read the specified entry from * the directory. */ public LDAPEntry read (String DN, String attrs[]) throws LDAPException { return read(DN, attrs, m_defaultConstraints); } public LDAPEntry read (String DN, String attrs[], LDAPSearchConstraints cons) throws LDAPException { LDAPSearchResults results = search (DN, SCOPE_BASE, "(|(objectclass=*)(objectclass=ldapsubentry))", attrs, false, cons); if (results == null) { return null; } LDAPEntry entry = results.next(); // cleanup required for referral connections while (results.hasMoreElements()) { results.nextElement(); } return entry; } /** * Reads the entry specified by the LDAP URL.

* * When you call this method, a new connection is created automatically, * using the host and port specified in the URL. After finding the entry, * the method closes this connection (in other words, it disconnects from * the LDAP server).

* * If the URL specifies a filter and scope, these are not used. * Of the information specified in the URL, this method only uses * the LDAP host name and port number, the base distinguished name (DN), * and the list of attributes to return.

* * The method returns the entry specified by the base DN.

* * (Note: If you want to search for more than one entry, use the * search( LDAPUrl ) method instead.)

* * For example, the following section of code reads the entry specified * by the LDAP URL. *

* *

     * String flatURL = "ldap://alway.mcom.com:3890/cn=Barbara Jenson,ou=Product Development,o=Ace Industry,c=US?cn,sn,mail";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "BAD URL!!!  BAD, BAD, BAD URL!!!" );
     *    return;
     * }
     * LDAPEntry myEntry = null;
     * try {
     *    myEntry = myConn.read( myURL );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getLDAPResultCode();
     *    switch( errCode ) {
     *        case ( e.NO_SUCH_OBJECT ):
     *            System.out.println( "The specified entry " + myDN +
     *                                " does not exist in the directory." );
     *            return;
     *        default:
     *            System.out.println( "An internal error occurred." );
     *            return;
     *    }
     * }
     * 
* * @param toGet LDAP URL specifying the entry to read * @return LDAPEntry returns the entry specified by the URL (or raises * an exception if the entry is not found). * @exception LDAPException Failed to read the specified entry from * the directory. * @see netscape.ldap.LDAPUrl * @see netscape.ldap.LDAPConnection#search(netscape.ldap.LDAPUrl) */ public static LDAPEntry read (LDAPUrl toGet) throws LDAPException { String host = toGet.getHost (); int port = toGet.getPort(); if (host == null) { throw new LDAPException ( "no host for connection", LDAPException.PARAM_ERROR ); } String[] attributes = toGet.getAttributeArray (); String DN = toGet.getDN(); LDAPEntry returnValue; LDAPConnection connection = new LDAPConnection (); if (toGet.isSecure()) { LDAPSocketFactory factory = toGet.getSocketFactory(); if (factory == null) { throw new LDAPException("No socket factory for LDAPUrl", LDAPException.OTHER); } connection.setSocketFactory(factory); } connection.connect (host, port); returnValue = connection.read (DN, attributes); connection.disconnect (); return returnValue; } /** * Performs the search specified by the LDAP URL.

* * For example, the following section of code searches for all entries under * the ou=Product Development,o=Ace Industry,c=US subtree of a * directory. The example gets and prints the mail attribute for each entry * found.

* *

     * String flatURL = "ldap://alway.mcom.com:3890/ou=Product Development,o=Ace Industry,c=US?mail?sub?objectclass=*";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "Incorrect URL syntax." );
     *    return;
     * }
     *
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myURL );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getLDAPResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     *
     * while ( myResults.hasMoreElements() ) {
     *    LDAPEntry myEntry = myResults.next();
     *    String nextDN = myEntry.getDN();
     *    System.out.println( nextDN );
     *    LDAPAttributeSet entryAttrs = myEntry.getAttributeSet();
     *    Enumeration attrsInSet = entryAttrs.getAttributes();
     *    while ( attrsInSet.hasMoreElements() ) {
     *        LDAPAttribute nextAttr = (LDAPAttribute)attrsInSet.nextElement();
     *        String attrName = nextAttr.getName();
     *        System.out.print( "\t" + attrName + ": " );
     *        Enumeration valsInAttr = nextAttr.getStringValues();
     *        while ( valsInAttr.hasMoreElements() ) {
     *            String nextValue = (String)valsInAttr.nextElement();
     *            System.out.println( nextValue );
     *        }
     *    }
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param toGet LDAP URL representing the search to perform * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the search specified by * the LDAP URL. * @see netscape.ldap.LDAPUrl * @see netscape.ldap.LDAPSearchResults * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchResults) */ public static LDAPSearchResults search (LDAPUrl toGet) throws LDAPException { return search (toGet, null); } /** * Performs the search specified by the LDAP URL. This method also * allows you to specify constraints for the search (such as the * maximum number of entries to find or the * maximum time to wait for search results).

* * As part of the search constraints, you can specify whether or not you * want the results delivered all at once or in smaller batches. * If you specify the results delivered in smaller * batches, each iteration blocks until the next batch of results is * returned.

* * For example, the following section of code retrieves the first 5 * matching entries for the search specified by the LDAP URL. The * example accomplishes this by creating a new set of search * constraints where the maximum number of search results is 5.

* *

     * LDAPSearchConstraints mySearchConstraints = myConn.getSearchConstraints();
     * mySearchConstraints.setMaxResults( 5 );
     * String flatURL = "ldap://alway.mcom.com:3890/ou=Product Development,o=Ace Industry,c=US?mail?sub?objectclass=*";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "Incorrect URL syntax." );
     *    return;
     * }
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myURL, mySearchConstraints );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getLDAPResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param toGet LDAP URL representing the search to run * @param cons constraints specific to the search * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the search specified * by the LDAP URL. * @see netscape.ldap.LDAPUrl * @see netscape.ldap.LDAPSearchResults * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchResults) */ public static LDAPSearchResults search (LDAPUrl toGet, LDAPSearchConstraints cons) throws LDAPException { String host = toGet.getHost (); int port = toGet.getPort(); if (host == null) { throw new LDAPException ( "no host for connection", LDAPException.PARAM_ERROR ); } String[] attributes = toGet.getAttributeArray (); String DN = toGet.getDN(); String filter = toGet.getFilter(); if (filter == null) { filter = defaultFilter; } int scope = toGet.getScope (); LDAPConnection connection = new LDAPConnection (); if (toGet.isSecure()) { LDAPSocketFactory factory = toGet.getSocketFactory(); if (factory == null) { throw new LDAPException("No socket factory for LDAPUrl", LDAPException.OTHER); } connection.setSocketFactory(factory); } connection.connect (host, port); LDAPSearchResults results; if (cons != null) { results = connection.search (DN, scope, filter, attributes, false, cons); } else { results = connection.search (DN, scope, filter, attributes, false); } results.closeOnCompletion(connection); return results; } /** * Performs the search specified by the criteria that you enter.

* * For example, the following section of code searches for all entries under * the ou=Product Development,o=Ace Industry,c=US subtree of a * directory. The example gets and prints the mail attribute for each entry * found.

* *

     * String myBaseDN = "ou=Product Development,o=Ace Industry,c=US";
     * String myFilter="(objectclass=*)";
     * String[] myAttrs = { "mail" };
     *
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myBaseDN, LDAPv2.SCOPE_SUB, myFilter, myAttrs, false );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getLDAPResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     *
     * while ( myResults.hasMoreElements() ) {
     *    LDAPEntry myEntry = myResults.next();
     *    String nextDN = myEntry.getDN();
     *    System.out.println( nextDN );
     *    LDAPAttributeSet entryAttrs = myEntry.getAttributeSet();
     *    Enumeration attrsInSet = entryAttrs.getAttributes();
     *    while ( attrsInSet.hasMoreElements() ) {
     *        LDAPAttribute nextAttr = (LDAPAttribute)attrsInSet.nextElement();
     *        String attrName = nextAttr.getName();
     *        System.out.println( "\t" + attrName + ":" );
     *        Enumeration valsInAttr = nextAttr.getStringValues();
     *        while ( valsInAttr.hasMoreElements() ) {
     *            String nextValue = (String)valsInAttr.nextElement();
     *            System.out.println( "\t\t" + nextValue );
     *        }
     *    }
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPv2.SCOPE_BASE (search only the base DN)

    *

  • LDAPv2.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPv2.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes that you want returned in the * search results * @param attrsOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the specified search. * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchResults) */ public LDAPSearchResults search( String base, int scope, String filter, String[] attrs, boolean attrsOnly ) throws LDAPException { return search( base, scope, filter, attrs, attrsOnly, m_defaultConstraints); } /** * Performs the search specified by the criteria that you enter. * This method also allows you to specify constraints for the search * (such as the maximum number of entries to find or the * maximum time to wait for search results).

* * As part of the search constraints, you can specify whether or not * you want the * results delivered all at once or in smaller batches. If you * specify that you want the results delivered in smaller batches, * each iteration blocks until the * next batch of results is returned.

* * For example, the following section of code retrieves the first 5 entries * matching the specified search criteria. The example accomplishes * this by creating a new set of search constraints where the maximum * number of search results is 5.

* *

     * String myBaseDN = "ou=Product Development,o=Ace Industry,c=US";
     * String myFilter="(objectclass=*)";
     * String[] myAttrs = { "mail" };
     * LDAPSearchConstraints mySearchConstraints = myConn.getSearchConstraints();
     * mySearchConstraints.setMaxResults( 5 );
     *
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myBaseDN, LDAPv2.SCOPE_SUB, myFilter, myAttrs, false, mySearchConstraints );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getLDAPResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPv2.SCOPE_BASE (search only the base DN)

    *

  • LDAPv2.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPv2.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes to return in the search * results * @param cons constraints specific to this search (for example, the * maximum number of entries to return) * @param attrsOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the specified search. * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchResults) */ public LDAPSearchResults search( String base, int scope, String filter, String[] attrs, boolean attrsOnly, LDAPSearchConstraints cons ) throws LDAPException { if (cons == null) { cons = m_defaultConstraints; } LDAPSearchResults returnValue = new LDAPSearchResults(this, cons, base, scope, filter, attrs, attrsOnly); Vector cacheValue = null; Long key = null; boolean isKeyValid = true; try { // get entry from cache which is a vector of JDAPMessages if (m_cache != null) { // create key for cache entry using search arguments key = m_cache.createKey(getHost(), getPort(),base, filter, scope, attrs, m_boundDN, cons); cacheValue = (Vector)m_cache.getEntry(key); if (cacheValue != null) { return (new LDAPSearchResults(cacheValue, this, cons, base, scope, filter, attrs, attrsOnly)); } } } catch (LDAPException e) { isKeyValid = false; printDebug("Exception: "+e); } checkConnection(/*rebind=*/true); /* Is this a persistent search? */ boolean isPersistentSearch = false; LDAPControl[] controls = (LDAPControl[])getOption(LDAPv3.SERVERCONTROLS, cons); for (int i = 0; (controls != null) && (i < controls.length); i++) { if ( controls[i] instanceof netscape.ldap.controls.LDAPPersistSearchControl ) { isPersistentSearch = true; break; } } // Persistent search is an asynchronous operation LDAPSearchListener myListener = isPersistentSearch ? new LDAPSearchListener(/*asynchOp=*/true, cons) : getSearchListener ( cons ); int deref = cons.getDereference(); JDAPSearchRequest request = null; try { request = new JDAPSearchRequest (base, scope, deref, cons.getMaxResults(), cons.getServerTimeLimit(), attrsOnly, filter, attrs); } catch (IllegalArgumentException e) { throw new LDAPException(e.getMessage(), LDAPException.PARAM_ERROR); } // if using cache, then need to add the key to the search listener. if ((m_cache != null) && (isKeyValid)) { myListener.setKey(key); } try { sendRequest (request, myListener, cons); } catch (LDAPException e) { releaseSearchListener (myListener); throw e; } /* For a persistent search, don't wait for a first result, because there may be none at this time if changesOnly was specified in the control. */ if ( isPersistentSearch ) { returnValue.associatePersistentSearch (myListener); } else if ( cons.getBatchSize() == 0 ) { /* Synchronous search if all requested at once */ try { /* Block until all results are in */ LDAPMessage response = myListener.completeSearchOperation(); Enumeration results = myListener.getAllMessages().elements(); checkSearchMsg(returnValue, response, cons, base, scope, filter, attrs, attrsOnly); while (results.hasMoreElements ()) { LDAPMessage msg = (LDAPMessage)results.nextElement(); checkSearchMsg(returnValue, msg, cons, base, scope, filter, attrs, attrsOnly); } } finally { releaseSearchListener (myListener); } } else { /* * Asynchronous to retrieve one at a time, check to make sure * the search didn't fail */ LDAPMessage firstResult = myListener.nextMessage (); if ( firstResult instanceof LDAPResponse ) { try { checkSearchMsg(returnValue, firstResult, cons, base, scope, filter, attrs, attrsOnly); } finally { releaseSearchListener (myListener); } } else { try { checkSearchMsg(returnValue, firstResult, cons, base, scope, filter, attrs, attrsOnly); } catch ( LDAPException ex ) { releaseSearchListener (myListener); throw ex; } /* we let this listener get garbage collected.. */ returnValue.associate (myListener); } } return returnValue; } void checkSearchMsg(LDAPSearchResults value, LDAPMessage msg, LDAPSearchConstraints cons, String dn, int scope, String filter, String attrs[], boolean attrsOnly) throws LDAPException { value.setMsgID(msg.getMessageID()); try { checkMsg (msg); // not the JDAPResult if (msg.getProtocolOp().getType() != JDAPProtocolOp.SEARCH_RESULT) { value.add (msg); } } catch (LDAPReferralException e) { Vector res = new Vector(); try { performReferrals(e, cons, JDAPProtocolOp.SEARCH_REQUEST, dn, scope, filter, attrs, attrsOnly, null, null, null, res); } catch (LDAPException ex) { if (msg.getProtocolOp() instanceof JDAPSearchResultReference) { // Ignore Search Result Referral Errors ? if (cons.getReferralErrors() == cons.REFERRAL_ERROR_CONTINUE) { return; // Don't want to miss all remaining results } else { throw ex; } } throw ex; } // the size of the vector can be more than 1 because it is possible // to visit more than one referral url to retrieve the entries for (int i=0; itrue if the entry has the value. Returns * false if the entry does not have the value or the * attribute. To represent the value that you want compared, you need * to create an LDAPAttribute object.

* * Note that only string values can be compared.

* * For example, the following section of code checks to see if the entry * "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US" contains * the attribute "mail" with the value "bjensen@aceindustry.com". * *

     * ...
     * LDAPConnection myConn = new LDAPConnection();
     * ...
     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String nameOfAttr = "mail";
     * String valOfAttr = "bjensen@aceindustry.com";
     * LDAPAttribute cmpThisAttr = new LDAPAttribute( nameOfAttr, valOfAttr );
     * boolean hasValue = myConn.compare( myDN, cmpThisAttr );
     * if ( hasValue ) {
     *     System.out.println( "Attribute and value found in entry." );
     * } else {
     *     System.out.println( "Attribute and value not found in entry." );
     * }
     * ...
* * @param DN the distinguished name of the entry to use in * the comparison * @param attr the attribute to compare against the entry. * (The method checks to see if the entry has an attribute with the same name * and value as this attribute.) * @return true if the entry contains the specified attribute and value. * @exception LDAPException Failed to perform the comparison. * @see netscape.ldap.LDAPAttribute */ public boolean compare( String DN, LDAPAttribute attr ) throws LDAPException { return compare(DN, attr, m_defaultConstraints); } public boolean compare( String DN, LDAPAttribute attr, LDAPConstraints cons) throws LDAPException { checkConnection(/*rebind=*/true); LDAPResponseListener myListener = getResponseListener (); Enumeration en = attr.getStringValues(); String val = (String)en.nextElement(); JDAPAVA ass = new JDAPAVA(attr.getName(), val); LDAPMessage response; try { sendRequest (new JDAPCompareRequest (DN, ass), myListener, cons); response = myListener.getResponse (); int resultCode = ((JDAPResult)response.getProtocolOp()).getResultCode(); if (resultCode == JDAPResult.COMPARE_FALSE) { return false; } if (resultCode == JDAPResult.COMPARE_TRUE) { return true; } checkMsg (response); } catch (LDAPReferralException e) { Vector res = new Vector(); performReferrals(e, cons, JDAPProtocolOp.COMPARE_REQUEST, DN, 0, null, null, false, null, null, attr, res); boolean bool = false; if (res.size() > 0) { bool = ((Boolean)res.elementAt(0)).booleanValue(); } return bool; } finally { releaseResponseListener (myListener); } return false; /* this should never be executed */ } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public boolean compare( String DN, LDAPAttribute attr, LDAPSearchConstraints cons) throws LDAPException { return compare(DN, attr, (LDAPConstraints) cons); } /** * Adds an entry to the directory.

* * Before using this method, you need to create an * LDAPEntry object and use it to specify the * distinguished name and attributes of the new entry. Make sure * to specify values for all required attributes in the * entry. If all required attributes are not specified and the LDAP server * checks the entry against the schema, an LDAPException * may be thrown (where the LDAP result code is * OBJECT_CLASS_VIOLATION).

* * For example, the following section of code creates an * LDAPEntry object for a new entry and uses the object * to add the new entry to the directory. Because the definition of * the LDAP inetOrgPerson class specifies that the * cn, sn, and objectclass * attributes are required, these attributes are specified as part * of the new entry. (mail is not required but is shown * here as an example of specifying additional attributes.) *

* *

     * ...
     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     *
     * LDAPAttribute attr1 = new LDAPAttribute( "cn", "Barbara Jensen" );
     * LDAPAttribute attr2 = new LDAPAttribute( "sn", "Jensen" );
     * LDAPAttribute attr3 = new LDAPAttribute( "objectclass", "top" );
     * LDAPAttribute attr4 = new LDAPAttribute( "objectclass", "person" );
     * LDAPAttribute attr5 = new LDAPAttribute( "objectclass", "organizationalPerson" );
     * LDAPAttribute attr6 = new LDAPAttribute( "objectclass", "inetOrgPerson" );
     * LDAPAttribute attr7 = new LDAPAttribute( "mail", "bjensen@aceindustry.com" );
     *
     * LDAPAttributeSet myAttrs = new LDAPAttributeSet();
     * myAttrs.add( attr1 );
     * myAttrs.add( attr2 );
     * myAttrs.add( attr3 );
     * myAttrs.add( attr4 );
     * myAttrs.add( attr5 );
     * myAttrs.add( attr6 );
     * myAttrs.add( attr7 );
     *
     * LDAPEntry myEntry = new LDAPEntry( myDN, myAttrs );
     *
     * myConn.add( myEntry );
     * ... 
* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @exception LDAPException Failed to add the specified entry to the * directory. * @see netscape.ldap.LDAPEntry */ public void add( LDAPEntry entry ) throws LDAPException { add(entry, m_defaultConstraints); } /** * Adds an entry to the directory and allows you to specify preferences * for this LDAP add operation by using an * LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to add the specified entry to the * directory. * @see netscape.ldap.LDAPEntry * @see netscape.ldap.LDAPConstraints */ public void add( LDAPEntry entry, LDAPConstraints cons ) throws LDAPException { checkConnection(/*rebind=*/true); LDAPResponseListener myListener = getResponseListener (); LDAPAttributeSet attrs = entry.getAttributeSet (); LDAPAttribute[] attrList = new LDAPAttribute[attrs.size()]; for( int i = 0; i < attrs.size(); i++ ) { attrList[i] = (LDAPAttribute)attrs.elementAt( i ); } int attrPosition = 0; LDAPMessage response; try { sendRequest (new JDAPAddRequest (entry.getDN(), attrList), myListener, cons); response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.ADD_REQUEST, null, 0, null, null, false, null, entry, null, null); } finally { releaseResponseListener (myListener); } } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void add( LDAPEntry entry, LDAPSearchConstraints cons ) throws LDAPException { add(entry, (LDAPConstraints) cons); } /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol.

* * Note that in order for the extended operation to work, the server * that you are connecting to must support LDAP v3 and must be configured * to process the specified extended operation. * * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see netscape.ldap.LDAPExtendedOperation */ public LDAPExtendedOperation extendedOperation( LDAPExtendedOperation op ) throws LDAPException { return extendedOperation(op, m_defaultConstraints); } /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol. This method allows the * user to set the preferences for the operation.

* * Note that in order for the extended operation to work, the server * that you are connecting to must support LDAP v3 and must be configured * to process the specified extended operation. * * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @param cons preferences for the extended operation * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see netscape.ldap.LDAPExtendedOperation */ public LDAPExtendedOperation extendedOperation( LDAPExtendedOperation op, LDAPConstraints cons) throws LDAPException { checkConnection(/*rebind=*/true); LDAPResponseListener myListener = getResponseListener (); LDAPMessage response = null; byte[] results = null; String resultID; try { sendRequest ( new JDAPExtendedRequest( op.getID(), op.getValue() ), myListener, cons ); response = myListener.getResponse(); checkMsg (response); JDAPExtendedResponse res = (JDAPExtendedResponse)response.getProtocolOp(); results = res.getValue(); resultID = res.getID(); } catch (LDAPReferralException e) { return performExtendedReferrals( e, cons, op ); } finally { releaseResponseListener (myListener); } return new LDAPExtendedOperation( resultID, results ); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public LDAPExtendedOperation extendedOperation( LDAPExtendedOperation op, LDAPSearchConstraints cons) throws LDAPException { return extendedOperation(op, (LDAPConstraints)cons); } /** * Makes a single change to an existing entry in the directory. * For example, changes the value of an attribute, adds a new * attribute value, or removes an existing attribute value.

* * Use the LDAPModification object to specify the change * to make and the LDAPAttribute object * to specify the attribute value to change. The * LDAPModification object allows you add an attribute * value, change an attibute value, or remove an attribute * value.

* * For example, the following section of code changes Barbara Jensen's email * address in the directory to babs@aceindustry.com.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     *
     * LDAPAttribute attrEmail = new LDAPAttribute( "mail", "babs@aceindustry.com" );
     * LDAPModification singleChange = new LDAPModification( LDAPModification.REPLACE, attrEmail );
     *
     * myConn.modify( myEntryDN, singleChange );
     * ... 
* * @param DN the distinguished name of the entry to modify * @param mod a single change to make to the entry * @exception LDAPException Failed to make the specified change to the * directory entry. * @see netscape.ldap.LDAPModification */ public void modify( String DN, LDAPModification mod ) throws LDAPException { modify(DN, mod, m_defaultConstraints); } /** * Makes a single change to an existing entry in the directory and * allows you to specify preferences for this LDAP modify operation * by using an LDAPConstraints object. * For example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN the distinguished name of the entry to modify * @param mod a single change to make to the entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to make the specified change to the * directory entry. * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPConstraints */ public void modify( String DN, LDAPModification mod, LDAPConstraints cons ) throws LDAPException { LDAPModification[] mods = { mod }; modify (DN, mods, cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void modify( String DN, LDAPModification mod, LDAPSearchConstraints cons ) throws LDAPException { modify (DN, mod, (LDAPConstraints)cons); } /** * Makes a set of changes to an existing entry in the directory. * For example, changes attribute values, adds new attribute values, * or removes existing attribute values.

* * Use the LDAPModificationSet object to specify the set * of changes to make. Changes are specified in terms * of attribute values. You must specify each attribute value to modify, add, * or remove by an LDAPAttribute object. *

* * For example, the following section of code changes Barbara Jensen's * title, adds a telephone number to the entry, and removes the room * number from the entry.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     *
     * LDAPModificationSet manyChanges = new LDAPModificationSet();
     * LDAPAttribute attrTelephoneNumber = new LDAPAttribute( "telephoneNumber",
     *                                                        "555-1212" );
     * manyChanges.add( LDAPModification.ADD, attrTelephoneNumber );
     * LDAPAttribute attrRoomNumber = new LDAPAttribute( "roomnumber", "222" );
     * manyChanges.add( LDAPModification.DELETE, attrRoomNumber );
     * LDAPAttribute attrTitle = new LDAPAttribute( "title",
     *                                       "Manager of Product Development" );
     * manyChanges.add( LDAPModification.REPLACE, attrTitle );
     *
     * myConn.modify( myEntryDN, manyChanges );
     * ... 
* * @param DN the distinguished name of the entry to modify * @param mods a set of changes to make to the entry * @exception LDAPException Failed to make the specified changes to the * directory entry. * @see netscape.ldap.LDAPModificationSet */ public void modify (String DN, LDAPModificationSet mods) throws LDAPException { modify(DN, mods, m_defaultConstraints); } /** * Makes a set of changes to an existing entry in the directory and * allows you to specify preferences for this LDAP modify operation * by using an LDAPConstraints object. * For example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN the distinguished name of the entry to modify * @param mods a set of changes to make to the entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to make the specified changes to the * directory entry. * @see netscape.ldap.LDAPModificationSet * @see netscape.ldap.LDAPConstraints */ public void modify (String DN, LDAPModificationSet mods, LDAPConstraints cons) throws LDAPException { LDAPModification[] modList = new LDAPModification[mods.size()]; for( int i = 0; i < mods.size(); i++ ) { modList[i] = mods.elementAt( i ); } modify (DN, modList, cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void modify (String DN, LDAPModificationSet mods, LDAPSearchConstraints cons) throws LDAPException { modify(DN, mods, (LDAPConstraints)cons); } /** * Makes a set of changes to an existing entry in the directory. * For example, changes attribute values, adds new attribute values, * or removes existing attribute values.

* * Use an array of LDAPModification objects to specify the * changes to make. Each change must be specified by * an LDAPModification object, and you must specify each * attribute value to modify, add, or remove by an LDAPAttribute * object.

* * @param DN the distinguished name of the entry to modify * @param mods an array of objects representing the changes to make * to the entry * @exception LDAPException Failed to make the specified changes to the * directory entry. * @see netscape.ldap.LDAPModification */ public void modify (String DN, LDAPModification[] mods) throws LDAPException { modify(DN, mods, m_defaultConstraints); } /** * Makes a set of changes to an existing entry in the directory and * allows you to specify preferences for this LDAP modify operation * by using an LDAPConstraints object. * For example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN the distinguished name of the entry to modify * @param mods an array of objects representing the changes to make * to the entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to make the specified changes to the * directory entry. * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPConstraints */ public void modify (String DN, LDAPModification[] mods, LDAPConstraints cons) throws LDAPException { checkConnection(/*rebind=*/true); LDAPResponseListener myListener = getResponseListener (); LDAPMessage response = null; try { sendRequest (new JDAPModifyRequest (DN, mods), myListener, cons); response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.MODIFY_REQUEST, DN, 0, null, null, false, mods, null, null, null); } finally { releaseResponseListener (myListener); } } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void modify (String DN, LDAPModification[] mods, LDAPSearchConstraints cons) throws LDAPException { modify(DN, mods, (LDAPConstraints)cons); } /** * Deletes the entry for the specified DN from the directory.

* * For example, the following section of code deletes the entry for * Barbara Jensen from the directory.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * myConn.delete( myEntryDN );
     * ... 
* * @param DN distinguished name identifying the entry * to remove from the directory * @exception LDAPException Failed to delete the specified entry from * the directory. */ public void delete( String DN ) throws LDAPException { delete(DN, m_defaultConstraints); } /** * Deletes the entry for the specified DN from the directory and * allows you to specify preferences for this LDAP delete operation * by using an LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN distinguished name identifying the entry * to remove from the directory * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to delete the specified entry from * the directory. * @see netscape.ldap.LDAPConstraints */ public void delete( String DN, LDAPConstraints cons ) throws LDAPException { checkConnection(/*rebind=*/true); LDAPResponseListener myListener = getResponseListener (); LDAPMessage response; try { sendRequest (new JDAPDeleteRequest (DN), myListener, cons); response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.DEL_REQUEST, DN, 0, null, null, false, null, null, null, null); } finally { releaseResponseListener (myListener); } } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void delete( String DN, LDAPSearchConstraints cons ) throws LDAPException { delete(DN, (LDAPConstraints)cons); } /** * Renames an existing entry in the directory.

* * You can specify whether or not the original name of the entry is * retained as a value in the entry. For example, suppose you rename * the entry "cn=Barbara" to "cn=Babs". You can keep "cn=Barbara" * as a value in the entry so that the cn attribute has two values:

* *

     *       cn=Barbara
     *       cn=Babs
     * 
* The following example renames an entry. The old name of the entry * is kept as a value in the entry.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String newRDN = "cn=Babs Jensen";
     * myConn.rename( myEntryDN, newRDN, false );
     * ... 
* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @exception LDAPException Failed to rename the specified entry. */ public void rename (String DN, String newRDN, boolean deleteOldRDN ) throws LDAPException { rename(DN, newRDN, null, deleteOldRDN); } /** * Renames an existing entry in the directory.

* * You can specify whether or not the original name of the entry is * retained as a value in the entry. For example, suppose you rename * the entry "cn=Barbara" to "cn=Babs". You can keep "cn=Barbara" * as a value in the entry so that the cn attribute has two values:

* *

     *       cn=Barbara
     *       cn=Babs
     * 
* The following example renames an entry. The old name of the entry * is kept as a value in the entry.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String newRDN = "cn=Babs Jensen";
     * myConn.rename( myEntryDN, newRDN, false );
     * ... 
* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to rename the specified entry. */ public void rename (String DN, String newRDN, boolean deleteOldRDN, LDAPConstraints cons ) throws LDAPException { rename(DN, newRDN, null, deleteOldRDN, cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void rename (String DN, String newRDN, boolean deleteOldRDN, LDAPSearchConstraints cons ) throws LDAPException { rename(DN, newRDN, deleteOldRDN, (LDAPConstraints)cons); } /** * Renames an existing entry in the directory and (optionally) * changes the location of the entry in the directory tree.

* * NOTE: Netscape Directory Server 3.0 does not support the * capability to move an entry to a different location in the * directory tree. If you specify a value for the newParentDN * argument, an LDAPException will be thrown. *

* * @param dn current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param newParentDN if not null, the distinguished name for the * entry under which the entry should be moved (for example, to move * an entry under the Accounting subtree, specify this argument as * "ou=Accounting, o=Ace Industry, c=US") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @exception LDAPException Failed to rename the specified entry. */ public void rename(String dn, String newRDN, String newParentDN, boolean deleteOldRDN) throws LDAPException { rename(dn, newRDN, newParentDN, deleteOldRDN, m_defaultConstraints); } /** * Renames an existing entry in the directory and (optionally) * changes the location of the entry in the directory tree. Also * allows you to specify preferences for this LDAP modify DN operation * by using an LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * NOTE: Netscape Directory Server 3.0 does not support the * capability to move an entry to a different location in the * directory tree. If you specify a value for the newParentDN * argument, an LDAPException will be thrown. *

* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param newParentDN if not null, the distinguished name for the * entry under which the entry should be moved (for example, to move * an entry under the Accounting subtree, specify this argument as * "ou=Accounting, o=Ace Industry, c=US") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to rename the specified entry. * @see netscape.ldap.LDAPConstraints */ public void rename (String DN, String newRDN, String newParentDN, boolean deleteOldRDN, LDAPConstraints cons) throws LDAPException { checkConnection(/*rebind=*/true); LDAPResponseListener myListener = getResponseListener (); try { JDAPModifyRDNRequest request = null; if ( newParentDN != null ) { request = new JDAPModifyRDNRequest (DN, newRDN, deleteOldRDN, newParentDN); } else { request = new JDAPModifyRDNRequest (DN, newRDN, deleteOldRDN); } sendRequest (request, myListener, cons); LDAPMessage response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.MODIFY_RDN_REQUEST, DN, 0, newRDN, null, deleteOldRDN, null, null, null, null); } finally { releaseResponseListener (myListener); } } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public void rename (String DN, String newRDN, String newParentDN, boolean deleteOldRDN, LDAPSearchConstraints cons) throws LDAPException { rename(DN, newRDN, newParentDN, deleteOldRDN, (LDAPConstraints)cons); } /** * Adds an entry to the directory. * * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPEntry * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener add(LDAPEntry entry, LDAPResponseListener listener) throws LDAPException{ return add(entry, listener, m_defaultConstraints); } /** * Adds an entry to the directory and allows you to specify constraints * for this LDAP add operation by using an LDAPConstraints * object. For example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPEntry * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener add(LDAPEntry entry, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } LDAPAttributeSet attrs = entry.getAttributeSet (); LDAPAttribute[] attrList = new LDAPAttribute[attrs.size()]; for( int i = 0; i < attrs.size(); i++ ) attrList[i] = (LDAPAttribute)attrs.elementAt( i ); int attrPosition = 0; sendRequest (new JDAPAddRequest (entry.getDN(), attrList), listener, cons); return listener; } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param version required LDAP protocol version * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener bind(int version, String dn, String passwd, LDAPResponseListener listener) throws LDAPException{ return bind(version, dn, passwd, listener, m_defaultConstraints); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener bind(String dn, String passwd, LDAPResponseListener listener) throws LDAPException{ return bind(m_protocolVersion, dn, passwd, listener, m_defaultConstraints); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener bind(String dn, String passwd, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ return bind( m_protocolVersion, dn, passwd, listener, cons ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param version required LDAP protocol version * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener bind(int version, String dn, String passwd, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ return authenticate( version, dn, passwd, listener, cons ); } /** * Deletes the entry for the specified DN from the directory. * * @param dn distinguished name of the entry to delete * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener delete(String dn, LDAPResponseListener listener) throws LDAPException{ return delete(dn, listener, m_defaultConstraints); } /** * Deletes the entry for the specified DN from the directory. * * @param dn distinguished name of the entry to delete * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener delete(String dn, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } sendRequest (new JDAPDeleteRequest(dn), listener, cons); return listener; } /** * Makes a single change to an existing entry in the directory. * For example, changes the value of an attribute, adds a new attribute * value, or removes an existing attribute value.
* The LDAPModification object specifies both the change to make and * the LDAPAttribute value to be changed. * * @param dn distinguished name of the entry to modify * @param mod a single change to make to an entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener modify(String dn, LDAPModification mod, LDAPResponseListener listener) throws LDAPException{ return modify(dn, mod, listener, m_defaultConstraints); } /** * Makes a single change to an existing entry in the directory. * For example, changes the value of an attribute, adds a new attribute * value, or removes an existing attribute value.
* The LDAPModification object specifies both the change to make and * the LDAPAttribute value to be changed. * * @param dn distinguished name of the entry to modify * @param mod a single change to make to an entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModification * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener modify(String dn, LDAPModification mod, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } LDAPModification[] modList = { mod }; sendRequest (new JDAPModifyRequest (dn, modList), listener, cons); return listener; } /** * Makes a set of changes to an existing entry in the directory. * For example, changes attribute values, adds new attribute values, or * removes existing attribute values. *

* @param dn distinguished name of the entry to modify * @param mods a set of changes to make to the entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModificationSet * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener modify(String dn, LDAPModificationSet mods, LDAPResponseListener listener) throws LDAPException{ return modify(dn,mods, listener, m_defaultConstraints); } /** * Makes a set of changes to an existing entry in the directory. * For example, changes attribute values, adds new attribute values, or * removes existing attribute values). * * @param dn distinguished name of the entry to modify * @param mods a set of changes to make to the entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons Constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPModificationSet * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener modify(String dn, LDAPModificationSet mods, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } LDAPModification[] modList = new LDAPModification[mods.size()]; for( int i = 0; i < mods.size(); i++ ) { modList[i] = mods.elementAt( i ); } sendRequest (new JDAPModifyRequest (dn, modList), listener, cons); return listener; } /** * Renames an existing entry in the directory. * * @param dn current distinguished name of the entry * @param newRdn new relative distinguished name for the entry * @param deleteOldRdn if true, the old name is not retained as an * attribute value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener */ public LDAPResponseListener rename(String dn, String newRdn, boolean deleteOldRdn, LDAPResponseListener listener) throws LDAPException{ return rename(dn, newRdn, deleteOldRdn, listener, m_defaultConstraints); } /** * Renames an existing entry in the directory. * * @param dn current distinguished name of the entry * @param newRdn new relative distinguished name for the entry * @param deleteOldRdn if true, the old name is not retained as an attribute * value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPResponseListener * @see netscape.ldap.LDAPConstraints */ public LDAPResponseListener rename(String dn, String newRdn, boolean deleteOldRdn, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException{ if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } sendRequest (new JDAPModifyRDNRequest (dn, newRdn, deleteOldRdn), listener, cons); return listener; } /** * Performs the search specified by the criteria that you enter.

* To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPv2.SCOPE_BASE (search only the base DN)

    *

  • LDAPv2.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPv2.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes that you want returned in the * search results * @param typesOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPSearchListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchListener) */ public LDAPSearchListener search(String base, int scope, String filter, String attrs[], boolean typesOnly, LDAPSearchListener listener) throws LDAPException { return search(base, scope, filter, attrs, typesOnly, listener, m_defaultConstraints); } /** * Performs the search specified by the criteria that you enter. * This method also allows you to specify constraints for the search * (such as the maximum number of entries to find or the * maximum time to wait for search results).

* To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPv2.SCOPE_BASE (search only the base DN)

    *

  • LDAPv2.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPv2.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes that you want returned in the search * results * @param typesOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found. * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to this search (for example, the * maximum number of entries to return) * @return LDAPSearchListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see netscape.ldap.LDAPConnection#abandon(netscape.ldap.LDAPSearchListener) */ public LDAPSearchListener search(String base, int scope, String filter, String attrs[], boolean typesOnly, LDAPSearchListener listener, LDAPSearchConstraints cons) throws LDAPException { if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPSearchListener(/*asynchOp=*/true, cons); } JDAPSearchRequest request = null; try { request = new JDAPSearchRequest (base, scope, cons.getDereference(), cons.getMaxResults(), cons.getServerTimeLimit(), typesOnly, filter, attrs); } catch (IllegalArgumentException e) { throw new LDAPException(e.getMessage(), LDAPException.PARAM_ERROR); } sendRequest (request, listener, cons); return listener; } /** * Compare an attribute value with one in the directory. The result can * be obtained by calling getResultCode on the * LDAPResponse from the LDAPResponseListener. * The code will be LDAPException.COMPARE_TRUE or * LDAPException.COMPARE_FALSE. * * @param dn distinguished name of the entry to compare * @param attr attribute with a value to compare * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. */ public LDAPResponseListener compare(String dn, LDAPAttribute attr, LDAPResponseListener listener) throws LDAPException { return compare(dn, attr, listener, m_defaultConstraints); } /** * Compare an attribute value with one in the directory. The result can * be obtained by calling getResultCode on the * LDAPResponse from the LDAPResponseListener. * The code will be LDAPException.COMPARE_TRUE or * LDAPException.COMPARE_FALSE. * * @param dn distinguished name of the entry to compare * @param attr attribute with a value to compare * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to this operation * @return LDAPResponseListener handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. */ public LDAPResponseListener compare(String dn, LDAPAttribute attr, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException { if (cons == null) { cons = m_defaultConstraints; } checkConnection(/*rebind=*/true); if (listener == null) { listener = new LDAPResponseListener(/*asynchOp=*/true); } Enumeration en = attr.getStringValues(); String val = (String)en.nextElement(); JDAPAVA ava = new JDAPAVA(attr.getName(), val); sendRequest (new JDAPCompareRequest (dn, ava), listener, cons); return listener; } /** * Cancels the ldap request with the specified id and discards * any results already received. * * @param id an LDAP request id * @exception LDAPException Failed to send request. */ public void abandon(int id) throws LDAPException { if (!isConnected()) { return; } try { /* Tell listener thread to discard results and send an abandon request */ LDAPControl ctrls[] = m_defaultConstraints.getServerControls(); m_thread.abandon( id, ctrls ); } catch (Exception ignore) {} } /** * Cancels all outstanding search requests associated with this * LDAPSearchListener object and discards any results already received. * * @param searchlistener a search listener returned from a search * @exception LDAPException Failed to send request. */ public void abandon(LDAPSearchListener searchlistener)throws LDAPException { int[] ids = searchlistener.getMessageIDs(); for (int i=0; i < ids.length; i++) { searchlistener.removeRequest(ids[i]); abandon(ids[i]); } } /** * Returns the value of the specified option for this * LDAPConnection object.

* * These options represent the constraints for the current connection. * To get all constraints for the current connection, call the * getSearchConstraints method. *

* * By default, the constraints apply to all operations performed * through the current connection. You can change these constraints: *

* *

    *
  • If you want to set a constraint only for a particular operation, * create an LDAPConstraints object (or a * LDAPSearchConstraints object for a search or find operation) * with your new constraints * and pass it to the LDAPConnection method that performs the * operation. *

    * *

  • If you want to override these constraints for all operations * performed under the current connection, call the * setOption method to change the constraint. *

    * *

*

* * For example, the following section of code gets and prints the * maximum number of search results that are returned for searches * performed through this connection. (This applies to all searches * unless a different set of search constraints is specified in an * LDAPSearchConstraints object.) *

* *

     * LDAPConnection ld = new LDAPConnection();
     * int sizeLimit = ( (Integer)ld.getOption( LDAPv2.SIZELIMIT ) ).intValue();
     * System.out.println( "Maximum number of results: " + sizeLimit );
     * 
* * @param option you can specify one of the following options: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OptionData TypeDescription
* LDAPv2.PROTOCOL_VERSIONIntegerSpecifies the version of the LDAP protocol used by the * client. *

By default, the value of this option is 2.

* LDAPv2.DEREFIntegerSpecifies when your client dereferences aliases. *
     * Legal values for this option are:
     *
     * DEREF_NEVER       Aliases are never dereferenced.
     *
     * DEREF_FINDING     Aliases are dereferenced when find-
     *                   ing the starting point for the
     *                   search (but not when searching
     *                   under that starting entry).
     *
     * DEREF_SEARCHING   Aliases are dereferenced when
     *                   searching the entries beneath the
     *                   starting point of the search (but
     *                   not when finding the starting
     *                   entry).
     *
     * DEREF_ALWAYS      Aliases are always dereferenced.
     *
*

By default, the value of this option is * DEREF_NEVER.

* LDAPv2.SIZELIMITIntegerSpecifies the maximum number of search results to return. * If this option is set to 0, there is no maximum limit. *

By default, the value of this option is 1000.

* LDAPv2.TIMELIMITIntegerSpecifies the maximum number of milliseconds to wait for results * before timing out. If this option is set to 0, there is no maximum * time limit. *

By default, the value of this option is 0.

* LDAPv2.REFERRALSBooleanSpecifies whether or not your client follows referrals automatically. * If true, your client follows referrals automatically. * If false, an LDAPReferralException is raised * when referral is detected. *

By default, the value of this option is false.

* LDAPv2.REFERRALS_REBIND_PROCLDAPRebindSpecifies an object with a class that implements the * LDAPRebind interface. You must define this class and * the getRebindAuthentication method that will be used to * get the distinguished name and password to use for authentication. * Modifying this option sets the LDAPv2.BIND option to null. *

By default, the value of this option is null.

* LDAPv2.BINDLDAPBindSpecifies an object with a class that implements the * LDAPBind * interface. You must define this class and the * bind method that will be used to authenticate * to the server on referrals. Modifying this option sets the * LDAPv2.REFERRALS_REBIND_PROC to null. *

By default, the value of this option is null.

* LDAPv2.REFERRALS_HOP_LIMITIntegerSpecifies the maximum number of referrals in a sequence that * your client will follow. (For example, if REFERRALS_HOP_LIMIT is 5, * your client will follow no more than 5 referrals in a row when resolving * a single LDAP request.) *

By default, the value of this option is 10.

* LDAPv2.BATCHSIZEIntegerSpecifies the number of search results to return at a time. * (For example, if BATCHSIZE is 1, results are returned one at a time.) *

By default, the value of this option is 1.

* LDAPv3.CLIENTCONTROLSLDAPControl[]Specifies the client controls that may affect the handling of LDAP * operations in the LDAP classes. These controls are used by the client * and are not passed to the LDAP server. At this time, no client controls * are defined for clients built with the Netscape LDAP classes.
* LDAPv3.SERVERCONTROLSLDAPControl[]Specifies the server controls that are passed to the LDAP * server on each LDAP operation. Not all servers support server * controls; a particular server may or may not support a given * server control.
* MAXBACKLOGIntegerSpecifies the maximum number of search results to accumulate in an * LDAPSearchResults before suspending the reading of input from the server. *

By default, the value of this option is 100. The value 0 means there * is no limit.

* @return the value for the option wrapped in an object. (You * need to cast the returned value as its appropriate type. For * example, when getting the SIZELIMIT option, cast the returned * value as an Integer.) * @exception LDAPException Failed to get the specified option. * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPConstraints * @see netscape.ldap.LDAPSearchConstraints * @see netscape.ldap.LDAPReferralException * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConnection#getSearchConstraints * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public Object getOption( int option ) throws LDAPException { if (option == LDAPv2.PROTOCOL_VERSION) { return new Integer(m_protocolVersion); } return getOption(option, m_defaultConstraints); } private static Object getOption( int option, LDAPSearchConstraints cons ) throws LDAPException { switch (option) { case LDAPv2.DEREF: return new Integer (cons.getDereference()); case LDAPv2.SIZELIMIT: return new Integer (cons.getMaxResults()); case LDAPv2.TIMELIMIT: return new Integer (cons.getServerTimeLimit()); case LDAPv2.REFERRALS: return new Boolean (cons.getReferrals()); case LDAPv2.REFERRALS_REBIND_PROC: return cons.getRebindProc(); case LDAPv2.BIND: return cons.getBindProc(); case LDAPv2.REFERRALS_HOP_LIMIT: return new Integer (cons.getHopLimit()); case LDAPv2.BATCHSIZE: return new Integer (cons.getBatchSize()); case LDAPv3.CLIENTCONTROLS: return cons.getClientControls(); case LDAPv3.SERVERCONTROLS: return cons.getServerControls(); case MAXBACKLOG: return new Integer (cons.getMaxBacklog()); default: throw new LDAPException ( "invalid option", LDAPException.PARAM_ERROR ); } } /** * Sets the value of the specified option for this * LDAPConnection object.

* * These options represent the constraints for the current * connection. * To get all constraints for the current connection, call the * getSearchConstraints method. *

* * By default, the option that you set applies to all subsequent * operations performed through the current connection. If you want to * set a constraint only for a particular operation, create an * LDAPConstraints object (or a * LDAPSearchConstraints object for a search or find operation) * with your new constraints * and pass it to the LDAPConnection method that performs the * operation. *

* * For example, the following section of code changes the constraint for * the maximum number of search results that are returned for searches * performed through this connection. (This applies to all searches * unless a different set of search constraints is specified in an * LDAPSearchConstraints object.) *

* *

     * LDAPConnection ld = new LDAPConnection();
     * Integer newLimit = new Integer( 20 );
     * ld.setOption( LDAPv2.SIZELIMIT, newLimit );
     * System.out.println( "Changed the maximum number of results to " + newLimit.intValue() );
     * 
* * @param option you can specify one of the following options: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OptionData TypeDescription
* LDAPv2.PROTOCOL_VERSIONIntegerSpecifies the version of the LDAP protocol used by the * client. *

By default, the value of this option is 2. If you want * to use LDAP v3 features (such as extended operations or * controls), you need to set this value to 3.

* LDAPv2.DEREFIntegerSpecifies when your client dereferences aliases. *
     * Legal values for this option are:
     *
     * DEREF_NEVER       Aliases are never dereferenced.
     *
     * DEREF_FINDING     Aliases are dereferenced when find-
     *                   ing the starting point for the
     *                   search (but not when searching
     *                   under that starting entry).
     *
     * DEREF_SEARCHING   Aliases are dereferenced when
     *                   searching the entries beneath the
     *                   starting point of the search (but
     *                   not when finding the starting
     *                   entry).
     *
     * DEREF_ALWAYS      Aliases are always dereferenced.
     *
*

By default, the value of this option is * DEREF_NEVER.

* LDAPv2.SIZELIMITIntegerSpecifies the maximum number of search results to return. * If this option is set to 0, there is no maximum limit. *

By default, the value of this option is 1000.

* LDAPv2.TIMELIMITIntegerSpecifies the maximum number of milliseconds to wait for results * before timing out. If this option is set to 0, there is no maximum * time limit. *

By default, the value of this option is 0.

* LDAPv2.REFERRALSBooleanSpecifies whether or not your client follows referrals automatically. * If true, your client follows referrals automatically. * If false, an LDAPReferralException is * raised when a referral is detected. *

By default, the value of this option is false.

* LDAPv2.REFERRALS_REBIND_PROCLDAPRebindSpecifies an object with a class that implements the * LDAPRebind * interface. You must define this class and the * getRebindAuthentication method that will be used to get * the distinguished name and password to use for authentication. * Modifying this option sets the LDAPv2.BIND option to null. *

By default, the value of this option is null.

* LDAPv2.BINDLDAPBindSpecifies an object with a class that implements the * LDAPBind * interface. You must define this class and the * bind method that will be used to autheniticate * to the server on referrals. Modifying this option sets the * LDAPv2.REFERRALS_REBIND_PROC to null. *

By default, the value of this option is null.

* LDAPv2.REFERRALS_HOP_LIMITIntegerSpecifies the maximum number of referrals in a sequence that * your client will follow. (For example, if REFERRALS_HOP_LIMIT is 5, * your client will follow no more than 5 referrals in a row when resolving * a single LDAP request.) *

By default, the value of this option is 10.

* LDAPv2.BATCHSIZEIntegerSpecifies the number of search results to return at a time. * (For example, if BATCHSIZE is 1, results are returned one at a time.) *

By default, the value of this option is 1.

* LDAPv3.CLIENTCONTROLSLDAPControl[]Specifies the client controls that may affect handling of LDAP * operations in the LDAP classes. These controls are used by the client * and are not passed to the server. At this time, no client controls * are defined for clients built with the Netscape LDAP classes.
* LDAPv3.SERVERCONTROLSLDAPControl[]Specifies the server controls that are passed to the LDAP * server on each LDAP operation. Not all servers support server * controls; a particular server may or may not support a particular * control.
* MAXBACKLOGIntegerSpecifies the maximum number of search results to accumulate in an * LDAPSearchResults before suspending the reading of input from the server. *

By default, the value of this option is 100. The value 0 means there * is no limit.

* @param value the value to assign to the option. The value must be * the java.lang object wrapper for the appropriate parameter * (e.g. boolean->Boolean, * integer->Integer) * @exception LDAPException Failed to set the specified option. * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPConstraints * @see netscape.ldap.LDAPSearchConstraints * @see netscape.ldap.LDAPReferralException * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConnection#getSearchConstraints * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public void setOption( int option, Object value ) throws LDAPException { if (option == LDAPv2.PROTOCOL_VERSION) { setProtocolVersion(((Integer)value).intValue()); return; } setOption(option, value, m_defaultConstraints); } private static void setOption( int option, Object value, LDAPSearchConstraints cons ) throws LDAPException { try { switch (option) { case LDAPv2.DEREF: cons.setDereference(((Integer)value).intValue()); return; case LDAPv2.SIZELIMIT: cons.setMaxResults(((Integer)value).intValue()); return; case LDAPv2.TIMELIMIT: cons.setTimeLimit(((Integer)value).intValue()); return; case LDAPv2.SERVER_TIMELIMIT: cons.setServerTimeLimit(((Integer)value).intValue()); return; case LDAPv2.REFERRALS: cons.setReferrals(((Boolean)value).booleanValue()); return; case LDAPv2.BIND: cons.setBindProc((LDAPBind)value); return; case LDAPv2.REFERRALS_REBIND_PROC: cons.setRebindProc((LDAPRebind)value); return; case LDAPv2.REFERRALS_HOP_LIMIT: cons.setHopLimit(((Integer)value).intValue()); return; case LDAPv2.BATCHSIZE: cons.setBatchSize(((Integer)value).intValue()); return; case LDAPv3.CLIENTCONTROLS: if ( value == null ) cons.setClientControls( (LDAPControl[]) null ); else if ( value instanceof LDAPControl ) cons.setClientControls( (LDAPControl) value ); else if ( value instanceof LDAPControl[] ) cons.setClientControls( (LDAPControl[])value ); else throw new LDAPException ( "invalid LDAPControl", LDAPException.PARAM_ERROR ); return; case LDAPv3.SERVERCONTROLS: if ( value == null ) cons.setServerControls( (LDAPControl[]) null ); else if ( value instanceof LDAPControl ) cons.setServerControls( (LDAPControl) value ); else if ( value instanceof LDAPControl[] ) cons.setServerControls( (LDAPControl[])value ); else throw new LDAPException ( "invalid LDAPControl", LDAPException.PARAM_ERROR ); return; case MAXBACKLOG: cons.setMaxBacklog(((Integer)value).intValue()); return; default: throw new LDAPException ("invalid option", LDAPException.PARAM_ERROR ); } } catch (ClassCastException cc) { throw new LDAPException ("invalid option value", LDAPException.PARAM_ERROR ); } } /** * Returns an array of the latest controls (if any) from server. *

* To retrieve the controls from a search result, call the * getResponseControls method from the LDAPSearchResults * object returned with the result. * @return an array of the controls returned by an operation, or * null if none. * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPSearchResults#getResponseControls */ public LDAPControl[] getResponseControls() { LDAPControl[] controls = null; Thread caller = Thread.currentThread(); /* Get the latest controls for the caller thread */ synchronized(m_responseControlTable) { ResponseControls rspCtrls = (ResponseControls) m_responseControlTable.get(caller); if (rspCtrls != null) { Vector v = rspCtrls.ctrls; controls = (LDAPControl[]) v.elementAt(0); v.removeElementAt(0); if (v.size() == 0) { m_responseControlTable.remove(caller); } } } return controls; } /** * Returns an array of the latest controls associated with the * particular request. Used internally by LDAPSearchResults to * get response controls returned for a search request. *

* @param msdid Message ID */ LDAPControl[] getResponseControls(int msgID) { LDAPControl[] controls = null; synchronized(m_responseControlTable) { Enumeration itr = m_responseControlTable.keys(); while (itr.hasMoreElements()) { Object client = itr.nextElement(); ResponseControls rspCtrls = (ResponseControls)m_responseControlTable.get(client); if (msgID == rspCtrls.msgID) { Vector v = rspCtrls.ctrls; controls = (LDAPControl[]) v.elementAt(0); v.removeElementAt(0); if (v.size() == 0) { m_responseControlTable.remove(client); } break; } } } return controls; } /** * Returns the set of constraints that apply to all operations * performed through this connection (unless you specify a different * set of constraints when calling a method). *

* * Note that if you want to get individual constraints (rather than * getting the * entire set of constraints), call the getOption method. *

* * Typically, you might call the getConstraints method * to create a slightly different set of constraints for a particular * operation. *

* * For example, the following section of code changes the timeout * to 3000 milliseconds for a specific rename. Rather than construct a new * set of constraints from scratch, the example gets the current * settings for the connections and just changes the setting for the * timeout. *

* * Note that this change only applies to the searches performed with this * custom set of constraints. All other searches performed through this * connection use the original set of search constraints. *

* *

     * ...
     * LDAPConstraints myOptions = ld.getConstraints();
     * myOptions.setTimeout( 3000 );
     * ld.search( "cn=William Jensen, ou=Accounting, o=Ace Industry,c=US",
     *            "cn=Will Jensen",
     *            null,
     *            false,
     *            myOptions );
     * ...
     * 
* * @return a copy of the LDAPConstraints object representing the * set of constraints that apply (by default) to all operations * performed through this connection. * @see netscape.ldap.LDAPConstraints * @see netscape.ldap.LDAPConnection#getOption */ public LDAPConstraints getConstraints () { return (LDAPConstraints)getSearchConstraints(); } /** * Returns the set of search constraints that apply to all searches * performed through this connection (unless you specify a different * set of search constraints when calling the search * method). *

* * Note that if you want to get individual constraints (rather than * getting the * entire set of constraints), call the getOption method. *

* * Typically, you might call the getSearchConstraints method * to create a slightly different set of search constraints * to apply to a particular search. *

* * For example, the following section of code changes the maximum number * of results to 10 for a specific search. Rather than construct a new * set of search constraints from scratch, the example gets the current * settings for the connections and just changes the setting for the * maximum results. *

* * Note that this change only applies to the searches performed with this * custom set of constraints. All other searches performed through this * connection use the original set of search constraints. *

* *

     * ...
     * LDAPSearchConstraints myOptions = ld.getSearchConstraints();
     * myOptions.setMaxResults( 10 );
     * String[] myAttrs = { "objectclass" };
     * LDAPSearchResults myResults = ld.search( "o=Ace Industry,c=US",
     *                                          LDAPv2.SCOPE_SUB,
     *                                          "(objectclass=*)",
     *                                          myAttrs,
     *                                          false,
     *                                          myOptions );
     * ...
     * 
* * @return a copy of the LDAPSearchConstraints object * representing the set of search constraints that apply (by default) to * all searches performed through this connection. * @see netscape.ldap.LDAPSearchConstraints * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public LDAPSearchConstraints getSearchConstraints () { return (LDAPSearchConstraints)m_defaultConstraints.clone(); } /** * Set the default constraint set for all operations. * @param cons LDAPConstraints object to use as the default * constraint set * @see netscape.ldap.LDAPConnection#getConstraints * @see netscape.ldap.LDAPConstraints */ public void setConstraints(LDAPConstraints cons) { m_defaultConstraints.setHopLimit(cons.getHopLimit()); m_defaultConstraints.setReferrals(cons.getReferrals()); m_defaultConstraints.setTimeLimit(cons.getTimeLimit()); m_defaultConstraints.setBindProc(cons.getBindProc()); m_defaultConstraints.setRebindProc(cons.getRebindProc()); LDAPControl[] tClientControls = cons.getClientControls(); LDAPControl[] oClientControls = null; if ( (tClientControls != null) && (tClientControls.length > 0) ) { oClientControls = new LDAPControl[tClientControls.length]; for( int i = 0; i < tClientControls.length; i++ ) { oClientControls[i] = (LDAPControl)tClientControls[i].clone(); } } m_defaultConstraints.setClientControls(oClientControls); LDAPControl[] tServerControls = cons.getServerControls(); LDAPControl[] oServerControls = null; if ( (tServerControls != null) && (tServerControls.length > 0) ) { oServerControls = new LDAPControl[tServerControls.length]; for( int i = 0; i < tServerControls.length; i++ ) { oServerControls[i] = (LDAPControl)tServerControls[i].clone(); } } m_defaultConstraints.setServerControls(oServerControls); } /** * Set the default constraint set for all search operations. * @param cons LDAPSearchConstraints object to use as the * default constraint set * @see netscape.ldap.LDAPConnection#getSearchConstraints * @see netscape.ldap.LDAPSearchConstraints */ public void setSearchConstraints(LDAPSearchConstraints cons) { m_defaultConstraints = (LDAPSearchConstraints)cons.clone(); } /** * Gets the stream for reading from the listener socket * * @return the stream for reading from the listener socket, or * null if there is none */ public InputStream getInputStream() { return (m_thread != null) ? m_thread.getInputStream() : null; } /** * Sets the stream for reading from the listener socket if * there is one * * @param is the stream for reading from the listener socket */ public void setInputStream( InputStream is ) { if ( m_thread != null ) { m_thread.setInputStream( is ); } } /** * Gets the stream for writing to the socket * * @return the stream for writing to the socket, or * null if there is none */ public OutputStream getOutputStream() { return (m_thread != null) ? m_thread.getOutputStream() : null; } /** * Sets the stream for writing to the socket * * @param os the stream for writing to the socket, if there is one */ public void setOutputStream( OutputStream os ) { if ( m_thread != null ) { m_thread.setOutputStream( os ); } } /** * Get a new listening agent from the internal buffer of available agents. * These objects are used to make the asynchronous LDAP operations * synchronous. * @return response listener object */ synchronized LDAPResponseListener getResponseListener () { if (m_responseListeners == null) { m_responseListeners = new Vector (5); } LDAPResponseListener l; if ( m_responseListeners.size() < 1 ) { l = new LDAPResponseListener ( /*asynchOp=*/false ); } else { l = (LDAPResponseListener)m_responseListeners.elementAt (0); m_responseListeners.removeElementAt (0); } return l; } /** * Get a new search listening agent from the internal buffer of available * agents. These objects are used to make the asynchronous LDAP operations * synchronous. * @return a search response listener object */ private synchronized LDAPSearchListener getSearchListener ( LDAPSearchConstraints cons ) { if (m_searchListeners == null) { m_searchListeners = new Vector (5); } LDAPSearchListener l; if ( m_searchListeners.size() < 1 ) { l = new LDAPSearchListener ( /*asynchOp=*/false, cons ); } else { l = (LDAPSearchListener)m_searchListeners.elementAt (0); m_searchListeners.removeElementAt (0); l.setSearchConstraints(cons); } return l; } /** * Put a listening agent into the internal buffer of available agents. * These objects are used to make the asynchronous LDAP operations * synchronous. * @param l listener to buffer */ synchronized void releaseResponseListener (LDAPResponseListener l) { if (m_responseListeners == null) { m_responseListeners = new Vector (5); } l.reset (); m_responseListeners.addElement (l); } /** * Put a search listening agent into the internal buffer of available * agents. These objects are used to make the asynchronous LDAP * operations synchronous. * @param l listener to buffer */ synchronized void releaseSearchListener (LDAPSearchListener l) { if (l.isAsynchOp()) { // persistent search return; } if (m_searchListeners == null) { m_searchListeners = new Vector (5); } l.reset (); m_searchListeners.addElement (l); } /** * Checks the message (assumed to be a return value). If the resultCode * is anything other than SUCCESS, it throws an LDAPException describing * the server's (error) response. * Extract response controls from the message, if any avaialble. * @param m server response to validate * @exception LDAPException failed to check message */ void checkMsg (LDAPMessage m) throws LDAPException { // Check for response controls LDAPControl[] ctrls = m.getControls(); if (ctrls != null) { int msgID = m.getMessageID(); setResponseControls(Thread.currentThread(), msgID, ctrls); } if (m.getProtocolOp() instanceof JDAPResult) { JDAPResult response = (JDAPResult)(m.getProtocolOp()); int resultCode = response.getResultCode (); if (resultCode == JDAPResult.SUCCESS) { return; } if (resultCode == JDAPResult.REFERRAL) { throw new LDAPReferralException ("referral", resultCode, response.getReferrals()); } if (resultCode == JDAPResult.LDAP_PARTIAL_RESULTS) { throw new LDAPReferralException ("referral", resultCode, response.getErrorMessage()); } else { throw new LDAPException ("error result", resultCode, response.getErrorMessage(), response.getMatchedDN()); } } else if (m.getProtocolOp() instanceof JDAPSearchResultReference) { String[] referrals = ((JDAPSearchResultReference)m.getProtocolOp()).getUrls(); throw new LDAPReferralException ("referral", JDAPResult.SUCCESS, referrals); } else { return; } } /** * Set response controls for the current connection for a particular * thread. Get the oldest returned controls and remove them from the * queue. If the connection is executing a persistent search, there may * be more than one set of controls in the queue. For any other * operation, there will only ever be at most one set of controls * (controls from any earlier operation are replaced by controls * received on the latest operation on this connection by this thread). * @param current the target thread * @param con the server response controls */ void setResponseControls( Thread client, int msgID, LDAPControl[] ctrls ) { synchronized(m_responseControlTable) { ResponseControls rspCtrls = (ResponseControls)m_responseControlTable.get(client); if (rspCtrls == null || rspCtrls.msgID != msgID) { rspCtrls = new ResponseControls(msgID, ctrls); m_responseControlTable.put(client, rspCtrls); } else { rspCtrls.addControls(ctrls); } } } /** * Set up connection for referral. * @param u referral URL * @param cons search constraints * @return new LDAPConnection, already connected and authenticated */ private LDAPConnection referralConnect( LDAPUrl[] refList, LDAPConstraints cons ) throws LDAPException { LDAPConnection connection = new LDAPConnection (getSocketFactory()); // Set the same connection setup failover policy as for this connection connection.setConnSetupDelay(getConnSetupDelay()); connection.setOption(REFERRALS, new Boolean(true)); connection.setOption(REFERRALS_REBIND_PROC, cons.getRebindProc()); connection.setOption(BIND, cons.getBindProc()); Object traceOut = getProperty(TRACE_PROPERTY); if (traceOut != null) { connection.setProperty(TRACE_PROPERTY, traceOut); } // need to set the protocol version which gets passed to connection connection.setOption(PROTOCOL_VERSION, new Integer(m_protocolVersion)); connection.setOption(REFERRALS_HOP_LIMIT, new Integer(cons.getHopLimit()-1)); try { connection.connect (refList); } catch (LDAPException e) { throw new LDAPException("Referral connect failed: " + e.getMessage(), e.getLDAPResultCode()); } return connection; } private void referralRebind(LDAPConnection ldc, LDAPConstraints cons) throws LDAPException{ try { if (cons.getRebindProc() == null && cons.getBindProc() == null) { ldc.authenticate (m_protocolVersion, null, null); } else if (cons.getBindProc() == null) { LDAPRebindAuth auth = cons.getRebindProc().getRebindAuthentication(ldc.getHost(), ldc.getPort()); ldc.authenticate(m_protocolVersion, auth.getDN(), auth.getPassword()); } else { cons.getBindProc().bind(ldc); } } catch (LDAPException e) { throw new LDAPException("Referral bind failed: " + e.getMessage(), e.getLDAPResultCode()); } } /** * Check for "ldap(s):///" referrals (no host:port) and replace them with * "ldap(s)://currentHost:currentPort". */ private void adjustReferrals(LDAPUrl[] urls) { String host = null; int port =0; for (int i=0; urls != null && i < urls.length; i++) { host = urls[i].getHost(); port = urls[i].getPort(); if ( (host == null) || (host.length() < 1) ) { // If no host:port was specified, use the latest (hop-wise) parameters host = getHost(); port = getPort(); urls[i] = new LDAPUrl (host, port, urls[i].getDN(), urls[i].getAttributeArray(), urls[i].getScope(), urls[i].getFilter(), urls[i].isSecure()); } } } /** * Establish the LDAPConnection to the referred server. This one is used * for bind operation only since we need to keep this new connection for * the subsequent operations. This new connection will be destroyed in * two circumstances: disconnect gets called or the client binds as * someone else. * @return the new LDAPConnection to the referred server */ LDAPConnection createReferralConnection(LDAPReferralException e, LDAPConstraints cons) throws LDAPException { if (cons.getHopLimit() <= 0) { throw new LDAPException("exceed hop limit", e.getLDAPResultCode(), e.getLDAPErrorMessage()); } if (!cons.getReferrals()) { throw e; } LDAPUrl[] refList = e.getURLs(); // If there are no referrals (because the server isn't set up for // them), give up here if (refList == null) { throw new LDAPException("No target URL in referral", LDAPException.NO_RESULTS_RETURNED); } adjustReferrals(refList); LDAPConnection connection = referralConnect(refList, cons); // which one did we connect to... LDAPUrl refURL = connection.m_connMgr.getLDAPUrl(); String refDN = refURL.getDN(); if ((refDN == null) || (refDN.equals(""))) { refDN = m_boundDN; } try { connection.authenticate(m_protocolVersion, refDN, m_boundPasswd); } catch (LDAPException authEx) { // Disconnect needed to terminate the LDAPConnThread try { connection.disconnect(); } catch (LDAPException ignore) {} throw authEx; } return connection; } /** * Follows a referral. * @param e referral exception * @param cons search constraints */ void performReferrals(LDAPReferralException e, LDAPConstraints cons, int ops, /* unions of different operation parameters */ String dn, int scope, String filter, String types[], boolean attrsOnly, LDAPModification mods[], LDAPEntry entry, LDAPAttribute attr, /* result */ Vector results ) throws LDAPException { LDAPUrl refURL = null; LDAPConnection connection = null; try { if (cons.getHopLimit() <= 0) { throw new LDAPException("exceed hop limit", e.getLDAPResultCode(), e.getLDAPErrorMessage()); } if (!cons.getReferrals()) { if (ops == JDAPProtocolOp.SEARCH_REQUEST) { LDAPSearchResults res = new LDAPSearchResults(); res.add(e); results.addElement(res); return; } else { throw e; } } LDAPUrl urls[] = e.getURLs(); // If there are no referrals (because the server isn't configured to // return one), give up here if ( urls == null || urls.length == 0) { return; } adjustReferrals(urls); // Check if we can use m_referralConnection to follow this referral if (m_referralConnection != null && m_referralConnection.isConnected()) { String refHost = m_referralConnection.getHost(); int refPort = m_referralConnection.getPort(); try { // Compare ipAddr:port for each referral with the m_referralConnection String refAddr = InetAddress.getByName(refHost).getHostAddress(); for (int i = 0; i < urls.length; i++) { String urlHost = urls[i].getHost(); int urlPort = urls[i].getPort(); String urlAddr = InetAddress.getByName(urlHost).getHostAddress(); if (refAddr == urlAddr && refPort == urlPort) { refURL = urls[i]; break; } } } catch (UnknownHostException ex) { // Compare host names rather than ip addr for (int i = 0; i < urls.length; i++) { if (refHost == urls[i].getHost() && refPort == urls[i].getPort()) { refURL = urls[i]; break; } } } } if (refURL != null) { connection = m_referralConnection; } else { connection = referralConnect( urls, cons ); // which one did we connect to... refURL = connection.m_connMgr.getLDAPUrl(); // Authenticate referralRebind(connection, cons); } String newDN = refURL.getDN(); String DN = null; if ((newDN == null) || (newDN.equals(""))) { DN = dn; } else { DN = newDN; } // If this was a one-level search, and a direct subordinate // has a referral, there will be a "?base" in the URL, and // we have to rewrite the scope from one to base if ( refURL.getUrl().indexOf("?base") > -1 ) { scope = SCOPE_BASE; } LDAPSearchConstraints newcons = (LDAPSearchConstraints)cons.clone(); newcons.setHopLimit( cons.getHopLimit()-1 ); referralOperation(connection, newcons, ops, DN, scope, filter, types, attrsOnly, mods, entry, attr, results); } catch (LDAPException ex) { if (refURL != null) { ex.setExtraMessage("Failed to follow referral to " + refURL); } else { ex.setExtraMessage("Failed to follow referral"); } throw ex; } } void referralOperation(LDAPConnection connection, LDAPConstraints cons, int ops, String dn, int scope, String filter, String types[], boolean attrsOnly, LDAPModification mods[], LDAPEntry entry, LDAPAttribute attr, Vector results) throws LDAPException { LDAPSearchResults res = null; try { switch (ops) { case JDAPProtocolOp.SEARCH_REQUEST: res = connection.search(dn, scope, filter, types, attrsOnly, (LDAPSearchConstraints)cons); if (res != null) { res.closeOnCompletion(connection); results.addElement(res); } else { if ((m_referralConnection == null) || (!connection.equals(m_referralConnection))) connection.disconnect(); } break; case JDAPProtocolOp.MODIFY_REQUEST: connection.modify(dn, mods, cons); break; case JDAPProtocolOp.ADD_REQUEST: if ((dn != null) && (!dn.equals(""))) entry.setDN(dn); connection.add(entry, cons); break; case JDAPProtocolOp.DEL_REQUEST: connection.delete(dn, cons); break; case JDAPProtocolOp.MODIFY_RDN_REQUEST: connection.rename(dn, filter /* newRDN */, attrsOnly /* deleteOld */, cons); break; case JDAPProtocolOp.COMPARE_REQUEST: boolean bool = connection.compare(dn, attr, cons); results.addElement(new Boolean(bool)); break; default: /* impossible */ break; } } catch (LDAPException ee) { throw ee; } finally { if ((connection != null) && ((ops != JDAPProtocolOp.SEARCH_REQUEST) || (res == null)) && ((m_referralConnection == null) || (!connection.equals(m_referralConnection)))) { connection.disconnect(); } } } /** * Follows a referral for an extended operation. * @param e referral exception * @param cons search constraints */ private LDAPExtendedOperation performExtendedReferrals( LDAPReferralException e, LDAPConstraints cons, LDAPExtendedOperation op ) throws LDAPException { if (cons.getHopLimit() <= 0) { throw new LDAPException("exceed hop limit", e.getLDAPResultCode(), e.getLDAPErrorMessage()); } if (!cons.getReferrals()) { throw e; } LDAPUrl u[] = e.getURLs(); // If there are no referrals (because the server isn't configured to // return one), give up here if ( u == null || u.length == 0) { return null; } adjustReferrals(u); LDAPConnection connection = referralConnect( u, cons); referralRebind(connection, cons); LDAPExtendedOperation results = connection.extendedOperation( op ); connection.disconnect(); return results; /* return right away if operation is successful */ } /** * Returns a new LDAPConnection object that shares * the physical connection to the LDAP server but has its own state. * * The returned LDAPConnection object contains the same * state as the current connection, including: *
    *
  • the default search constraints *
  • host name and port number of the LDAP server *
  • the DN and password used to authenticate to the LDAP server *
  • the cache *
*

* @return the LDAPconnection object representing the * new object. */ public synchronized Object clone() { LDAPConnection c = null; try { if (m_thread != null) { checkConnection(/*rebind=*/true); } } catch (LDAPException ignore) {} try { c = (LDAPConnection)super.clone(); c.m_defaultConstraints = (LDAPSearchConstraints)m_defaultConstraints.clone(); c.m_responseListeners = null; c.m_searchListeners = null; c.m_properties = (Hashtable)m_properties.clone(); c.m_responseControlTable = new Hashtable(); if (c.m_cache != null) { c.m_cache.addReference(); } if (isConnected()) { /* share current connection thread */ c.m_thread.register(c); } else { c.m_thread = null; c.m_connMgr = null; } } catch (Exception ignore) {} return c; } /** * Sets up basic connection privileges for Communicator. * @return true if in Communicator and connections okay. */ private static boolean checkCommunicator() { try { java.lang.reflect.Method m = LDAPCheckComm.getMethod( "netscape.security.PrivilegeManager", "enablePrivilege"); if (m == null) { printDebug("Method is null"); return false; } Object[] args = new Object[1]; args[0] = new String("UniversalConnect"); m.invoke( null, args); printDebug( "UniversalConnect enabled" ); args[0] = new String("UniversalPropertyRead"); m.invoke( null, args); printDebug( "UniversalPropertyRead enabled" ); return true; } catch (LDAPException e) { printDebug("Exception: "+e.toString()); } catch (Exception ie) { printDebug("Exception on invoking " + "enablePrivilege: "+ie.toString()); } return false; } /** * Reports if the class is running in a Netscape browser. * @return true if the class is running in a Netscape browser. */ public static boolean isNetscape() { return isCommunicator; } static void printDebug( String msg ) { if ( debug ) { System.out.println( msg ); } } /** * Returns the string representation for this LDAPConnection. *

* For example: * *

LDAPConnection {ldap://dilly:389 (2) ldapVersion:3 bindDN:"uid=admin,o=iplanet.com"}
* * For cloned connections, the number of LDAPConnection instances sharing the * same physical connection is shown in parenthesis following the ldap url. * If a LDAPConnection is not cloned, this number is omitted from the string * representation. * * @return string representation of the connection. * @see netscape.ldap.LDAPConnection#clone */ public String toString() { int cloneCnt = (m_thread == null) ? 0 : m_thread.getClientCount(); StringBuffer sb = new StringBuffer("LDAPConnection {"); //url if (m_connMgr != null) { sb.append(m_connMgr.getLDAPUrl().getServerUrl()); } // clone count if (cloneCnt > 1) { sb.append(" ("); sb.append(cloneCnt); sb.append(")"); } // ldap version sb.append(" ldapVersion:"); sb.append(m_protocolVersion); // bind DN sb.append(" bindDN:\""); if (getAuthenticationDN() != null) { sb.append(getAuthenticationDN()); } sb.append("\"}"); return sb.toString(); } /** * A helper class for collecting response controls. Used as a value * in m_responseControlTable */ class ResponseControls { int msgID; Vector ctrls; public ResponseControls(int msgID, LDAPControl[] ctrls) { this.msgID = msgID; this.ctrls = new Vector(); this.ctrls.addElement(ctrls); } void addControls(LDAPControl[] ctrls) { this.ctrls.addElement(ctrls); } } /** * Prints out the LDAP Java SDK version and the highest LDAP * protocol version supported by the SDK. To view this * information, open a terminal window, and enter: *
java netscape.ldap.LDAPConnection
     * 
* @param args not currently used */ public static void main(String[] args) { System.out.println("LDAP SDK Version is "+SdkVersion); System.out.println("LDAP Protocol Version is "+ProtocolVersion); } /** * Option specifying the maximum number of unread entries to be cached in any * LDAPSearchResults without suspending reading from the server. * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public static final int MAXBACKLOG = 30; private static boolean isCommunicator = checkCommunicator(); private static boolean debug = false; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSocketFactory.java0000664001003300100330000000577010602743270030033 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; import java.net.*; /** * Represents a socket connection that you can use to connect to an * LDAP server. You can write a class that implements this interface * if you want to use a TLS socket to connect to a secure server. * (The LDAPSSLSocketFactory class, which is included * in the netscape.ldap package, implements this * interface for SSL connections.) *

* * When you construct a new LDAPConnection * object, you can specify that the connection use this socket. * To do this, pass the constructor an object of the class that * implements this interface. *

* * @version 1.0 * @see LDAPConnection#LDAPConnection(netscape.ldap.LDAPSocketFactory) * @see LDAPSSLSocketFactory */ public interface LDAPSocketFactory { /** * Returns a socket to the specified host name and port number. *

* * @param host name of the host to which you want to connect * @param port port number to which you want to connect * @exception LDAPException Failed to create the socket. * @see LDAPSSLSocketFactory#makeSocket(java.lang.String,int) */ public Socket makeSocket(String host, int port) throws LDAPException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPConnSetupMgr.java0000664001003300100330000004746510602743270027646 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; import java.net.*; /** * Makes a connection to a server from a list using "smart" failover. * Connection attempts can be made serially from the same thread, or * in parallel by creating a separate thread after the specified delay. * Connection setup status is preserved for later attempts, so that servers * that are more likely to be available will be tried first. *

* The total time spent opening a connection can be limited with the * ConnectTimeout property. *

* When a connection is successfully created, a socket is opened. The socket * is passed to the LDAPConnThread. The LDAPConnThread must call * invalidateConnection() if the connection is lost due to a network or * server error, or closeConnection() if the connection is deliberately terminated * by the user. */ class LDAPConnSetupMgr implements java.io.Serializable { static final long serialVersionUID = 1519402748245755307L; /** * Policy for opening a connection when multiple servers are used */ private static final int SERIAL = 0; private static final int PARALLEL = 1; /** * ServerEntry.connSetupStatus possible value. The values also represent * the likelihood that the connection will be setup to a server. Lower * values have higher priority. See sortDsList() method */ private static final int CONNECTED = 0; private static final int DISCONNECTED = 1; private static final int NEVER_USED = 2; private static final int INTERRUPTED = 3; private static final int FAILED = 4; /** * Representation for a server in the server list. */ class ServerEntry { LDAPUrl url; int connSetupStatus; Thread connSetupThread; ServerEntry(LDAPUrl url, int status) { this.url = url; connSetupStatus = status; connSetupThread = null; } public String toString() { return "{" + url + " status="+connSetupStatus+"}"; } } /** * Socket to the connected server */ private Socket m_socket = null; /** * Original, underlying socket to the server, see layerSocket() */ private Socket m_origSocket = null; /** * Last exception occured during connection setup */ private LDAPException m_connException = null; /** * List of server to use for the connection setup */ ServerEntry[] m_dsList; /** * Index of the last connected server */ private int m_dsIdx = -1; /** * Socket factory for SSL connections */ LDAPSocketFactory m_factory; /** * Connection setup policy (PARALLEL or SERIAL) */ int m_policy = SERIAL; /** * Delay in ms before another connection setup thread is started. */ int m_connSetupDelay = -1; /** * The maximum time to wait to established the connection */ int m_connectTimeout = 0; /** * During connection setup, the current count of servers to which * connection attmpt has been made */ private transient int m_attemptCnt = 0; /** * Constructor * @param host list of host names to which to connect * @param port list of port numbers corresponding to the host list * @param factory socket factory for SSL connections */ LDAPConnSetupMgr(String[] hosts, int[] ports, LDAPSocketFactory factory) throws LDAPException{ m_dsList = new ServerEntry[hosts.length]; boolean secure = (factory != null); for (int i=0; i < hosts.length; i++) { String url = secure ? "ldaps://" : "ldap://"; url += hosts[i] + ":" + ports[i]; try { m_dsList[i] = new ServerEntry(new LDAPUrl(url), NEVER_USED); } catch (MalformedURLException ex) { throw new LDAPException("Invalid host:port " + hosts[i]+":"+ports[i], LDAPException.PARAM_ERROR); } } m_factory = factory; } LDAPConnSetupMgr(String[] urls, LDAPSocketFactory factory) throws LDAPException{ m_dsList = new ServerEntry[urls.length]; for (int i=0; i < urls.length; i++) { try { LDAPUrl url = new LDAPUrl(urls[i]); m_dsList[i] = new ServerEntry(url, NEVER_USED); } catch (MalformedURLException ex) { throw new LDAPException("Malformed LDAP URL " + urls[i], LDAPException.PARAM_ERROR); } } m_factory = factory; } LDAPConnSetupMgr(LDAPUrl[] urls, LDAPSocketFactory factory) throws LDAPException{ m_dsList = new ServerEntry[urls.length]; for (int i=0; i < urls.length; i++) { m_dsList[i] = new ServerEntry(urls[i], NEVER_USED); } m_factory = factory; } /** * Try to open the connection to any of the servers in the list, limiting * the time waiting for the connection to be established * @return connection socket */ synchronized Socket openConnection() throws LDAPException{ long tcur=0, tmax = Long.MAX_VALUE; Thread th = null; reset(); // If reconnecting, sort dsList so that servers more likly to // be available are tried first sortDsList(); if (m_connectTimeout == 0) { // No need for a separate thread, connect time not limited connect(); } else { // Wait for connection at most m_connectTimeout milliseconds // Run connection setup in a separate thread to monitor the time tmax = System.currentTimeMillis() + m_connectTimeout; th = new Thread (new Runnable() { public void run() { connect(); } }, "ConnSetupMgr"); th.setDaemon(true); th.start(); while (m_socket==null && (m_attemptCnt < m_dsList.length) && (tcur = System.currentTimeMillis()) < tmax) { try { wait(tmax - tcur); } catch (InterruptedException e) { th.interrupt(); cleanup(); throw new LDAPInterruptedException("Interrupted connect operation"); } } } if (m_socket != null) { return m_socket; } if ( th != null && (tcur = System.currentTimeMillis()) >= tmax) { // We have timed out th.interrupt(); cleanup(); throw new LDAPException( "Connect timeout, " + getServerList() + " might be unreachable", LDAPException.CONNECT_ERROR); } if (m_connException != null && m_dsList.length == 1) { throw m_connException; } throw new LDAPException( "Failed to connect to server " + getServerList(), LDAPException.CONNECT_ERROR); } private void reset() { m_socket = null; m_origSocket = null; m_connException = null; m_attemptCnt = 0; for (int i=0; i < m_dsList.length; i++) { m_dsList[i].connSetupThread = null; } } private String getServerList() { StringBuffer sb = new StringBuffer(); for (int i=0; i < m_dsList.length; i++) { sb.append(i==0 ? "" : " "); sb.append(m_dsList[i].url.getHost()); sb.append(":"); sb.append(m_dsList[i].url.getPort()); } return sb.toString(); } private void connect() { if (m_policy == SERIAL || m_dsList.length == 1) { openSerial(); } else { openParallel(); } } /** * Called when the current connection is lost. * Put the connected server at the end of the server list for * the next connect attempt. */ synchronized void invalidateConnection() { if (m_socket != null) { m_dsList[m_dsIdx].connSetupStatus = FAILED; // Move the entry to the end of the list int srvCnt = m_dsList.length, j=0; ServerEntry[] newDsList = new ServerEntry[m_dsList.length]; for (int i=0; i < srvCnt; i++) { if (i != m_dsIdx) { newDsList[j++] = m_dsList[i]; } } newDsList[j] = m_dsList[m_dsIdx]; m_dsList = newDsList; m_dsIdx = j; try { m_socket.close(); } catch (Exception e) { } finally { m_socket = null; } } if (m_origSocket != null) { try { m_origSocket.close(); } catch (Exception e) { } finally { m_origSocket = null; } } } /** * Called when the current connection is terminated by the user. * Mark the connected server status as DISCONNECTED. This will * put it at top of the server list for the next connect attempt. */ void closeConnection() { if (m_socket != null) { m_dsList[m_dsIdx].connSetupStatus = DISCONNECTED; try { m_socket.close(); } catch (Exception e) { } finally { m_socket = null; } } if (m_origSocket != null) { try { m_origSocket.close(); } catch (Exception e) { } finally { m_origSocket = null; } } } Socket getSocket() { return m_socket; } /** * Layer a new socket over the existing one (used by startTLS) */ void layerSocket(LDAPTLSSocketFactory factory) throws LDAPException{ Socket s = factory.makeSocket(m_socket); m_origSocket = m_socket; m_socket = s; } String getHost() { if (m_dsIdx >= 0) { return m_dsList[m_dsIdx].url.getHost(); } return m_dsList[0].url.getHost(); } int getPort() { if (m_dsIdx >= 0) { return m_dsList[m_dsIdx].url.getPort(); } return m_dsList[0].url.getPort(); } boolean isSecure() { if (m_dsIdx >= 0) { return m_dsList[m_dsIdx].url.isSecure(); } return m_dsList[0].url.isSecure(); } LDAPUrl getLDAPUrl() { if (m_dsIdx >= 0) { return m_dsList[m_dsIdx].url; } return m_dsList[0].url; } int getConnSetupDelay() { return m_connSetupDelay/1000; } /** * Selects the connection failover policy * @param delay in seconds for the parallel connection setup policy. * Possible values are:
(delay=-1) use serial policy,
* (delay=0) start immediately concurrent threads to each specified server *
(delay>0) create a new connection setup thread after delay seconds */ void setConnSetupDelay(int delay) { m_policy = (delay < 0) ? SERIAL : PARALLEL; m_connSetupDelay = delay*1000; } int getConnectTimeout() { return m_connectTimeout/1000; } /** * Sets the maximum time to spend in the openConnection() call * @param timeout in seconds to wait for the connection to be established */ void setConnectTimeout(int timeout) { m_connectTimeout = timeout*1000; } /** * Check if the user has voluntarily closed the connection */ boolean isUserDisconnected() { return (m_dsIdx >=0 && m_dsList[m_dsIdx].connSetupStatus == DISCONNECTED); } /** * Try sequentially to open a new connection to a server. */ private void openSerial() { for (int i=0; i < m_dsList.length; i++) { m_dsList[i].connSetupThread = Thread.currentThread(); connectServer(i); if (m_socket != null) { return; } } } /** * Try concurrently to open a new connection a server. Create a separate * thread for each connection attempt. */ private synchronized void openParallel() { for (int i=0; m_socket==null && i < m_dsList.length; i++) { //Create a Thread to execute connectSetver() final int dsIdx = i; String threadName = "ConnSetupMgr " + m_dsList[dsIdx].url; Thread t = new Thread(new Runnable() { public void run() { connectServer(dsIdx); } }, threadName); m_dsList[dsIdx].connSetupThread = t; t.setDaemon(true); t.start(); // Wait before starting another thread if the delay is not zero if (m_connSetupDelay != 0 && i < (m_dsList.length-1)) { try { wait(m_connSetupDelay); } catch (InterruptedException e) { return; } } } // At this point all threads are started. Wait until first thread // succeeds to connect or all threads terminate while (m_socket == null && (m_attemptCnt < m_dsList.length)) { // Wait for a thread to terminate try { wait(); } catch (InterruptedException e) {} } } /** * Connect to the server at the given index */ void connectServer(int idx) { ServerEntry entry = m_dsList[idx]; Thread currThread = Thread.currentThread(); Socket sock = null; LDAPException conex = null; try { /* If we are to create a socket ourselves, make sure it has sufficient privileges to connect to the desired host */ if (!entry.url.isSecure()) { sock = new Socket (entry.url.getHost(), entry.url.getPort()); } else { LDAPSocketFactory factory = m_factory; if (factory == null) { factory = entry.url.getSocketFactory(); } if (factory == null) { throw new LDAPException("Can not connect, no socket factory " + entry.url, LDAPException.OTHER); } sock = factory.makeSocket(entry.url.getHost(), entry.url.getPort()); } sock.setTcpNoDelay( true ); } catch (IOException e) { conex = new LDAPException("failed to connect to server " + entry.url, LDAPException.CONNECT_ERROR); } catch (LDAPException e) { conex = e; } if (currThread.isInterrupted()) { return; } synchronized (this) { if (m_socket == null && entry.connSetupThread == currThread) { entry.connSetupThread = null; if (sock != null) { entry.connSetupStatus = CONNECTED; m_socket = sock; m_dsIdx = idx; cleanup(); // Signal other concurrent threads to terminate } else { entry.connSetupStatus = FAILED; m_connException = conex; } m_attemptCnt++; notifyAll(); } } } /** * Terminate all concurrently running connection setup threads */ private synchronized void cleanup() { Thread currThread = Thread.currentThread(); for (int i=0; i < m_dsList.length; i++) { ServerEntry entry = m_dsList[i]; if (entry.connSetupThread != null && entry.connSetupThread != currThread) { entry.connSetupStatus = INTERRUPTED; //Thread.stop() is considered to be dangerous, use Thread.interrupt(). //interrupt() will however not work if the thread is blocked in the //socket library native connect() call, but the connect() will //eventually timeout and the thread will die. entry.connSetupThread.interrupt(); entry.connSetupThread = null; } } } /** * Sorts Server List so that servers which are more likely to be available * are tried first. The likelihood of making a successful connection * is determined by the connSetupStatus. Lower values have higher * likelihood. Thus, the order of server access is (1) disconnected by * the user (2) never used (3) interrupted connection attempt * (4) connection setup failed/connection lost */ private void sortDsList() { int srvCnt = m_dsList.length; for (int i=1; i < srvCnt; i++) { for (int j=0; j < i; j++) { if (m_dsList[i].connSetupStatus < m_dsList[j].connSetupStatus) { // swap entries ServerEntry entry = m_dsList[j]; m_dsList[j] = m_dsList[i]; m_dsList[i] = entry; } } } } /** * This is used only by the ldapjdk test libaray to simulate a * server problem and to test fail-over and rebind * @return A flag whether the connection was closed */ boolean breakConnection() { try { m_socket.close(); return true; } catch (Exception e) { return false; } } public String toString() { String str = "dsIdx="+m_dsIdx+ " dsList="; for (int i=0; i < m_dsList.length; i++) { str += m_dsList[i]+ " "; } return str; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/DynamicInvoker.java0000664001003300100330000001016010602743270027521 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.lang.reflect.*; import java.util.Hashtable; /** * Utility class to dynamically find methods of a class and to invoke * them */ class DynamicInvoker { static Object invokeMethod(Object obj, String packageName, String methodName, Object[] args, String[] argNames) throws LDAPException { try { java.lang.reflect.Method m = getMethod(packageName, methodName, argNames); if (m != null) { return (m.invoke(obj, args)); } } catch (Exception e) { throw new LDAPException("Invoking "+methodName+": "+ e.toString(), LDAPException.PARAM_ERROR); } return null; } static java.lang.reflect.Method getMethod(String packageName, String methodName, String[] args) throws LDAPException { try { java.lang.reflect.Method method = null; String suffix = ""; if (args != null) for (int i=0; i * If the specified locale is en and us and the base name of the file is * netscape/ldap/errors/ErrorCodes, then the class loader will search for * the file in the following order: *

 *
 *   ErrorCodes_en_us.props
 *   ErrorCodes_en.props
 *   ErrorCodes.props
 *
 * 
* @see java.util.Locale */ class LDAPResourceBundle implements java.io.Serializable { static final long serialVersionUID = -5903986665461157980L; private static final boolean m_debug = false; private static final String m_suffix = ".props"; private static final String m_locale_separator = "_"; /** * Return the property resource bundle according to the base name of the * property file and the locale. The class loader will find the closest match * with the given locale. * @return the property resource bundle. * @exception IOException Gets thrown when failed to open the resource * bundle file. */ static PropertyResourceBundle getBundle(String baseName) throws IOException { return getBundle(baseName, Locale.getDefault()); } /** * Return the property resource bundle according to the base name of the * property file and the locale. The class loader will find the closest match * with the given locale. * @param baseName the base name of the property file. The base name contains * no locale context and no . suffix. * @param l the locale * @return the property resource bundle. * @exception IOException Gets thrown when failed to create a property * resource */ static PropertyResourceBundle getBundle(String baseName, Locale l) throws IOException { String localeStr = m_locale_separator+l.toString(); InputStream fin = null; while (true) { if ((fin=getStream(baseName, localeStr)) != null) { PropertyResourceBundle p = new PropertyResourceBundle(fin); return p; } else { int index = localeStr.lastIndexOf(m_locale_separator); if (index == -1) { printDebug("File "+baseName+localeStr+m_suffix+" not found"); return null; } else localeStr = localeStr.substring(0, index); } } } /** * Constructs the whole absolute path name of a property file and retrieves * an input stream on the file. * @param baseName the base name of the property file. The base name contains * no locale context and no . suffix. * @param the locale string to insert into the file name * @return the input stream of the property file. */ private static InputStream getStream(String baseName, String locale) { String fStr = baseName+locale+m_suffix; return (ClassLoader.getSystemResourceAsStream(fStr)); } /** * Prints debug messages if the debug mode is on. * @param str the message that is printed */ private static void printDebug(String str) { if (m_debug) System.out.println(str); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPCheckComm.java0000664001003300100330000000664410602743270027105 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * This static class checks if the caller is an applet running in * Netscape Communicator. If so, it returns the appropriate method. */ class LDAPCheckComm { /** * Returns the method whose name matches the specified argument. * @param classPackage the class package * @param name the method name * @return the method. * @exception LDAPException Gets thrown if the method is not found or * the caller is not an applet running in Netscape * Communicator. */ static java.lang.reflect.Method getMethod(String classPackage, String name) throws LDAPException { SecurityManager sec = System.getSecurityManager(); if ( sec == null ) { /* Not an applet, we can do what we want to */ return null; } else if ( sec.toString().startsWith("java.lang.NullSecurityManager") ) { /* Not an applet, we can do what we want to */ return null; } else if (sec.toString().startsWith("netscape.security.AppletSecurity")) { /* Running as applet. Is PrivilegeManager around? */ try { Class c = Class.forName(classPackage); java.lang.reflect.Method[] m = c.getMethods(); for( int i = 0; i < m.length; i++ ) { if ( m[i].getName().equals(name) ) { return m[i]; } } throw new LDAPException("no enable privilege in " + classPackage); } catch (ClassNotFoundException e) { throw new LDAPException("Class not found"); } } return null; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPRebindAuth.java0000664001003300100330000001047310602743270027274 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; /** * Represents information used to authenticate the client in cases where * the client follows referrals automatically. If you are defining a class * that implements the LDAPRebind interface, your implementation * of the LDAPRebind.getRebindAuthentication method needs to * construct and return an object of this class. *

* * For example, the following method sets up authentication information based * on the LDAP server identified in the referral. Ideally, this method would be * defined as part of a class implementing the LDAPRebind interface. * *

 * private String myDN = "cn=Directory Manager,o=Ace Industry,c=US";
 * private String myPW = "alway4444";
 * private LDAPRebindAuth myRebindInfo;
 * ...
 * public LDAPRebindAuth getRebindAuthentication( String host, int port ) {
 *  if ( host.equalsIgnoreCase( "alway.mcom.com" ) && ( port == 389 ) ) {
 *      myRebindInfo = new LDAPRebindAuth( myDN, myPW );
 *  } else {
 *      myRebindInfo = new LDAPRebindAuth( "", "" );
 *  }
 *  return myRebindInfo;
 * } 
* * @version 1.0 * @see netscape.ldap.LDAPRebind */ public class LDAPRebindAuth implements java.io.Serializable { static final long serialVersionUID = 7161655313564756294L; private String m_dn; private String m_password; /** * Constructs information that is used by the client * for authentication when following referrals automatically. * @param dn distinguished name to use for authenticating to * the LDAP server during an automatic referral (if the client * is set up to follow referrals automatically) * @param password password to use for authenticating to * the LDAP server during an automatic referral (if the client * is set up to follow referrals automatically) */ public LDAPRebindAuth(String dn, String password) { m_dn = dn; m_password = password; } /** * Returns the distinguished name to be used for reauthentication, * if the client is set up to follow referrals automatically. * @return distinguished name to use when authenticating to * other LDAP servers during referrals. */ public String getDN() { return m_dn; } /** * Returns the password to be used for reauthentication, * if the client is set up to follow referrals automatically. * @return password to use when authenticating to other * LDAP servers during referrals. */ public String getPassword() { return m_password; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPInterruptedException.java0000664001003300100330000000545510602743270031437 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * An exception thrown when the LDAP operation being invoked has * been interrupted. For example, an application might interrupt a thread that * is performing a search. * * @version 1.0 */ public class LDAPInterruptedException extends LDAPException { static final long serialVersionUID = 5267455101797397456L; /** * Constructs a default exception with a specified string of * additional information. This string appears if you call * the toString() method. *

* * @param message the additional information * @see netscape.ldap.LDAPInterruptedException#toString() */ LDAPInterruptedException( String message ) { super( message, LDAPException.OTHER, null); } /** * Gets the string representation of the exception. */ public String toString() { String str = "netscape.ldap.LDAPInterruptedException: "; String msg = super.getMessage(); if (msg != null) { str +=msg; } return str; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPConnThread.java0000664001003300100330000006354210602743270027301 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import netscape.ldap.ber.stream.*; import netscape.ldap.util.*; import java.io.*; import java.net.*; import java.text.SimpleDateFormat; /** * Multiple LDAPConnection clones can share a single physical connection, * which is maintained by a thread. * * +----------------+ * | LDAPConnection | --------+ * +----------------+ | * | * +----------------+ | +----------------+ * | LDAPConnection | --------+------- | LDAPConnThread | * +----------------+ | +----------------+ * | * +----------------+ | * | LDAPConnection | --------+ * +----------------+ * * All LDAPConnections send requests and get responses from * LDAPConnThread (a thread). */ class LDAPConnThread implements Runnable { /** * Constants */ private final static int MAXMSGID = Integer.MAX_VALUE; private final static int BACKLOG_CHKCNT = 50; /** * Internal variables */ transient private static int m_highMsgId; transient private InputStream m_serverInput, m_origServerInput; transient private OutputStream m_serverOutput, m_origServerOutput; transient private Hashtable m_requests; transient private Hashtable m_messages = null; transient private Vector m_registered; transient private LDAPCache m_cache = null; transient private Thread m_thread = null; transient private Object m_sendRequestLock = new Object(); transient private LDAPConnSetupMgr m_connMgr = null; transient private Object m_traceOutput = null; transient private int m_backlogCheckCounter = BACKLOG_CHKCNT; transient private boolean m_bound; /** * Connection IDs for ldap trace messages */ transient private static int m_nextId; transient private int m_id; // Time Stemp format Hour(0-23):Minute:Second.Milliseconds used for trace msgs static SimpleDateFormat m_timeFormat = new SimpleDateFormat("HH:mm:ss.SSS"); /** * Constructs a connection thread that maintains connection to the * LDAP server. * @param connMgr the connection setup manager * @param cache cache object or null * @param traceOutput trace object or null */ public LDAPConnThread(LDAPConnSetupMgr connMgr, LDAPCache cache, Object traceOutput) { m_requests = new Hashtable (); m_registered = new Vector (); m_connMgr = connMgr; setCache( cache ); setTraceOutput(traceOutput); } synchronized void connect(LDAPConnection ldc) throws LDAPException{ if (m_thread != null) { return; } try { m_connMgr.openConnection(); m_serverInput = new BufferedInputStream (m_connMgr.getSocket().getInputStream()); m_serverOutput = new BufferedOutputStream(m_connMgr.getSocket().getOutputStream()); register(ldc); } catch (IOException e) { throw new LDAPException ( "failed to connect to server " + m_connMgr.getHost(), LDAPException.CONNECT_ERROR ); } m_id = m_nextId++; String url = m_connMgr.getLDAPUrl().getServerUrl(); if (m_traceOutput != null) { StringBuffer sb = new StringBuffer(" Connected to "); sb.append(url); logTraceMessage(sb); } String threadID = "LDAPConnThread-" + m_id + " " + url; m_thread = new Thread(this, threadID); m_thread.setDaemon(true); m_thread.start(); } public synchronized String toString() { if (m_thread != null) { return m_thread.getName(); } else { return "LDAPConnThread-" + m_id + " "; } } /** * Layer a SSL socket over the current non-SSL one */ void layerSocket(LDAPTLSSocketFactory factory) throws Exception { synchronized (m_sendRequestLock) { try { m_connMgr.layerSocket(factory); setInputStream(m_connMgr.getSocket().getInputStream()); setOutputStream(m_connMgr.getSocket().getOutputStream()); } catch (Exception e) { m_serverInput = m_origServerInput; m_serverOutput = m_origServerOutput; throw e; } } } void setBound(boolean bound) { m_bound = bound; } boolean isBound() { return (m_thread != null) && m_bound; } InputStream getInputStream() { return m_serverInput; } void setInputStream( InputStream is ) { m_serverInput = is; } OutputStream getOutputStream() { return m_serverOutput; } void setOutputStream( OutputStream os ) { m_serverOutput = os; } int getRequestCount() { return m_requests.size(); } void setTraceOutput(Object traceOutput) { synchronized (m_sendRequestLock) { if (traceOutput == null) { m_traceOutput = null; } else if (traceOutput instanceof OutputStream) { m_traceOutput = new PrintWriter((OutputStream)traceOutput); } else if (traceOutput instanceof LDAPTraceWriter) { m_traceOutput = traceOutput; } } } void logTraceMessage(StringBuffer msg) { String timeStamp = m_timeFormat.format(new Date()); StringBuffer sb = new StringBuffer(timeStamp); sb.append(" ldc="); sb.append(m_id); synchronized( m_sendRequestLock ) { if (m_traceOutput instanceof PrintWriter) { PrintWriter traceOutput = (PrintWriter)m_traceOutput; traceOutput.print(sb); // header traceOutput.println(msg); traceOutput.flush(); } else if (m_traceOutput instanceof LDAPTraceWriter) { sb.append(msg); ((LDAPTraceWriter)m_traceOutput).write(sb.toString()); } } } /** * Set the cache to use for searches. * @param cache The cache to use for searches; null for no cache */ synchronized void setCache( LDAPCache cache ) { m_cache = cache; m_messages = (m_cache != null) ? new Hashtable() : null; } /** * Allocates a new LDAP message ID. These are arbitrary numbers used to * correlate client requests with server responses. * @return new unique msgId */ private int allocateId () { synchronized (m_sendRequestLock) { m_highMsgId = (m_highMsgId + 1) % MAXMSGID; return m_highMsgId; } } /** * Sends LDAP request via this connection thread. * @param request request to send * @param toNotify response listener to invoke when the response * is ready */ void sendRequest (LDAPConnection conn, JDAPProtocolOp request, LDAPMessageQueue toNotify, LDAPConstraints cons) throws LDAPException { if (m_thread == null) { throw new LDAPException ( "Not connected to a server", LDAPException.SERVER_DOWN ); } LDAPMessage msg = new LDAPMessage(allocateId(), request, cons.getServerControls()); if ( toNotify != null ) { /* Only worry about toNotify if we expect a response... */ m_requests.put (new Integer (msg.getMessageID()), toNotify); /* Notify the backlog checker that there may be another outstanding request */ resultRetrieved(); toNotify.addRequest(msg.getMessageID(), conn, this, cons.getTimeLimit()); } if (!sendRequest(msg, /*ignoreErrors=*/false)) { throw new LDAPException("Server or network error", LDAPException.SERVER_DOWN); } } private boolean sendRequest (LDAPMessage msg, boolean ignoreErrors) { synchronized( m_sendRequestLock ) { try { if (m_traceOutput != null) { logTraceMessage(msg.toTraceString()); } msg.write (m_serverOutput); m_serverOutput.flush(); return true; } catch (IOException e) { if (!ignoreErrors) { networkError(e); } } catch (NullPointerException e) { // m_serverOutput is null bacause of network error if (!ignoreErrors) { if (m_thread != null) { throw e; } } } return false; } } private void sendUnbindRequest(LDAPControl[] ctrls) { LDAPMessage msg = new LDAPMessage(allocateId(), new JDAPUnbindRequest(), ctrls); sendRequest(msg, /*ignoreErrors=*/true); } private void sendAbandonRequest(int id, LDAPControl[] ctrls) { LDAPMessage msg = new LDAPMessage(allocateId(), new JDAPAbandonRequest(id), ctrls); sendRequest(msg, /*ignoreErrors=*/true); } /** * Register with this connection thread. * @param conn LDAP connection */ public synchronized void register(LDAPConnection conn) { if (!m_registered.contains(conn)) m_registered.addElement(conn); } int getClientCount() { return m_registered.size(); } boolean isConnected() { return m_thread != null; } /** * De-Register with this connection thread. If all the connection * is deregistered. Then, this thread should be killed. * @param conn LDAP connection */ /** * De-Register with this connection thread. If all the connection * is deregistered. Then, this thread should be killed. * @param conn LDAP connection */ synchronized void deregister(LDAPConnection conn) { if (m_thread == null) { return; } m_registered.removeElement(conn); if (m_registered.size() == 0) { // No more request processing Thread t = m_thread; m_thread = null; try { // Notify the server sendUnbindRequest(conn.getConstraints().getServerControls()); // interrupt the thread try { t.interrupt(); wait(500); } catch (InterruptedException ignore) {} } catch (Exception e) { LDAPConnection.printDebug(e.toString()); } finally { cleanUp(null); } } } /** * Clean up after the thread shutdown. * The list of registered clients m_registered is left in the current state * to enable the clients to recover the connection. */ private void cleanUp(LDAPException ex) { resultRetrieved(); try { m_serverOutput.close (); } catch (Exception e) { } finally { m_serverOutput = null; } try { m_serverInput.close (); } catch (Exception e) { } finally { m_serverInput = null; } if (m_origServerInput != null) { try { m_origServerInput.close (); } catch (Exception e) { } finally { m_origServerInput = null; } } if (m_origServerOutput != null) { try { m_origServerOutput.close (); } catch (Exception e) { } finally { m_origServerOutput = null; } } // Notify the Connection Manager if (ex != null) { // the connection is lost m_connMgr.invalidateConnection(); } else { // the connection is closed m_connMgr.closeConnection(); } // Set the status for all outstanding requests Enumeration requests = m_requests.elements(); while (requests.hasMoreElements()) { try { LDAPMessageQueue listener = (LDAPMessageQueue)requests.nextElement(); if (ex != null) { listener.setException(this, ex); } else { listener.removeAllRequests(this); } } catch (Exception ignore) {} } m_requests.clear(); if (m_messages != null) { m_messages.clear(); } m_bound = false; } /** * Sleep if there is a backlog of search results */ private void checkBacklog() throws InterruptedException{ while (true) { if (m_requests.size() == 0) { return; } Enumeration listeners = m_requests.elements(); while( listeners.hasMoreElements() ) { LDAPMessageQueue l = (LDAPMessageQueue)listeners.nextElement(); // If there are clients waiting for a regular response // message, skip backlog checking if ( !(l instanceof LDAPSearchListener) ) { return; } LDAPSearchListener sl = (LDAPSearchListener)l; // should never happen, but just in case if (sl.getSearchConstraints() == null) { return; } int slMaxBacklog = sl.getSearchConstraints().getMaxBacklog(); int slBatchSize = sl.getSearchConstraints().getBatchSize(); // Disabled backlog check ? if (slMaxBacklog == 0) { return; } // Synch op with zero batch size ? if (!sl.isAsynchOp() && slBatchSize == 0) { return; } // Max backlog not reached for at least one listener ? // (if multiple requests are in progress) if (sl.getMessageCount() < slMaxBacklog) { return; } } synchronized(this) { wait(3000); } } } /** * This is called when a search result has been retrieved from the incoming * queue. We use the notification to unblock the listener thread, if it * is waiting for the backlog to lighten. */ synchronized void resultRetrieved() { notifyAll(); } /** * Reads from the LDAP server input stream for incoming LDAP messages. */ public void run() { LDAPMessage msg = null; JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nread = new int[1]; while (Thread.currentThread() == m_thread) { try { // Check every BACKLOG_CHKCNT messages if the backlog is not too high if (--m_backlogCheckCounter <= 0) { m_backlogCheckCounter = BACKLOG_CHKCNT; checkBacklog(); } nread[0] = 0; BERElement element = BERElement.getElement(decoder, m_serverInput, nread); msg = LDAPMessage.parseMessage(element); if (m_traceOutput != null) { logTraceMessage(msg.toTraceString()); } // passed in the ber element size to approximate the size of the cache // entry, thereby avoiding serialization of the entry stored in the // cache processResponse (msg, nread[0]); Thread.yield(); } catch (Exception e) { if (Thread.currentThread() == m_thread) { networkError(e); } else { resultRetrieved(); } } } } /** * When a response arrives from the LDAP server, it is processed by * this routine. It will pass the message on to the listening object * associated with the LDAP msgId. * @param msg New message from LDAP server */ private void processResponse (LDAPMessage msg, int size) { Integer messageID = new Integer (msg.getMessageID()); LDAPMessageQueue l = (LDAPMessageQueue)m_requests.get (messageID); if (l == null) { return; /* nobody is waiting for this response (!) */ } if (m_cache != null && (l instanceof LDAPSearchListener)) { cacheSearchResult((LDAPSearchListener)l, msg, size); } l.addMessage (msg); if (msg instanceof LDAPResponse) { m_requests.remove (messageID); if (m_requests.size() == 0) { m_backlogCheckCounter = BACKLOG_CHKCNT; } // Change IO streams if startTLS extended op completed if (msg instanceof LDAPExtendedResponse) { LDAPExtendedResponse extrsp = (LDAPExtendedResponse) msg; String extid = extrsp.getID(); if (extrsp.getResultCode() == 0 && extid != null && extid.equals(LDAPConnection.OID_startTLS)) { changeIOStreams(); } } } } private void changeIOStreams() { // Note: For the startTLS, the new streams are layered over the // existing ones so current IO streams as well as the socket MUST // not be closed. m_origServerInput = m_serverInput; m_origServerOutput = m_serverOutput; m_serverInput = null; m_serverOutput = null; while (m_serverInput == null || m_serverOutput == null) { try { if (Thread.currentThread() != m_thread) { return; // user disconnected } Thread.sleep(200); } catch (InterruptedException ignore) {} } } /** * Collect search results to be added to the LDAPCache. Search results are * packaged in a vector and temporary stored into a hashtable m_messages * using the message id as the key. The vector first element (at index 0) * is a Long integer representing the total size of all LDAPEntries entries. * It is followed by the actual LDAPEntries. * If the total size of entries exceeds the LDAPCache max size, or a referral * has been received, caching of search results is disabled and the entry is * not added to the LDAPCache. A disabled search request is denoted by setting * the entry size to -1. */ private synchronized void cacheSearchResult (LDAPSearchListener l, LDAPMessage msg, int size) { Integer messageID = new Integer (msg.getMessageID()); Long key = l.getKey(); Vector v = null; if ((m_cache == null) || (key == null)) { return; } if (msg instanceof LDAPSearchResult) { // get the vector containing the LDAPMessages for the specified messageID v = (Vector)m_messages.get(messageID); if (v == null) { m_messages.put(messageID, v = new Vector()); v.addElement(new Long(0)); } // Return if the entry size is -1, i.e. the caching is disabled if (((Long)v.firstElement()).longValue() == -1L) { return; } // add the size of the current LDAPMessage to the lump sum // assume the size of LDAPMessage is more or less the same as the size // of LDAPEntry. Eventually LDAPEntry object gets stored in the cache // instead of LDAPMessage object. long entrySize = ((Long)v.firstElement()).longValue() + size; // If the entrySize exceeds the cache size, discard the collected // entries and disble collecting of entries for this search request // by setting the entry size to -1. if (entrySize > m_cache.getSize()) { v.removeAllElements(); v.addElement(new Long(-1L)); return; } // update the lump sum located in the first element of the vector v.setElementAt(new Long(entrySize), 0); // convert LDAPMessage object into LDAPEntry which is stored to the // end of the Vector v.addElement(((LDAPSearchResult)msg).getEntry()); } else if (msg instanceof LDAPSearchResultReference) { // If a search reference is received disable caching of // this search request v = (Vector)m_messages.get(messageID); if (v == null) { m_messages.put(messageID, v = new Vector()); } else { v.removeAllElements(); } v.addElement(new Long(-1L)); } else if (msg instanceof LDAPResponse) { // The search request has completed. Store the cache entry // in the LDAPCache if the operation has succeded and caching // is not disabled due to the entry size or referrals boolean fail = ((LDAPResponse)msg).getResultCode() > 0; v = (Vector)m_messages.remove(messageID); if (!fail) { // If v is null, meaning there are no search results from the // server if (v == null) { v = new Vector(); v.addElement(new Long(0)); } // add the new entry if the entry size is not -1 (caching diabled) if (((Long)v.firstElement()).longValue() != -1L) { m_cache.addEntry(key, v); } } } } /** * Stop dispatching responses for a particular message ID and send * the abandon request. * @param id Message ID for which to discard responses. */ void abandon (int id, LDAPControl[] ctrls) { if (m_thread == null) { return; } LDAPMessageQueue l = (LDAPMessageQueue)m_requests.remove(new Integer(id)); // Clean up cache if enabled if (m_messages != null) { m_messages.remove(new Integer(id)); } if (l != null) { l.removeRequest(id); } resultRetrieved(); // If LDAPConnThread is blocked in checkBacklog() sendAbandonRequest(id, ctrls); } /** * Change listener for a message ID. Required when LDAPMessageQueue.merge() * is invoked. * @param id Message ID for which to chanage the listener. * @return Previous listener. */ LDAPMessageQueue changeListener (int id, LDAPMessageQueue toNotify) { if (m_thread == null) { toNotify.setException(this, new LDAPException("Server or network error", LDAPException.SERVER_DOWN)); return null; } return (LDAPMessageQueue) m_requests.put (new Integer (id), toNotify); } /** * Handles network errors. Basically shuts down the whole connection. * @param e The exception which was caught while trying to read from * input stream. */ private synchronized void networkError (Exception e) { if (m_thread == null) { return; } m_thread = null; // No more request processing cleanUp(new LDAPException("Server or network error", LDAPException.SERVER_DOWN)); } }ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPEntry.java0000664001003300100330000001754510602743270026357 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * Represents an entry in the directory. * * @version 1.0 */ public class LDAPEntry implements java.io.Serializable { static final long serialVersionUID = -5563306228920012807L; private String dn = null; private LDAPAttributeSet attrSet = null; /** * Constructs an empty entry. */ public LDAPEntry() { dn = null; attrSet = new LDAPAttributeSet(); } /** * Constructs a new entry with the specified distinguished name and with * an empty attribute set. * @param distinguishedName the distinguished name of the new entry */ public LDAPEntry( String distinguishedName ) { dn = distinguishedName; attrSet = new LDAPAttributeSet(); } /** * Constructs a new entry with the specified distinguished name and * set of attributes. * @param distinguishedName the distinguished name of the new entry * @param attrs the set of attributes to assign to the new entry * @see netscape.ldap.LDAPAttributeSet */ public LDAPEntry( String distinguishedName, LDAPAttributeSet attrs ) { dn = distinguishedName; attrSet = attrs; } /** * Returns the distinguished name of the current entry. * @return distinguished name of the current entry. */ public String getDN() { return dn; } void setDN(String name) { dn = name; } /** * Returns the attribute set of the entry. * @return set of attributes in the entry. * @see netscape.ldap.LDAPAttributeSet */ public LDAPAttributeSet getAttributeSet() { return attrSet; } /** * Creates a new attribute set containing only the attributes * that have the specified subtypes. *

* * For example, suppose an entry contains the following attributes: *

* *

     * cn
     * cn;lang-ja
     * sn;phonetic;lang-ja
     * sn;lang-us
     * 
* * If you call the getAttributeSet method and pass * lang-ja as the argument, the method returns * an attribute set containing the following attributes: *

* *

     * cn;lang-ja
     * sn;phonetic;lang-ja
     * 
* * @param subtype semi-colon delimited list of subtypes * that you want to find in attribute names. *
     *     "lang-ja"        // Only Japanese language subtypes
     *     "binary"         // Only binary subtypes
     *     "binary;lang-ja" // Only Japanese language subtypes
     *                         which also are binary
     *
* @return attribute set containing the attributes that have * the specified subtypes. * @see netscape.ldap.LDAPAttributeSet * @see netscape.ldap.LDAPAttributeSet#getSubset */ public LDAPAttributeSet getAttributeSet(String subtype) { return attrSet.getSubset(subtype); } /** * In an entry, returns the single attribute that exactly matches the * specified attribute name. * @param attrName name of attribute to return * For example: *
     *     "cn"            // Only a non-subtyped version of cn
     *     "cn;lang-ja"    // Only a Japanese version of cn, will not
     *                     // return "cn;lang-ja-JP-kanji", for example
     *
* @return attribute in the current entry that has exactly the same name, * or null (if no attribute in the entry matches the specified name). * @see netscape.ldap.LDAPAttribute */ public LDAPAttribute getAttribute(String attrName) { return attrSet.getAttribute(attrName); } /** * Returns the subtype that matches "attrName" and that best matches * a language specification "lang". If there are subtypes other than * "lang" subtypes included in attrName, e.g. "cn;binary", only * attributes with all of those subtypes are returned. If lang is * null or empty, the method behaves as getAttribute(attrName). If * there are no matching attributes, null is returned. * * Example:
     *  Assume the entry contains only the following attributes:
     *     cn;lang-en
     *     cn;lang-ja-JP-kanji
     *     sn
     *  getAttribute( "cn" ) returns null.
     *  getAttribute( "sn" ) returns the "sn" attribute.
     *  getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute.
     *  getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute.
     *  getAttribute( "cn", "lang-ja" ) returns null.
     *  getAttribute( "sn", "lang-en" ) returns the "sn" attribute.
     *
*

* @param attrName name of attribute to find in the entry * @param lang a language specification (for example, lang-en) * @return the attribute that matches the base name and that best * matches any specified language subtype. * @see netscape.ldap.LDAPAttribute */ public LDAPAttribute getAttribute( String attrName, String lang ) { return attrSet.getAttribute( attrName, lang ); } /** * Retrieves the string representation of the entry's * distinguished name (DN) and its attributes. * For example: * *

     * LDAPEntry: uid=bjensen, ou=People, o=airius.com; LDAPAttributeSet:
     * LDAPAttribute {type='cn', values='Barbara Jensen,Babs Jensen'}
     * LDAPAttribute {type='sn', values='Jensen'}LDAPAttribute {type='givenname',
     * values='Barbara'}LDAPAttribute {type='objectclass', values='top,person,
     * organizationalPerson,inetOrgPerson'}LDAPAttribute {type='ou',
     * values='Product Development,People'}
     * 
* * @return string representation of the entry's DN and its attributes. */ public String toString() { StringBuffer sb = new StringBuffer("LDAPEntry: "); if ( dn != null ) { sb.append(dn); sb.append("; "); } if ( attrSet != null ) { sb.append(attrSet.toString()); } return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/0000775001003300100330000000000010667357325024523 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/0000775001003300100330000000000010667357325026016 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERChoice.java0000664001003300100330000000717510620653754030410 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Choice object. Note that this class may be * used by a client. * *
 * ENCODING RULE:
 *   Encoding is the encoding of the specific type used.
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERChoice extends BERElement { /** * Internal variables */ private BERElement m_value = null; /** * Constructs a choice element. * @param value any BERElement value */ public BERChoice(BERElement value) { m_value = value; } /** * Constructs a choice element from an input stream. * Note that with the current decoding architecture choice types * will not be decoded as choices but rather as the types * chosen. The following method will never be called. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERChoice(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { m_value = getElement(decoder, stream, bytes_read); } /** * Sends the BER encoding of the chosen type directly to a stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { m_value.write(stream); } /** * Gets the value of the chosen type. */ public BERElement getValue() { return m_value; } /** * Gets the element type. */ public int getType() { return BERElement.CHOICE; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "CHOICE {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERSequence.java0000664001003300100330000000636010602743270030752 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Sequence object. A sequence object can * contains a sequence of BER Elements. * *
 * ENCODING RULE:
 *  tag    = 0x30 (always constructed)
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERSequence extends BERConstruct { /** * Constructs a sequence element. */ public BERSequence() { super(); } /** * Constructs a sequence element from an input stream. * @param decoder application-specific BER decoder * @param stream input stream from which to read BER * @param bytes_read array of 1 int; value is incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERSequence(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder, stream, bytes_read); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.SEQUENCE; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String elements = ""; for (int i = 0; i < super.size(); i++) { if (i != 0) elements = elements + ", "; elements = elements + ((BERElement)super.elementAt(i)).toString(); } return "Sequence {" + elements + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERNull.java0000664001003300100330000000651410602743270030115 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the NULL type. * *
 * ENCODING RULE:
 *   tag = 0x05
 *   length value is zero (short or long form).
 *   no contents
 *
 * Example 1:  (short form)
 *   05 00
 * Example 2:  (long form)
 *   05 81 00
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERNull extends BERElement { /** * Constructs a NULL element. */ public BERNull() { } /** * Constructs a null element from an input stream. * @param stream input stream from socket * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERNull(InputStream stream, int[] bytes_read) throws IOException { /* The result should be zero of course */ readLengthOctets(stream,bytes_read); } /** * Sends the BER encoding directly to stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { byte[] buffer = new byte[2]; buffer[0] = (byte)BERElement.NULL; /* NULL tag */ buffer[1] = 0x00; /* length */ stream.write(buffer); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.NULL; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Null {}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERIntegral.java0000664001003300100330000001444510602743270030752 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This is the base class for integral types such as Integer and * Enumerated. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = << depends on type >>
 *   length = (short or long form)
 *   one or more contents octets hold integral value
 *   value in two's complement
 *
 * Example 1:  (Integer - zero)
 *   02 01 00
 * Example 2:  (Enumerated - 1)
 *   0A 01 01
 * Example 3:  (Integer - 300, short form)
 *   02 02 01 2C
 * Example 4:  (Integer - 300, long form)
 *   02 84 00 00 01 2C
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public abstract class BERIntegral extends BERElement { /** * Value of element */ private int m_value; /** * Constructs an integral type with a value. * @param value integer value */ public BERIntegral(int value) { m_value = value; } /** * Constructs an integral element from an input stream. * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERIntegral(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { boolean negative = false; int octet = stream.read(); bytes_read[0]++; if ((octet & 0x80) > 0) /* left-most bit is 1. */ negative = true; for (int i = 0; i < contents_length; i++) { if (i > 0) { octet = stream.read(); bytes_read[0]++; } if (negative) m_value = (m_value<<8) + (int)(octet^0xFF)&0xFF; else m_value = (m_value<<8) + (int)(octet&0xFF); } if (negative) /* convert to 2's complement */ m_value = (m_value + 1) * -1; } } /** * Writes BER to stream. * @param stream output stream * @exception IOException on failure to write */ public void write(OutputStream stream) throws IOException { int binary_value = m_value; int num_content_octets = 0; int total_ber_octets; int offset=1; int lead; int i; byte[] content_octets = new byte[10]; /* should be plenty big */ byte[] net_octets = new byte[10]; /* pse need this in network order */ /* Get content octets - need to determine length */ if (m_value == 0) { num_content_octets = 1; content_octets[offset] = (byte)0x00; net_octets[offset] = (byte)0x00; } else { if (m_value < 0) /* convert from 2's complement */ binary_value = (m_value * -1) -1; do { if (m_value < 0) content_octets[num_content_octets+offset] = (byte)((binary_value^0xFF)&0xFF); else content_octets[num_content_octets+offset] = (byte)(binary_value&0xFF); binary_value = (binary_value>>8); num_content_octets++; } while (binary_value > 0); /* pse 1/16/96 we've just created a string that is in non-network order flip it for net order */ for (i=0; i 0) && ((lead & 0x80) > 0)) { offset = 0; net_octets[offset] = (byte)0x00; num_content_octets++; } } stream.write(getType()); sendDefiniteLength(stream, num_content_octets); stream.write(net_octets,offset,num_content_octets); /* contents */ } /** * Gets the integral value. * @return element value. */ public int getValue() { return m_value; } /** * Gets the element type. * @return element type. */ public abstract int getType(); /** * Gets the string representation. * @return string representation of tag. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERBoolean.java0000664001003300100330000000736310620653754030574 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Boolean object. * *
 * ENCODING RULE:
 *  tag    = 0x01
 *  length = 0x01
 *  one contents octet (non-zero indicates TRUE).
 *
 * Example 1:  (false)
 *   01 01 00
 * Example 2:  (true)
 *   01 01 FF
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERBoolean extends BERElement { /** * Internal variables */ private boolean m_value = true; /** * Constructs a boolean element. * @param value boolean value */ public BERBoolean(boolean value) { m_value = value; } /** * Constructs a boolean element from an input stream. * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERBoolean(InputStream stream, int[] bytes_read) throws IOException { int octet = stream.read(); /* skip length */ bytes_read[0]++; octet = stream.read(); /* content octet */ bytes_read[0]++; if (octet > 0) m_value = true; else m_value = false; } /** * Sends the BER encoding directly to a stream. * @param stream output stream */ public void write(OutputStream stream) throws IOException { stream.write(BERElement.BOOLEAN); stream.write(0x01); if (m_value) stream.write(0xFF); /* non-zero means true. */ else stream.write(0x00); /* zero means false. */ } /** * Gets the boolean value. */ public boolean getValue() { return m_value; } /** * Gets the element type. */ public int getType() { return BERElement.BOOLEAN; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Boolean {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BEREnumerated.java0000664001003300100330000000611510620653754031300 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Enumerated object. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x0a
 *   length = (short or long form)
 *   one or more contents octets hold integral value
 *   value in two's complement
 *
 * Example:  (Enumerated - 1)
 *   0A 01 01
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BEREnumerated extends BERIntegral { /** * Constructs an enumerated element with a value. * @param value integral value */ public BEREnumerated(int value) { super(value); } /** * Constructs an enumerated element with the input stream. * @param stream input stream from which to decode * @param bytes_read array of 1 int; value incremented by * number of bytes read from array * @exception IOException failed to construct */ public BEREnumerated(InputStream stream, int[] bytes_read) throws IOException { super(stream, bytes_read); } /** * Gets the element type. */ public int getType() { return BERElement.ENUMERATED; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Enumerated {" + getValue() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERElement.java0000664001003300100330000003057010620653754030602 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the tagged object type. A nested tag is * allowed. A tagged element contains another BER element. * * @version 1.0 * seeAlso CCITT X.209 */ public abstract class BERElement implements Serializable { /** * Possible element types. */ public final static int BOOLEAN = 0x01; public final static int INTEGER = 0x02; public final static int BITSTRING = 0x03; public final static int OCTETSTRING = 0x04; public final static int NULL = 0x05; public final static int OBJECTID = 0x06; public final static int REAL = 0x09; public final static int ENUMERATED = 0x0a; public final static int SET = 0x31; /* always constructed */ public final static int SEQUENCE = 0x30; /* always constructed */ public final static int NUMERICSTRING = 0x12; public final static int PRINTABLESTRING = 0x13; public final static int TELETEXSTRING = 0x14; public final static int VIDEOTEXSTRING = 0x15; public final static int IA5STRING = 0x16; public final static int UTCTIME = 0x17; public final static int GRAPHICSTRING = 0x19; public final static int VISIBLESTRING = 0x1A; public final static int GENERALSTRING = 0x1B; /** * Internal (non-transmitted) tags. */ public final static int TAG = -1; public final static int CHOICE = -2; public final static int ANY = -3; /** * Possible tags. */ public final static int EOC = 0x00; /* End Of Construction */ public final static int UNIVERSAL = 0x00; public final static int APPLICATION = 0x40; public final static int CONTEXT = 0x80; public final static int SASLCONTEXT = 0xa0; public final static int PRIVATE = 0xC0; public final static int PRIMITIVE = 0x00; public final static int CONSTRUCTED = 0x20; public final static int MRA_OID = 0x01; public final static int MRA_TYPE = 0x02; public final static int MRA_VALUE = 0x03; public final static int MRA_DNATTRS = 0x04; public final static int EXOP_REQ_OID = 0x00; public final static int EXOP_REQ_VALUE = 0x01; public final static int EXOP_RES_OID = 0x0a; public final static int EXOP_RES_VALUE = 0x0b; public final static int SK_MATCHRULE = 0x00; public final static int SK_REVERSE = 0x01; public final static int SR_ATTRTYPE = 0x00; /** * Gets a ber element from the input stream. * @param decoder decoder for application specific BER * @param stream source of ber encoding * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to decode an element. */ public static BERElement getElement(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { BERElement element = null; int tag = stream.read(); bytes_read[0] = 1; if (tag == EOC) { stream.read(); /* length octet (always zero) */ bytes_read[0] = 1; element = null; } else if (tag == BOOLEAN) { element = new BERBoolean(stream, bytes_read); } else if (tag == INTEGER) { element = new BERInteger(stream, bytes_read); } else if (tag == BITSTRING) { element = new BERBitString(stream, bytes_read); } else if (tag == (BITSTRING | CONSTRUCTED)) { element = new BERBitString(decoder, stream, bytes_read); } else if (tag == OCTETSTRING) { element = new BEROctetString(stream, bytes_read); } else if (tag == (OCTETSTRING | CONSTRUCTED)) { element = new BEROctetString(decoder, stream, bytes_read); } else if (tag == NULL) { element = new BERNull(stream, bytes_read); } else if (tag == OBJECTID) { element = new BERObjectId(stream, bytes_read); } else if (tag == REAL) { element = new BERReal(stream, bytes_read); } else if (tag == ENUMERATED) { element = new BEREnumerated(stream, bytes_read); } else if (tag == SEQUENCE) { element = new BERSequence(decoder, stream, bytes_read); } else if (tag == SET) { element = new BERSet(decoder, stream, bytes_read); } else if (tag == NUMERICSTRING) { element = new BERNumericString(stream, bytes_read); } else if (tag == (NUMERICSTRING | CONSTRUCTED)) { element = new BERNumericString(decoder, stream, bytes_read); } else if (tag == PRINTABLESTRING) { element = new BERPrintableString(stream, bytes_read); } else if (tag == (PRINTABLESTRING | CONSTRUCTED)) { element = new BERPrintableString(decoder, stream, bytes_read); } else if (tag == UTCTIME) { element = new BERUTCTime(stream, bytes_read); } else if (tag == (UTCTIME | CONSTRUCTED)) { element = new BERUTCTime(decoder, stream, bytes_read); } else if (tag == VISIBLESTRING) { element = new BERVisibleString(stream, bytes_read); } else if (tag == (VISIBLESTRING | CONSTRUCTED)) { element = new BERVisibleString(decoder, stream, bytes_read); } else if ((tag & (APPLICATION | PRIVATE | CONTEXT)) > 0) { element = new BERTag(decoder, tag, stream, bytes_read); } else throw new IOException("invalid tag " + tag); return element; } /** * Reads and decodes a length byte and then that many octets * from the input stream. * @param stream input stream from which to read * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @return length of contents or -1 if indefinite length. * @exception IOException failed to read octets */ public static int readLengthOctets(InputStream stream, int[] bytes_read) throws IOException { int contents_length = 0; int octet = stream.read(); bytes_read[0]++; if (octet == 0x80) /* Indefinite length */ contents_length = -1; else if ((octet & 0x80) > 0) { /* Definite (long form) - num octets encoded in 7 rightmost bits */ int num_length_octets = (octet & 0x7F); for (int i = 0; i < num_length_octets; i++) { octet = stream.read(); bytes_read[0]++; contents_length = (contents_length<<8) + octet; } } else { /* Definite (short form) - one length octet. Value encoded in */ /* 7 rightmost bits. */ contents_length = octet; } return contents_length; } /** * Writes length octets (definite length only) to stream. * Uses shortform whenever possible. * @param stream output stream to write to * @param num_content_octets value to be encode into length octets * @exception IOException failed to read octets */ public static void sendDefiniteLength(OutputStream stream, int num_content_octets) throws IOException { int bytes_written = 0; if (num_content_octets <= 127) { /* Use short form */ stream.write(num_content_octets); } else { /* Using long form: * Need to determine how many octets are required to * encode the length. */ int num_length_octets = 0; int num = num_content_octets; while (num >= 0) { num_length_octets++; num = (num>>8); if (num <= 0) break; } byte[] buffer = new byte[num_length_octets+1]; buffer[0] = (byte)(0x80 | num_length_octets); num = num_content_octets; for (int i = num_length_octets; i > 0; i--) { buffer[i] = (byte)(num & 0xFF); num = (num>>8); } stream.write(buffer); } } /** * Reads a number of bytes from an input stream and form * an integer.. * @param stream source of data * @param bytes_read number of bytes read * @param length number of bytes to be read (1 to 4) * @return the value of the data as two's complement. * @exception IOException failed to read octets */ protected int readUnsignedBinary(InputStream stream, int[] bytes_read, int length) throws IOException { int value = 0; int octet; for (int i = 0; i < length; i++) { octet = stream.read(); bytes_read[0]++; value = (value<<8) + octet; } return value; } /** * Reads the two's complement representation of an integer from * an input stream. * @param stream source of data * @param bytes_read number of bytes read * @param length number of bytes to be read * @return the integer value as two's complement. * @exception IOException failed to read octets */ protected int readTwosComplement(InputStream stream, int[] bytes_read, int length) throws IOException { int value = 0; if (length > 0) { boolean negative = false; int octet = stream.read(); bytes_read[0]++; if ((octet & 0x80) > 0) /* left-most bit is 1. */ negative = true; for (int i = 0; i < length; i++) { if (i > 0) { octet = stream.read(); bytes_read[0]++; } if (negative) value = (value<<8) + (int)(octet^0xFF)&0xFF; else value = (value<<8) + (int)(octet&0xFF); } if (negative) /* convert to 2's complement */ value = (value + 1) * -1; } return value; } /** * Converts byte to hex string. * @param value byte value * @return string representation of Hex String */ public String byteToHexString(byte value) { if (value < 0) return Integer.toHexString((value & 0x7F) + 128); else return Integer.toHexString(value); } /** * Sends the BER encoding directly to a stream. * @param stream output stream */ public abstract void write(OutputStream stream) throws IOException; /** * Gets the element type. * @return element type. */ public abstract int getType(); /** * Gets the string representation. * @return string representation of an element. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERTagDecoder.java0000664001003300100330000000536210602743270031204 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This is an abstract class which should be extended * for use by the BERTag class in decoding application * specific BER tags. Since different applications may * define their own tag, the BER package needs a tag decoder * to give hints on how to decode implicitly tagged * objects. Each application should extend this * decoder. * * @version 1.0 * seeAlso CCITT X.209 */ public abstract class BERTagDecoder { /** * Gets an application specific ber element from an input stream. * @param decoder an instance of a BERTagDecoder * @param tag element tag * @param stream source stream * @param bytes_read array of 1 int; value incremented by number * of bytes read from stream * @param implicit array of implicit flags */ public abstract BERElement getElement(BERTagDecoder decoder, int tag, InputStream stream, int[] bytes_read, boolean[] implicit) throws IOException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERReal.java0000664001003300100330000001765310602743270030074 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Real object. * *
 * ENCODING RULE:
 *  tag    = 0x09
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERReal extends BERElement { /** * Constants: special ASN.1 real values */ public final static float PLUS_INFINITY = 1.0f/0.0f; public final static float MINUS_INFINITY = -1.0f/0.0f; /** * Value of element */ private float m_value = 0; /** * Constructs a real element with a value * @param value float value */ public BERReal(float value) { m_value = value; } /** * Constructs a real element from an input stream. * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream. * @exception IOException failed to construct */ public BERReal(InputStream stream, int[] bytes_read) throws IOException { int length = super.readLengthOctets(stream, bytes_read); if (length == 0) /* zero length indicates value is zero */ m_value = 0; else { int octet = stream.read(); /* first content octet */ bytes_read[0]++; if (octet == 0x40) /* bit 8 = 1 */ m_value = PLUS_INFINITY; else if (octet == 0x41) /* bit 8 = 1 and bit 1 = 1 */ m_value = MINUS_INFINITY; else if ((octet & 0x80) > 0) { /* bit 8 = 1 */ /* Binary encoding */ /* M = S*N*2F where S = -1 or 1, 0<= F <= 3. */ int sign; int base; int number; int f; /* binary scaling factor */ int exponent; int mantissa; int num_exponent_octets; int contents_length_left; if ((octet & 0x40) > 0) sign = -1; else sign = 1; if ((octet & 0x20) > 0) { if ((octet & 0x10) > 0) { /* bits 6+5 = 11 */ /* reserved for future use */ base = 0; } else { /* bits 6+5 = 10 */ base = 16; } } else if ((octet & 0x10) > 0) { /* bits 6+5 = 01 */ base = 8; } else { /* bits 6+5 = 00 */ base = 2; } if ((octet & 0x08) > 0) { if ((octet & 0x04) > 0) { /* bits 4+3 = 11 */ f = 3; } else { /* bits 4+3 = 10 */ f = 2; } } else if ((octet & 0x04) > 0) { /* bits 4+3 = 01 */ f = 1; } else { /* bits 4+3 = 00 */ f = 0; } if ((octet & 0x02) > 0) { if ((octet & 0x01) > 0) { /* bits 2+1 = 11 */ /* Following octet encodes the number of octets used to * encode the exponent. */ num_exponent_octets = stream.read(); bytes_read[0]++; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } else { /* bits 2+1 = 10 */ num_exponent_octets = 3; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } } else if ((octet & 0x01) > 0) { /* bits 2+1 = 01 */ num_exponent_octets = 2; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } else { /* bits 2+1 = 00 */ num_exponent_octets = 1; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } contents_length_left = length - 1 - num_exponent_octets; number = readUnsignedBinary(stream, bytes_read, contents_length_left); mantissa = (int)(sign * number * Math.pow(2, f)); m_value = mantissa * (float)Math.pow((double)base,(double)exponent); } else { /* bits 8 + 7 = 00 */ /* ISO 6093 field */ /*** NOTE: It has been agreed that this feature will * not be provided right now. */ throw new IOException("real ISO6093 not supported. "); } } } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { if (m_value == 0) { stream.write(BERElement.REAL); stream.write(0x00); /* length */ } else if (m_value == PLUS_INFINITY) { stream.write(BERElement.REAL); stream.write(0x01); /* length */ stream.write(0x40); /* contents */ } else if (m_value == MINUS_INFINITY) { stream.write(BERElement.REAL); stream.write(0x01); /* length */ stream.write(0x41); /* contents */ } else { /* Non-special real value */ /* NOTE: currently always sends as a base 2 binary encoding * (see X.2 09 section 10.5.) * * M = S * N * 2F * * Simple encoding always uses F = 1. */ // bcm - incomplete. } } /** * Gets the element type. * @return element type */ public int getType() { return BERElement.REAL; } /** * Gets the string representation. * @return string representation of tag */ public String toString() { return "Real {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERPrintableString.java0000664001003300100330000000745610620653754032327 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the PrintableString type. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x13
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERPrintableString extends BERCharacterString { /** * Constructs a printable string element containing buffer. * @param string string value */ public BERPrintableString(String string) { m_value = string; } /** * Constructs a printables tring element from buffer. * @param buffer byte array value */ public BERPrintableString(byte[] buffer) { super(buffer); } /** * Constructs a printable string element from an input stream * (for constructed encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERPrintableString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder,stream,bytes_read); } /** * Constructs a printablestring element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERPrintableString(InputStream stream, int[] bytes_read) throws IOException { super(stream,bytes_read); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.PRINTABLESTRING; } /** * Gets the string representation. Note that it prints out * values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "PrintableString (null)"; else return "PrintableString {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERNumericString.java0000664001003300100330000000747110620653754032006 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the NumericString type. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x12
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERNumericString extends BERCharacterString { /** * Constructs a numeric string element from a string * @param string string with value of element */ public BERNumericString(String string) { m_value = string; } /** * Constructs a numeric string element from a byte array * @param buffer buffer */ public BERNumericString(byte[] buffer) { super(buffer); } /** * Constructs a numeric string element from an input stream * (for constructed encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERNumericString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder,stream,bytes_read); } /** * Constructs a numericstring element from an input stream * (for primitive encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERNumericString(InputStream stream, int[] bytes_read) throws IOException { super(stream,bytes_read); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.NUMERICSTRING; } /** * Gets the string representation. Note that currently prints out * values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "NumericString (null)"; else return "NumericString {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERCharacterString.java0000664001003300100330000001520210620653754032267 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This is an abstract base class for character string types. * * @version 1.0 * seeAlso CCITT X.209 */ public abstract class BERCharacterString extends BERElement { /** * Internal variables */ protected String m_value = null; /** * Constructs a character string element containing a buffer. */ public BERCharacterString() { } /** * Constructs a character string element containing buffer. * @param string a string value */ public BERCharacterString(String string) { m_value = string; } /** * Constructs a character string element from a byte array. * @param buffer buffer containing UTF8 data */ public BERCharacterString(byte[] buffer) { try{ m_value = new String(buffer,"UTF8"); } catch(Throwable x) {} } /** * Constructs a character string element from an input stream * (for constructed encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERCharacterString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; if (contents_length == -1) { /* Constructed - indefinite length content octets. */ do { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a string of same type * - add it to the existing buffer */ BERCharacterString octet_element = (BERCharacterString)element; String string_buffer = octet_element.getValue(); if (m_value == null) { m_value = string_buffer; } else { m_value = m_value + string_buffer; } } } while (element != null); } else { /* Definite length content octets string. */ bytes_read[0] += contents_length; while (contents_length > 0) { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a string of the same type * - add it to the existing buffer */ BERCharacterString octet_element = (BERCharacterString)element; String string_buffer = octet_element.getValue(); if (m_value == null) { m_value = string_buffer; } else { m_value = m_value + string_buffer; } } contents_length -= component_length[0]; } } } /** * Constructs a character string element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERCharacterString(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { byte[] buffer = new byte[contents_length]; for (int i = 0; i < contents_length; i++) { buffer[i] = (byte) stream.read(); } bytes_read[0] += contents_length; try { m_value = new String(buffer,"UTF8"); } catch(Throwable x) {} } } private byte[] byte_buf; /** * Writes BER to stream. * @param stream output stream */ public void write(OutputStream stream) throws IOException { stream.write(getType()); /* tag */ if (m_value == null) { sendDefiniteLength(stream, 0); } else { try { byte_buf = m_value.getBytes("UTF8"); sendDefiniteLength(stream, byte_buf.length); /* length */ } catch(Throwable x) {} stream.write(byte_buf,0,byte_buf.length); /* contents */ } } /** * Gets the element value. */ public String getValue() { return m_value; } /** * Gets the element type. */ public abstract int getType(); /** * Gets the string representation. * @return string representation. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERInteger.java0000664001003300100330000000620710620653754030606 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Integer object. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x02
 *   length = (short or long form)
 *   one or more contents octets hold integer
 *   value in two's complement
 *
 * Example 1:  (zero)
 *   02 01 00
 * Example 2:  (1)
 *   02 01 01
 * Example 3:  (300 - short form)
 *   02 02 01 2C
 * Example 4:  (300 - long form)
 *   02 84 00 00 01 2C
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERInteger extends BERIntegral { /** * Constructs a integer element. * @param value integer value */ public BERInteger(int value) { super(value); } /** * Constructs an integer element with the input stream. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERInteger(InputStream stream, int[] bytes_read) throws IOException { super(stream, bytes_read); } /** * Gets the element type. */ public int getType() { return BERElement.INTEGER; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Integer {" + getValue() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERTag.java0000664001003300100330000001326510602743270027717 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the tagged object type. A nested tag is * allowed. A tagged element contains another * ber element. * *
 * ENCODING RULE:
 *  tag    = whatever it is constructed with
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERTag extends BERElement { /** * Value of tag */ private int m_tag = 0; /** * Value of element */ private BERElement m_element = null; /** * Implicit or not */ private boolean m_implicit = false; /** * Constructs a tag element. * @param tag tag value * @param element ber element * @param implicit tagged implicitly */ public BERTag(int tag, BERElement element, boolean implicit) { m_tag = tag; m_element = element; m_implicit = implicit; } /** * Constructs a tag element from an input stream. * @param decoder decoder object for application-specific tags * @param tag tag value; already stripped from stream * @param stream source * @param bytes_read array of 1 int; incremented by number * of bytes read from stream * @exception IOException failed to construct */ public BERTag(BERTagDecoder decoder, int tag, InputStream stream, int[] bytes_read) throws IOException { m_tag = tag; boolean[] implicit = new boolean[1]; /* * Need to use user callback to decode contents of * a non-universal tagged value. */ m_element = decoder.getElement(decoder, tag, stream, bytes_read, implicit); m_implicit = implicit[0]; } /** * Gets the element from the tagged object. * @return BER element. */ public BERElement getValue() { return m_element; } /** * Sets the implicit tag. If it is an implicit tag, * the next element tag can be omitted (it will * not be sent to a stream or buffer). * @param value implicit flag */ public void setImplicit(boolean value) { m_implicit = value; } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to send */ public void write(OutputStream stream) throws IOException { stream.write(m_tag); /* bcm - assuming tag is one byte */ ByteArrayOutputStream contents_stream = new ByteArrayOutputStream(); m_element.write(contents_stream); byte[] contents_buffer = contents_stream.toByteArray(); if (m_implicit) { /* Assumes tag is only one byte. Rest of buffer is */ /* length and contents of tagged element. */ stream.write(contents_buffer, 1, contents_buffer.length -1); } else { /* Send length */ sendDefiniteLength(stream, contents_buffer.length); /* Send contents */ stream.write(contents_buffer); } } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.TAG; } /** * Gets the element tag. * @return element tag. */ public int getTag() { return m_tag; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String s = ""; if ((m_tag & 0xC0) == 0) /* bits 8 + 7 are zeros */ s = s + "UNIVERSAL-"; else if (((m_tag & 0x80) & (m_tag & 0x40)) > 0) /* bits 8 + 7 are ones */ s = s + "PRIVATE-"; else if ((m_tag & 0x40) > 0) /* bit 8 is zero, bit 7 is one */ s = s + "APPLICATION-"; else if ((m_tag & 0x80) > 0) /* bit 8 is one, bit 7 is zero */ s = s + "CONTEXT-"; return "[" + s + (m_tag&0x1f) + "] " + m_element.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERUTCTime.java0000664001003300100330000001406410620653754030463 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the UTCTime object. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x17
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERUTCTime extends BERElement { /** * Internal variables */ private String m_value = null; /** * Constructs a UTC time element containing the specified string. * @param utc_string string in UTC time format */ public BERUTCTime(String utc_string) { m_value = utc_string; } /** * Constructs a UTCTime element from an input stream * (for constructed encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERUTCTime(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; m_value = ""; if (contents_length == -1) { /* Constructed - indefinite length content octets. */ { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is an octetstring - add it to the existing buffer */ BERUTCTime utc_element = (BERUTCTime)element; m_value += utc_element.getValue(); } } while (element != null); } else { /* Definite length content octets string. */ bytes_read[0] += contents_length; while (contents_length > 0) { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is an octetstring - add it to the existing buffer */ BERUTCTime utc_element = (BERUTCTime)element; m_value += utc_element.getValue(); } contents_length -= component_length[0]; } } } /** * Constructs a UTC time element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERUTCTime(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { byte[] byte_buf = new byte[contents_length]; for (int i = 0; i < contents_length; i++) { byte_buf[i] = (byte) stream.read(); } bytes_read[0] += contents_length; try{ m_value = new String(byte_buf, "UTF8"); } catch(Throwable x) {} } } private byte[] byte_buf; /** * Writes BER to a stream. * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { stream.write((byte)getType()); if (m_value == null) { sendDefiniteLength(stream, 0); } else { try{ byte_buf = m_value.getBytes("UTF8"); sendDefiniteLength(stream, byte_buf.length); /* length */ } catch(Throwable x) {} stream.write(byte_buf,0,byte_buf.length); /* contents */ } } /** * Gets the element value. */ public String getValue() { return m_value; } /** * Gets the element type. */ public int getType() { return BERElement.UTCTIME; } /** * Gets the string representation. * NOTE: currently prints out values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "UTCTime (null)"; else return "UTCTime {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERVisibleString.java0000664001003300100330000000734710620653754032003 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the VisibleString object. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x1A
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 * seeAlso X.209 */ public class BERVisibleString extends BERCharacterString { /** * Constructs a visiblestring element. * @param string string */ public BERVisibleString(String string) { m_value = string; } /** * Constructs a visiblestring element from buffer. * @param buffer buffer */ public BERVisibleString(byte[] buffer) { super(buffer); } /** * Constructs a visiblestring element with the input stream. * (for constructed encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERVisibleString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder,stream,bytes_read); } /** * Constructs a visiblestring element with the input stream. * (for primitive encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERVisibleString(InputStream stream, int[] bytes_read) throws IOException { super(stream,bytes_read); } /** * Gets the element type. */ public int getType() { return BERElement.VISIBLESTRING; } /** * Gets the string representation. Note that currently prints out * values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "VisibleString (null)"; return "VisibleString {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERConstruct.java0000664001003300100330000001154610620653754031177 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This abstract class serves as a based class for constructed * types such as sequence or set. * * @version 1.0 * seeAlso CCITT X.209 */ public abstract class BERConstruct extends BERElement { /** * List of BER elements in the construct. */ private Vector m_elements = new Vector(); /** * Constructs a construct element. */ public BERConstruct() { } /** * Constructs a construct element from an input stream. * @param decoder decoder for application specific BER * @param stream input stream from socket * @param bytes_read array of 1 int; value incremented by number * of bytes read from stream * @exception IOException failed to construct */ public BERConstruct(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream,bytes_read); int[] component_length = new int[1]; if (contents_length == -1) { /* Constructed - indefinite length */ BERElement element = null; { component_length[0] = 0; element = getElement(decoder, stream, component_length); if (element != null) addElement(element); } while (element != null); } else { /* Constructed - definite length */ bytes_read[0] += contents_length; while (contents_length > 0) { component_length[0] = 0; addElement(getElement(decoder, stream,component_length)); contents_length -= component_length[0]; } } } /** * Adds an element to the list. */ public void addElement(BERElement element) { m_elements.addElement(element); } /** * Retrieves number of elements. * @return number of elements. */ public int size() { return m_elements.size(); } /** * Gets ber element at specific position. * @param index index of the element to get * @return BER element. */ public BERElement elementAt(int index) { return (BERElement)m_elements.elementAt(index); } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to send */ public void write(OutputStream stream) throws IOException { stream.write(getType()); ByteArrayOutputStream contents_stream = new ByteArrayOutputStream(); for (int i = 0; i < m_elements.size(); i++) { BERElement e = elementAt(i); e.write(contents_stream); } byte[] contents_buffer = contents_stream.toByteArray(); sendDefiniteLength(stream, contents_buffer.length); stream.write(contents_buffer); } /** * Gets the element type. */ public abstract int getType(); /** * Gets the string representation. * @return string representation of tag. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BEROctetString.java0000664001003300100330000001674610620653754031467 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the OctetString type. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x04
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BEROctetString extends BERElement { /** * Raw value of element */ private byte[] m_value = null; /** * Constructs an octet string element containing a copy of * the contents of buffer. * @param buffer a UCS-2 String */ public BEROctetString(String buffer) { if (buffer == null) return; try { m_value = buffer.getBytes( "UTF8" ); } catch (Throwable xxx){}; } /** * Constructs an octet string element containing a reference to * buffer. * @param buffer a byte array, which must be in UTF-8 format if * it is string data */ public BEROctetString(byte[] buffer) { m_value = buffer; } /** * Constructs an octet string element containing a * subset of buffer. * @param buffer buffer containing 'octets' * @param start start of buffer range to copy * @param end end of buffer range to copy */ public BEROctetString(byte[] buffer, int start, int end) { m_value = new byte[end - start]; for (int i = 0; i < end - start; i++) m_value[i] = buffer[start + i]; } /** * Constructs an octet string element from an input stream * (for constructed encoding) * @param decoder a decode that understands the specific tags * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BEROctetString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; if (contents_length == -1) { /* Constructed - indefinite length content octets. */ do { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is an octetstring - add it to the existing buffer */ BEROctetString octet_element = (BEROctetString)element; byte[] octet_buffer = octet_element.getValue(); if (m_value == null) { m_value = new byte[octet_buffer.length]; System.arraycopy(octet_buffer,0, m_value,0,octet_buffer.length); } else { byte[] new_buffer = new byte[m_value.length + octet_buffer.length]; System.arraycopy(m_value,0,new_buffer,0,m_value.length); System.arraycopy(octet_buffer,0, new_buffer,m_value.length, octet_buffer.length); m_value = new_buffer; } } } while (element != null); } else { /* Definite length content octets string. */ bytes_read[0] += contents_length; m_value = new byte[contents_length]; int cnt=0, idx=0; while (idx < contents_length) { cnt = stream.read(m_value, idx, contents_length-idx); idx += cnt; } } } /** * Constructs an octet string element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BEROctetString(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { m_value = new byte[contents_length]; for (int i = 0; i < contents_length; i++) { m_value[i] = (byte) stream.read(); } bytes_read[0] += contents_length; } } /** * Writes BER to stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { stream.write((byte)BERElement.OCTETSTRING); /* OCTETSTRING tag */ if (m_value == null) { sendDefiniteLength(stream, 0); } else { sendDefiniteLength(stream, m_value.length); /* length */ stream.write(m_value,0,m_value.length); /* contents */ } } /** * Gets the element value. */ public byte[] getValue() { return m_value; } /** * Gets the element type. */ public int getType() { return BERElement.OCTETSTRING; } /** * Gets the string representation. * NOTE: currently prints out values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) { return "OctetString (null)"; } StringBuffer octets = new StringBuffer("OctetString {"); for (int i = 0; i < m_value.length; i++) { if (i != 0) { octets.append(' '); } octets.append(byteToHexString(m_value[i])); } octets.append('}'); return octets.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERSet.java0000664001003300100330000000670010602743270027733 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Set object. A set object can contain * a set of BER elements. * *
 * ENCODING RULE:
 *  tag    = 0x31 (always constructed)
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERSet extends BERConstruct { /** * Constructs a set element. * @exception failed to construct */ public BERSet() throws IOException { } /** * Constructs a set element from an input stream. * @param decoder decoder for application-specific BER * @param stream source * @param bytes_read array of 1 int; value incremented by number * of bytes read from stream * @exception IOException failed to construct */ public BERSet(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder, stream,bytes_read); } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { super.write(stream); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.SET; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String elements = ""; for (int i = 0; i < super.size(); i++) { if (i != 0) elements = elements + ", "; elements = elements + ((BERElement)super.elementAt(i)).toString(); } return "Set {" + elements + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERObjectId.java0000664001003300100330000001571310602743270030667 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.util.StringTokenizer; import java.io.*; /** * This class is for the Object ID object. * * @version 1.0 * seeAlso CCITT X.209 */ public class BERObjectId extends BERElement { /** * Values of each component of the OID */ private int[] m_value = null; /** * Constructs an object ID element from an array of values. * @param value object ID value as array of components */ public BERObjectId(int[] value) { m_value = new int[value.length]; System.arraycopy(value,0,m_value,0,value.length); } /** * Constructs an object id element from a string. * @param value object id value in format "2.100.3" */ public BERObjectId(String value) { StringTokenizer tokenizer = new StringTokenizer(value, "."); m_value = new int[tokenizer.countTokens()]; for (int i=0; i 0) { contents_read[0] = 0; sub_id = readSubIdentifier(stream, contents_read); contents_length -= contents_read[0]; oid.addElement(new Integer(sub_id)); } m_value = new int[oid.size()]; for (int i = 0; i= 2 identifier components (values). * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { stream.write(BERElement.OBJECTID); ByteArrayOutputStream contents_stream = new ByteArrayOutputStream(); /* first subidentifier packs two component values */ writeSubIdentifier(contents_stream,m_value[0]*40 + m_value[1]); for (int i = 2; i < m_value.length; i++) { writeSubIdentifier(contents_stream,m_value[i]); } byte[] contents_buffer = contents_stream.toByteArray(); sendDefiniteLength(stream, contents_buffer.length); stream.write(contents_buffer); } /** * Reads a sub identifier from stream. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream */ private int readSubIdentifier(InputStream stream, int[] bytes_read) throws IOException { int octet; int sub_id = 0; do { octet = stream.read(); bytes_read[0]++; sub_id = (sub_id << 7) | (octet & 0x7F); } while ((octet & 0x80) > 0); return sub_id; } /** * Sends the BER encoding of a sub identifier directly to stream. * @param stream output stream * @param value sub-identifier value */ private void writeSubIdentifier(OutputStream stream, int value) throws IOException { ByteArrayOutputStream sub_id_stream = new ByteArrayOutputStream(); /* gather octets in reverse order */ while (value > 0) { sub_id_stream.write(value & 0x7F); value = value >> 7; } byte[] sub_id_buffer = sub_id_stream.toByteArray(); for (int i=sub_id_buffer.length-1; i>0; i--) { /* all but last octet have bit 8 = 1 */ stream.write(sub_id_buffer[i] | 0x80); } stream.write(sub_id_buffer[0]); /* last octet has bit 8 = 0 */ } /** * Gets the element value. * @return element value. */ public int[] getValue() { return m_value; } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.OBJECTID; } /** * Gets the string representation. * @return string representation of element. */ public String toString() { if (m_value == null) return "ObjectIdentifier (null)"; String oid = ""; for (int i = 0; i < m_value.length; i++) { if (i != 0) oid = oid + " "; oid = oid + m_value[i]; } return "ObjectIdentifier {" + oid + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERAny.java0000664001003300100330000000672210620653754027742 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the "any" object that is unknown to the * BER package but conforms to BER rules. * *
 * Encoding Rule:
 *   The encoding is that of the particular implementation.
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERAny extends BERElement { /** * Internal variables */ private BERElement m_value = null; /** * Constructs an "any" element. * @param value BERElement value */ public BERAny(BERElement value) { m_value = value; } /** * Constructs an "any" element from an input stream. * Note that with the current decoding architecture "any" types * will not be decoded as any's but rather as the particular * implementation. The following method will never be called. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERAny(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { m_value = getElement(decoder, stream, bytes_read); } /** * Sends the BER encoding directly to an output stream. * @param stream output stream */ public void write(OutputStream stream) throws IOException { m_value.write(stream); } /** * Gets the element type. */ public int getType() { return BERElement.ANY; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "ANY {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/ber/stream/BERBitString.java0000664001003300100330000002362310620653754031117 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.ber.stream; import java.util.*; import java.util.BitSet; import java.io.*; /** * This class is for the BitString object. Note that the BitSet class * has a bug: size() returns the size of the internal allocated memory * rather than the number of bits. Current work-around is to maintain * the number of bits ourselves in m_value_num_bits. * Change is required when BitSet is fixed. * *
 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x03
 * 
* * @version 1.0 * seeAlso CCITT X.209 */ public class BERBitString extends BERElement { /** * Internal variables */ private BitSet m_value; private int m_value_num_bits; /** * Constructs a boolean element. * @param value boolean value */ public BERBitString(BitSet value) { m_value = value; } /** * Constructs a bitstring element from an input stream * (for constructed encodings). * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERBitString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; if (contents_length == -1) { /* Constructed - indefinite length. */ { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a bitstring - add it to the existing BitSet */ BERBitString bit_string_element = (BERBitString)element; BitSet new_bit_set = new BitSet(m_value_num_bits + bit_string_element.getSize()); for (int i = 0; i 0) { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a bitstring - add it to the existing BitSet */ BERBitString bit_string_element = (BERBitString)element; BitSet new_bit_set = new BitSet(m_value_num_bits + bit_string_element.getSize()); for (int i = 0; i 0) { m_value.set(bit_num); } else m_value.clear(bit_num); bit_num++; mask = mask / 2; } } octet = stream.read(); /* last content octet */ int mask = 0x80; for (int j = 0; j < 8-last_unused_bits; j++) { if ((octet & mask) > 0) m_value.set(bit_num); else m_value.clear(bit_num); bit_num++; mask = mask / 2; } bytes_read[0] += contents_length; } /** * Sends the BER encoding directly to a stream. * Always sends in primitive form. * @param stream output stream */ public void write(OutputStream stream) throws IOException { stream.write(BERElement.BITSTRING); //int num_bits = m_value.size(); /* number of bits to send */ int num_bits = m_value_num_bits; /* Number of bits unused int the last contents octet */ int last_unused_bits = 8 - (num_bits % 8); /* Figure out the number of content octets */ int num_content_octets = (int)(num_bits/8) + 1; if (last_unused_bits > 0) num_content_octets += 1; stream.write(num_content_octets); /* length octet */ stream.write(last_unused_bits); /* first content octet */ for (int i = 0; i < (int)(num_bits/8); i++) { int new_octet = 0; int bit = 0x80; for (int j = 0; j < 8; j++) { if (m_value.get(i*8+j)) new_octet += bit; bit = bit/2; } stream.write(new_octet); } /* * Last octet may not use all bits. If last octet DOES use all * bits then it has already been written above. */ if (last_unused_bits > 0) { int new_octet = 0; int bit = 0x80; for (int j = 0; j < last_unused_bits; j++) { if (m_value.get(((int)(num_bits/8))*8+j)) new_octet += bit; bit = bit/2; } stream.write(new_octet); } } /** * Gets the bitstring value. */ public BitSet getValue() { return m_value; } /** * Gets the number of bits. * @return bit numbers. */ public int getSize() { return m_value_num_bits; } /** * Gets the element type. */ public int getType() { return BERElement.BITSTRING; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String hex_string = ""; int octet; //int num_bits = m_value.size(); int num_bits = m_value_num_bits; for (int i = 0; i < (int)(num_bits/8); i++) { octet = 0; int bit = 0x80; for (int j = 0; j < 8; j++) { if (m_value.get(i*8+j)) octet += bit; bit = bit/2; } hex_string += " " + (byte)octet; } int bit = 0x80; octet = 0; for (int k = 0; k < num_bits-(int)(num_bits/8); k++) { if (m_value.get(((int)(num_bits/8))*8+k)) octet += bit; bit = bit/2; } hex_string += " " + (byte)octet; return "Bitstring {" + hex_string + " }"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSearchConstraints.java0000664001003300100330000004735310602743270030713 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Represents a set of search preferences. * You can set these preferences for a particular search * by creating an LDAPSearchConstraints object, * specifying your preferences, and passing the object to * the LDAPConnection.search method. *

* * @version 1.0 */ public class LDAPSearchConstraints extends LDAPConstraints implements Cloneable { // Constants for behavior when a search continuation reference cannot // be followed /** * Continue processing if there is an error following a search continuation * reference */ public static final int REFERRAL_ERROR_CONTINUE = 0; /** * Throw exception if there is an error following a search continuation * reference */ public static final int REFERRAL_ERROR_EXCEPTION = 1; private int deref; private int maxRes; private int batch; private int serverTimeLimit; private int maxBacklog = 100; private int referralErrors = REFERRAL_ERROR_CONTINUE; /** * Constructs an LDAPSearchConstraints object that specifies * the default set of search constraints. */ public LDAPSearchConstraints() { super(); deref = 0; maxRes = 1000; batch = 1; serverTimeLimit = 0; } /** * Constructs a new LDAPSearchConstraints object and allows you * to specify the search constraints in that object. *

* @param msLimit maximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param dereference either LDAPv2.DEREF_NEVER, * LDAPv2.DEREF_FINDING, * LDAPv2.DEREF_SEARCHING, or * LDAPv2.DEREF_ALWAYS (see LDAPConnection.setOption). * LDAPv2.DEREF_NEVER is the default. * @param maxResults maximum number of search results to return * (1000 by default) * @param doReferrals specify true to follow referrals * automatically, or false to throw an * LDAPReferralException error if the server sends back * a referral (false by default) * @param batchSize specify the number of results to return at a time * (1 by default) * @param rebind_proc specifies the object of the class that * implements the LDAPRebind interface (you need to * define this class). The object will be used when the client * follows referrals automatically. The object provides the client * with a method for getting the distinguished name and password * used to authenticate to another LDAP server during a referral. * (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see netscape.ldap.LDAPConnection#setOption(int, java.lang.Object) * @see netscape.ldap.LDAPConnection#search(netscape.ldap.LDAPUrl, netscape.ldap.LDAPSearchConstraints) * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public LDAPSearchConstraints( int msLimit, int dereference, int maxResults, boolean doReferrals, int batchSize, LDAPRebind rebind_proc, int hop_limit) { super(msLimit, doReferrals, rebind_proc, hop_limit); deref = dereference; maxRes = maxResults; batch = batchSize; } /** * Constructs a new LDAPSearchConstraints object and allows you * to specify the search constraints in that object. *

* @param msLimit maximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param timeLimit maximum time in seconds for the server to spend * processing a search request (the default value is 0, indicating that there * is no limit) * @param dereference either LDAPv2.DEREF_NEVER, * LDAPv2.DEREF_FINDING, * LDAPv2.DEREF_SEARCHING, or * LDAPv2.DEREF_ALWAYS (see LDAPConnection.setOption). * LDAPv2.DEREF_NEVER is the default. * @param maxResults maximum number of search results to return * (1000 by default) * @param doReferrals specify true to follow referrals * automatically, or false to throw an * LDAPReferralException error if the server sends back * a referral (false by default) * @param batchSize specify the number of results to return at a time * (1 by default) * @param rebind_proc specifies the object that * implements the LDAPRebind interface. * The object will be used when the client * follows referrals automatically. The object provides the client * with a method for getting the distinguished name and password * used to authenticate to another LDAP server during a referral. * (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see netscape.ldap.LDAPConnection#setOption(int, java.lang.Object) * @see netscape.ldap.LDAPConnection#search(netscape.ldap.LDAPUrl, netscape.ldap.LDAPSearchConstraints) * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public LDAPSearchConstraints( int msLimit, int timeLimit, int dereference, int maxResults, boolean doReferrals, int batchSize, LDAPRebind rebind_proc, int hop_limit) { super(msLimit, doReferrals, rebind_proc, hop_limit); serverTimeLimit = timeLimit; deref = dereference; maxRes = maxResults; batch = batchSize; } /** * Constructs a new LDAPSearchConstraints object and allows you * to specify the search constraints in that object. *

* @param msLimit maximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param timeLimit maximum time in seconds for the server to spend * processing a search request (the default value is 0, indicating that there * is no limit) * @param dereference either LDAPv2.DEREF_NEVER, * LDAPv2.DEREF_FINDING, * LDAPv2.DEREF_SEARCHING, or * LDAPv2.DEREF_ALWAYS (see LDAPConnection.setOption). * LDAPv2.DEREF_NEVER is the default. * @param maxResults maximum number of search results to return * (1000 by default) * @param doReferrals specify true to follow referrals * automatically, or false to throw an * LDAPReferralException error if the server sends back * a referral (false by default) * @param batchSize specify the number of results to return at a time * (1 by default) * @param bind_proc specifies the object that * implements the LDAPBind interface (you need to * define this class). The object will be used to authenticate * to the server on referrals. * (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see netscape.ldap.LDAPConnection#setOption(int, java.lang.Object) * @see netscape.ldap.LDAPConnection#search(netscape.ldap.LDAPUrl, netscape.ldap.LDAPSearchConstraints) * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, netscape.ldap.LDAPSearchConstraints) */ public LDAPSearchConstraints( int msLimit, int timeLimit, int dereference, int maxResults, boolean doReferrals, int batchSize, LDAPBind bind_proc, int hop_limit) { super(msLimit, doReferrals, bind_proc, hop_limit); serverTimeLimit = timeLimit; deref = dereference; maxRes = maxResults; batch = batchSize; } /** * Returns the maximum number of seconds to wait for the server to * spend on a search operation.If 0, there is no time limit. * @return maximum number of seconds for the server to spend. */ public int getServerTimeLimit() { return serverTimeLimit; } /** * Specifies how aliases should be dereferenced. * @return LDAPv2.DEREF_NEVER to * never follow ("dereference") aliases, * LDAPv2.DEREF_FINDING to dereference when finding * the starting point for the search (but not when searching * under that starting entry), LDAPv2.DEREF_SEARCHING * to dereference when searching the entries beneath the * starting point of the search (but not when finding the starting * entry), or LDAPv2.DEREF_ALWAYS to always * dereference aliases. */ public int getDereference() { return deref; } /** * Returns the maximum number of search results that are to be returned; 0 means * there is no limit. * @return maximum number of search results to be returned. */ public int getMaxResults() { return maxRes; } /** * Returns the suggested number of results to return at a time during * search. This should be 0 if intermediate results are not needed, and * 1 if results are to be processed as they come in. * @return number of results to return at a time. */ public int getBatchSize() { return batch; } /** * Sets the maximum number of seconds for the server to spend * returning search results. If 0, there is no time limit. * @param limit maximum number of seconds for the server to spend. * (0 by default, which means that there is no maximum time limit.) */ public void setServerTimeLimit( int limit ) { serverTimeLimit = limit; } /** * Sets a preference indicating how aliases should be dereferenced. * @param dereference LDAPv2.DEREF_NEVER to * never follow ("dereference") aliases, * LDAPv2.DEREF_FINDING to dereference when finding * the starting point for the search (but not when searching * under that starting entry), LDAPv2.DEREF_SEARCHING * to dereference when searching the entries beneath the * starting point of the search (but not when finding the starting * entry), or LDAPv2.DEREF_ALWAYS to always * dereference aliases */ public void setDereference( int dereference ) { deref = dereference; } /** * Sets the maximum number of search results to return; 0 means * there is no limit. (By default, this is set to 1000.) * @param maxResults maximum number of search results to return */ public void setMaxResults( int maxResults ) { maxRes = maxResults; } /** * Sets the suggested number of results to return at a time during search. * This should be 0 if intermediate results are not needed, and 1 if * results are to be processed as they come in. (By default, this is 1.) * @param batchSize number of results to return at a time */ public void setBatchSize( int batchSize ) { batch = batchSize; } /** * Set the maximum number of unread entries any search listener can * have before we stop reading from the server. * @param backlog the maximum number of unread entries per listener * @deprecated Use LDAPConnection.setOption() */ public void setMaxBacklog( int backlog ) { maxBacklog = backlog; } /** * Get the maximum number of unread entries any search listener can * have before we stop reading from the server. * @return the maximum number of unread entries per listener. * @deprecated Use LDAPConnection.getOption() */ public int getMaxBacklog() { return maxBacklog; } /** * Reports if errors when following search continuation references are * to cause processing of the remaining results to be aborted. *

* If an LDAP server does not contain an entry at the base DN for a search, * it may be configured to return a referral. If it contains an entry at * the base DN of a subtree search, one or more of the child entries may * contain search continuation references. The search continuation * references are returned to the client, which may follow them by issuing * a search request to the host indicated in the search reference. *

* If the LDAPConnection object has been configured to follow * referrals automatically, it may fail when issuing a search request to * the host indicated in a search reference, e.g. because there is no * entry there, because it does not have credentials, because it does not * have sufficient permissions, etc. If the client aborts evaluation of the * search results (obtained through LDAPSearchResults) when a * search reference cannot be followed, any remaining results are discarded. *

* Up to version 4.17 of the Java LDAP SDK, the SDK printed an error * message but continued to process the remaining search results and search * continuation references. *

* As of SDK version 4.17, the default behavior is still to continue * processing any remaining search results and search continuation * references if there is an error following a referral, but the behavior * may be changed with setReferralErrors to throw an exception * instead. * * @return REFERRAL_ERROR_CONTINUE if remaining results are * to be processed when there is an error following a search continuation * reference, REFERRAL_ERROR_EXCEPTION if such an error is to * cause an LDAPException. * * @see netscape.ldap.LDAPConstraints#setReferrals * @since LDAPJDK 4.17 */ public int getReferralErrors() { return referralErrors; } /** * Specifies if errors when following search continuation references are * to cause processing of the remaining results to be aborted. *

* If an LDAP server does not contain an entry at the base DN for a search, * it may be configured to return a referral. If it contains an entry at * the base DN of a subtree search, one or more of the child entries may * contain search continuation references. The search continuation * references are returned to the client, which may follow them by issuing * a search request to the host indicated in the search reference. *

* If the LDAPConnection object has been configured to follow * referrals automatically, it may fail when issuing a search request to * the host indicated in a search reference, e.g. because there is no * entry there, because it does not have credentials, because it does not * have sufficient permissions, etc. If the client aborts evaluation of the * search results (obtained through LDAPSearchResults) when a * search reference cannot be followed, any remaining results are discarded. *

* Up to version 4.17 of the Java LDAP SDK, the SDK printed an error * message but continued to process the remaining search results and search * continuation references. *

* As of SDK version 4.17, the default behavior is still to continue * processing any remaining search results and search continuation * references if there is an error following a referral, but the behavior * may be changed with setReferralErrors to throw an exception * instead. * * @param errorBehavior Either REFERRAL_ERROR_CONTINUE if * remaining results are to be processed when there is an error following a * search continuation reference or REFERRAL_ERROR_EXCEPTION * if such an error is to cause an LDAPException. * * @see netscape.ldap.LDAPSearchConstraints#getReferralErrors * @see netscape.ldap.LDAPSearchResults#next * @see netscape.ldap.LDAPSearchResults#nextElement * @since LDAPJDK 4.17 */ public void setReferralErrors(int errorBehavior) { if ( (errorBehavior != REFERRAL_ERROR_CONTINUE) && (errorBehavior != REFERRAL_ERROR_EXCEPTION) ) { throw new IllegalArgumentException( "Invalid error behavior: " + errorBehavior ); } referralErrors = errorBehavior; } /** * Makes a copy of an existing set of search constraints. * @return a copy of an existing set of search constraints. */ public Object clone() { LDAPSearchConstraints o = (LDAPSearchConstraints) super.clone(); return o; } /** * Return a string representation of the object for debugging * * @return A string representation of the object */ public String toString() { StringBuffer sb = new StringBuffer("LDAPSearchConstraints {"); sb.append( super.toString() + ' ' ); sb.append("size limit " + maxRes + ", "); sb.append("server time limit " + serverTimeLimit + ", "); sb.append("aliases " + deref + ", "); sb.append("batch size " + batch + ", "); sb.append("max backlog " + maxBacklog + ", "); sb.append("referralErrors " + referralErrors); sb.append('}'); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPExtendedOperation.java0000664001003300100330000001410610602743270030665 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Version 3 of the LDAP protocol include the means to define additional * operations ("extended operations") beyond the standard LDAP * operations. An LDAP v3 client can send an extended operation request, * identifying the operation by its unique object ID (OID). The server * receives the request and if OID corresponds to an operation supported * by the server, the server procoess the request and sends an extended * operation response back to the client. *

* * Objects of this class can be used to represent extended operation * requests (sent by your client) or extended operation responses * (returned by an LDAP v3 server). *

* * To determine which extended operations are supported by a server, * you need to search for the root DSE (DSA-specific entry, where DSA is * another term for "LDAP server") and find the values of the * supportedExtension attribute. This attribute contains the * object IDs (OIDs) of the extended operations supported by this server. *

* * The following section of code demonstrates how to get the list * of the extended operations supported by an LDAP server. *

* *

 * public static void main( String[] args )
 * {
 *   LDAPConnection ld = new LDAPConnection();
 *   try {
 *     String MY_HOST = "localhost";
 *     int MY_PORT = 389;
 *     ld.connect( MY_HOST, MY_PORT );
 *     try {
 *       ld.authenticate( 3, "cn=Directory Manager", "23skidoo" );
 *     } catch( LDAPException e ) {
 *       System.out.println( "LDAP server does not support v3." );
 *       ld.disconnect();
 *       System.exit(1);
 *     }
 *
 *     String MY_FILT = "(objectclass=*)";
 *     String MY_BASE = "";
 *     String getAttrs[] = { "supportedExtension" };
 *     LDAPSearchResults res = ld.search( MY_BASE,
 *       LDAPConnection.SCOPE_BASE, MY_FILT, getAttrs, false );
 *
 *     while ( res.hasMoreElements() ) {
 *       LDAPEntry findEntry = (LDAPEntry)res.nextElement();
 *       LDAPAttributeSet findAttrs = findEntry.getAttributeSet();
 *       Enumeration enumAttrs = findAttrs.getAttributes();
 *
 *         while ( enumAttrs.hasMoreElements() ) {
 *           LDAPAttribute anAttr = (LDAPAttribute)enumAttrs.nextElement();
 *           String attrName = anAttr.getName();
 *           System.out.println( attrName );
 *           Enumeration enumVals = anAttr.getStringValues();
 *
 *           while ( enumVals.hasMoreElements() ) {
 *             String aVal = ( String )enumVals.nextElement();
 *             System.out.println( "\t" + aVal );
 *           }
 *         }
 *      }
 *   }
 *   catch( LDAPException e ) {
 *     System.out.println( "Error: " + e.toString() );
 *   }
 *   try {
 *     ld.disconnect();
 *   }
 *   catch( LDAPException e ) {
 *     System.exit(1);
 *   }
 *   System.exit(0);
 * }
 * 
*

* * If you compile and run this example against an LDAP server that * supports v3 of the protocol, you might receive the following results: *

* *

 * supportedextension
 *   1.2.3.4
 * 
*

* * For more information on LDAP controls, see the Internet-Draft on * the LDAP v3 protocol. (Note that this internet draft is still a * work in progress. You can find the latest draft at the ASID home page. *

* * @version 1.0 * @see netscape.ldap.LDAPConnection#extendedOperation(netscape.ldap.LDAPExtendedOperation) * @see netscape.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) * */ public class LDAPExtendedOperation implements java.io.Serializable { static final long serialVersionUID = 4010382829133611945L; /** * Construct an object * @param oid identifier for the particular operation * @param vals operation-specific data */ public LDAPExtendedOperation( String oid, byte[] vals ) { m_oid = oid; m_vals = vals; } /** * Get the identifier for this operation. * @return oid identifier for the particular operation. */ public String getID() { return m_oid; } /** * Get the data for this operation. * @return vals operation-specific data. */ public byte[] getValue() { return m_vals; } private String m_oid; private byte[] m_vals; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSchema.java0000664001003300100330000011014710602743270026446 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * This object represents the schema of an LDAP v3 server. * You can use the fetchSchema method to retrieve * the schema used by a server. (The server must support LDAP v3 * and the capability to retrieve the schema over the LDAP protocol.) *

* * After you retrieve the schema, you can use this object to get * the object class, attribute type, and matching rule descriptions * in the schema. You can also add your own object classes, * attribute types, and matching rules to the schema. *

* * To remove any object classes, attribute types, and matching rules * that you added, call the remove methods of the * LDAPObjectClassSchema, LDAPAttributeSchema, * and LDAPMatchingRuleSchema classes. (This method is * inherited from the LDAPSchemaElement class.) *

* * The following class is an example of an LDAP client that can * fetch the schema, get and print object class descriptions and * attribute type descriptions, and add object classes and attribute * types to the schema over the LDAP protocol. *

* *

 * import netscape.ldap.*;
 * public class TestSchema {
 *     public static void main( String[] args ) {
 *         String HOSTNAME = "ldap.netscape.com";
 *         int PORT_NUMBER = DEFAULT_PORT;
 *         String ROOT_DN = "cn=Directory Manager";
 *         String ROOT_PASSWORD = "23skidoo";
 *
 *         LDAPConnection ld = new LDAPConnection();
 *
 *         // Construct a new LDAPSchema object to get the schema.
 *         LDAPSchema dirSchema = new LDAPSchema();
 *
 *         try {
 *             // Connect to the server.
 *             ld.connect( HOSTNAME, PORT_NUMBER );
 *
 *             // Get the schema from the directory.
 *             dirSchema.fetchSchema( ld );
 *
 *             // Get and print the inetOrgPerson object class description.
 *             LDAPObjectClassSchema objClass = dirSchema.getObjectClass(
 *                 "inetOrgPerson" );
 *             if ( objClass != null ) {
 *                 System.out.println("inetOrgPerson := "+objClass.toString());
 *             }
 *
 *             // Get and print the definition of the userPassword attribute.
 *             LDAPAttributeSchema attrType = dirSchema.getAttribute(
 *                 "userpassword" );
 *             if ( attrType != null ) {
 *                 System.out.println("userPassword := " + attrType.toString());
 *             }
 *
 *             // Create a new object class definition.
 *             String[] requiredAttrs = {"cn", "mail"};
 *             String[] optionalAttrs = {"sn", "phoneNumber"};
 *             LDAPObjectClassSchema newObjClass =
 *                     new LDAPObjectClassSchema( "newInetOrgPerson",
 *                                                "1.2.3.4.5.6.7",
 *                                                "top",
 *                                                "Experiment",
 *                                                requiredAttrs,
 *                                                optionalAttrs );
 *
 *             // Authenticate as root DN to get permissions to edit the schema.
 *             ld.authenticate( ROOT_DN, ROOT_PASSWORD );
 *
 *             // Add the new object class to the schema.
 *             newObjClass.add( ld );
 *
 *             // Create a new attribute type "hairColor".
 *             LDAPAttributeSchema newAttrType =
 *                     new LDAPAttributeSchema( "hairColor",
 *                                              "1.2.3.4.5.4.3.2.1",
 *                                              "Blonde, red, etc",
 *                                              LDAPAttributeSchema.cis,
 *                                              false );
 *             // Add a custom qualifier
 *             newObjClass.setQualifier( "X-OWNER", "John Jacobson" );
 *
 *             // Add the new attribute type to the schema.
 *             newAttrType.add( ld );
 *
 *             // Fetch the schema again to verify that changes were made.
 *             dirSchema.fetchSchema( ld );
 *
 *             // Get and print the new attribute type.
 *             newAttrType = dirSchema.getAttribute( "hairColor" );
 *             if ( newAttrType != null ) {
 *                 System.out.println("hairColor := " + newAttrType.toString());
 *             }
 *
 *             // Get and print the new object class.
 *             newObjClass = dirSchema.getObjectClass( "newInetOrgPerson" );
 *             if ( newObjClass != null ) {
 *                 System.out.println("newInetOrgPerson := " +newObjClass.toString());
 *             }
 *
 *             ld.disconnect();
 *
 *         } catch ( Exception e ) {
 *             System.err.println( e.toString() );
 *             System.exit( 1 );
 *         }
 *
 *         System.exit( 0 );
 *     }
 * }
 * 
* * If you are using the Netscape Directory Server 3.0, you can also * verify that the class and attribute type have been added through * the directory server manager (go to Schema | Edit or View Attributes * or Schema | Edit or View Object Classes). *

* * To remove the classes and attribute types added by the example, * see the examples under the LDAPSchemaElement class. *

* * @see netscape.ldap.LDAPAttributeSchema * @see netscape.ldap.LDAPObjectClassSchema * @see netscape.ldap.LDAPMatchingRuleSchema * @see netscape.ldap.LDAPSchemaElement * @version 1.0 * @author Rob Weltman **/ public class LDAPSchema implements java.io.Serializable { static final long serialVersionUID = -3911737419783579398L; /** * Constructs a new LDAPSchema object. * Once you construct the object, you can get * the schema by calling fetchSchema. *

* * You can also print out the schema by using the * main method. For example, you can enter * the following command: *

     * java netscape.ldap.LDAPSchema myhost.mydomain.com 389
     * 
* * Note that you need to call fetchSchema * to get the schema from the server. Constructing the * object does not fetch the schema. *

* * @see netscape.ldap.LDAPSchema#fetchSchema * @see netscape.ldap.LDAPSchema#main */ public LDAPSchema() { } public LDAPSchema( LDAPEntry entry ) { initialize( entry ); } /** * Adds an object class schema definition to the current schema. * You can also add object class schema definitions by calling the * add method of your newly constructed * LDAPObjectClassSchema object. *

* * To remove an object class schema definition that you have added, * call the getObjectClass method to get the * LDAPObjectClassSchema object representing your * object class and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPObjectClassSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param objectSchema LDAPObjectClassSchema object * representing the object class schema definition to add * @see netscape.ldap.LDAPObjectClassSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addObjectClass( LDAPObjectClassSchema objectSchema ) { objectClasses.put( objectSchema.getName().toLowerCase(), objectSchema ); } /** * Add an attribute type schema definition to the current schema. * You can also add attribute type schema definitions by calling the * add method of your newly constructed * LDAPAttributeSchema object. *

* * To remove an attribute type schema definition that you have added, * call the getAttribute method to get the * LDAPAttributeSchema object representing your * attribute type and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPAttributeSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param attrSchema LDAPAttributeSchema object * representing the attribute type schema definition to add * @see netscape.ldap.LDAPAttributeSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addAttribute( LDAPAttributeSchema attrSchema ) { attributes.put( attrSchema.getName().toLowerCase(), attrSchema ); } /** * Add a matching rule schema definition to the current schema. * You can also add matching rule schema definitions by calling the * add method of your newly constructed * LDAPMatchingRuleSchema object. *

* * To remove an attribute type schema definition that you have added, * call the getMatchingRule method to get the * LDAPMatchingRuleSchema object representing your * matching rule and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPMatchingRuleSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param matchSchema LDAPMatchingRuleSchema object * representing the matching rule schema definition to add * @see netscape.ldap.LDAPMatchingRuleSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addMatchingRule( LDAPMatchingRuleSchema matchSchema ) { matchingRules.put( matchSchema.getName().toLowerCase(), matchSchema ); } /** * Add a syntax schema definition to the current schema. * You can also add syntax schema definitions by calling the * add method of your newly constructed * LDAPSyntaxSchema object. *

* * To remove a syntax schema definition that you have added, * call the getSyntax method to get the * LDAPSyntaxSchema object representing your * syntax type and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPSyntaxSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param syntaxSchema LDAPSyntaxSchema object * representing the syntax schema definition to add * @see netscape.ldap.LDAPSyntaxSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addSyntax( LDAPSyntaxSchema syntaxSchema ) { String name = syntaxSchema.getName().toLowerCase(); if ( name.length() < 1 ) { name = syntaxSchema.getOID(); } syntaxes.put( name, syntaxSchema ); } /** * Add a structure rule definition to the current schema. * You can also add structure rule definitions by calling the * add method of your newly constructed * LDAPDITStructureRuleSchema object. *

* * To remove a structure rule definition that you have added, * call the getDITStructureRule method to get the * LDAPDITStructureRuleSchema object representing your * rule and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPSyntaxSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param rule LDAPDITStructureRuleSchema object * representing the structure rule definition to add * @see netscape.ldap.LDAPDITStructureRuleSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addDITStructureRule( LDAPDITStructureRuleSchema rule ) { String name = rule.getName().toLowerCase(); structureRulesByName.put( name, rule ); structureRulesById.put( new Integer( rule.getRuleID() ), rule ); } /** * Add a content rule definition to the current schema. * You can also add content rule definitions by calling the * add method of your newly constructed * LDAPDITContentRuleSchema object. *

* * To remove a content rule definition that you have added, * call the getDITContentRule method to get the * LDAPDITContentRuleSchema object representing your * rule and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPSyntaxSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param rule LDAPDITContentRuleSchema object * representing the content rule definition to add * @see netscape.ldap.LDAPDITContentRuleSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addDITContentRule( LDAPDITContentRuleSchema rule ) { String name = rule.getName().toLowerCase(); contentRules.put( name, rule ); } /** * Add a name form definition to the current schema. * You can also add name form definitions by calling the * add method of your newly constructed * LDAPNameFormSchema object. *

* * To remove a name form definition that you have added, * call the getNameForm method to get the * LDAPNameFormSchema object representing your * nameForm type and call the remove method. *

* * NOTE: For information on the add and * remove methods of LDAPNameFormSchema, * see the documentation for LDAPSchemaElement. * (These methods are inherited from LDAPSchemaElement.) *

* * @param nameForm LDAPNameFormSchema object * representing the name form definition to add * @see netscape.ldap.LDAPNameFormSchema * @see netscape.ldap.LDAPSchemaElement#add * @see netscape.ldap.LDAPSchemaElement#remove */ public void addNameForm( LDAPNameFormSchema nameForm ) { String name = nameForm.getName().toLowerCase(); nameForms.put( name, nameForm ); } /** * Gets an enumeration ofthe object class definitions in this schema. * @return an enumeration of object class definitions. */ public Enumeration getObjectClasses() { return objectClasses.elements(); } /** * Gets an enumeration ofthe attribute type definitions in this schema. * @return an enumeration of attribute type definitions. */ public Enumeration getAttributes() { return attributes.elements(); } /** * Gets an enumeration ofthe matching rule definitions in this schema. * @return an enumeration of matching rule definitions. */ public Enumeration getMatchingRules() { return matchingRules.elements(); } /** * Get an enumeration of the syntaxes in this schema. * @return an enumeration of syntax objects */ public Enumeration getSyntaxes() { return syntaxes.elements(); } /** * Get an enumeration of the structure rules in this schema. * @return an enumeration of structure rule objects */ public Enumeration getDITStructureRules() { return structureRulesByName.elements(); } /** * Get an enumeration of the content rules in this schema. * @return an enumeration of content rule objects */ public Enumeration getDITContentRules() { return contentRules.elements(); } /** * Get an enumeration of the name forms in this schema. * @return an enumeration of name form objects */ public Enumeration getNameForms() { return nameForms.elements(); } /** * Gets the definition of the object class with the specified name. * @param name name of the object class to find * @return an LDAPObjectClassSchema object representing * the object class definition, or null if not found. */ public LDAPObjectClassSchema getObjectClass( String name ) { return (LDAPObjectClassSchema)objectClasses.get( name.toLowerCase() ); } /** * Gets the definition of the attribute type with the specified name. * @param name name of the attribute type to find * @return an LDAPAttributeSchema object representing * the attribute type definition, or null if not found. */ public LDAPAttributeSchema getAttribute( String name ) { return (LDAPAttributeSchema)attributes.get( name.toLowerCase() ); } /** * Gets the definition of a matching rule with the specified name. * @param name name of the matching rule to find * @return an LDAPMatchingRuleSchema object representing * the matching rule definition, or null if not found. */ public LDAPMatchingRuleSchema getMatchingRule( String name ) { return (LDAPMatchingRuleSchema)matchingRules.get( name.toLowerCase() ); } /** * Gets the definition of a syntax with the specified name. * @param name name of the syntax to find * @return an LDAPSyntaxSchema object representing * the syntax definition, or null if not found. */ public LDAPSyntaxSchema getSyntax( String name ) { return (LDAPSyntaxSchema)syntaxes.get( name.toLowerCase() ); } /** * Gets the definition of a structure rule with the specified name. * @param name name of the rule to find * @return an LDAPDITStructureRuleSchema object representing * the rule, or null if not found. */ public LDAPDITStructureRuleSchema getDITStructureRule( String name ) { return (LDAPDITStructureRuleSchema)structureRulesByName.get( name.toLowerCase() ); } /** * Gets the definition of a structure rule with the specified name. * @param ID ID of the rule to find * @return an LDAPDITStructureRuleSchema object representing * the rule, or null if not found. */ public LDAPDITStructureRuleSchema getDITStructureRule( int ID ) { return (LDAPDITStructureRuleSchema)structureRulesById.get( new Integer( ID ) ); } /** * Gets the definition of a content rule with the specified name. * @param name name of the rule to find * @return an LDAPDITContentRuleSchema object representing * the rule, or null if not found. */ public LDAPDITContentRuleSchema getDITContentRule( String name ) { return (LDAPDITContentRuleSchema)contentRules.get( name.toLowerCase() ); } /** * Gets the definition of a name form with the specified name. * @param name name of the name form to find * @return an LDAPNameFormSchema object representing * the syntax definition, or null if not found. */ public LDAPNameFormSchema getNameForm( String name ) { return (LDAPNameFormSchema)nameForms.get( name.toLowerCase() ); } /** * Get an enumeration of the names of the object classes in this schema. * @return an enumeration of object class names (all lower-case). */ public Enumeration getObjectClassNames() { return objectClasses.keys(); } /** * Get an enumeration of the names of the attribute types in this schema. * @return an enumeration of attribute names (all lower-case). */ public Enumeration getAttributeNames() { return attributes.keys(); } /** * Get an enumeration of the names of the matching rules in this schema. * @return an enumeration of matching rule names (all lower-case). */ public Enumeration getMatchingRuleNames() { return matchingRules.keys(); } /** * Get an enumeration of the names of the syntaxes in this schema. * @return an enumeration of syntax names (all lower-case). */ public Enumeration getSyntaxNames() { return syntaxes.keys(); } /** * Get an enumeration of the names of the structure rules in this schema. * @return an enumeration of names of the structure rule objects */ public Enumeration getDITStructureRuleNames() { return structureRulesByName.keys(); } /** * Get an enumeration of the names of the content rules in this schema. * @return an enumeration of names of the content rule objects */ public Enumeration getDITContentRuleNames() { return contentRules.keys(); } /** * Get an enumeration of the names of the name forms in this schema. * @return an enumeration of names of name form objects */ public Enumeration getNameFormNames() { return nameForms.keys(); } /** * Retrieve the schema for a specific entry. * @param ld an active connection to a Directory Server * @param dn the entry for which to fetch schema * @exception LDAPException on failure. */ public void fetchSchema( LDAPConnection ld, String dn ) throws LDAPException { /* Find the subschemasubentry value for this DN */ String entryName = getSchemaDN( ld, dn ); Enumeration en; /* Get the entire schema definition entry */ LDAPEntry entry = readSchema( ld, entryName ); initialize( entry ); } /** * Extract all schema elements from subschema entry * * @param entry entry containing schema definitions */ protected void initialize( LDAPEntry entry ) { /* Get all object class definitions */ LDAPAttribute attr = entry.getAttribute( "objectclasses" ); Enumeration en; if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPObjectClassSchema sch = new LDAPObjectClassSchema( (String)en.nextElement() ); addObjectClass( sch ); } } /* Get all attribute definitions */ attr = entry.getAttribute( "attributetypes" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPAttributeSchema sch = new LDAPAttributeSchema( (String)en.nextElement() ); addAttribute( sch ); } } /* Get all syntax definitions */ attr = entry.getAttribute( "ldapsyntaxes" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPSyntaxSchema sch = new LDAPSyntaxSchema( (String)en.nextElement() ); addSyntax( sch ); } } /* Get all structure rule definitions */ attr = entry.getAttribute( "ldapditstructurerules" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPDITStructureRuleSchema sch = new LDAPDITStructureRuleSchema( (String)en.nextElement() ); addDITStructureRule( sch ); } } /* Get all content rule definitions */ attr = entry.getAttribute( "ldapditcontentrules" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPDITContentRuleSchema sch = new LDAPDITContentRuleSchema( (String)en.nextElement() ); addDITContentRule( sch ); } } /* Get all name form definitions */ attr = entry.getAttribute( "nameforms" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPNameFormSchema sch = new LDAPNameFormSchema( (String)en.nextElement() ); addNameForm( sch ); } } /* Matching rules are tricky, because we have to match up a rule with its use. First get all the uses. */ Hashtable h = new Hashtable(); attr = entry.getAttribute( "matchingruleuse" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { String use = (String)en.nextElement(); LDAPMatchingRuleSchema sch = new LDAPMatchingRuleSchema( null, use ); h.put( sch.getOID(), use ); } } /* Now get the rules, and assign uses to them */ attr = entry.getAttribute( "matchingrules" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { String raw = (String)en.nextElement(); LDAPMatchingRuleSchema sch = new LDAPMatchingRuleSchema( raw, null ); String use = (String)h.get( sch.getOID() ); if ( use != null ) sch = new LDAPMatchingRuleSchema( raw, use ); addMatchingRule( sch ); } } } /** * Retrieve the entire schema from the root of a Directory Server. * @param ld an active connection to a Directory Server * @exception LDAPException on failure. */ public void fetchSchema( LDAPConnection ld ) throws LDAPException { fetchSchema( ld, "" ); } /** * Read one attribute definition from a server to determine if * attribute syntaxes are quoted (a bug, present in Netscape * and Novell servers). * @param ld an active connection to a Directory Server * @return true if standards-compliant. * @exception LDAPException on failure. */ static boolean isAttributeSyntaxStandardsCompliant( LDAPConnection ld ) throws LDAPException { /* Check if this has already been investigated */ String schemaBug = (String)ld.getProperty( ld.SCHEMA_BUG_PROPERTY ); if ( schemaBug != null ) { return schemaBug.equalsIgnoreCase( "standard" ); } boolean compliant = true; /* Get the schema definitions for attributes */ String entryName = getSchemaDN( ld, "" ); String[] attrs = { "attributetypes" }; LDAPEntry entry = ld.read( entryName, attrs ); /* Get all attribute definitions, and check the first one */ LDAPAttribute attr = entry.getAttribute( "attributetypes" ); if ( attr != null ) { Enumeration en = attr.getStringValues(); if( en.hasMoreElements() ) { compliant = !isSyntaxQuoted( (String)en.nextElement() ); } } ld.setProperty( ld.SCHEMA_BUG_PROPERTY, compliant ? "standard" : "NetscapeBug" ); return compliant; } /** * Parses an attribute schema definition to see if the SYNTAX value * is quoted. It shouldn't be (according to RFC 2252), but it is for * some LDAP servers. It will either be:
* SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 or
* SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' * @param raw Definition of the attribute type in the * AttributeTypeDescription format. */ static boolean isSyntaxQuoted( String raw ) { int ind = raw.indexOf( " SYNTAX " ); if ( ind >= 0 ) { ind += 8; int l = raw.length() - ind; // Extract characters char[] ch = new char[l]; raw.getChars( ind, raw.length(), ch, 0 ); ind = 0; // Skip to ' or start of syntax value while( (ind < ch.length) && (ch[ind] == ' ') ) { ind++; } if ( ind < ch.length ) { return ( ch[ind] == '\'' ); } } return false; } /** * Displays the schema (including the descriptions of its object * classes, attribute types, and matching rules) in an easily * readable format (not the same as the format expected by * an LDAP server). * @return a string containing the schema in printable format. */ public String toString() { String s = "Object classes:\n"; Enumeration en = getObjectClasses(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } s += "Attributes:\n"; en = getAttributes(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } s += "Matching rules:\n"; en = getMatchingRules(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } s += "Syntaxes:\n"; en = getSyntaxes(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } return s; } /** * Retrieve the DN of the schema definitions for a specific entry. * @param ld an active connection to a Directory Server * @param dn the entry for which to fetch schema * @exception LDAPException on failure. */ static String getSchemaDN( LDAPConnection ld, String dn ) throws LDAPException { if ( (ld == null) || !ld.isConnected() ) { throw new LDAPException( "No connection", LDAPException.OTHER ); } String[] attrs = { "subschemasubentry" }; LDAPEntry entry = ld.read( dn, attrs ); if ( entry == null ) { throw new LDAPException( "", LDAPException.NO_SUCH_OBJECT ); } LDAPAttribute attr = entry.getAttribute( attrs[0] ); String entryName = "cn=schema"; if ( attr != null ) { Enumeration en = attr.getStringValues(); if ( en.hasMoreElements() ) { entryName = (String)en.nextElement(); } } return entryName; } private static LDAPEntry readSchema( LDAPConnection ld, String dn, String[] attrs ) throws LDAPException { LDAPSearchResults results = ld.search (dn, ld.SCOPE_BASE, "objectclass=subschema", attrs, false); if ( !results.hasMoreElements() ) { throw new LDAPException( "Cannot read schema", LDAPException.INSUFFICIENT_ACCESS_RIGHTS ); } return results.next (); } private static LDAPEntry readSchema( LDAPConnection ld, String dn ) throws LDAPException { return readSchema( ld, dn, new String[] { "*", "ldapSyntaxes", "matchingRules", "attributeTypes", "objectClasses" } ); } /** * Helper for "main" to print out schema elements. * @param en enumeration of schema elements */ private static void printEnum( Enumeration en ) { while( en.hasMoreElements() ) { LDAPSchemaElement s = (LDAPSchemaElement)en.nextElement(); System.out.println( " " + s ); // System.out.println( " " + s.getValue() ); } } /** * Fetch the schema from the LDAP server at the specified * host and port, and print out the schema (including descriptions * of its object classes, attribute types, and matching rules). * The schema is printed in an easily readable format (not the * same as the format expected by an LDAP server). For example, * you can enter the following command to print the schema: *

     * java netscape.ldap.LDAPSchema myhost.mydomain.com 389
     * 
* * @param args the host name and the port number of the LDAP server * (for example, netscape.ldap.LDAPSchema directory.netscape.com * 389) */ public static void main( String[] args ) { if ( args.length < 2 ) { System.err.println( "Usage: netscape.ldap.LDAPSchema HOST PORT" ); System.exit(1 ); } int port = Integer.parseInt( args[1] ); LDAPConnection ld = new LDAPConnection(); try { ld.connect( args[0], port ); LDAPSchema schema = new LDAPSchema(); schema.fetchSchema( ld ); ld.disconnect(); System.out.println( "Object classes: " ); printEnum( schema.getObjectClasses() ); System.out.println( "\nAttributes: " ); printEnum( schema.getAttributes() ); System.out.println( "\nMatching rules: " ); printEnum( schema.getMatchingRules() ); System.out.println( "\nSyntaxes: " ); printEnum( schema.getSyntaxes() ); System.exit( 0 ); } catch ( LDAPException e ) { System.err.println( e ); } } private Hashtable objectClasses = new Hashtable(); private Hashtable attributes = new Hashtable(); private Hashtable matchingRules = new Hashtable(); private Hashtable syntaxes = new Hashtable(); private Hashtable structureRulesByName = new Hashtable(); private Hashtable structureRulesById = new Hashtable(); private Hashtable contentRules = new Hashtable(); private Hashtable nameForms = new Hashtable(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPAttributeSchema.java0000664001003300100330000003554610602743270030343 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; /** * The definition of an attribute type in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * to specify when defining an attribute type. According to the RFC, * the description of an attribute type can include the following: *

* *

    *
  • an OID identifying the attribute type *
  • a name identifying the attribute type *
  • a description of the attribute type *
  • the name of the parent attribute type *
  • the syntax used by the attribute (for example, * cis or int) *
  • an indication of whether the attribute type is single-valued * or multi-valued *
*

* * When you construct an LDAPAttributeSchema object, you can * specify these types of information as arguments to the constructor or * in the AttributeTypeDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * There a number of additional optional description fields which * are not explicitly accessible through LDAPAttributeSchema, but which * can be managed with setQualifier, getQualifier, and getQualifierNames: *

* *

    *
  • EQUALITY *
  • ORDERING *
  • SUBSTR *
  • COLLECTIVE *
  • NO-USER-MODIFICATION *
  • USAGE *
  • OBSOLETE *
*

* * To get the name, OID, and description of this attribute type * definition, use the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this attribute type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines AttributeTypeDescription as follows: *

*

 *     AttributeTypeDescription = "(" whsp
 *          numericoid whsp              ; AttributeType identifier
 *        [ "NAME" qdescrs ]             ; name used in AttributeType
 *        [ "DESC" qdstring ]            ; description
 *        [ "OBSOLETE" whsp ]
 *        [ "SUP" woid ]                 ; derived from this other
 *                                       ; AttributeType
 *        [ "EQUALITY" woid              ; Matching Rule name
 *        [ "ORDERING" woid              ; Matching Rule name
 *        [ "SUBSTR" woid ]              ; Matching Rule name
 *        [ "SYNTAX" whsp noidlen whsp ] ; see section 4.3
 *        [ "SINGLE-VALUE" whsp ]        ; default multi-valued
 *        [ "COLLECTIVE" whsp ]          ; default not collective
 *        [ "NO-USER-MODIFICATION" whsp ]; default user modifiable
 *        [ "USAGE" whsp AttributeUsage ]; default userApplications
 *        whsp ")"
 *
 *    AttributeUsage =
 *        "userApplications"     /
 *        "directoryOperation"   /
 *        "distributedOperation" / ; DSA-shared
 *        "dSAOperation"          ; DSA-specific, value depends on server
 * 
* * @version 1.0 * @see netscape.ldap.LDAPSchemaElement **/ public class LDAPAttributeSchema extends LDAPSchemaElement { static final long serialVersionUID = 2482595821879862595L; /** * Constructs a blank element. */ protected LDAPAttributeSchema() { super(); } /** * Constructs an attribute type definition, using the specified * information. * @param name name of the attribute type * @param oid object identifier (OID) of the attribute type * in dotted-string format (for example, "1.2.3.4") * @param description description of attribute type * @param syntax syntax of this attribute type. The value of this * argument can be one of the following: *
    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
* @param single true if the attribute type is single-valued */ public LDAPAttributeSchema( String name, String oid, String description, int syntax, boolean single ) { this( name, oid, description, cisString, single ); syntaxElement.syntax = syntax; String syntaxType = syntaxElement.internalSyntaxToString( syntax ); if ( syntaxType != null ) { syntaxElement.syntaxString = syntaxType; } setQualifier( SYNTAX, getSyntaxString() ); } /** * Constructs an attribute type definition, using the specified * information. * @param name name of the attribute type * @param oid object identifier (OID) of the attribute type * in dotted-string format (for example, "1.2.3.4") * @param description description of attribute type * @param syntaxString syntax of this attribute type in dotted-string * format (for example, "1.2.3.4.5") * @param single true if the attribute type is single-valued */ public LDAPAttributeSchema( String name, String oid, String description, String syntaxString, boolean single ) { this( name, oid, description, syntaxString, single, null, null ); } /** * Constructs an attribute type definition, using the specified * information. * @param name name of the attribute type * @param oid object identifier (OID) of the attribute type * in dotted-string format (for example, "1.2.3.4") * @param description description of attribute type * @param syntaxString syntax of this attribute type in dotted-string * format (for example, "1.2.3.4.5") * @param single true if the attribute type is single-valued * @param superior superior attribute as a name or OID; null * if there is no superior * @param aliases names which are to be considered aliases for this * attribute; null if there are no aliases */ public LDAPAttributeSchema( String name, String oid, String description, String syntaxString, boolean single, String superior, String[] aliases ) { super( name, oid, description, aliases ); attrName = "attributetypes"; syntaxElement.syntax = syntaxElement.syntaxCheck( syntaxString ); syntaxElement.syntaxString = syntaxString; setQualifier( SYNTAX, syntaxElement.syntaxString ); if ( single ) { setQualifier( SINGLE, "" ); } if ( (superior != null) && (superior.length() > 0) ) { setQualifier( SUPERIOR, superior ); } } /** * Constructs an attribute type definition based on a description in * the AttributeTypeDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of "attributetypes" are attribute type descriptions * in this format.) *

* * @param raw definition of the attribute type in the * AttributeTypeDescription format */ public LDAPAttributeSchema( String raw ) { attrName = "attributetypes"; parseValue( raw ); String val = (String)properties.get( SYNTAX ); if ( val != null ) { syntaxElement.syntaxString = val; syntaxElement.syntax = syntaxElement.syntaxCheck( val ); } } /** * Determines if the attribute type is single-valued. * @return true if single-valued, * false if multi-valued. */ public boolean isSingleValued() { return (properties != null) ? properties.containsKey( SINGLE ) : false; } /** * Gets the name of the attribute that this attribute inherits from, * if any. * @return the name of the attribute from which this attribute * inherits, or null if it does not have a superior. */ public String getSuperior() { String[] val = getQualifier( SUPERIOR ); return ((val != null) && (val.length > 0)) ? val[0] : null; } /** * Gets the syntax of the schema element * @return one of the following values: *

    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
  • unknown (not a known syntax) *
*/ public int getSyntax() { return syntaxElement.syntax; } /** * Gets the syntax of the attribute type in dotted-decimal format, * for example "1.2.3.4.5" * @return The attribute syntax in dotted-decimal format. */ public String getSyntaxString() { return syntaxElement.syntaxString; } /** * Prepares a value in RFC 2252 format for submission to a server * * @param quotingBug true if SUP and SYNTAX values are to * be quoted. This is required to work with bugs in certain LDAP servers. * @return a String ready for submission to an LDAP server. */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); String val = getValue( SUPERIOR, false ); if ( val.length() > 0 ) { s += val + ' '; } val = getOptionalValues( MATCHING_RULES ); if ( val.length() > 0 ) { s += val + ' '; } val = getValue( SYNTAX, quotingBug ); if ( val.length() > 0 ) { s += val + ' '; } if ( isSingleValued() ) { s += SINGLE + ' '; } val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } val = getOptionalValues( new String[] {USAGE} ); if ( val.length() > 0 ) { s += val + ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the attribute type in a user friendly format. * This is the format that the attribute type definition uses when * printing the attribute type or the schema. * @return definition of the attribute type in a user friendly format. */ public String toString() { String s = "Name: " + name + "; OID: " + oid + "; Type: "; s += syntaxElement.syntaxToString(); s += "; Description: " + description + "; "; if ( isSingleValued() ) { s += "single-valued"; } else { s += "multi-valued"; } s += getQualifierString( IGNOREVALS ); s += getAliasString(); return s; } // Predefined qualifiers public static final String EQUALITY = "EQUALITY"; public static final String ORDERING = "ORDERING"; public static final String SUBSTR = "SUBSTR"; public static final String SINGLE = "SINGLE-VALUE"; public static final String COLLECTIVE = "COLLECTIVE"; public static final String NO_USER_MODIFICATION = "NO-USER-MODIFICATION"; public static final String USAGE = "USAGE"; // Qualifiers known to not have values; prepare a Hashtable static String[] NOVALS = { SINGLE, COLLECTIVE, NO_USER_MODIFICATION }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } static final String[] MATCHING_RULES = { EQUALITY, ORDERING, SUBSTR }; // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { SINGLE, OBSOLETE, SUPERIOR, SINGLE, COLLECTIVE, NO_USER_MODIFICATION, SYNTAX}; protected LDAPSyntaxSchemaElement syntaxElement = new LDAPSyntaxSchemaElement(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPExtendedResponse.java0000664001003300100330000000620410602743270030523 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import netscape.ldap.client.opers.JDAPExtendedResponse; /** * Represents a server response to an extended operation request. * * @version 1.0 */ public class LDAPExtendedResponse extends LDAPResponse implements java.io.Serializable { static final long serialVersionUID = -3813049515964705320L; /** * Constructor * * @param msgid message identifier * @param rsp extended operation response * @paarm controls array of controls or null */ LDAPExtendedResponse(int msgid, JDAPExtendedResponse rsp, LDAPControl controls[]) { super(msgid, rsp, controls); } /** * Returns the OID of the response. * * @return the response OID. */ public String getID() { JDAPExtendedResponse result = (JDAPExtendedResponse)getProtocolOp(); return result.getID(); } /** * Returns the OID of the response. * * @return the response OID. * @deprecated Use LDAPExtendedResponse.getID() */ public String getOID() { return getID(); } /** * Returns the raw bytes of the value part of the response. * * @return response as a raw array of bytes. */ public byte[] getValue() { JDAPExtendedResponse result = (JDAPExtendedResponse)getProtocolOp(); return result.getValue(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSearchResultReference.java0000664001003300100330000000536110602743270031472 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import netscape.ldap.client.opers.JDAPSearchResultReference; /** * An LDAPSearchResultReference object encapsulates a continuation * reference from a search operation. * * @version 1.0 */ public class LDAPSearchResultReference extends LDAPMessage { static final long serialVersionUID = -7816778029315223117L; /** * A list of LDAP URLs that are referred to. */ private String m_URLs[]; /** * Constructor * * @param msgid message identifier * @param resRef search result reference response * @param controls array of controls or null * @see netscape.ldap.LDAPEntry */ LDAPSearchResultReference(int msgid, JDAPSearchResultReference resRef, LDAPControl[]controls) { super(msgid, resRef, controls); m_URLs = resRef.getUrls(); } /** * Returns a list of LDAP URLs that are referred to. * @return a list of URLs. */ public String[] getUrls() { return m_URLs; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSaslBind.java0000664001003300100330000003066010602743270026746 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import netscape.ldap.client.*; import netscape.ldap.client.opers.*; import netscape.ldap.ber.stream.*; import netscape.ldap.util.*; import java.io.*; import java.net.*; //import javax.security.auth.callback.CallbackHandler; /** * Authenticates to a server using SASL */ public class LDAPSaslBind implements LDAPBind, java.io.Serializable { static final long serialVersionUID = -7615315715163655443L; /** * Construct an object which can authenticate to an LDAP server * using the specified name and a specified SASL mechanism. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param mechanisms array of mechanism names, e.g. { "GSSAPI", "SKEY" } * @param props optional additional properties of the desired * authentication mechanism, e.g. minimum security level * @param cbh a class which may be called by the SASL framework to * obtain additional required information */ public LDAPSaslBind( String dn, String[] mechanisms, String packageName, Hashtable props, /*CallbackHandler*/ Object cbh ) { _dn = dn; _mechanisms = mechanisms; _packageName = packageName; _props = props; _cbh = cbh; // 12-01-99 Disabled check for instanceof CallbackHandler so that // there is no dependency on the extenal jaas.jar package. This is // reqired for Communicator build where the ldap java package does not // include any sasl classes. /*if ( (cbh != null) && !(cbh instanceof javax.security.auth.callback.CallbackHandler) ) { throw new IllegalArgumentException( "Callback argument must implement " + "javax.security.auth.callback.CallbackHandler" ); }*/ } /** * Authenticates to the LDAP server (that the object is currently * connected to) using the parameter that were provided to the * constructor. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param ldc an active connection to a server, which will have * the new authentication state on return from the method * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind( LDAPConnection ldc ) throws LDAPException { if ( _props == null ) { _props = new Hashtable(); } if ( (!_props.containsKey( CLIENTPKGS )) && (System.getProperty( CLIENTPKGS ) == null) ) { _props.put( CLIENTPKGS, ldc.DEFAULT_SASL_PACKAGE ); } _saslClient = getClient( ldc, _packageName ); if ( _saslClient != null ) { bind( ldc, true ); return; } else { ldc.printDebug( "LDAPSaslBind.bind: getClient " + "returned null" ); } } /** * Get a SaslClient object from the Sasl framework * * @param ldc contains the host name * @param packageName package containing a ClientFactory * @return a SaslClient supporting one of the mechanisms * of the member variable _mechanisms. * @exception LDAPException on error producing a client */ private Object getClient( LDAPConnection ldc, String packageName ) throws LDAPException { try { Object[] args = new Object[6]; args[0] = _mechanisms; args[1] = _dn; args[2] = "ldap"; args[3] = ldc.getHost(); args[4] = _props; args[5] = _cbh; String[] argNames = new String[6]; argNames[0] = "[Ljava.lang.String;"; argNames[1] = "java.lang.String"; argNames[2] = "java.lang.String"; argNames[3] = "java.lang.String"; argNames[4] = "java.util.Hashtable"; argNames[5] = CALLBACK_HANDLER; // Get a mechanism driver return DynamicInvoker.invokeMethod(null, packageName+".Sasl", "createSaslClient", args, argNames); } catch (Exception e) { ldc.printDebug( "LDAPSaslBind.getClient: " + packageName+".Sasl.createSaslClient: " + e ); throw new LDAPException(e.toString(), LDAPException.OTHER); } } void bind(LDAPConnection ldc, boolean rebind) throws LDAPException { if ((ldc.isConnected() && rebind) || !ldc.isConnected()) { try { // Get the initial request to start authentication String className = _saslClient.getClass().getName(); ldc.printDebug( "LDAPSaslBind.bind: calling " + className+".createInitialResponse" ); byte[] outVals = (byte[])DynamicInvoker.invokeMethod( _saslClient, className, "createInitialResponse", null, null); String mechanismName = (String)DynamicInvoker.invokeMethod( _saslClient, className, "getMechanismName", null, null); ldc.printDebug( "LDAPSaslBind.bind: mechanism " + "name is " + mechanismName ); boolean isExternal = isExternalMechanism(mechanismName); int resultCode = LDAPException.SASL_BIND_IN_PROGRESS; JDAPBindResponse response = null; while (!checkForSASLBindCompletion(resultCode)) { ldc.printDebug( "LDAPSaslBind.bind: calling " + "saslBind" ); response = saslBind(ldc, mechanismName, outVals); resultCode = response.getResultCode(); ldc.printDebug( "LDAPSaslBind.bind: saslBind " + "returned " + resultCode ); if (isExternal) { continue; } byte[] b = response.getCredentials(); Object[] args = {b}; String[] argNames = {"[B"}; // class name for byte array outVals = (byte[])DynamicInvoker.invokeMethod( _saslClient, className, "evaluateChallenge", args, argNames); } // Make sure authentication REALLY is complete Boolean bool = (Boolean)DynamicInvoker.invokeMethod( _saslClient, className, "isComplete", null, null); if (!bool.booleanValue()) { // Authentication session hijacked! throw new LDAPException("The server indicates that " + "authentication is successful" + ", but the SASL driver " + "indicates that authentication" + " is not yet done.", LDAPException.OTHER); } Object[] args = {ldc.getInputStream()}; String[] argNames = {"java.io.InputStream"}; InputStream is = (InputStream)DynamicInvoker.invokeMethod( _saslClient, className, "getInputStream", args, argNames); ldc.setInputStream(is); args[0] = ldc.getOutputStream(); argNames[0] = "java.io.OutputStream"; OutputStream os = (OutputStream)DynamicInvoker.invokeMethod( _saslClient, className, "getOutputStream", args, argNames); ldc.setOutputStream(os); ldc.setBound(true); } catch (LDAPException e) { throw e; } catch (Exception e) { throw new LDAPException(e.toString(), LDAPException.OTHER); } } } boolean isExternalMechanism(String name) { return name.equalsIgnoreCase( LDAPConnection.EXTERNAL_MECHANISM ); } private boolean checkForSASLBindCompletion(int resultCode) throws LDAPException{ if (resultCode == LDAPException.SUCCESS) { return true; } else if (resultCode == LDAPException.SASL_BIND_IN_PROGRESS) { return false; } else { throw new LDAPException("Authentication failed", resultCode); } } private JDAPBindResponse saslBind(LDAPConnection ldc, String mechanismName, byte[] credentials) throws LDAPException { LDAPResponseListener myListener = ldc.getResponseListener (); try { ldc.sendRequest(new JDAPBindRequest(3, _dn, mechanismName, credentials), myListener, ldc.getConstraints()); LDAPMessage response = myListener.getResponse(); JDAPProtocolOp protocolOp = response.getProtocolOp(); if (protocolOp instanceof JDAPBindResponse) { return (JDAPBindResponse)protocolOp; } else { throw new LDAPException("Unknown response from the " + "server during SASL bind", LDAPException.OTHER); } } finally { ldc.releaseResponseListener(myListener); } } private static final String CALLBACK_HANDLER = "javax.security.auth.callback.CallbackHandler"; private static final String CLIENTPKGS = "javax.security.sasl.client.pkgs"; private String _dn; private String[] _mechanisms; private String _packageName; private Hashtable _props; private /*CallbackHandler*/ Object _cbh; private Object _saslClient = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPUrl.java0000664001003300100330000006564010620653754026026 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; import java.net.MalformedURLException; /** * Represents an LDAP URL. The complete specification for LDAP URLs is in * RFC 1959. In addition, the secure ldap (ldaps://) is also * supported. LDAP URLs have the following format: * *
 * "ldap[s]://" [ hostName [":" portNumber] ] "/"
 *                      distinguishedName
 *          ["?" attributeList ["?" scope
 *                      "?" filterString ] ]
 * 
* where *

*

    *
  • all text within double-quotes are literal

    *

  • hostName and portNumber * identify the location of the LDAP server.

    *

  • distinguishedName is the name of an entry * within the given directory (the entry represents the starting point * of the search)

    *

  • attributeList contains a list of attributes * to retrieve (if null, fetch all attributes). This is a comma-delimited * list of attribute names.

    *

  • scope is one of the following: *
      *
    • base indicates that this is a search only for the * specified entry *
    • one indicates that this is a search for matching entries * one level under the specified entry (and not including the entry itself) *
    • sub indicates that this is a search for matching entries * at all levels under the specified entry (including the entry itself) *
    *

    * If not specified, scope is base by * default.

    *

  • filterString is a human-readable representation * of the search criteria. This value is used only for one-level or subtree * searches.

    *

*

* Note that if scope and filterString * are not specified, an LDAP URL identifies exactly one entry in the * directory.

* The same encoding rules for other URLs (e.g. HTTP) apply for LDAP * URLs. Specifically, any "illegal" characters are escaped with * %HH, where HH represent the * two hex digits which correspond to the ASCII value of the character. * This encoding is only legal (or necessary) on the DN and filter portions * of the URL. * * @version 1.0 */ public class LDAPUrl implements java.io.Serializable { static final long serialVersionUID = -3245440798565713641L; public static String defaultFilter = "(objectClass=*)"; private String m_hostName; private int m_portNumber; private String m_DN; private Vector m_attributes; private int m_scope; private String m_filter; private String m_URL; private boolean m_secure; private static LDAPSocketFactory m_factory; /** * The default port number for secure LDAP connections. * @see netscape.ldap.LDAPUrl#LDAPUrl(java.lang.String, int, java.lang.String, java.lang.String[], int, java.lang.String, boolean) */ public static final int DEFAULT_SECURE_PORT = 636; /** * Constructs a URL object with the specified string as URL. * @param url LDAP search expression in URL form * @exception MalformedURLException failed to parse URL */ public LDAPUrl (String url) throws java.net.MalformedURLException { m_attributes = null; m_scope = LDAPv2.SCOPE_BASE; m_filter = defaultFilter; m_URL = url; parseUrl(url); } /** * Parse URL as defined in RFC 1959. Beyond the RFC, the secure ldap * (ldaps) is also supported. */ private void parseUrl(String url) throws MalformedURLException { StringTokenizer urlParser = new StringTokenizer (url, ":/?", true); String currentToken; String str = null; try { currentToken = urlParser.nextToken(); if (currentToken.equalsIgnoreCase ("LDAPS")) { m_secure = true; } else if (!currentToken.equalsIgnoreCase ("LDAP")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); if (!currentToken.equals(":")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); if (!currentToken.equals("/")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); if (!currentToken.equals("/")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); } catch (NoSuchElementException e) { throw new MalformedURLException (); } // host-port if (currentToken.equals ("/")) { m_hostName = null; m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT; } else if (currentToken.equals (":")) { // port number without host name is not allowed throw new MalformedURLException ("No hostname"); } else if (currentToken.equals ("?")) { throw new MalformedURLException ("No host[:port]"); } else { m_hostName = currentToken; if (urlParser.countTokens() == 0) { m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT; return; } currentToken = urlParser.nextToken (); // either ":" or "/" if (currentToken.equals (":")) { try { m_portNumber = Integer.parseInt (urlParser.nextToken()); } catch (NumberFormatException nf) { throw new MalformedURLException ("Port not a number"); } catch (NoSuchElementException ex) { throw new MalformedURLException ("No port number"); } if (urlParser.countTokens() == 0) { return; } else if (! urlParser.nextToken().equals("/")) { throw new MalformedURLException (); } } else if (currentToken.equals ("/")) { m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT; } else { // expecting ":" or "/" throw new MalformedURLException (); } } // DN if (!urlParser.hasMoreTokens ()) { return; } m_DN = decode(readNextConstruct(urlParser)); if (m_DN.equals("?")) { m_DN = ""; } else if (m_DN.equals("/")) { throw new MalformedURLException (); } // attribute if (!urlParser.hasMoreTokens ()) { return; } str = readNextConstruct(urlParser); if (!str.equals("?")) { StringTokenizer attributeParser = new StringTokenizer (decode(str), ", "); m_attributes = new Vector (); while (attributeParser.hasMoreTokens()) { m_attributes.addElement (attributeParser.nextToken()); } } // scope if (!urlParser.hasMoreTokens ()) { return; } str = readNextConstruct(urlParser); if (!str.equals("?")) { m_scope = getScope(str); if (m_scope < 0) { throw new MalformedURLException("Bad scope:" + str); } } // filter if (!urlParser.hasMoreTokens ()) { return; } str = readNextConstruct(urlParser); m_filter = decode(str); checkBalancedParentheses(m_filter); if (!m_filter.startsWith("(") && !m_filter.endsWith(")")) { m_filter = "(" + m_filter + ")"; } // Nothing after the filter is allowed if (urlParser.hasMoreTokens()) { throw new MalformedURLException(); } } private void checkBalancedParentheses(String filter) throws MalformedURLException { int parenCnt =0; StringTokenizer filterParser = new StringTokenizer (filter, "()", true); while (filterParser.hasMoreElements()) { String token = filterParser.nextToken(); if (token.equals("(")) { parenCnt++; } else if (token.equals(")")) { if (--parenCnt < 0) { throw new MalformedURLException("Unbalanced filter parentheses"); } } } if (parenCnt != 0) { throw new MalformedURLException("Unbalanced filter parentheses"); } } /** * Constructs with the specified host, port, and DN. This form is used to * create URL references to a particular object in the directory. * @param host host name of the LDAP server, or null for "nearest X.500/LDAP" * @param port port number of the LDAP server (use LDAPv2.DEFAULT_PORT for * the default port) * @param DN distinguished name of the object */ public LDAPUrl (String host, int port, String DN) { initialize(host, port, DN, null, LDAPv2.SCOPE_BASE, defaultFilter, false); } /** * Constructs a full-blown LDAP URL to specify an LDAP search operation. * @param host host name of the LDAP server, or null for "nearest X.500/LDAP" * @param port port number of the LDAP server (use LDAPv2.DEFAULT_PORT for * the default port) * @param DN distinguished name of the object * @param attributes list of attributes to return. Use null for "all * attributes." * @param scope depth of search (in DN namespace). Use one of the LDAPv2 scopes: * SCOPE_BASE, SCOPE_ONE, or SCOPE_SUB. * @param filter LDAP filter string (as defined in RFC 1558). Use null for * no filter (this effectively makes the URL reference a single object). */ public LDAPUrl (String host, int port, String DN, String attributes[], int scope, String filter) { this(host, port, DN, attributes, scope, filter, false); } /** * Constructs a full-blown LDAP URL to specify an LDAP search operation. * @param host host name of the LDAP server, or null for "nearest X.500/LDAP" * @param port port number of the LDAP server (use LDAPv2.DEFAULT_PORT for * the default port) * @param DN distinguished name of the object * @param attributes list of the attributes to return. Use null for "all * attributes." * @param scope depth of the search (in DN namespace). Use one of the LDAPv2 scopes: * SCOPE_BASE, SCOPE_ONE, or SCOPE_SUB. * @param filter LDAP filter string (as defined in RFC 1558). Use null for * no filter (this effectively makes the URL reference a single object). */ public LDAPUrl (String host, int port, String DN, Enumeration attributes, int scope, String filter) { initialize(host, port, DN, attributes, scope, filter, false); } /** * Constructs a full-blown LDAP URL to specify an LDAP search operation. * @param host host name of the LDAP server, or null for "nearest X.500/LDAP" * @param port port number of the LDAP server (use LDAPv2.DEFAULT_PORT for * the default non-secure port or LDAPUrl.DEFAULT_SECURE_PORT for the default * secure port) * @param DN distinguished name of the object * @param attributes list of the attributes to return. Use null for "all * attributes." * @param scope depth of the search (in DN namespace). Use one of the LDAPv2 scopes: * SCOPE_BASE, SCOPE_ONE, or SCOPE_SUB. * @param filter LDAP filter string (as defined in RFC 1558). Use null for * no filter (this effectively makes the URL reference a single object). * @param secure flag if secure ldap protocol (ldaps) is to be used. */ public LDAPUrl (String host, int port, String DN, String[] attributes, int scope, String filter, boolean secure) { if (attributes != null) { Vector list = new Vector(); for (int k = 0; k < attributes.length; k++) { list.addElement(attributes[k]); } initialize(host, port, DN, list.elements(), scope, filter, secure); } else { initialize(host, port, DN, null, scope, filter, secure); } } /** * Initializes URL object. */ private void initialize (String host, int port, String DN, Enumeration attributes, int scope, String filter, boolean secure) { m_hostName = host; m_DN = DN; m_portNumber = port; m_filter = (filter != null) ? filter : defaultFilter; m_scope = scope; m_secure = secure; if (attributes != null) { m_attributes = new Vector (); while (attributes.hasMoreElements()) { m_attributes.addElement (attributes.nextElement()); } } else m_attributes = null; StringBuffer url = new StringBuffer (secure ? "ldaps://" :"ldap://"); if (host != null) { url.append (host); url.append (':'); url.append (String.valueOf (port)); } url.append ('/'); url.append (encode (DN)); if (attributes != null) { url.append ('?'); Enumeration attrList = m_attributes.elements(); boolean firstElement = true; while (attrList.hasMoreElements()) { if (!firstElement) url.append (','); else firstElement = false; url.append ((String)attrList.nextElement()); } } if (filter != null) { if (attributes == null) url.append ('?'); url.append ('?'); switch (scope) { default: case LDAPv2.SCOPE_BASE: url.append ("base"); break; case LDAPv2.SCOPE_ONE: url.append ("one"); break; case LDAPv2.SCOPE_SUB: url.append ("sub"); break; } url.append ('?'); url.append (filter); } m_URL = url.toString(); } /** * Return the host name of the LDAP server * @return LDAP host. */ public String getHost () { return m_hostName; } /** * Return the port number for the LDAP server * @return port number. */ public int getPort () { return m_portNumber; } /** * Return the distinguished name encapsulated in the URL * @return target distinguished name. */ public String getDN () { return m_DN; } /** * Return the server part of the ldap url, ldap://host:port * @return server url. */ String getServerUrl() { return (m_secure ? "ldaps://" : "ldap://") + m_hostName + ":" + m_portNumber; } /** * Return the collection of attributes specified in the URL, or null * for "every attribute" * @return enumeration of attributes. */ public Enumeration getAttributes () { if (m_attributes == null) return null; else return m_attributes.elements(); } /** * Return the collection of attributes specified in the URL, or null * for "every attribute" * @return string array of attributes. */ public String[] getAttributeArray () { if (m_attributes == null) return null; else { String[] attrNames = new String[m_attributes.size()]; Enumeration attrs = getAttributes(); int i = 0; while (attrs.hasMoreElements()) attrNames[i++] = (String)attrs.nextElement(); return attrNames; } } /** * Returns the scope of the search, according to the values * SCOPE_BASE, SCOPE_ONE, SCOPE_SUB as defined in LDAPv2. This refers * to how deep within the directory namespace the search will look * @return search scope. */ public int getScope () { return m_scope; } /** * Returns the scope of the search. If the scope returned is -1, then * the given string is not for the scope. * @param str the string against which to compare the scope type * @returns the scope of the search, -1 is returned if the given string is * not SUB, ONE or BASE (the acceptable LDAPv2 values for scope). */ private int getScope(String str) { int s = -1; if (str.equalsIgnoreCase("base")) s = LDAPv2.SCOPE_BASE; else if (str.equalsIgnoreCase("one")) s = LDAPv2.SCOPE_ONE; else if (str.equalsIgnoreCase("sub")) s = LDAPv2.SCOPE_SUB; return s; } /** * Returns the search filter (RFC 1558), or the default if none was * specified. * @return the search filter. */ public String getFilter () { return m_filter; } /** * Returns a valid string representation of this LDAP URL. * @return the LDAP search expression in URL form. */ public String getUrl () { return m_URL; } /** * Returns true if the secure ldap protocol is used. * @return true if ldaps is used. */ public boolean isSecure() { return m_secure; } /** * Gets the socket factory to be used for ldaps:// URLs. *

* If the factory is not explicitly specified with * LDAPUrl.setSocketFactory, the method will * attempt the determine the default factory based on the * available factories in the netscape.ldap.factory package. * * @return the socket factory to be used for ldaps:// URLs */ public static LDAPSocketFactory getSocketFactory() { if (m_factory == null) { // No factory explicitly set, try to determine // the default one. try { // First try Mozilla JSSSocketFactory Class c = Class.forName("netscape.ldap.factory.JSSSocketFactory"); m_factory = (LDAPSocketFactory) c.newInstance(); } catch (Throwable e) { } if (m_factory != null) { return m_factory; } try { // then try Sun JSSESocketFactory Class c = Class.forName("netscape.ldap.factory.JSSESocketFactory"); m_factory = (LDAPSocketFactory) c.newInstance(); } catch (Throwable e) { } } return m_factory; } /** * Sets the socket factory to be used for ldaps:// URLs. * Overrides the default factory assigned by the LDAPUrl * class. * @param factory the socket factory to be used for ldaps:// URLs * @see netscape.ldap.LDAPUrl#getSocketFactory */ public static void setSocketFactory(LDAPSocketFactory factory) { m_factory = factory; } /** * Reads next construct from the given string parser. * @param parser the string parser * @return the next construct which can be an attribute, scope or filter. * @exception java.net.MalformedURLException Get thrown when the url format * is incorrect. */ private String readNextConstruct(StringTokenizer parser) throws MalformedURLException { try { if (parser.hasMoreTokens()) { String tkn = parser.nextToken(); if (tkn.equals("?")) { // empty construct return tkn; } else if (parser.hasMoreTokens()){ // Remove '?' delimiter String delim = parser.nextToken(); if (!delim.equals("?")) { throw new MalformedURLException(); } } return tkn; } } catch (NoSuchElementException e) { throw new MalformedURLException(); } return null; } /** * Parses hex character into integer. */ private static int hexValue (char hexChar) throws MalformedURLException { if (hexChar >= '0' && hexChar <= '9') return hexChar - '0'; if (hexChar >= 'A' && hexChar <= 'F') return hexChar - 'A' + 10; if (hexChar >= 'a' && hexChar <= 'f') return hexChar - 'a' + 10; throw new MalformedURLException (); } private static char hexChar (int hexValue) { if (hexValue < 0 || hexValue > 0xF) return 'x'; if (hexValue < 10) return (char)(hexValue + '0'); return (char)((hexValue - 10) + 'a'); } /** * Decodes a URL-encoded string. Any occurences of %HH are decoded to the * hex value represented. However, this routine does NOT decode "+" * into " ". See RFC 1738 for full details about URL encoding/decoding. * @param URLEncoded a segment of a URL which was encoded using the URL * encoding rules * @exception MalformedURLException failed to parse URL */ public static String decode (String URLEncoded) throws MalformedURLException { StringBuffer decoded = new StringBuffer (URLEncoded); int srcPos = 0, dstPos = 0; try { while (srcPos < decoded.length()) { if (decoded.charAt (srcPos) != '%') { if (srcPos != dstPos) decoded.setCharAt (dstPos, decoded.charAt (srcPos)); srcPos++; dstPos++; continue; } decoded.setCharAt (dstPos, (char) ((hexValue(decoded.charAt (srcPos+1))<<4) | (hexValue(decoded.charAt (srcPos+2))))); dstPos++; srcPos += 3; } } catch (StringIndexOutOfBoundsException sioob) { // Indicates that a "%" character occured without the following HH throw new MalformedURLException (); } /* 070497 Url problems submitted by Netscape */ /* decoded.setLength (dstPos+1); */ decoded.setLength (dstPos); return decoded.toString (); } /** * Encodes an arbitrary string. Any illegal characters are encoded as * %HH. However, this routine does NOT decode "+" into " " (this is a HTTP * thing, not a general URL thing). Note that, because Sun's URLEncoder * does do this encoding, we can't use it. * See RFC 1738 for full details about URL encoding/decoding. * @param toEncode an arbitrary string to encode for embedding within a URL */ public static String encode (String toEncode) { StringBuffer encoded = new StringBuffer (toEncode.length()+10); for (int currPos = 0; currPos < toEncode.length(); currPos++) { char currChar = toEncode.charAt (currPos); if ((currChar >= 'a' && currChar <= 'z') || (currChar >= 'A' && currChar <= 'Z') || (currChar >= '0' && currChar <= '9') || ("$-_.+!*'(),".indexOf (currChar) > 0)) { // this is the criteria for "doesn't need to be encoded" (whew!) encoded.append (currChar); } else { encoded.append ("%"); encoded.append (hexChar ((currChar & 0xF0) >> 4)); encoded.append (hexChar (currChar & 0x0F)); } } return encoded.toString(); } /** * Returns the URL in String format * * @return the URL in String format */ public String toString() { return getUrl(); } /** * Reports if the two objects represent the same URL * * @param url the object to be compared to * @return true if the two are equivalent */ public boolean equals( LDAPUrl url ) { if ( getHost() == null ) { if ( url.getHost() != null ) { return false; } } else if ( !getHost().equals( url.getHost() ) ) { return false; } if ( getPort() != url.getPort() ) { return false; } if ( getDN() == null ) { if ( url.getDN() != null ) { return false; } } else if ( !getDN().equals( url.getDN() ) ) { return false; } if ( getFilter() == null ) { if ( url.getFilter() != null ) { return false; } } else if ( !getFilter().equals( url.getFilter() ) ) { return false; } if ( getScope() != url.getScope() ) { return false; } if ( m_attributes == null ) { if ( url.m_attributes != null ) { return false; } } else if ( m_attributes.size() != url.m_attributes.size() ) { return false; } else { for( int i = 0; i < m_attributes.size(); i++ ) { if ( m_attributes.elementAt( i ) != url.m_attributes.elementAt( i ) ) { return false; } } } return true; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPTLSSocketFactory.java0000664001003300100330000000465510602743270030417 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2002 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; import java.util.*; import java.io.*; import java.net.*; /** * A socket factory interface for supporting the start TLS LDAPv3 * extension (RFC 2830). *

* * @version 1.0 * @since LDAPJDK 4.17 */ public interface LDAPTLSSocketFactory extends LDAPSocketFactory { /** * Creates an SSL socket layered over an existing socket. * * Used for the start TLS operations (RFC2830). * * @param s An existing non-SSL socket * @return A SSL socket layered over the input socket * @exception LDAPException on error creating socket * @see LDAPConnection#startTLS */ public Socket makeSocket(Socket s) throws LDAPException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPConstraints.java0000664001003300100330000003700310602743270027554 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap; /** * Represents a set of operation preferences. * You can set these preferences for a particular operation * by creating an LDAPConstraints object, * specifying your preferences, and passing the object to * the proper LDAPConnection method. *

* * @version 1.0 */ public class LDAPConstraints implements Cloneable, java.io.Serializable { static final long serialVersionUID = 6506767263918312029L; private int m_hop_limit; private LDAPBind m_bind_proc; private LDAPRebind m_rebind_proc; private boolean referrals; private int m_time_limit; private LDAPControl[] m_clientControls; private LDAPControl[] m_serverControls; /** * Constructs an LDAPConstraints object that specifies * the default set of constraints. */ public LDAPConstraints() { m_time_limit = 0; referrals = false; m_bind_proc = null; m_rebind_proc = null; m_hop_limit = 5; m_clientControls = null; m_serverControls = null; } /** * Constructs a new LDAPConstraints object and allows you * to specify the constraints in that object. *

* @param msLimit maximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param doReferrals specify true to follow referrals * automatically, or False to throw an * LDAPReferralException error if the server sends back * a referral (False by default) * @param rebind_proc specifies the object that * implements the LDAPRebind interface (you need to * define this class). The object will be used when the client * follows referrals automatically. The object provides the client * with a method for getting the distinguished name and password * used to authenticate to another LDAP server during a referral. * (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see netscape.ldap.LDAPConnection#setOption(int, java.lang.Object) */ public LDAPConstraints( int msLimit, boolean doReferrals, LDAPRebind rebind_proc, int hop_limit) { m_time_limit = msLimit; referrals = doReferrals; m_bind_proc = null; m_rebind_proc = rebind_proc; m_hop_limit = hop_limit; m_clientControls = null; m_serverControls = null; } /** * Constructs a new LDAPConstraints object and allows you * to specify the constraints in that object. *

* @param msLimit Mmaximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param doReferrals specify true to follow referrals * automatically, or False to throw an * LDAPReferralException error if the server sends back * a referral (False by default) * @param bind_proc specifies the object that * implements the LDAPBind interface (you need to * define this class). The object will be used to authenticate to the * server on referrals. (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see netscape.ldap.LDAPConnection#setOption(int, java.lang.Object) */ public LDAPConstraints( int msLimit, boolean doReferrals, LDAPBind bind_proc, int hop_limit) { m_time_limit = msLimit; referrals = doReferrals; m_bind_proc = bind_proc; m_rebind_proc = null; m_hop_limit = hop_limit; m_clientControls = null; m_serverControls = null; } /** * Returns the maximum number of milliseconds to wait for any operation * under these constraints. If 0, there is no maximum time limit * on waiting for the operation results. * @return maximum number of milliseconds to wait for operation results. */ public int getTimeLimit() { return m_time_limit; } /** * Specifies whether nor not referrals are followed automatically. * Returns true if referrals are to be followed automatically, * or false if referrals throw an * LDAPReferralException. * @return true if referrals are followed automatically, * false if referrals throw an * LDAPReferralException. */ public boolean getReferrals() { return referrals; } /** * Returns the object that provides the mechanism for authenticating to the * server on referrals. This object must implement the LDAPBind * interface. * @return object to use to authenticate to the server on referrals. * @see netscape.ldap.LDAPBind */ public LDAPBind getBindProc() { return m_bind_proc; } /** * Returns the object that provides the method for getting * authentication information. This object must * implement the LDAPRebind interface. * @return object to use to obtain information for * authenticating to other LDAP servers during referrals. * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPRebindAuth */ public LDAPRebind getRebindProc() { return m_rebind_proc; } /** * Returns the maximum number of hops to follow during a referral. * @return maximum number of hops to follow during a referral. */ public int getHopLimit() { return m_hop_limit; } /** * Returns any client controls to be applied by the client * to LDAP operations. * @return client controls for the client to apply to LDAP operations. * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public LDAPControl[] getClientControls() { return m_clientControls; } /** * Returns any server controls to be applied by the server * to LDAP operations. * @return server controls for the server to apply to LDAP operations. * @see netscape.ldap.LDAPControl * @see netscape.ldap.LDAPConnection#getOption * @see netscape.ldap.LDAPConnection#setOption */ public LDAPControl[] getServerControls() { return m_serverControls; } /** * Sets the maximum number of milliseconds to wait for any operation * under these constraints. If 0, there is no maximum time limit * on waiting for the operation results. If the time limit is exceeded, * an LDAPException with the result code LDAPException.TIME_LIMIT * is thrown. * @param msLimit Maximum number of milliseconds to wait for operation * results (0 by default, which means that there is no maximum time * limit.) * @see netscape.ldap.LDAPException#LDAP_TIMEOUT */ public void setTimeLimit( int msLimit ) { m_time_limit = msLimit; } /** * Specifies whether or not referrals are followed automatically. * Specify true if referrals are to be followed automatically, * or false if referrals are to throw an * LDAPReferralException. * (By default, this is set to false.) *

* If you set this to true, you need to create an object of * this class that implements either the LDAPRebind or * LDAPBind interface. The LDAPRebind object * identifies the method for retrieving authentication information which * will be used when connecting to other LDAP servers during referrals. * This object should be passed to the setRebindProc method. * Alternatively, the LDAPBind object identifies an * authentication mechanism to be used instead of the default * authentication mechanism when following referrals. This * object should be passed to the setBindProc method. * @param doReferrals set to true if referrals should be * followed automatically, or False if referrals should throw * an LDAPReferralException * @see netscape.ldap.LDAPBind * @see netscape.ldap.LDAPRebind * @see netscape.ldap.LDAPRebindAuth */ public void setReferrals( boolean doReferrals ) { referrals = doReferrals; } /** * Sets the object that provides the mechanism for authenticating * to the server on referrals. This object must implement * the LDAPBind interface.(By default, this is * null.) This method sets the LDAPRebind * object to null for this constraint. * @param bind_proc object to use to authenticate to the server * on referrals * @see netscape.ldap.LDAPBind */ public void setBindProc( LDAPBind bind_proc ) { m_bind_proc = bind_proc; if (bind_proc != null) { m_rebind_proc = null; } } /** * Specifies the object that provides the method for getting * authentication information. This object must belong to a class * that implements the LDAPRebind interface. * (By default, this is null.) This method sets the * LDAPBind object to null for this constraint. * @param rebind_proc object to use to obtain information for * authenticating to other LDAP servers during referrals */ public void setRebindProc( LDAPRebind rebind_proc ) { m_rebind_proc = rebind_proc; if (rebind_proc != null) { m_bind_proc = null; } } /** * Sets maximum number of hops to follow in sequence during a referral. * (By default, this is 5.) * @param hop_limit maximum number of hops to follow during a referral */ public void setHopLimit( int hop_limit ) { m_hop_limit = hop_limit; } /** * Sets a client control for LDAP operations. * @param control client control for LDAP operations * @see netscape.ldap.LDAPControl */ public void setClientControls( LDAPControl control ) { m_clientControls = new LDAPControl[1]; m_clientControls[0] = control; } /** * Sets an array of client controls for LDAP operations. * @param controls array of client controls for LDAP operations * @see netscape.ldap.LDAPControl */ public void setClientControls( LDAPControl[] controls ) { m_clientControls = controls; } /** * Sets a server control for LDAP operations. * @param control server control for LDAP operations * @see netscape.ldap.LDAPControl */ public void setServerControls( LDAPControl control ) { m_serverControls = new LDAPControl[1]; m_serverControls[0] = control; } /** * Sets an array of server controls for LDAP operations. * @param controls an array of server controls for LDAP operations * @see netscape.ldap.LDAPControl */ public void setServerControls( LDAPControl[] controls ) { m_serverControls = controls; } /** * Return a string representation of the object for debugging * * @return A string representation of the object */ public String toString() { StringBuffer sb = new StringBuffer("LDAPConstraints {"); sb.append("time limit " + getTimeLimit() + ", "); sb.append("referrals " + getReferrals() + ", "); sb.append("hop limit " + getHopLimit() + ", "); sb.append("bind_proc " + getBindProc() + ", "); sb.append("rebind_proc " + getRebindProc()); LDAPControl[] controls = getClientControls(); if ( controls != null ) { sb.append(", client controls "); for (int i =0; i < controls.length; i++) { sb.append(controls[i].toString()); if ( i < (controls.length - 1) ) { sb.append(" "); } } } controls = getServerControls(); if ( controls != null ) { sb.append(", server controls "); for (int i =0; i < controls.length; i++) { sb.append(controls[i].toString()); if ( i < (controls.length - 1) ) { sb.append(" "); } } } sb.append('}'); return sb.toString(); } /** * Makes a copy of an existing set of constraints. * @return a copy of an existing set of constraints */ public Object clone() { try { LDAPConstraints o = (LDAPConstraints) super.clone(); if ( (this.m_clientControls != null) && (this.m_clientControls.length > 0) ) { o.m_clientControls = new LDAPControl[this.m_clientControls.length]; for( int i = 0; i < this.m_clientControls.length; i++ ) o.m_clientControls[i] = (LDAPControl)this.m_clientControls[i].clone(); } if ( (this.m_serverControls != null) && (this.m_serverControls.length > 0) ) { o.m_serverControls = new LDAPControl[this.m_serverControls.length]; for( int i = 0; i < this.m_serverControls.length; i++ ) o.m_serverControls[i] = (LDAPControl)this.m_serverControls[i].clone(); } return o; } catch (CloneNotSupportedException ex) { // shold never happen, the class is Cloneable return null; } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/0000775001003300100330000000000010667357315022006 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/0000775001003300100330000000000010667357315023610 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/0000775001003300100330000000000010667357315024552 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/SaslException.java0000664001003300100330000001402210620653754030170 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.sasl; /** * This class represents an error that has occurred when using SASL. * */ public class SaslException extends java.io.IOException { /** * The possibly null root cause exception. * @serial */ private Throwable exception; /** * Constructs a new instance of SaslException. * The root exception and the detailed message are null. */ public SaslException () { super(); } /** * Constructs a new instance of SaslException with a detailed message. * The root exception is null. * @param detail A possibly null string containing details of the exception. * * @see java.lang.Throwable#getMessage */ public SaslException (String detail) { super(detail); } /** * Constructs a new instance of SaslException with a detailed message * and a root exception. * For example, a SaslException might result from a problem with * the callback handler, which might throw a NoSuchCallbackException if * it does not support the requested callback, or throw an IOException * if it had problems obtaining data for the callback. The * SaslException's root exception would be then be the exception thrown * by the callback handler. * * @param detail A possibly null string containing details of the exception. * @param ex A possibly null root exception that caused this exception. * * @see java.lang.Throwable#getMessage * @see #getException */ public SaslException (String detail, Throwable ex) { super(detail); exception = ex; } /** * Returns the root exception that caused this exception. * @return The possibly null root exception that caused this exception. */ public Throwable getException() { return exception; } /** * Prints this exception's stack trace to System.err. * If this exception has a root exception; the stack trace of the * root exception is printed to System.err instead. */ public void printStackTrace() { printStackTrace( System.err ); } /** * Prints this exception's stack trace to a print stream. * If this exception has a root exception; the stack trace of the * root exception is printed to the print stream instead. * @param ps The non-null print stream to which to print. */ public void printStackTrace(java.io.PrintStream ps) { if ( exception != null ) { String superString = super.toString(); synchronized ( ps ) { ps.print(superString + (superString.endsWith(".") ? "" : ".") + " Root exception is "); exception.printStackTrace( ps ); } } else { super.printStackTrace( ps ); } } /** * Prints this exception's stack trace to a print writer. * If this exception has a root exception; the stack trace of the * root exception is printed to the print writer instead. * @param pw The non-null print writer to which to print. */ public void printStackTrace(java.io.PrintWriter pw) { if ( exception != null ) { String superString = super.toString(); synchronized (pw) { pw.print(superString + (superString.endsWith(".") ? "" : ".") + " Root exception is "); exception.printStackTrace( pw ); } } else { super.printStackTrace( pw ); } } /** * Returns the string representation of this exception. * The string representation contains * this exception's class name, its detailed messsage, and if * it has a root exception, the string representation of the root * exception. This string representation * is meant for debugging and not meant to be interpreted * programmatically. * @return The non-null string representation of this exception. * @see java.lang.Throwable#getMessage */ public String toString() { String answer = super.toString(); if (exception != null && exception != this) { answer += " [Root exception is " + exception.toString() + "]"; } return answer; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/SaslClientFactory.java0000664001003300100330000000765510602743267031015 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.sasl; import java.util.Hashtable; import javax.security.auth.callback.CallbackHandler; /** * An interface for creating instances of SaslClient. * * @see SaslClient * @see Sasl */ public abstract interface SaslClientFactory { /** * Creates a SaslClient using the parameters supplied. * * @param mechanisms The non-null list of mechanism names to try. Each is the * IANA-registered name of a SASL mechanism. (e.g. "GSSAPI", "CRAM-MD5"). * @param authorizationId The possibly null authorization ID to use. When * the SASL authentication completes successfully, the entity named * by authorizationId is granted access. * @param protocol The non-null string name of the protocol for which * the authentication is being performed (e.g., "ldap"). * @param serverName The non-null string name of the server to which * we are creating an authenticated connection. * @param props The possibly null properties to be used by the SASL * mechanisms to configure the authentication exchange. For example, * "javax.security.sasl.encryption.maximum" might be used to specify * the maximum key length to use for encryption. * @param cbh The possibly null callback handler to used by the SASL * mechanisms to get further information from the application/library * to complete the authentication. For example, a SASL mechanism might * require the authentication ID and password from the caller. *@return A possibly null SaslClient created using the parameters * supplied. If null, this factory cannot produce a SaslClient * using the parameters supplied. *@exception SaslException If cannot create a SaslClient because * of an error. */ public abstract SaslClient createSaslClient( String[] mechanisms, String authorizationId, String protocol, String serverName, Hashtable props, CallbackHandler cbh) throws SaslException; /** * Returns an array of names of mechanisms supported by this factory. * @return A non-null array containing a IANA-registered SASL mechanism names. */ public abstract String[] getMechanismNames(); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/mechanisms/0000775001003300100330000000000010667357315026701 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/mechanisms/SaslExternal.java0000664001003300100330000001224010620653754032143 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.sasl.mechanisms; import java.io.*; import com.netscape.sasl.*; /** * This class provides the implementation of the EXTERNAL mechanism driver. * This mechanism is passed in the SASL External bind request to retrieve the * current result code from the server. */ public class SaslExternal implements SaslClient { /** * Default constructor */ public SaslExternal() { } /** * Retrieves the initial response. * * @return The possibly null byte array containing the initial response. * It is null if the mechanism does not have an initial response. * @exception SaslException If an error occurred while creating * the initial response. */ public byte[] createInitialResponse() throws SaslException { return null; } /** * Evaluates the challenge data and generates a response. * * @param challenge The non-null challenge sent from the server. * * @return The possibly null reponse to send to the server. * It is null if the challenge accompanied a "SUCCESS" status * and the challenge only contains data for the client to * update its state and no response needs to be sent to the server. * @exception SaslException If an error occurred while processing * the challenge or generating a response. */ public byte[] evaluateChallenge(byte[] challenge) throws SaslException { return null; } /** * Returns the name of mechanism driver. * @return The mechanism name. */ public String getMechanismName() { return MECHANISM_NAME; } /** * The method may be called at any time to determine if the authentication * process is finished. * @return true if authentication is complete. For this class, * always returns true. */ public boolean isComplete() { return true; } /** * Retrieves an input stream for the session. It may return * the same stream that is passed in, if no processing is to be * done by the client object. * * This method can only be called if isComplete() returns true. * @param is The original input stream for reading from the server. * @return An input stream for reading from the server, which * may include processing the original stream. For this class, the * input parameter is always returned. * @exception IOException If the authentication exchange has not completed * or an error occurred while getting the stream. */ public InputStream getInputStream(InputStream is) throws IOException { return is; } /** * Retrieves an output stream for the session. It may return * the same stream that is passed in, if no processing is to be * done by the client object. * * This method can only be called if isComplete() returns true. * @param os The original output stream for writing to the server. * @return An output stream for writing to the server, which * may include processing the original stream. For this class, the * input parameter is always returned. * @exception IOException If the authentication exchange has not completed * or an error occurred while getting the stream. */ public OutputStream getOutputStream(OutputStream os) throws IOException { return os; } private final static String MECHANISM_NAME = "EXTERNAL"; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/ClientFactory.java0000664001003300100330000001360610602743267030163 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.sasl; import java.util.Hashtable; import javax.security.auth.callback.CallbackHandler; /** * An interface for creating instances of SaslClient. * * @see SaslClient * @see Sasl */ public class ClientFactory implements SaslClientFactory { public ClientFactory() { _mechanismTable = new Hashtable(); for( int i = 0; i < _mechanismNames.length; i++ ) { _mechanismTable.put( _mechanismNames[i].toLowerCase(), PACKAGENAME + '.' + _mechanismClasses[i] ); } } /** * Creates a SaslClient using the parameters supplied. * * @param mechanisms The non-null list of mechanism names to try. * Each is the IANA-registered name of a SASL mechanism. (e.g. * "GSSAPI", "CRAM-MD5"). * @param authorizationId The possibly null authorization ID to * use. When the SASL authentication completes successfully, the * entity named by authorizationId is granted access. * @param protocol The non-null string name of the protocol for * which the authentication is being performed (e.g., "ldap"). * @param serverName The non-null string name of the server to * which we are creating an authenticated connection. * @param props The possibly null properties to be used by the SASL * mechanisms to configure the authentication exchange. For example, * "javax.security.sasl.encryption.maximum" might be used to * specify the maximum key length to use for encryption. * @param cbh The possibly null callback handler to used by the * SASL mechanisms to get further information from the * application/library to complete the authentication. For example, * a SASL mechanism might require the authentication ID and * password from the caller. * @return A possibly null SaslClient created using the * parameters supplied. If null, this factory cannot produce a * SaslClient using the parameters supplied. * @exception SaslException if it cannot create a * SaslClient because of an error. */ public SaslClient createSaslClient( String[] mechanisms, String authorizationId, String protocol, String serverName, Hashtable props, CallbackHandler cbh ) throws SaslException { String mechName = null; if ( Sasl.debug ) { System.out.println( "ClientFactory.createSaslClient" ); } for( int i = 0; (mechName == null) && (i < mechanisms.length); i++ ) { mechName = (String)_mechanismTable.get( mechanisms[i].toLowerCase() ); } if ( mechName != null ) { try { Class c = Class.forName( mechName ); SaslClient client = (SaslClient)c.newInstance(); if ( Sasl.debug ) { System.out.println( "ClientFactory.createSaslClient: newInstance for " + mechName + " returned " + client); } return client; } catch ( Exception e ) { System.err.println( "ClientFactory.createSaslClient: " + e ); } } else { if ( Sasl.debug ) { System.out.println( "ClientFactory.createSaslClient: does not support " + "any of the mechanisms" ); for( int i = 0; i < mechanisms.length; i++ ) { System.out.println( " " + mechanisms[i] ); } } } return null; } /** * Returns an array of names of mechanisms supported by this * factory. * @return A non-null array containing IANA-registered SASL * mechanism names. */ public String[] getMechanismNames() { return _mechanismNames; } private final String PACKAGENAME = "com.netscape.sasl.mechanisms"; private final String[] _mechanismNames = { "EXTERNAL" }; private final String[] _mechanismClasses = { "SaslExternal" }; private Hashtable _mechanismTable; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/SaslClient.java0000664001003300100330000001532610620653754027460 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.sasl; import java.util.Hashtable; import java.io.*; /** * Performs SASL authentication as a client. *

* A protocol library such as one for LDAP gets an instance of this * class in order to perform authentication defined by a specific SASL * mechanism. Invoking methods on the SaslClient instance * process challenges and create responses according to the SASL * mechanism implemented by the SaslClient. * As the authentication proceeds, the instance * encapsulates the state of a SASL client's authentication exchange. *

* Here's an example of how an LDAP library might use a SaslClient. * It first gets an instance of a SaslClient: *

 * SaslClient sc = Sasl.createSaslClient(mechanisms,
 *     authorizationId, protocol, serverName, props, callbackHandler);
 *
* It can then proceed to use the client for authentication. * For example, an LDAP library might use the client as follows: *
 * InputStream is = ldap.getInputStream();
 * OutputStream os = ldap.getOutputStream();
 * byte[] toServer = sc.createInitialResponse();
 * LdapResult res = ldap.sendBindRequest(dn, sc.getName(), toServer);
 * while (!sc.isComplete() && res.status == SASL_BIND_IN_PROGRESS) {
 *     toServer = sc.evaluateChallenge(res.getBytesFromServer());
 *     if (toServer != null) {
 *        res = ldap.sendBindRequest(dn, sc.getName(), toServer);
 *     }
 * }
 * if (sc.isComplete() && res.status == SUCCESS) {
 *     // Get the input and output streams; may be unchanged
 *     is = sc.getInputStream( is );
 *     os = sc.getOutputStream( os );
 *     // Use these streams from now on
 *     ldap.setInputStream( is );
 *     ldap.setOutputStream( os );
 * }
 *
* * Note that the call to createInitialResponse() is optional. * Protocols such as IMAP4 do not invoke it but instead only use * evaluateChallenge(), possibly with an empty challenge. * It is the responsibility of the SaslClient implementation * for a mechanism to take this into account so that it behaves properly * regardless of whether createInitialResponse() is called. * * @see Sasl * @see SaslClientFactory */ public abstract interface SaslClient { /** * Returns the IANA-registered mechanism name of this SASL client. * (e.g. "CRAM-MD5", "GSSAPI"). * @return A non-null string representing the IANA-registered mechanism name. */ public abstract String getMechanismName(); /** * Retrieves the initial response. * * @return The possibly null byte array containing the initial response. * It is null if the mechanism does not have an initial response. * @exception SaslException If an error occurred while creating * the initial response. */ public abstract byte[] createInitialResponse() throws SaslException; /** * Evaluates the challenge data and generates a response. * * @param challenge The non-null challenge sent from the server. * * @return The possibly null reponse to send to the server. * It is null if the challenge accompanied a "SUCCESS" status and the challenge * only contains data for the client to update its state and no response * needs to be sent to the server. * @exception SaslException If an error occurred while processing * the challenge or generating a response. */ public abstract byte[] evaluateChallenge(byte[] challenge) throws SaslException; /** * Determines whether the authentication exchange has completed. * @return true if the authentication exchange has completed; false otherwise. */ public abstract boolean isComplete(); /** * Retrieves an input stream for the session. It may return * the same stream that is passed in, if no processing is to be * done by the client object. * * This method can only be called if isComplete() returns true. * @param is The original input stream for reading from the server. * @return An input stream for reading from the server, which * may include processing the original stream. * @exception IOException If the authentication exchange has not completed * or an error occurred while getting the stream. */ public abstract InputStream getInputStream(InputStream is) throws IOException; /** * Retrieves an output stream for the session. It may return * the same stream that is passed in, if no processing is to be * done by the client object. * * This method can only be called if isComplete() returns true. * @param os The original output stream for writing to the server. * @return An output stream for writing to the server, which * may include processing the original stream. * @exception IOException If the authentication exchange has not completed * or an error occurred while getting the stream. */ public abstract OutputStream getOutputStream(OutputStream os) throws IOException; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/com/netscape/sasl/Sasl.java0000664001003300100330000002470610602743267026322 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.sasl; import java.util.Hashtable; import javax.security.auth.callback.CallbackHandler; import java.util.StringTokenizer; import java.io.*; /** * A static class for creating SASL clients and servers. *

* This class defines the policy of how to locate, load, and instantiate * SASL clients and servers. * Currently, only the client methods are available. *

* For example, an application or library gets a SASL client by doing * something like: *

 * SaslClient sc = Sasl.createSaslClient(mechanisms,
 *     authorizationId, protocol, serverName, props, callbackHandler);
 *
* It can then proceed to use the client create an authentication connection. * For example, an LDAP library might use the client as follows: *
 * InputStream is = ldap.getInputStream();
 * OutputStream os = ldap.getOutputStream();
 * byte[] toServer = sc.createInitialResponse();
 * LdapResult res = ldap.sendBindRequest(dn, sc.getName(), toServer);
 * while (!sc.isComplete() && res.status == SASL_BIND_IN_PROGRESS) {
 *     toServer = sc.evaluateChallenge(res.getBytesFromServer());
 *     if (toServer != null) {
 *        res = ldap.sendBindRequest(dn, sc.getName(), toServer);
 *     }
 * }
 * if (sc.isComplete() && res.status == SUCCESS) {
 *     // Get the input and output streams; may be unchanged
 *     is = sc.getInputStream( is );
 *     os = sc.getOutputStream( os );
 *     // Use these streams from now on
 *     ldap.setInputStream( is );
 *     ldap.setOutputStream( os );
 * }
 *
* * IMPLEMENTATION NOTE: To use this class on JDK1.2, the caller needs: *
    *
  • java.lang.RuntimePermission("getSecurityManager") *
  • java.lang.RuntimePermission("getClassLoader") *
  • java.util.PropertyPermission("javax.security.sasl.client.pkgs", "read"); *
*/ public class Sasl { private static SaslClientFactory clientFactory = null; static final boolean debug = false; // Cannot create one of these private Sasl() { } /** * The property name containing a list of package names, separated by * '|'. Each package contains a class named ClientFactory that * implements the SaslClientFactory interface. * Its value is "javax.security.sasl.client.pkgs". */ public static final String CLIENTPKGS = "javax.security.sasl.client.pkgs"; /** * Creates a SaslClient using the parameters supplied. * The algorithm for selection is as follows: *
    *
  1. If a factory has been installed via setSaslClientFactory(), * try it first. If non-null answer produced, return it. *
  2. The javax.security.sasl.client.pkgs property contains * a '|'-separated list of package names. Each package contains a * class named ClientFactory. Load each factory * and try to create a SaslClient. * Repeat this for * each package on the list until a non-null answer is produced. * If non-null answer produced, return it. *
  3. Repeat previous step using the javax.security.sasl.client.pkgs * System property. *
  4. If no non-null answer produced, return null. *
* * @param mechanisms The non-null list of mechanism names to try. Each is the * IANA-registered name of a SASL mechanism. (e.g. "GSSAPI", "CRAM-MD5"). * @param authorizationId The possibly null authorization ID to use. When * the SASL authentication completes successfully, the entity named * by authorizationId is granted access. * @param protocol The non-null string name of the protocol for which * the authentication is being performed (e.g., "ldap"). * @param serverName The non-null string name of the server to which * we are creating an authenticated connection. * @param props The possibly null properties to be used by the SASL * mechanisms to configure the authentication exchange. For example, * "javax.security.sasl.encryption.maximum" might be used to specify * the maximum key length to use for encryption. * @param cbh The possibly null callback handler to used by the SASL * mechanisms to get further information from the application/library * to complete the authentication. For example, a SASL mechanism might * require the authentication ID and password from the caller. *@return A possibly null SaslClient created using the parameters * supplied. If null, cannot find a SaslClientFactory * that will produce one. *@exception SaslException If cannot create a SaslClient because * of an error. */ public static SaslClient createSaslClient( String[] mechanisms, String authorizationId, String protocol, String serverName, Hashtable props, CallbackHandler cbh) throws SaslException { if (debug) { System.out.println("Sasl.createSaslClient"); } SaslClient mech = null; // If factory has been set, try it first if (clientFactory != null) { mech = clientFactory.createSaslClient( mechanisms, authorizationId, protocol, serverName, props, cbh); } // No mechanism produced if (mech == null) { String pkgs = (props == null) ? null : (String) props.get(CLIENTPKGS); // Try properties argument if (pkgs != null) { mech = loadFromPkgList(pkgs, mechanisms, authorizationId, protocol, serverName, props, cbh); } // Try system properties if (mech == null && (pkgs = System.getProperty(CLIENTPKGS)) != null) { mech = loadFromPkgList(pkgs, mechanisms, authorizationId, protocol, serverName, props, cbh); } } return mech; } private static SaslClient loadFromPkgList(String pkgs, String[] mechanisms, String authorizationId, String protocol, String serverName, Hashtable props, CallbackHandler cbh) throws SaslException { StringTokenizer packagePrefixIter = new StringTokenizer(pkgs, "|"); SaslClient mech = null; SaslClientFactory fac = null; while (mech == null && packagePrefixIter.hasMoreTokens()) { String pkg = packagePrefixIter.nextToken().trim(); String clsName = pkg + ".ClientFactory"; if (debug) { System.out.println("Sasl.loadFromPkgList: " + clsName); } Class cls = null; try { cls = Class.forName(clsName); } catch (Exception e) { System.err.println( "Sasl.loadFromPkgList: " + e ); } if (cls != null) { try { fac = (SaslClientFactory) cls.newInstance(); } catch (InstantiationException e) { throw new SaslException( "Cannot instantiate " + clsName); } catch (IllegalAccessException e) { throw new SaslException( "Cannot access constructor of " + clsName); } mech = fac.createSaslClient(mechanisms, authorizationId, protocol, serverName, props, cbh); } } return mech; } /** * Sets the default SaslClientFactory to use. * This method sets fac to be the default factory. * It can only be called with a non-null value once per VM. * If a factory has been set already, this method throws * IllegalStateException. * @param fac The possibly null factory to set. If null, doesn't * do anything. * @exception IllegalStateException If factory already set. */ public static void setSaslClientFactory(SaslClientFactory fac) { if (clientFactory != null) { throw new IllegalStateException ( "SaslClientFactory already defined"); } SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkSetFactory(); } clientFactory = fac; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/lib/0000775001003300100330000000000010667357320021772 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/lib/jaas.jar0000664001003300100330000001711706751717535023424 0ustar viveklviveklPKDO‰& META-INF/þÊPKPKDO‰&META-INF/MANIFEST.MFóMÌËLK-.Ñ K-*ÎÌϳR0Ô3àår.JM,IMÑuª )h—æ)øf&åW—¤æ+xæ%ëiòrñrPK(õ BBPK ÌN‰&javax/PK ÌN‰&javax/security/PK åN‰&javax/security/auth/PK ÍN‰&javax/security/auth/callback/PKÌN‰&+javax/security/auth/callback/Callback.class;õo×>f]v6vvF^çÄœœ¤Ääl½¬Ä²DF~ŸÌ¼T¿ÒܤԢĤœTF®àüÒ¢äT·LG¤J?'1/]ß?)+5¹„‘A$T¡_œš\Z”YR©ŸXZ’¡Ÿ 5Uf<##02°I&fPKµ± ¯{PKÌN‰&1javax/security/auth/callback/ChoiceCallback.class}TÉRQ=@è0„A N¡ó©³áƒzxYþáå²iSL S¤m#o•øÒN5<2âžNÆryÔÏŠê™ÁŒ®·Ðu¥˜ÏlÈó²ªÈ$­Œ˜“9ƒµB’¦)²º9\Ì–s²ÏÏ¥EA@ái25Ku®å(Ø]s]·JåB!_äM“Qԥ̽’9—(‰t¹hØzÙžI¤«½N¬4]Aìÿ¼u#âðLaeíý¹jJ«M°òö€Ó`‘QЗÛÐåá•XS¡Ú/iÍB¥ºæ±Ÿõ.QÂ6î‚áÆ¸äGÐr!Ëp,7±ÜÚfò·3“}ᯠýM´†6–Ø"±o¼@w| ñ…D^¡%_xÖpMÏ£yÑ}Äûýñ°÷ÀÒ0ãe-üÄ«„½Løû[‹UÔâ´j‘ T-ì© í /ãðˆ'ÐFæv"ˆóèÅqÅ&±¹ÄSS˜ÀMLâ.® …«˜aDáßÈ–ê"´ ­WûжO«òMŽó1q¶6 ¶~®£f‰ûÑ×€ªÖ«–ˆ°©5X¯z‡xСÔSCõÔijè¯Rœ¬‹6¨y~ú+É ÷æÉZÿÚHžñxÎóSzϱËÉ#ÕäÙ“—ü€wºC™‡Q%TÙäLÿ5EÞ o mÇ;tãCÎw³ãPK‹0‰ºPKÌN‰&7javax/security/auth/callback/ConfirmationCallback.class}TÝO[eÿ½ô´…Ò k+ƒÉVúAÓÉ>DXi·3X X <”Cé,-¶§nŒ‰ÆÌ o¼QÄIæ×"š¸q‰F¼ãÂÄ ?¢&:ÿ‘Íç==¥å¤z’ó|?ïy~ïï}Ͽك AŒ™@Œ‹:.L¦GôXñ¬ÃVŒXqÉŠ° ´Ù`E[lm¨G;·ŽrÑÁE'ǸpÙÑ‹Çì8¿£pÛáV”‹Ë´ã úíàg0yû$†6oßø ù%9”‘³©PBͧ³© Zr–AôöÍ×Ê ^‰§-^IÒŒ¯T£NOÕH”º|µRÿµŽåb:›V‡ÈÄ‘q"œ[R:ùìr:¿*«é\6,g2‹rò…~¾ƒƒrUΪ³r¦HµæÈÔT|ŠðF)O]™–â1†¦ñtV‰W•ü´¼˜¡Ú–ZÀëbqñ1†æøØBi’…øDi ["WÌ'•hZkŸ‰%&"a)*EF*¬×G¦bRì2íï\$A›Or!7.äÐÃe¿µ& Ž%eY.fÔøGN¥uôpÈA¡’=½±FCÙüC9ùÜêšZêM(%©*KRvIYgè©|RÊd””œɧЫJV¬'•ò7+EñÅÔ~(T•¡—‡ÖC%Y̧Õ\TWBIªP™3†Óÿ_Wƒg:%›RWˆÏU¥PSŠŽ4WÛš+c¶¬é€ Úˆ‚<ºÁ¯UÁ‰NœŸì>~Ga&ÿé*ŸÎÎVùu䟮òMä?e¨êO꟨òò†þ' ý¾CýuüŠk6Ý|MGu}N×ôд¤ù6êí%Ä §ÈûGû&ð†ï>쾺]4»¶àt™?„ݽ…z·ù#4~ ËÜ}4~ïÞöÌ”unzƒô†=›ôÛ8S®¦À)èñ˜·á9ˆZ¶ÑÌ#«ú\»hò¹éË>Ï.÷øÿQ[2JdïÐxy"f -x.Ü lc· ΘÄÇxŸ`wÂ^ÄgØÀxwñ*îá&õs¸=:Ü/5Jåj¸.·=°–ÀÞ&ž-4x{·+#šÎ wÐ…}8¸úGÞ­¤_˜(Pã%,]8 XÎãÉŸt,?–_˯4Ùo”ÿŽÜô÷þãdÏâ/Ìão<P¨‡ÏBŸÿ¡>ÿûóû÷áöÓ<›‰0§›3Gê=ÕÌy8ssU´uÒ 7" ›âi°\ÌC~-Ô+ ÄTW%Aä9µX…=ÿ.Z8{Mq³OᎡ•Lk 7³¡5ÂÃì8ÉègM¸ÂœH°Ì3ˬv*;†W˜ 7YÞdÇñëÆÛ¬·˜UÛ‹Çõ½ø‘XHoTï…·´Ý´¾Á}´‰Ö&QØ‚M‚‡‰5±AÑ̉åÊ@¬™‰æ Flf³k€y ÍdFu˜Á¼J0Çæ8Ø5œgq ³ L²IÌ‘dÓXa3Xe³È³ëX§^F‡Ä­Cóf¤Í¾¯àøüà3d›$/Ô,m6–n¼ˆ®¥Î»†Ò×I>£•K[Œ¥I’C5h5ðÉ«8®—öh?0Êñ{ÒZÙ>²˜Ù§ÐΨ÷_PKBb[ÏÄ8 PKÌN‰&3javax/security/auth/callback/LanguageCallback.class}PÁJÃ@œm›ÄÄhkmõäAEH[ãžEñRðô xßÄ%¦® ¤YÑ¿RP~€%¾Ä¡Yvx;3ûf÷}~½  ›ºÖ-ô0˜6‘–‹eØ.úh3ô¼A0÷‚ë"Q<È"¡äCÓ\1ô½E­äÍã$MІÖ8»–ä Dk˱P*ÑíAy¡$©<Ów¡Ì/E¨ÈÙý+̹ÈtÉÓ¤tر,~†NeVÔœŸ‡ {%õÀ§2ÒyRÏýùëË7ä±KÇ’ŽºŽ{:–u¬`0 ä`0Š[ J)˪7QÅ”‰9̘XT°Š k˜aÈ7¬†é†µ{Âßp'à¡çÈȽÉá †Jãß3ůeðÙJí¡úòÃÈVïP0”wýPìÅÝŽˆžóN@ÌdVüÄïŠ-îžÞWã G®xê«¿Š‡âˆÇT:†’'äöuB'bШÛzݾ¤ÞûqÊׇ©;A <lF^Ü¡lŸ»¢/ý^È0>=ëœWþE n˰¢¨sçL¸qäË·å±ã¦—wþLÁ`ýWw}bÚ[ BOSÓO/¯Ÿ F½kŽ}„9§ž :—ÖŤjt^Å4ámújŸ£Z³/¡7Àh~†ñů`//¡}·›(~$ÃÂ*Ø(£I-²·ËJjùš óT×SËŠ²|‡R‹Ü[îvëcÈyè„ñ˜"61‹'¨c›¦iSØ©j˜L£jTÕQûÆ>\Yh ùŠp>SZ¸)2¥Å›Ò}ÂÆÕúêéú45Ia8„‘°m눘»ÉúgPKg4#ù¨PKÌN‰&3javax/security/auth/callback/PasswordCallback.class}QMOQ=¯µv:ÐÊGEZ´TÑik;F—Ó`ÒHÀ!V¯ÃËtêt¦™Î(îýî\¹q¡‰H¢ îXøgüê}Cqˆ›{Þ»÷Üsï÷Ÿ_ŽD-·ÜV +¨)¨«`ÐT$ e‘„4“*1óòUÐ0‡i ‹¸¦á&®khಆ;(1$õZ‡aF¯­õù n8ܵŒÍÀ·]ëAÜŽìÃ%½¶Ûf(êç‰;’•ÒwÛÓ˶k+”ÐööC~ÍvÅz8è ÿ)ï:䙺¨Õì>½ôü½6wœ.7Ÿ·$‰AÝôBßl™ÉhŽ„œbÂt÷OS¨©0{ކ˳D»³òç{ƒa@)¶; ÿŠeìÑê8©ÏÓqaqç¡o…á«û¦¶G¤BLÚèö…üã:ÑÁ°$]ûÆH˜¡o¯ =ÃK2Nµ14ÿË;» è× zôŽõäF±RºlŠnO;§“'äaBºw„trÂ4ÅçP${•~ëäOVë‡PÇPŸ¡¾Aî+سC¤¿ÕÈÕËÈ|$Ã<Ùyª´¨‹<îâ ûÔ§EŒ ¦Çµ;ÑÀbý²Ç('—ßaR¾K…ÊÖkÆJò}ôö׸t‘=(°¡¡ ,ŠV1;.»@ÈS2ýßÔtäädo`êjî,u…ìu8Oͼ?C}L¶I:O¨UR%u¥år²ñðjäÝ& [äYˆv^þ PK‘JÄ&«PKÍN‰&4javax/security/auth/callback/TextInputCallback.class}QmOÓP~î-ëêÆÛ¦ C˜À¶n£?@cÀ ÉâK &~àCW®]¡ë–î–ÌŸ¢¿B‘Dýæ”ñÜ®0…Æ/çœ>çéóœsî¯ß_¿#&j*ÖU”UÃì„ô¢sÊmñ4™aSB#sÈí0pÅ;Ó E×´ãyÍ«Á¶ÿË»µ)]Ðã¾#ºT ®vŽwÁ:½pŠžŠž;% ¼çµ(+Ô/b‘â]úÚ#^K(xLq5‘š½I}EñA"5s“:¤X½>_9>Ÿ"7ÉL–Ð"´K×rYŽÎÿPKQº ¸û²PKÍN‰&5javax/security/auth/callback/TextOutputCallback.class}RßOAþ–öz¥½VK¬¶gõ|òG &Mz ´ÉµÁøÆö܇×+éí™ò§è‹þ>h"’h¢o>øGgO´ÆKö›™ovfnæûO_Â-ÜL>LÁ„Ž×tTt\×q#‡4¦rÐd0=‰,fœ30‡YU Ô°hÀÄCªZ³f«µÍ=þ‚[=«#‡~è­&Îm†¹ª=îTŽÌšúò!Cº9x& ÍAIÊmĤkëŽÓveÈÛ­¶³ÕèÚíÃô¦ŠVÜï‰a—÷âÿ•?×ÄCWløŠ1ß#ÙŽå~,›<zÜ}~[Å0èONËn=¢OÈ-EÜ£€,)y b—O·ƒ@xržô!ÃÌ)©ÝÛ®üÃô«(†Š2¬H¸ñЗå®ådTÆ`ý—7Þ ýÎ@„žÜ¥~ú'-h‘ªWi~ÈAXB t¿¨fO²„+gô ÒKgôšsr§¡'‹CÅÂyÒvpÇ&\JzºüPKXߨõPKÍN‰&?javax/security/auth/callback/UnsupportedCallbackException.classQMOÂ@}ÛR> ‚Ѝ\´µ7?ñÒè‰xA½—²ÁÕÚ’²5ø¯4Ñxðø£Œ³ðB‡}3óö½™Ùì÷Ïçta7‡ívL0dä Ð/¡ SA±„-l04¬FçÁ{öÆÎˆûI,ä‹ã%òÞñ½ èyþ£ãN“ƒn5îjVjp/8]‹pÐR¼m­ØH‰Û«ŠÏʶE(äCÆúœ¡Ò!¿Nžz<¾ñz1+¿ÊìFIìó+¡lõÛp” ‡Q,y¦¹û|(E«– ùY†â€Kw^Uÿw{Η.²lêôe  £©ß¢L§¼Œa…*›x¢iO ÛÍo©z°LZàX(`?õ­M}Mr©Û¢}8Af¡ñÎ`â„Ø5ø3îQT ö;Œ×¹%›’.á&E Õ_PK-ƒAB†PKÍN‰&2javax/security/auth/callback/CallbackHandler.classPËN1 —²‹ ´•à#@f]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘AlVf¾¾§¿kErjAIf~#ƒH´B?/µD¿¸8G?8Ø.ÉÎÀÆÎÀÎÃÀÄÀÈÅÀÁÀÅ ÈÀ ¤A€™À$3'd3i6-íí Ü¡*X€$+PK²U³ÑPKô™H')javax/net/ssl/SSLHandshakeException.class;õo×>f]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘A dV…~^j‰~qqŽ~p°kErjAIf~#ƒ2†¤Gb^JqFbv*\;;;#ƒ"'F d“Ì@žÍ¤Ù´´·3po„ª`’L ¬PK˜rP+·áPKô™H'.javax/net/ssl/SSLPeerUnverifiedException.class;õo×>f]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘A dV…~^j‰~qqŽ~p°kErjAIf~#ƒ†d@jjQh^YjQfZfj \);;;#ƒ"'F d“Ì@žÍ¤Ù´´·3po„ª`’L ¬PK¿^¹Š¼æPKô™H'(javax/net/ssl/SSLProtocolException.class;õo×>f]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘A dV…~^j‰~qqŽ~p°kErjAIf~#ƒ†$Ѐ’üäü¸"v6vv&F..EN Œ@È&™f]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘A dV…~^j‰~qqŽ~p°kErjAIf~#ƒ,†¤wj%\ž‡‰‘‹ƒ‹A‘Hƒ#2If OÈfÒlZÚÛ¸7BU°I&VPKÞT_±ÛPKô™H'javax/net/ssl/SSLSession.classuRÛNÛ@= á–B¸—"Uj‡Ô©ROmÑ*$·êÃÖ™&9v´»ŽÂ¯õ¡Ъ:ë&HðƒÏÌÙ™Ù33ûçï¯ß˜FÓ^ù‹ÀºW®wd_ú‘Œ[~`µŠ['¯‡ôÀÉúÆD~Ô2F%q-‰- ìIV¢!óÊ·ŸJ “Jy#~à S­ì’¶þÍûÃãê§ ¥%}ãx(ïêG‡BwqiR Ky;Ïw‘ gƒz–Û1ìIªC:W lÜžJÓN®uRiTßUªG‡Õãß–[dkª×&¤ÊräŠ#4IWå«ê23ÃÌç¦Àc]û1 yfÔüºÉì5‘~Ðt­-U,Pž\$Æ Ù{e^Ûyìä±5+°Wpßbއ…)€q"ÃUÌdXú/g«ÀÑ9Ɨ̬ 3Öù:,a.à Ìf¸É‘w±áæ9[`‘ÿSXúPKk<ãÛPKô™H'%javax/net/ssl/SSLSessionContext.class;õo×>f]nFI MŸ¬Ä²DýÒ’Ì}×¼ÒÜԢĒÌü\·×²Zö6»wMû‹|õ#£‰¯&þ(ãì„Ò@|èÌ33gfN÷÷Ÿï?‘@åÜd˜5Ìú;þw-O(Ë–Î{¡¶¸£¤ß«0, dƒ mÙvýbQÂ0w& ³×Zmîµ,[ù®×¢lÉFͺ#­ ôÎÓV¥§DWQËÆIËÙF•aŽÚ+s¨Š¡a4†¸·Eo‡{¼%üÊpò¥ê4Ý' „ú®êYvô/¸×”‡•èÆÔc×sÕ†dU6Cæi×åJ/`˜»ú¨üI‘Ú2ô±å¶iB®±ÉƒùÜ—ÅÝòÚz±¼^*?ÚxÍÀ8ýÞ0Ì\>”Aw|Á•èÏ!æ–P›â-Ûä΂ªÛ9¾ºJУ”¨yâžC ŒQ4°'Ãt…Žô•hö&#}&b]iÕžýSèÿÃsèÔ%_ÃÊ `'Ë^Ôaája5Ìk˜Õ0¡aAÃ] s:ÒHê˜BJÇ FtL#¡#‹䱚ÁîGƈŒ™Á2VÓ¸‡Br‘lÀ5ê§jz¥1üu°ˆ“l†¢,y¡…c<øL$nC#p4 È/ÂÄ$õª1X_Púcœ}ÃÃícìÅÂÖ¾¢ôÙ½XÞ?†G *ýDM)º`+ñˆíù;‘§Ü­x×±¿PKϧrpòPKô™H'+javax/net/ssl/DefaultSSLSocketFactory.class•’ÛJÃ@†gmkj¬§ªõ¬ñBi…ë•âÄ…€ Å‹5]ÛÕ˜ ÉVô­ôJPÔ{JœMÅCJ;ÃÌÿí¿;K^^ïŸ E˜NCD¾p@`0_¨ìžÑKj:Ô­™–ô¹[[QýŸ]ÅÏFôË…fÏeÒ´„}Î$¬EŸ\ÃFµê³ ˆÞ?—oüÇðXÊÿhFLpµµ}•»\®HnŠ*# o_ÙÌ“\¸òv ~á9삹’ª®á i  w艣xK4|›ípUä*[4¨‹}_Jó‹ÅÒâBiyé˜@Æö•¬y*r5&·Ø)m8r“{uæ[ .8Œ‚Õð<áKVý.õ‡wçÂ,ï}\‘@oë˜èÑ2äzFIW¡Žù~²IîP[ ÿšÀäw®Ð`HƒA ú5Ð —ÚTHê0 :ŒÀ$LÃ8êKQÆN¬ú0Ì©¹;˜º œR(9‡y³þ#‡YrÆsÈdp%‘ éö/tê_Z‹åŽå݃îC¦å0vóþÙ¿ånŒmÐóPKˆÒîæ¢ PKô™H'*javax/net/ssl/SSLServerSocketFactory.classR]OÓ`~ëVê '§ˆíÌ,ãJ3ãÍÄ0b Æ,^¼é^Gu¼]Ú·dûEÞú‘€ÑÄ[”ñt`pÙ4ôâ9çôyÎgûó××ïÈ †js„Ší´ÞŠC1p•Ô®'£Cy¡ÿNêmáë06ö˜&Ž{®çµ¦K3¶³GX²ö(Ãí Õu=ªËì†=ùÖiùá'êïâÍPi9МҶÛ‚9|&”èʨ1I¾ˆ’Xÿ¡OÚÅÒO¢@y=väs¡:áA#4÷(P~LÈ6ÃŽ$¬Ÿ{Of¦&‘/·ƒçÛ["Þw£°¶W¿¿Y«onÔ>xM A(ý{I.Ó•zK¾IƒâYÐ úûÜ: ´Œ sL.cæ”nŽ„€û ÎØ ôwvªDt„õêî~†óó/¿aåÕ1ìQ”aéNÊqß2npCâ.³#{%µÌYŒ3¸ðPK®ßCÚoPKô™H'1javax/net/ssl/DefaultSSLServerSocketFactory.class…’MKÃ@Eï´µ©ñ³ÕÖÚúQÁEªÔØ®E«P((!k´dÊd*ú¯t%(êÞ%¾¤¢QQy7çdæäåõþ qT0ŸB–!n”²Fù¸yn_ÚfÇöÚ¦¥¤ëµ7 F£Ü_÷¸2-./¹´„sÁÁ¢ÑøƒV‰~•íVKrßßøý›¬ñ3D/¹éz®ÚbHìˆgÐw¯ÞU®ð|,Ñ“ßs;DrÇuÛ?RT«+µJµ¶Z]_;aÈ8’ÛŠG$»ÍUŸÚ½ŽÚq»gz®â´gž€Õëv…T¼õM„ ]a6ö?R0ŒÏM{|Þ2<.b/è*d¾ß1ß#XV3oÏv”× ‹_íß´¬'JÄJ}XêS_䆌†q i ÃH!MGES˜Á 4O,¨Ò”¦Î¨,Ýaö6F !À9úbÔõLeØæžCG§7Af>´"vü_;±ÿØ£ä| ÄôÍ{б¿ñÕ†ßPKA‰‡PKô™H'-javax/net/ssl/SSLSessionBindingListener.class…M;nÂ@œÇÏÄ¡H•(œÅTAt(¡²”H4ˆb'X´z+y×gK‘äPQl7)SŒæ£ÑÌ÷ÏçºH0"L'ÙUWú¦„ƒòÞª<ÏröÞ8Y99¿U,a9Ýâܕőׯ2áq÷ªýÅ}.Ù¦Ïó$ÏÒÅËžðÐì)«å¬ÞW>ÂS•ÁXÕ®eÆ.ãÎÿšq¥mÉ+Wʉ0jÍF0ˆÐ‹Ðîƒp Ó#DµFÍÆktšÝ_PKæãBšÃPKô™H'*javax/net/ssl/SSLSessionBindingEvent.classuNËNÂPœË«Pêä©nL\”*^a¥Ñ¸ðµ"jÒ„qQá/©· -ÄÏÒÄGâ¸ö£Œ§¥nD6'sfæÌ™¯ï÷$ÑÄCÉlt†ÎÄᮣüòv(zÁÁ_ÚFR ˆ^é®DÀ}ßå¶Ý±…ïKO‘\6g³]nοš}^d¥’ÁCêÄë †âmtÛzâ\ºä¨\Ÿ:þw5òšÝÖN»Ùjï¶ö÷n˜Ã  DpáÜ“M'¿fÈ…K”AÝ£ã@ºül"T0­ÏP›×œasžt,UŸ*F9–44,È e ¬E0E”sXA%DUl, Â¡‡P’PišmU$ˆòÖÖjÖö êO@t`45¢s m=£þË QR(—b9k½bõ¥_GŽfúPKÿÐÃ"7PKô™H'javax/net/ssl/SSLSocket.class}SÛnÓ@7N\BiÓ†¸¥¤ÐR.NŠë¦O "¤*5R HVûЊ¯w7ònJ‹§H<ð|bÆYD.‘|NvΙ™qòë÷Ÿ ¨:µö×à&¸õ8Sž”±çûmŸI ~d@Ω]¤xi@Å©]¥^/x×óUñ.zlg2Ú¢4wš0Q³Âq&ØlìßtæˆYâœ}¿³<”½ Ïšâz3ÅÂv$ã,9"¿é\ÙΔ9I(¼‰x¤Þ¢±)Bf@ñä¶Ã W%ñà‹aÒaï£ûê] {âS"Ü‹Æþ¡Û8©dk¨j­XšÁÁ*4 Y qǵ%  ‹Ý9çÜ×Ñüüõí;. [ n·vŽü±ï„~Ôwv_Q ÿ {*‘QŸáå>q"RNš†Žçíx”¦2Ž˜^:—ŽƒcÒ5m»u˜Ó)£DªwN@‰rll¹È72ð±tÎ>;Tk_à¡=±þä¹tâôIõT`Ê{$`nŸ4TL§‹ÿÛÉôâQÐsrZãð™Ÿâ½$îìwïovº›Ý­G¯„/0Ó'åÊá€o$«› ì%ìæ|qQfòUýÈ–(bÝMÈ,):ÛcŠÔ©ëOûÂzéÀ?&7~; IQ/S³ßg¶ÒüŒÆ”ð4,+,˜Ÿd/1Ápusšæ-T0ma5 —P²pe W!L,àz‹¸QÃnêkEc«Xap»§ó8*sTÁw•_M”ø—µöÝ/¸Õ¾÷ k€,;ä¢F–˜íXûŠu÷¹†`Õ9šÛ…Æä3ÅÌ2ŸYnuZq6W—µº(v%jºžÓ•ögÜùk…Â⻄‹¿PK^áFÖ\PKô™H'.javax/net/ssl/HandshakeCompletedListener.class…Ž»Q„çw[—F¼’u¬Š(]¢H¶ÅÁ»geÏ!žMá<”X•B3™L&óÍãy»# %B³>ÝË‹¼ ÍV£ÄDê­ äÑñ¤Øòvtamû ŸP\DçxÃãP1¡ºJDó8r}¯Õq½NÛëuW„Jð3A(¿)BI½³õž7–PûDg*ñALCcYsL¨ÿ»ô­:pdär„< H.  !“øÄ!•h éPKŸŒ‡µóPK õ™H'com/sun/net/ssl/PKô™H' com/sun/net/ssl/SSLContext.class•USG~Ž.g+)¢µRSª4äé…`, hJ5ˆMSÛ—å8{¹ËÜ]ø*ýu¦§ÌÔþÕÎôC9¾{I€$¬“¹Ýw÷}öyžÝwwòß›?ÿB)T"ø$‚pßb–íŶíºUŠOçŒÅ§ /Ô]5mª–ž.zŽaéY—ÛÓ.ÓêŽáí§9ö®Qa%ã­ä^Úb^ÚuÍt±X(2g—9E[û•y+ªæÙÎ>A'¡] r²) /hv5íÖ­ÓØeÛòØžW¬Ù~†zýsº©ø©ùõ­Ló²[‰œa…–$—tO-Õ··ýóº'‹Kóïíeõ‘Ж{ÏGÀã÷`ë­D0烾œ go¶/÷VÙþšj©:­îMn8u×k§»D‹<`OT«bWýz -–áå„—í £çroOc5ϰ-WÀÕwÜNÑ Ûu©ÿ3’NøÀ®;[1L/ßUÝ›°©ÍÙ™ÔlffvîÖs‚J.ÕZñ,lѧÑ[íoLÀÄ™®\a–nXì>ó099Iw&¤f"O&`Dg^Þr=ÕÒXsDÖ=[³Íã‘¿iâÓû×{$†O>yrªyÓdºj.:z½Ê,ï¸<´¼ûÞuL5«AêÁOTÀµÎ"_©.•©NØC»X×vMݦáNõðz°} §pãÁ—ƒŠlÒùz;´‹ªáºä4V;ÎE<»½!qW5ël}[Ä “"b"Ò"fDdD|.â+_ŠH‰˜•q’Œ.Éø—e|†y4Ê#2nAæÑ‡2®â71$ãk rHTÆ5Dd\ǰŒ)ŒI˜ÃÝaÌãoVxs_B$Šòð„ÛXåM7kr|¸€‡–x”ź„;xěǼyB~æ‰ô—%pƒ Ü­ß“Wê‡)"¯ÔŽÓ(†„©K¢˜P°‘Hài"u€Í—€ÿçÅÑk¤˜KDណ0_RB™¿qG Sû-±|ÿû³#äJG¸]J¼Bé?D(7ðã!ž¿&Y`‚~‹Ô_¤/L39_ä|K$G"!ê3Ê?”~ú 现TІñókRVHy+'}å䉲o˜³WŽ48ïG-Þ›-^Eù·—ð—w6mŽ"NÔÍ“¥žof0ñ6›ÀQLC H?m§ˆ´Òc­t„Ò ¨m„â×'±ÕF$)ÓÜÐErÅk7ÂJ2Õ€ö²Ãð2}W(ÀÄ[PKQ>®ÈPKô™H'#com/sun/net/ssl/SSLContextSpi.classmPKO1žòZ]QñyÒƒÆÃb²V8i0^PŒ£±† ñP— .BKÚ.ŸåÉă?Àe쮊é¡ßÌ|óúæãóíÒàÃÏ+Ö;|À‡T ¡Zw)cu†j€ŠÉàMFªQ…ÀîÌÔ©¤´WlhzÍz {TGbœ|…£k.xUå?y¯"m~éd ÕD*4#Êbï¸hÉ^%îž; EhN dª²…Üóa€}J¡­Ãd¤¬…]Ël6ϸ~’·JúÒAÙ/•KÇG¶§°RªRÖ l¡h‡/Ð̸…íûGOî7qi÷#PHtt¹hÓ›Ç6´7)m|“ 3VáÀ’˸yÈBÚ…¬ev`Õbü2@â°ýsÖ[±H,f÷_aý%á ,Ä!‹yH%¸˜9?ÅqÉœµS0ÿPKÐ(Ï;A PKõ™H'&com/sun/net/ssl/X509TrustManager.class½JA…ÏdcVã/VvnŠu²Á`%AP""‹qr]'¬³2w&à«Yø>”8ÙBÐÊæ~‡ï¸Üϯ÷$ȱ!°Ÿõ&35W’Igü›Ôä¼¼;ìG1˜'£•§c,ûW±w/Ð×Ái:3 ìLN?××®Îo‹ƒA^ úÅðèA`W×/’ƒ•–¼d®ä ì/•U%9½¿ëťߕí’ü‰ÖôêizÎȱÀ¦áQeÈú¦KÓÆŒÉÍÉý˜­æ‘JÙR^=ÎHûÝKU¬A`@ÒHcFä2Z WŒ.‰³…ö7PKñgKìLPKõ™H'"com/sun/net/ssl/TrustManager.class;õo×>f]vF®àüÒ¢äT·ÌœTF±h—ÄâŒü€¢|Ý0C=#]C#CK‹XF™äü\ýâÒ<ý¼Ôýââý¢ÒâßļÄôÔ"F¬Ä²DýœÄ¼t}ÿ¤¬Ôävfv6FV6`B&&PK#fz~PKõ™H'$com/sun/net/ssl/X509KeyManager.class•QÁJ1ÔÚÕjµµàÁƒg=´i ‚¥KŋЅ1Œ»)kV’t¡¿æÁð£ÄÙ¶ÚeÙ‹—¼É›÷f&“¯ïOØ‚´tÏîf"<:ä¾3J‡£óeQÎr >5*oq1b0,3‡DãøÓEo8¡@½*Ivò^•x‹Vj¦¥zñïy1ƒñÿJe5ê~27oTŒ Žƒka£dj’Îc¿;èô½þðò™AKFIbq+Ôn+aÿ8MŠfÍÈäÛ¹æ·6æ´§{¡Eˆ†Ái1™-%/h‡èrKšDBiÍŒÝ4FjÓ jó+InŽLÒܼõáe†ÒyP÷àЃÝ%¡ Ž VeàÑÿáÎ÷ ²Ä}¨.±AÚ ²;ÅÛtV öPKóȵ×-:PKõ™H' com/sun/net/ssl/KeyManager.class;õo×>f]vF®àüÒ¢äT·ÌœTF±h—ÄâŒü€¢|Ý0C=#]C#CK‹XF©äü\ýâÒ<ý¼Ôýââ}ïÔJßļÄôÔ"F¬Ä²DýœÄ¼t}ÿ¤¬Ôävfv6FV6`B&&PK ×ýCx|PKõ™H')com/sun/net/ssl/TrustManagerFactory.classUmSÓX~.-¤ÄøByñ]Š®XšÖJÝjY_p»€€U´Ëº;1\Bœtš„YþÊþ p–õ“Îø£ÏM[,4îÖm'÷œ{ϹÏóœsoÚOŸÿy‹2ø3†³1Dc¸Î 'lÇK¬9¾½ÊIŽú’#s/´M-ki¶‘-yUÓ6 gË.×ýªéme«Î¦¹Ê«…`ç2ÃPrdeNw6²®ogmîe]×Ê>ªú®7¯Ùšd>NþkÆŒ¦{Nu«T1 ßbk'¸‡“Më Ï_pÝ+„Ö‘O†´£‰ö¦C÷^ºí¯­µö‡¥“ÖÙõÿ/ª=´ü•ÖŽ1,}ZëÙ|/fB›UŸMB˜å[%Šñ Ã]¦mz“ Ñ;Î*§k~ï/W<Ó±]†¶o C<ìúö{ —¿ªóÓ"ÒÞX†•»š»îЦÌòèÕ\f4wm4?þŒi¤[«T¸xÙszt†KmH¥Ëß^ADÎmôù}î5gPOäZ H]cP îM[†CÕ­o0¡iÑv=ÍÖymÖ¨˜á„Ñ5‹_;W´,nhÖtÕð7¸ííŸm?|[,Õ:NªÃß0†Áð+ÐD0|0ãSòõõýÚš/‡%6êlÊ?{::‹Zè­S¦ë’ÈDe?óœF-Ò¦fù|aM‚*aH „´„Œ„¬„‹F%\“’pUAb qRÁyœVÀ)áYÁO8"¼c .ਂÑ¥ ‡N‘Ò£àºü€^70Ý1ÜÃ1Ü•1Ž{2y32ò¸/ã&~CQ ¿Ê(ˆi³2¦„7Ž9˜Ã Ѿý‘0!‹<&4–’‘G iì§Yˆ’íKíb!¥nc1•ÞÆR*³‡¯ >=¸Œ®zvYF¶3õ_áÓ†B "ÙC¡¼‡›åÔ<ÞÅr¼cOvðtåwúyúN’ 'J+…€äxd’H"dsêÈê~ûG÷0UŽGv±òŽ˜UbžÌé€9ý•9,P»«@H7^Ç«ãªêÇVÀßÿ°&³W …´j©–H?m讇ûêá…wð¬‘1‚Þºž~²¢™Ý"ƒêüãÕ¶[ôœ!¿ç¾PK¢fm:PKõ™H',com/sun/net/ssl/TrustManagerFactorySpi.class}OÁJ1t·]­U[/¤Ù kÜž”е"VVz)b 5eMJ’÷³< ü?Jœ¬ Ä Ã›yo˜yùø|{‡X'Ľ1nÜ›Œ¸~¤¶PT G­Íé)¬»dŠM…ØŒG3öĨ¼0Ò•ôB”™ÓF ü†Æ¡TÒõ½ Ð<}æbî¤V›L†‹¡ÌQÙ˜œ0û ¯NÆén?Iû{éÁþ-íÿ Ç[e6—¸A¨©TâL¸ßþηpŽN´+·9SSzu7©­¿?ðc5‚VË,¶ Ò„è„]h#ú€x_»NUÔw^aíÅë!€Z…KÕpÓˆ«˜Ö5XøPK¢ã‰{PKõ™H''com/sun/net/ssl/KeyManagerFactory.classUmSW=—„lXW+©ÚR‚U ÙÄHú˜HEQ£hŒ/]–˲β›ÙÝ0å¯ôWàL N™©ý¤3ýQŽÏ]²m2{ßžçžsž³÷&ÿ~úëoD…Ç×qDãø‘ANÚŽŸ\rêö"C$5TbèI ͼÑVµœ¥ÙF®ì»¦m.ì,{\¯»¦¿–{à:«æ"w ÁÎy†þÔPuFwVr^ÝÎÙÜÏyž•›æk³š­A^9õ…ø”¦ûŽ»V®™…Øڅ ÞÁTËúÜ®û…ÐFR!G+¢™Ð—nÕ—–‚:φ¥“ÒRÈúÿ•4},¬ôj»[ ÿZû{ Çœ;3áX5÷¥짤2Åx¡:)üMÛôÇ¢“Î"§ã}çw×|Ó±=†î6D::Ç; ‰°ótîð!—º«ó)Ó"½ÕÛš·ìP8;?|5ŸÎ_}ÉÀ4Ò¬Õj\\?¶@Î0p¤$†KÇ‘Mw™Û†ió»Üß‹“òör‰¼bP îOX†C,¯0œ iÉö|ÍÖIù)ãÀVÞ)“l6ˆ‹{Þ”,‹š5áõnû»þ3œ>xBö-m{JV…ß)úq ñ-ƒû3î;庾¼[YKâå°Ä¢ZòzÃß.Õý'¶Ëug•»Ú‚ÅIX DÌ"«ýe*uÅô<*'YÛE‰ûÎNÕÒªfÕùÜ’U€„~  Y 9 % K¸&!-᪄¼‚Äô㜂>\PÄy1:-²‚ŸqBŒN)ø'ü„˜‚Ð)Rº|.—pFÆ&»0ŠÛ¢¹#š)c¸+ÓèW×Q’QÀ=ÑL‹fFFQL¯cVÆM1Ã}70'š }#ýÃ0!‹FLh zRH}œF¤Ú³4K¢Qê{Ò›x˜V7ð(Ù@9ÝÀã·Ÿn\F¬™ÝM=£¾3ý'¯áó„B "<‹Ncécïðdf £5’ÿ7Ô(µãD2¿þt ÅÊ •ô;<ÝijDG•žo¢ú>@ï£ï/Ô÷Ò¥•b@òU“dœH"ÔçÕÕ^ü“[¸YID6ñò=1«Ä<+˜3sf9,Pc„U$›hâŽ4qUõc;à«#·eÒ‘DWÓªž¦Uq²êQ¯×›f¦ …˜YÞ3 áLSO/©zd føíí.]œ"Dx‹v|Có|ûPKíªY=ŽXPKõ™H'*com/sun/net/ssl/KeyManagerFactorySpi.classuO[KAþF×ÖÌJËì)$ˆÒÀ6}*Œ ,#² H¾HãtXWÖÙ‹äÏê)è¡Њf7°„šópÎwáœo>>ßÞ‘D› Ér¥ËP*Wzm¡F–JKR`ù¾k]Óô†Kn“×`Ø*·‡|Â-ŸDè9Á4R;ò¨ÑkFNé§ FS=CæâYÐ8p”ô5è¨ÐÔr\­{çܨ{OU»µƒzµV?¬=2ìü Å…¾5팆IÛ‘tIÁÝø¦¯t †\œÕåÒ¶îúCš*ý“awÞq«:¡œ¹¶Òp0úeÜ›7>H„šÇû.é½3§‰¬‰e+&VM,fa€eƱ‚îÑK‚E´®”FùxRû¯(¾Dº¡†DÜ—bó‚&ÓzÊc ë›'þPKQ,T8ÔPKõ™H'(com/sun/net/ssl/HttpsURLConnection.classT[SÓ@=+•@ŒRÊEQ.UK+„" (^ËÝz;22Œ1®4Z&»eà_8:ãøäƒ?ÊñÛ¥f&ÙýÎù®g·ýýçÛÔ /ê0ÀLõåmoÙe×t¹4…(™3ž®µÌç¹ï|p¸¡“Ü>Z«–Y²Ü%³Àí²ïÈõg–k-|s%/}Ç]"¸#„ׂÜÏþÄå”eKÏ_'¶§‚U• …üQ§šTßoF©*øP²3h ¾­Ä:yf<ñPK<HæÎPKõ™H'*com/sun/net/ssl/HttpsURLConnection$1.classeO»NA=—×ÊŠÖ$‚ ®K¥Ñج1šh$n¡±X׆,3df áŸl¬L,ü?Êxw ¦¸çÎ9ç¾~~¿¾QÆB¹× ½Ñ,Y%A–¨I0vFªÉÙ&Ó$ÔÎ¥’î‚P‰ô« 4n”&Êk…%øc½4©¸’kõñZ¹©p2%ì=]&vªïŒÄáÑpÃÓ“gÂ~ªç]ª@ X›×Ú:•ÌE,Œ|“ºçöá~iž:©U7$´þ¾}™1ÏÛ®ò&kÛ|õŸM>vÐBˆ&#a@‰‘Æ ÿÚœcõðíäÏ+"_[XsS³(áÒò{¡•P+⪌>«Í‚ïüPKÏ_ËXmPKõ™H'&com/sun/net/ssl/HostnameVerifier.class;õo×>f]NFu Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkLÍ(F®àüÒ¢äT·ÌœTF±h—ÄâŒü€¢|Ý0C=#]C#CK‹XF…äü\ýâÒ<ý¼Ôýââ}üâ’¼ÄÜ԰Ԣ̴ÌÔ"F„ñþIY©É%Œ le ÙJvvV6Fv`dÊ10‚X L@’‰PKÚí« Ï³{Ò¡õ-z}#E†a2üdl[ͤ»)\Ý1? Ê0}ÇÝŽgø–B‹@áÎe†–pçj Ÿ"ʽ᲌ ©J·£á€€–2줦û®e'ã¥yÆÉkÌÚzÂL»–¿­Ñ6ë¤ç;áR¾ç !«§CÊä[\—±dØkÎzà½õïGHP帙²lËÀpa<;M:k‚AyºeŠ ŸÎ×£lÊ×UëYªjàÿjªé´d‰ªî¤]SLY)âÍõ´-#3Ô¯>1¼Î¢ëD—c=}ÑX_oltä=3¨} f24ÊW‰¾a1´¡´SÓzáyâè~1ÄÎdQŒ¡ýTÊsÓZ“¸®¸ Ãå¤äòf,ûþý0Ë%^üdlØ5:Û&a'-[<þ1œèÀóê£ %£˜¦g¨N Úö|Ã6Ée Í w™Š=d8nIPŠÂ×æßˆ¿—‚Ò’ÛŸq±.l¿vóäÒåháhæ¸ËÑÊÑÆÑÎq›ãÇŽ‡ÆÑ«¢\E÷P§¢CŠTI¡ªè‚¢Ò ZE7*åÚ%7Q«¢×T4¡^A(èÇ„‚LTa¥x¤` K1‚I£x"ÅS)¦Œá™‚xÆâ¹ÓR¼@ É~çÁd$1,è)^ÐÓ ïú*ú_§ùšÕ ó ícæ[0b2½¬¶ƒ¾gŒúÆÈf#HìanóùáBÎ(PFuY£ª %ÈpñkÒ‰ ¥a y™ƒDpçÈ;„È#ðœb$ºö°´ƒ•îC4_eûÐÇB !¶‹W ¡]¼žûþæ *9–èÞÃòÑCT N$ßÌG¢;xû-H¬6cœ¼^•)ÓÊý`ÛBYZW¨—´ÎG¾c>G©ñXõBNÝD|KÕ+9õ½ Óbu"§¾NòþPKûý¾‚B;PKõ™H'8com/sun/net/ssl/internal/ssl/SSLSessionContextImpl.class•TÛRA=C"+Ë(*‚(*Š·%Bð‚7.j( "Þ–d„ÅÍ®µ»±ÔOñ|Õ* *U–Ï~Š¡v¯K(ÒÓ}朞éžÞ|ÿùå+bè¼@ÌèÈ„vL atŒÜRÊ/;)G)ß·S–(Ï1í0È)ß·\'SØMäyó…™²Mg6usf^‚Up.ð,g–à½Kp9°ìÔ¨S.)Ï (×@xx>´÷âFÇô/ÆâÆ/gu®•n6ìþ2È”žÛ¬ìÙ°²*I®'©ö€ÙÇÕMX³/Mk)AßøS^6Vwz½\Y¯@Ú˜Ú¬æ`¨á£_VË$"laÕV;h9VpÞqØ-*£ÿ?hØ,Ì)’ë9·ìÔË&MóôˆéϹžÛ•Ow÷v¥{{Òý}„IL³XµUI93íë лùa¢±ØDh,66B; eÏ£ëß±J*kÙ¶åS!„oUÊ¢06«¨ºZ²™"…õäL(å]s}‚uŠ¢t s¦Ÿu=5ZÕîø{lV@¹W~ J4›k~™KÔÏ“ÖõZþõìmÿÚŠúHcðL½â ŠªÏ{^æò éèÇ0›Þeï ›«^ÓqöÆê1€ë:1ÎX–ÃìÝdl‚)·tJz›½“{PC–Êh=®yÍ¡ÝCÑ ú÷´¶&p'±ˆ3S ¸ûùewò=Ê[±-$Q ‹“Ÿp¯‚©Ää“ܧßô$“ä<ƒd¢‚‡K Ž£6J0B b´ö-â\¨®àÑÿqŸdߢ1Ùùô]~Ã`3(¤a~óëåUÔÞ(câá•9Å"§’ xZÁì7œW½ÿ®ˆÜBT&Ëè®Äê_f5F¬¦ˆU— ÊÜ ÊöˆÒM®£=ê'ÊF¾v¢“:ÁþRö’­Á¾ßPKhȰŽ<8PKõ™H'(com/sun/net/ssl/internal/ssl/Cache.classT]Sg~–ì,+ u£‚¨aIˆPqˆ…ÐÒ""±|j˶\61Ù8µ3m/ÚñÆéô¶^رW¹ñ§fÊÓ‹šiCKÓó.ËÇ´Ð2½ØsÎ{ö9ç<ç¼g÷÷?Þ€Ìñ×û€j´û¾ªT*|¡Ö!ÇC­ÃKÆC#jöBôÖÜ’™râÔmwÁI[Ñ„]X6s†“ÎØq7pܕӸÐ;¡¡A¦/†þ™lßüþý€ãø©N×>þÿS*éäÒö‚[ª=43œÊ,Gó;j›N4Ÿ·¢iÛ1s¶a¹‡~#µh&l'÷(>ÍÄî´vz©éþ̼ɤ‡FØzè4÷c('3…\ÊL[”õÄÌ€‘_ÌŒæ2‘ñŽöÎHGçåŽk]÷8h‡§K¼ zæèIÑå?uŸCó‡s¸tȇAníM&ÇáÜ¿ÂÇÌO‰ì<‡jÓ2—MÛÉÓ¼ÍÃ"÷`:ôf‘æ²5y)O,g"Q¿;ÎD.Çê4ïz†,Ë\0¬¹…K™ø,efÙs8³ )XÖhÆ%³Ðð÷k¢/e÷{H§Ì`cà£5ì4 Û—-VÌ™Œ­k,gåê¼éÜY¤Ý£ˆ|úsSBX ! ­ÎIh“Ð$á¬MÁQH ނ̬z&ØQUp¼‚Q„À|ÇpBÁiø4ã³\‰N( .³TQÔɸ‚ï WF ×et¡¯†Ž7d\ûLôËÐ1Pƒ8L 2ñžŒ«èa¸÷™bâÝ,•ŽY¾a&nÊîA™Wðà_²8FÅÕ§=M$I+dQ—$é¥G: ­aDk0¹5Ü*¢nb±©Æª5Œn¾$OaõDnp|Š‚«XJ78àÆ¾<”ì¡NÊGºv Õ²jÂyˆHu™GÖÑ5¥½Â˜o ·W<ØÔz°ÛTO$`›m«Hö}_†7²1>ìç;u¡ˆ ªð ãÁçð3c‚@wž¢FVñÑ óLê‚*”+p[髨u{écÄ‚QÕ?@nù¶îûg¨]ÇÕ©5Lmj-%Lk׈—0¦·,=)af»ÝKô{ßî„Ûê„(Þ} ÉWÏ¿ð:‰Ü0¿§aÚöñ©!ý:\fTº‰Ê½MaÍÇx?OíG¨}Óň_èÔ¥"ºU‰&àçŸã,³¼S%^­JáU|¬V¯¸ç2$UÒE†›ÔÉ,W~eÄé™ùuÚ*>ÑÚ?»¢Še\XGœ„w‹•0IJ“ÚÅð³%ÜUE?_¸*¶•0¡Š¬”7hŽ}^[ßym}ÍZÙèvo3 ,ò³½A°ÎkÁÇä›vG¬©”p,£« ³Å"úT‘ÈŠŒ³è¶ñçݦiÁlŒzTy5ãÇ´*%‹t.Çy—c¹ò‹_øF¨<«¬lïbÇÎ’}Aä$Ò\2ŽqÙÞ3}Ïžµ«â4¨¢»hT¾…BÜSrouqÏBþ´3§·ÝÝ`TŽzË$°;yá½>éní©¿PKÏð³ìƒ_PKõ™H'=com/sun/net/ssl/internal/ssl/SSLServerSocketFactoryImpl.class•SoÒ`~^`T*¸9œ€›?¦fWà5„mIfR%1‹1MyeÕ®%íÛ¿ÕL4Mü~(ãµüãÆB“^ïîyž»{¯í¯ßß" e†h¡ØaX-Ûïõ]µt»§jÂ5í^![h‡y› Uãî w5ÇøÀ¹BkZ%´m8ǪçÛ!îy–jÚ‚»¶n…¦µ%¢uÜ·jÁ•@4©Ø"Sïv]îyµó=;W3wûranIü±i›â C¬át9Ã"<¡Û¢£[>Å©æî^ýUûåÛ§õÆóöÁ>ƒ¼;0x_˜Äc`-e®¦T@s|×à{¦Eõ3‡MÝ;r^¸ŽÒ©ìT•Jµ\yôð UÖ¶fn˜ý#ÚcŸ .azé{º!÷c0ílåPRºP2E^6\® >]…NÝã¢Éßé¾%F§ðMÁiŸé¿À8µF)Íï÷Wðî¿ì•ð³1µu0y) ›Av0îìÃKÈK¸*aUBNBFÂJ °$–‘ ¼…ÀHI\G$‰,"2nàNëØ”±»¹'ã¶dÜF!  JÑ:±€©’XÃå0RÉ£²äÇÉKàY™¢ azÊ¥¯(–¶¿ ô ÁÅp~ïHÈÉa!ä¤~`ãu.]-}±·OCâ"Ý1¢ß %±‘$K’` ¥P’Ÿ¡ˆOšÄ);n’W†’ûÿKÖH0œ=MO ß œŽ¦Îž…îŒÑt¸‹+PKBD4l&½PKõ™H'7com/sun/net/ssl/internal/ssl/SSLSocketFactoryImpl.class­”OÓ@ÆŸƒÂœ8Ä!‡ ÝÆ(ÃÔ„ Ñ%$š4ѤéÎQ½¥½)~+L43šøüPÆ÷º1Ô•?C³ìÉõÞç÷ÜÛ÷’þøùõ;zÇ}†=³ÉÔ3Ûëo­w–QµÜŠaJÏq+Ë úº-ö ¿î.—†ïW Ç•Üs­jð`šëEAû²´W«.«¨bwHç©%•²õÏ)Í-—HVÊeû~3üéyÂC“^ÿ—¤Ø8聆w¹ Ì–ÊÑÃß3< 3×pŸÕ»0¯gî"cI?ÛBо‡ŽëÈÇ Ñ¢(s†Ø“}›×¤#\Ÿ!ßÕElŠºgó5§JI#Û«–¿#^x"¿Y˜_Ì –^10‹aöÄà¢SÛážYã6Cá´š¯²fÙRxT#tgcšæ¸íqKòæµ]ár•¿±êUÙj£îHNÃH·Fiˬ×j“¼ü§{8µ#ŒÒóöDRí Øpw]ñÞ}&|ù[}RÕ÷Ûmÿýv&5Œh¸ªaBCJC2ŽA°8®`H­¢Jz•ô)Ñ”ôÇ1†HãˆÄ0…[¸Ž™Ò˜U¢+É(É*É)™‹á&}(Ódœ@¦òiÕO«Aúˆ2\¢§DèIJ ÌgsŸa|ÿ(¨¢m p„E ˜  '´FÄO9ævtñXh.¥ ;Ð5BšƒJ#¤ÊÜ=hh<¬zï°z™4‚á_PKfû¨-J´PKõ™H'5com/sun/net/ssl/internal/ssl/JsseX509KeyManager.class•R]kA=“m“nÚÔ¦ÑXšÓmŠ!*–H´b!P„àøŽÉ”uWv7¾û'|ôÉ× ŠT°èKüþõN³5k -î²gî\Î9÷Îýþóó4TPfÐ Åm†ÕÂæïsÃâvÇhù®´;â å ³çJרreŸûâ¡Øm0ÔÇ Ú# S¸¾ñäÆZ½I|!M’“öÞí¨”ŠÙ¦|Å­ã6Âd†õÿ³hóÈÚ›¦óÒðz¶a ßð<Ë Ã=â6ï·¡Æ2u[ÚÒ¿Ë0Ñtž ’ü#P§ ‰â-§çšbCZÄ_lßç^×ÙrÊvuµV©ÖÖªõ[Og˜3»Žã‰¦%…í¯[’{r-áö…äVN®É`Œ¤í ׿ÖÑæç‰QÅ|Gø¡;iv¹´’*;ìFPí¥†÷> „šS”äp´ŸíÓÿ+5˜v Q$£˜bQGL‡Ž˜Ž&tÌ(˜ƒ¦ã,&uÌ#¢#…É8–p>†ed¦‘Æ+ .*È*È)¸„q–À(¦¹*_@• oŠð ínÒÏ®ÑZ*}ÂeíÎ;¤Ë™Ú7¤ß Q¢è+Ò‘aåCÄ2僷¿~¼‡z˜j0ðÈ ¥ÈbV-åëû¸¢aíô™SéWÃt:t@Ï"B/ÐgŽèû¸ ±i:;˜/˜È\û‚sÇ åÉþŰêTÿÒˆœ0‚éßPKoçT7OPKõ™H'7com/sun/net/ssl/internal/ssl/JsseX509TrustManager.classRAkAþf7uMºMjŒÑjÔØ‹›„¸M@±T‰JE¡RÄÐÃt3Æ)ë®Ì̼û'jÅÚÁ¹µ3¹&in0éHÿ!w«ú«Ci-ÍT$n˘õá-®Ÿ¦TÚ]ï]êw{ý¥ÞòÕ ÆšÓÜzÿRdb„Jxœoîj-kªcanF‘xnÄèŽÖ™Pš¡"õ –"19WŒòÊšPÛBý®Ìçc‰y2ïon‰ÈЧOÊüßì‡c>fÀ|”àù˜ƒã£Œ‚ %TQ/â8N΢†S6,Øp¨X#LC±JB3ô èhw…K¹Ýþ€3îõ7Xè4ú_P{…¹6¡Ï¨½Gã¥Ã:(6:û¯|{ »˜=ÂÄc1wêíwhÒÎ2캟pbwÂ/ç-¿IJ‡rí¿lSgçì¸;veûüŸì£PKÉv¼ßPKõ™H'3com/sun/net/ssl/internal/ssl/HandshakeMessage.classVkWUÝ—@'„á•¶5­(áÕÔ ú y“Šb­u.ÉÐa&™Pð­¿Å?àr­à²kéw”Ë}“¦6­†söÙçÜsæÜsïœä¯¿ÿ!Œá§0Ò! Œ7ÂèŇÒ=ñ¡å=ãÀHX†Od|×´óÓç–Àëñô‹Þ¹Òî®t¹¦™^./çœý„W²¶ôžg%LÛ—®mX’É,¯•übÉg¸4ö§UÌ…x5­é$Ö™3蚌¿XÏЫߒْ*z´nèKëï­·œ„Gc–´c³1ª39Ë´Mÿ¦À¹™š"æ:’ÒõÍ]3gørÅË D†Mù¸$=_ ;`Ü’®¹{$Ж´Liû‹Ò²¶0éìHö¤c{¾aû[†U"ïI->ÌH÷@ºKòhþ0W`…4w§LÏg•%Ó+ÈUcŸ¶ݲè›LÀrX£ò \Y4ì¯`<’±}éyF^Æ|ljeÍühÌ?*ÊÊöôJ'õêiÛ–nÒ29nø¿‹{墓–­T;&0ÓÐúߊÛg?9“[gNñìÆM5˜!x?ç‹­m¯7–äôßh,ðùËœl,ø%—¸Áæ=wågÏ[ý@<ú:Õ62˜ù±ç-;Õ/E0\ìò¡Þ–—~º2 rÊZàcòÙ8ÿlЧ×Næ@×éX]ËîÉO£¯þ¸¤‡'²¦@¢öÚèZ–vÞçkÛjü‡§W!ÆqôùN51·ðÄ5}©aD膤†9 ) ó&5¼§áš†4ŒiøPÃûÆ5Ìh¸ªáº†„† 7¡ë¸˜Žnh:Т´w•GX‰vᜎ%´êRb‘–ñ°+ø2‚UjÙÖ‘SÚŽÒ¤»Jä#ØPŽM”0Õ’½ ¡„P¢I‰6%t%Ú•èP¢S‰.%zš/3nU­ÃE " þºªP’øùp€E>à_“Oø7ä3þ-ùl€G~+À¿'¿à?ß ðÉÙTêZÑE)ðY/Ô¿ 5*~ã_aýR¡B5¿¶¤›¨µ c¿ânêX*x·†ƒìÿ²('qHÐÂ4K´4URn0Jõo~¸ {¶?Úô3Ÿbcû)Ö·£¡c8´Ëxm.Ãí§R†w ÿÏ‘ª½¤Ð.ã`x¤Œ'ÕŠO_Ô„w*[~o³Ð‘á!½ÉFÜ#ö?&^!nÏ?!4‡ñ)ñ2ù6ñ"ñ3â%â}bñsâÛÄÄ^âÄ~\øPK» @æ PKõ™H'2com/sun/net/ssl/internal/ssl/SSLOutputStream.class•’mOÓPÇÿwÝÖµOsQQÀ®e+å•F1’&$—ð†ø¢–jFKú BüÆoà7 Ñ™øboMüPÆsK×0³©´¹çœ{ïÿÿ;·?}ïC@  ‚Ú´Ò¸ÇPT-žÚêŽQâ¾QÔ5N⮄÷¹¡¤îoó,R¶RDùç{ñCB>\ùé{Ç=޽ÀôKàÉÚ ’ÐqŸy]âÔöŸØÑað< Z{f{³enn˜÷î¾d`6W4†æãÖÿªítvÎå8tí#“¥ôº›D‡ Koì·¶áÆöIì> CûdX;;Ø·vó§g˜¬þ ü.ôbWDMÄ´ˆyUs D\…¬`‚‚:Ê &y5ÃØ‚Y.©CÑÀu ¸!S¸É§Ë¼ºÅÃm×°Â×Ve,a­¸L‹ Ôó©’¨Q¤X¡Y ºYû†;šþêø5MMK´Ã5k¤æšý$Mè¡y¦éýO”5]Ðû=hç‰ç.’{2w¯fîÆÀ­s7¥ñæ©ñ­×¹ù#åñnzƒ™ÛL+:‚öj­ÒgˆZm>]¬V>ÇHk^Œz†h+™¨<ªžæ jåôЩjeЭ *Aë —j0“7˜Ï¾­”ªGˆÿŸ2ñJ&®g§)^<ÍHïª P~PKÎ)ûÅ iPKõ™H'/com/sun/net/ssl/internal/ssl/OutputRecord.classVûW÷ÿ ;»3 ]VVD;M—]"‘PÔV¨Ñ–qaͲ»Ý‡›˜4}7iúЦ 6mi£}¨a¡bж©m“¾µ¯4}ž“ÿ¡?ÕÞûaE@Ì)ç̽÷ûýÞ÷‹}ã¿'áB5þ­"£b¯ŠÍ*’*R*zT¼OŽ*U¬UÑ¡¢ZE ŸŠZ5*VK ®`e‹€mJ‚•Û›GÌÚ˜ï«íȤ¢ñ¾¦™×ý)Ëìm2{Ü'Ália Ó­‡° ƒ-Ý-mm•Ýd¤<Ø6[KöÐ!+Eêdz%pp{$1P›ÎÆkãV¦6ŽÕFã+7câ°)šì·R-‰Á&æ^uîÍ›_MÐ6MԶœ٠ٶ̦üe{6só–Ê‚·»'8-Šöƒ‡­H¦iÎÄ…æ`l›ãJ¾.8[EåüѵZ³l§jNÑÛfÚ?ûžÛÜ‹âv‹Z*AQʶ+išÿ•5,¬2öînëÜÜhÛ#Œ7kªŒH‚âŽg:‡’–±º¶¨ÊˆYñ¾L¿8-®22)3žŽ™«wúƒT#A]‰EãÑÌFêÊõánŽY©Œos2‹FÌL47ZÍŒI"Ô¨¾Mý”˰{ÍèHZêÏM‰^K‚¶y0b%Y MݽՌ÷¦û͇èA¢¼¬|wõòç{k%yªµÈ?jWòžŒt$²©ˆµ%cÅT‚žŸÅÝ­fº?±+•¨ÞSW³¦ºnÍêºûÖàW²½lþT“sÝÓ½uÀØÑºÖ ¿Ž­ÍuF?©´Ò”j2l猒à1“I+ÞKš©”9I$‡èá MûÁì!¢(ÕóOi¿™2#t±9¡´¥hhÞÝTKXqçÒ–˜—i«5ØšHæmwÚ*çe±WÀn+’HQRâ¥#•fÁ̾tGÙ85Ö]Tƒ?ˆeI£OätK¸fO$)¤cj(Irg—â+ê³2mñtÆŒGˆ]¡ÓNs€{¡ŸjÒ?­é¢¤7šn§ž‘KLõUËPÆjæÒMÛv*f=Oßmåwd{¾Ëiýϵ§1Oëaš¨™„ÚvîEt+ïP:cÝ*>•ºòyºZÂR~ÌWöÅ4Ï]‰,±,K¿”(Ÿ‘޵ŒL"a¤ÌX¬‘Ц$9‚ xRN‰Ý)+m‘¬‹”Ò É$¦‚ñd“TF®É3–µÚ©^n1V v*ø€"RW°KAŸ‚C v(hWpXA¿‚^Û (ˆ)ˆ*ئãVéøÖë0±IG„A=–éØƒtt£AÇ~hÒñ!¦¶1õ~4ëhC™Ž­XÉw¥:6¢DÇnt ¢RÇ„uìCHÇAYi)ƒ÷êx:²ðëø(뙯 Ëua* ,ÛÊê ¤Y¬ ‹t|‹u|˜ÅÆÝ¬åæ«d¯J™*a»a CøT!ŽâÓ >Ãà³Áç˜ú<ƒgŽ‘BÒ÷m¶ñ¯°/g4c±£8«á|—Á÷4|ßg-?à‡s Î3¸ÀÆ_eê ë;ƒ:"„OB#H™·9˜ª#0•O`*™ÀÝÞ/p—œp!W]àˆÀ^¢Ö ”øÖÑé9Èà¿§}Ò8F/ ç-º¤u¹ Ú»dúÜôyÜí]ŠÜÞ¥íõ(•€8z=5¯Ò~c³%‹qœd´¥éµo¦4<ÀŠq…TŒŸ¾HÔ/åŽkQ <¬ ·–á‡!×(.†ÊG1 ŒâRHÅk¡ŠQL†B¯âµQ\¶Upã:*ž‡›~ÀÏÇ•P±í“{HÌÕ9ã¢|æE 3PŒyµ—¡ŸÇX ¦`nÏÙ\âåÙ™²³´ŸÇ8³y=g©± ’‡R9y¨^è]±!¨ß{*zä°_®öÕA"åqèipûÝîXƒÇ/»{Wƒò±½†Â¬ û•ŠTß ME~5ä×üEcøQOƒz¢Pòú=§o¼Åιeá£'쪄–mBõ«^õQ;$¯Ç¯:”bÇäU\è`Íkt†Ý"\ŠÖkŒãÇ"n¯Áq ÒÝËq¸Ë”r×~Šéøqû ó‘‚Ÿ%íRÞGŸL¥<&&Á°S†FxDQkHhÒ»xJ(‡Ÿ„sxý$a¾°Jµ7‡ŸîUåpõVÇQÌ;Åi“e¤O"ìcÁIáfIO±Œž^»`ż¢ÞbÂÌËAOžušv[~¨V“úÂ+Y }—{×—¿ˆ%!'E—ËÇð³[û•C{#½Ò m‰íü†±røùÍ´pÿ„‰+$á!|ö¨ÏêØ?½Âúy]—Øaî Ä}äSvŽ Ò§¼ÛWH°Â§,6h¦ßd¶™ÂF‘cCçoÉ0¶8µÇŸsøË8Þ"!ŸžÃ_Éë ’ôÝeÓ—˜^@t5}¾…ùFqm$†‹®a¼>5l¢!ëåaœ \ ñ€Ò{Im”íÕP&»ÊäIÞe”‹·)û ¹)ë<¥ÂÓ¤ðô$úçrÐËNÙ¡ùŠmúïywFpïÔ&™Ì/Ž Añ<^²—ZÀ«µ÷Š ,Ó¿ÿG0œ_Z9üƒÜøçÌRÀ¿MœêpèA×ú1¾×Êit›Èá_'$©Üšw\l–뇅f)Ψ¼3Õ|÷‹qoùPKRÅñ{ ŠPKõ™H'@com/sun/net/ssl/internal/ssl/HandshakeMessage$HelloRequest.class•PKK#Aþ:‰ŽŽññ±ÁCŒÄq<©+^te#^ÄC“4Éè¤gœî‘õ?íe/+xðø£d«“Q’\lè.ª¾GUõóËãÒ(cuC éâz¥ó^0l«õ í¨X:RhG)ßñ¤‘ä~'©Õªƺ¦#ÁÛ_Äý¿ä4Öýš|±zÍï¸ãÎYDìh&|.›Õ=ÙìJJ¥RáXø~ðCÜÆBéBQ´C}¿Î0¸ïIO0dƒ†`°¿ý¬‹P{T Ù^ ¥)Etès¥¡v-ˆ£ºøîù¤›½<⪜EAùÂÝÜ.»Û[îîÎã å—<没ZüFœ¥x“Ìö>Å_ëŸ2÷ú;•Ó·]zª=Æ0ÚîZT…lêÃH’Ÿß‡4†®OꌲaaÒBδ…©,†‘Îb–y|±±ˆe¸X¢ÄœA0C ×¦l’"£8PzÀÊïÁÀ¤ÞàT? áR%¦¤2*UõáŠ"'æEÊõî;Â{;< ŸúýÌŸ ¿sCÂÙò½#R…¼é®E“̈k†•¶K…U…gF˜ú#‘ˆ0ËšÂrÇD6kw„Vè]:B¤. ÕMËt/‘@ƒ×bf.#ò¡dÁt…3 ­“Õ± _š~ÌN KÌ^Îå…㘶nÆNïØ/¯¦DÎ%…#A[–ÈDz†ã[~€Q1Wàm8ìJyãi^œã‰R÷1Û^2Õ!¡¶lŠzr0iò)qÅÌRõ>Þ²Ó3£†“±'óvçTOWogOowOÿ…›4 ƒÆbärÂJ“0G'%¡åðÂ%th4F5:cIŒSiÆÕÑ$ûÖÇB?ÂöÓNeñ%´ý¿ùÓhèT¥KÝKÔ‘4O‡ø€éLXNí|;ñ‰Ý­¨¸­ø¢è=öÿBè)—Ký'„µàfh!Ëòõµe¬Êq ²G³>àx/§¸v)éVD~Îv„Œe¼,c@F¿Œ—d Ë‘ñªŒó2.¨ᄊKP™;¥¢'™kRÑÍ\7žSÑËЇˆŠ´«¸ˆ.C !4²¶–¹=xŠáŒŠ1Wq…ï^ÁÓ*.3×z¾;Í¢¦baާ±¢ŽÃ{)›‚x׃xo‘Àso1Žw˜›®ÁUÜ`˜ax—á&Ã{ ï³Ç,ALbŽ!ÅfA¼‰ù ®a¹ ›Ì-2,ÕPÞlI,³Ââ(Ó,Ú 9êê*Õx&ÄI<Òdœ%º¾Í¸±=ûcÙat×á8QvðvtôÎåfÿ BüD‹ú#LNkÒîR˜[E|¤ùŠø˜øUâ‹ø¤ˆOÆWâæÿ÷â ] ñ¬Q¿ŸëZIz© ÒU“äúÍQ£krY¹ÞÜWÄ—÷|R³Wò÷ÿþ­k …Öµšý6*6*‚„{GüêÊ åŸ×K Ý×KÍÜ/—üu¹ØoŠøÖ+­ˆï¼Œ$?×Gÿ)h~ˆâ¢AºãU;‡†ÿPKBê3 NrPKõ™H',com/sun/net/ssl/internal/ssl/SessionId.class}SMOQ=Ó™vÚ¡ ­´¨m¡Ÿ ¥Š@ *“&¢h†v CÊLí´&ÆèŠ?¡ªj°$bný.]úÄûÚÁ0,Þ¹_çžwï›Ì÷ß_ŽÀ#‡Nô9ÑáÄm|8’åÐŽ<ÞT^*rIÑ7ä§k›j¾š>›ÎU+š¾‘nöÌs‘å)pöÒJĵ±ýË3ŠY4æ*Fb>98œH%ÇFW8p ©+岪(X£{ó%C§¶¼±%›5]ÖÕªlš%YÓ«jEWJÍ`Z+ÕJ®¬æ9ô_ÈÌ©¦©z–ÉÓq¨/jJÉäà,Ò@­m:Î>,Íûÿ$ ÖZ5ZI _Óy#¢GDHD@DP„OÄM7<\r㮸ѧ×agÉ«p3p¹Ñ ‡„~Ä% áBƒ.òd"%‚!VMJˆa˜AŠÁw‘¤r?šƒ]BžHž— ½ A€l_ô#wèŠb`ñFpocŸ1^‡å¿:Éû4•å'—$ÄRƒ+„<—ÊÍ4ÖÖ„3Å cGSù’]˸ +c /ãºÕŒiy±Œªï‹ùœUoxtZµ)>2vô‘BÃ{üL_*`bÚ™¢±?Õ›ÚG²°º!JžJœðyzŸ²ünü†„xje†óÑt:-!A2YNS8s¢Zµ‡’MÚúPR‚4"¡mÚ´Lï9´Öî¬Y¯'Yl˜ž˜L&ï(–µË‚n%k×êŽp]Ó¶’ó«ØåIʪWî–DÝ£ +AËY–p²UÃu¹ý‡ïrV¬6øbZyÐ3Wæ7gyòºa•íZÖ¶7Mf)¡cßx:Ã#ÉܬŸU‹vÃ)‰«f•æˆðó9½2k¸{Á±‡—ÆFÆ‡ÇÆGÇ&.Þ¤%´£^V™œUúJÎ=†„áCAsÄØ­›bž¨ëÄcâXøþÇÔñ¬é±çEKø·A«¡/^¦—h"i>²c¦[°$œÚýQä {od_tßO…îãéOŸ®²ÌŸÖºW¡‹ýÅ{uê¯s ²¯«T>æú7§xvP‡r´¶UÛ2^•ñºŒ e¼&ã-o˸,れ74¼€“Þ„ÆÖ) ãèb묆 ’ÆXŒ#¥a¯h˜Â°†é Ñɸ> £èfqFÃ;8¡á Ç.á ³leÐ˱Ó&1ÀUëaÑŕϪȡ¨â],ª¸†ØZR‘LJí˜ÇG,–YÜ`±Ââc7ò‰Šn±¸ÍÂ`±ªb%ï£Ì–à¢kl­·S£ŠŠë09¶Á6Ù­Ò,ó”Ú ñÔdI<¸¯iv_Óø¾¦ øzÚÏó Z Éóäu“–HÇÓ;¨ýø@Ú*"~úbdEN§õ¬m8¡vÓpmYß½ ìü2Åë;øttüOeÍôohF½ÈV,°‚Ów‚fýôŨå{ôÍ 3du†š2«Ž®:ØháîíŸCnÙ=Љz$¾›£‹ yÿòþA„ÂrBÚÁ=*ä´ðY"ÒÂ}²]²[ø¼…¿âë¿QODÇ?¢¢'b-<$€G<¿Ôqòô€ÄWA±¶ X3zËÉA¹fÌ÷ò‚ª¶=ÀÞÙk¦'T’g¿ŠžzžþŠ™úe=`¼¥l·BNß„l¾má;}—‡ò9øõÛz²GC¼,ŒàeÒ*Åø¥Ñ÷PK¨§¶ÿPKõ™H'Bcom/sun/net/ssl/internal/ssl/HandshakeMessage$CertificateMsg.class•T[wUþ&™dÒa€š’Ji„ˆÒ„¶J¡— ô‚D[  mE:MNÓtg&…â/¼£¾¹®¥OyáÁºtʲŠ>ùàòÕå?ðÁµü Ö}&iI±xÈ™}öýûÎÞùíßîÀ>÷aЇÝ>l÷á¸û|höá îpsRÀ–póÀyuFçT=OY†¦g»ã°1Ü<Ö#`}ÊN&K Íš§™aÅÏìoéè%A›ÔÒªÅ(,NV§š8ÏÒéWëËezŠ““Ìèâe’¼ZKx ŸŽ›E=®3+n𹏦[ÌÐÕœsI¥’z¡hQ4S§»xHëƒC†ŠÖê˜ár'Z>¾*ÝZW£Ûz7ò8¨Nº7üØë ¬å~ošÊc¬“¦ëþî÷ÅqDM[ycöÞ&–£‡ï£à õp»Dßd’O8üPsÁƒÜ‘H„RÓª2…ÒSª¦ ðvkºf°©Ê8hfi6zó&@î¿”fKËë¦%©ëÌèÍ©¦ÉèºkýècE>Òr*_4Ò숖£|ž3û¨Iõc}ª9•?näcíûÚb­m-­Ï hzȉφ!‚JÔL¦?Ǧ™n"µP`z†,Ę34&`çƒ[[×騪gÌ)õd¦©f L÷#ùﺗâè#lè£,)c¨ÏVfç0ñS—eô†ÔBU7ŽÖªRô–§C&m¿ž¦A >7Ð%©›–ª§Yٴƒ¨™Cä\^ÒžY‹6 uv€º•íZªjíš¾UûNC³öB.»;†“SFþ¢:Ágmûú Iÿ¯ë;TuÙôP»McöàÙPë8--fD"‚ÞB4ßFdX!® å'Cé»ELî£]¦XŸ•/sEif˜1‘7™„ mž—ð¬„Cú%$$ôHh•pDBŸ„^ ÏIˆK8,ái; +Ø—6+x\Úª si›‚ð+ˆ"   5 ŽqçvlTAXA6(xGt£AÁ^lâG=?¶(âÏ`—‚£<,ÆkİMÆ ¨2^„ŒÒ2N"#㘌aLÊ8,—¦¸U“qç¹t¹Œ`ZÆËÐeœE^Æ+(È8ÇcÏáU~ü0ùaÕP¡¢L32Æq‘—ÐJ÷h…8’$’v .ò®ÄX@´1÷ FSs¢¹òÎ×KÍšQ˜˜Á¡ØI?‘4§ŒA:9ÆzÂꢯÌ1F¢”xp89¥âó˜Ãàቿ©˜é+æ¥uÓ·Ù›p*‹™îA/¿4¶Ù¸vg|<1',5Þ\ú§ñtðºðv;} H®¤Ú\©ä®Ýp«R'‚ºÊsŒVê‹úÝ6®‹O~EŸ_¼÷¾@·Ûa~çFüDâûAø½6>äM©‰l|LAs.!X¡ç¨Ÿ¨½^†[MÎ.W¤z¼bG4bãÏOyºèrÖk6>«Jùw µƒüÑöVÞlÞA¦­Yý.4‘ìÂb¸'ŸÄ¶þPK¿èñ"[ PKõ™H'Ecom/sun/net/ssl/internal/ssl/HandshakeMessage$ServerKeyExchange.class;õo×>f]Ff MO0ÆÈÀf“™—YbÇÈÀ✟’ÊÈÀã™——Z䜓X\œZÌÈ œZT–ZäZéZ‘œ‘˜—Tœ_Z”œê–™äˆE»$gäåë†êéZZÄ22è&ççê—æé祖èçèg敤å%æ€9‰y)ʼn٩¾©Åʼn SíIR¯‚Å]ܹ¹Ê‚TvNv. ™¸xøXx4010‚„$ '¤4«Övþ`@“À‚ i~¨4³Ï¨nv0ÉÁÀ ¤¹€’ sÙX8PKóñgôòaPKõ™H'Icom/sun/net/ssl/internal/ssl/HandshakeMessage$RSA_ServerKeyExchange.class•VÙWgÿMH2!Ä£X¢ÔFEbën,Z£aÑX)Ê|&£a†ÎL¨hÕ.Šmífw»Ó'_|Ð ZÏñô©ý'úŸÔÞ; 4(s·ïî÷~ßáŸÿþ|ˆ*Dñ›M¬÷ ìÁ*Þò âÁj¼4KpÏK¨ 5Å%Ô‡š§” %6¦XÙX§š‰k–È£]BÓÌ‘)RyCµ&c*'•”0c‡’ýùÑœš: &Ûmgœ¡¦¡NFE.Ψ%”Héc13¯Å4aÅL3Wô£)9›I&qmTÌVÕcýi—­/å-#¹ªeÚŸ®êØ«¤,ÝàrZæaÐ#LSɈn5#L‹lê*Ù Ì!?&ayùPçP§ÝÂX¨òT*K9̆Ð<‡•Hóg°Þ&³Õ¨½Š%Êœ•õø…Îì)ú–§ Ìq‘â1$ ?Óíòes…†ì[b_s'Ç:p8¤øÁ¤0&„Aâ=gRYj¹ kДàÞ®jªµ“ÖµKO“ÐKçbÜRuÍ”à‹kš0ºrŠi bŸ¿•Ýb4ŸáË {º7¤Øj9ƒ=ÏåͶ`ðÅ­gQ±ªàž3ãº&4«tTGG'*äëJî눶PŠI=o¤Ä^5ÇEðº,êV̬ÞoèÑ–õ­Ñ–Ö -Û¶KúFéKIXýâä%DŸ«´OÑÒfV9-JË/¡kAúsT¶ka^*xˆ,à‘мׅº—¦æ§‹ r§í OBŠúRFÐ~к)¡&#¬¸fZŠ–â]"®4u ‹‰)ªÍŒ›vN5û4 Kf®xßãí+“–=g3RûÑ(Ó]Zé] 2ûnĵ %§¦‹›1­Ÿë”°â9/ž„u³O{õd>•íÈetb³ce‚³“jFS¬¼!ÊTÖÎëí°¦Â“Q®Áo‡„EcÅLBËXYšÝ8wP‚lãÅsšB£¡ÖXzç¤%: C!çîüxšfIz´]£º)dl•±MÆN[dtËØ'#!£GÆ›2Úe±_F\F¯Œ½2öÈØ$c³Œ6Öà%Zñ2S¯1µÁ‡ Þ@ȇø|Hòi'S­°^ЇÝXæÃa¶8ŒZv°ÊnÔñérva¥ñŠ]¨÷¡Ÿ©~,öa;^g/v W½€êÅœòâ(NWc9c ´ C÷â8Æ™zÇK2ƒõÌjœ@Î ƒ<ƒ ïz1Š3lqÚ‹&™=Ëä^àœ'ñSç\¨F½Èâ}Vù-ä J$nQ÷ÁÆÔ ¢ÖÀ‰k…“~uái|ŽðÑ]\.á)F½á8:Æ¥»¸rü³ÖöR…cÂÛ¶·†’·a¸!>XôvK(àÛå}|Zb¦Â~)zŸœ¦qµÍö;f ÜvЀ+ànžÆgÏÂvðK ’º ŸŒÜÃm΀³¹€/Î(Áð\~¸ÙpÖ¹j=g¯ð“‹ñèB‘æó¢ÚÔ Ô¦lŸ\»õ8'•?b·zAÎ$NypC7I Õ=|Ýó©Á8>Èq¦ñM‰œ"rßö6SŠßý…áÄ 8Dn‘bä.mO¬5%·$—×׺í‚Fì|^)àû‡#7í”8‘¥¥–\¥–T¾ñSÎ?üŸÿFÞﺇ¯c,âwp½jÇ ¬l¸Žêˆ_&6ž6rÍütÉ!5Ø¡~ôoÄï!ue£©§¦žÝžÕ«côÂ’RŠ! ‘â~‰»lc®‹Ègí[±¢d¿d<õ(-T3­N´´>NÚ§rÞÅî"gÀUÀ¯7+®RŒxÝžu„½dîUõÿPKÚÈÔy…á PKõ™H'Hcom/sun/net/ssl/internal/ssl/HandshakeMessage$DH_ServerKeyExchange.class•V wg~&ÙÍL&‹Ð…-¬$í@ÝìKÀFš%a[wmÈjjk™ìN6S6³qw6 ÕÚª­_µ~§~Vm#ZµÔd‚é‡H¥T€Çs<ÇàO°Þ;3»ÙÝ&ÎÞ÷}îû>ï}ox÷¯_A3bø»„=z$|TBFÂ> a '%ì–‘°^B\½bz4)ç4‡ºR¶„ºS§Õø¤jNÄô\Ê0µœVì³Ã<¡®ÑVŽ—bÕJÚ~<4˜)LÆKe#nhf¼TÊÇuJP4Ô¼í$’j3÷ŸÎL¨FNë㈡5E8µ•´L¹¨›3ñcE}Z55Bô8ì¾I¾tz0eL•Í´YÔÔI»„#k i¬¡<–×3•l:ºožðhÙ¬/bKÈÉ«øTFíV·»•' â´®¹¾®†*†´RIÍi =§•Lº¬Ø-Ĥõœ¡šå¢FøÀrøáÖÐZµ€Êmt4ÂjnŒ÷Û?°_e“·•Æí¥’+_ØÕ±™W3Z)~<Ý_;\¹7D:åêaWÓú¶#V/·3+ }|\×bI-ŸŸT %­§µbM“Ò{Š*ô&öë†nÐÚoŒ™ÉB¹Dïåp!K_"© ¨%M9 În]ìndA÷±8Äb;}8Ž»|È#ĸ»²ƒ­;YÜîÃÜæƒÎ±ƒle¡ñnŠY¶²øÂ=K &Y<æˆM2 <-£€/µ’ø²Œ)|…Å3¼ö,[_•ñ9|ݯ³õ E|“Ås2Ná9û‹çY|[Æ ¾Ãaßeñ=Æ}ŸÅdœÁeœÃ¬Œ'ð[?bëÇ,~"ãóø©Œ/àglýœÅ‹­x¿ñEüRÆSøü%/sæ—X¼Œnú¦À¹#K`úl}ÈÕI[¯#+ŠÍ$w‘·MôX^Ä\8²ˆ_‡…œ¿Ø!Ql¡mž…é©*0úJ³Øá.â7½Þ 7já·á 7ô,â2,üŽ2Íá¿é"~ßëõ7³j©@þ¶8Æ%Gþj°…DtzÅpP´ðZµ’½ô“è¿Þ&ʘ¶ë ºuír°Ý©ËÂ0ïêW[5gÚë’tÚÎòa7Ëi­ôVËð†ç1Å{"Ûãµí…ÛrìpÀ{Y¢Eh鼅Ňˆ¥Çgq·Ã’”ˆ¥‹á ä°”ØŸzÄ9Œôì,’L//âõ^Éá®ÕáN[+ÜÉŽA ßÄÙ`+³'“°p‰s­»„3#~\~# ¾àº^v—Xȩ́m>Mâ‚ÛA›pйs~Õmˆ#+Ãæk`ÇV†YUX¶tDö o¸ü¿i›ö¼e›V¥5ǰÁÝçÆF7´ìßj_Ñ [/¸Ú"Í„^C»çyù7ËA´»-ðOj//éDüÔ†o¿†k×pÕ/^Ä_fq9â—,\m>0‡;ÚgÑñáWùŽçÛ÷Þ†÷Ÿ°ð×§›„vûã/¾ÿîâ툿ƒRPG]ÐBG5¨Yè°+­ òqPgJÀSf<Õ8°É¤À9|²wà‹ø×‘3Çq"ãƒMŸ³ß<Ÿø#.o!û Þ±ksµEÚ%Ííå¿5æâûÛæÞÁS.{§"Ôà×#16=žHÀ³A:ó¼…wÉâòmÓùâuûì«`Œµ†*½~¡ÚPîáê ºÁÝh,è½¥Dï¹Ýh,¨³à`¬Õ0TÐz®¦©¨>»ÀÄ:?=æõ“4µ·üPK÷E…]TPKõ™H'Fcom/sun/net/ssl/internal/ssl/HandshakeMessage$CertificateRequest.class•Uë{eÿ½ÙÙÌd;‘v`Ck¶¸@ ›n7Im MR›KkWBR»!b¥“Ý7É´“Ùeg¶¤xA%‚wo­  F* `»«F‹ŸüÀG¿øE¿úèÃã¿`=gvÓMiiòÌyÏ9ï¹_Þ}÷¼ˆ28¯á ÷k¸[ƒ¥!¥a·†z4tkØ©!£á> Û4Ü+IuånKu·NZYÇrç³y¿b»óýklOªÛ?•=L7»l9ýj>€SJªkfX AÇu4â©\ØÏÄìqYð?¹õþ‡«ss²Ò϶sì¢;5V(-f½ª›u¥Ÿõ<'k»¾¬¸–£²’sËUŸ´¥µØÿaTòù±«Uzn¬2Qõ߯“¾Î#»»»Ç­EoN52µKAiÂvâ©õÅYÇo6çù DS3Ã|ß•ººYñ9œ=#„ØsvÁòePÝŽt: qÈÇ«ÒóZv$Zl×ö÷ $‡­â5Ä’£ãIGºóþ‚À&¾NUý…ù´¥·W@x“§ÊD‘9ãZŽ”‘RQ ´”\Ï·\ÊrªDGFó4eÊ rQV,'9z(™"^Ò³ç»Ö]É5/b– ²ìÛd´—dñ*ÕóŠš mÐs®++#Žåy’”·Ýhîf«¼,2Bnó¥j¥ ÚÅåŒ3»r½j¹\ªøä¯TIÚŽ#ç)b¦dÁ±¥ë'-ªWò„<•”K…ê'i·ðFuÌŒZÞBép¥”™êÙÙ›ééíîÙsÿQ*×ÌØyù´ŠÅUÁ¥2¶Zå²t‹t3K_Aà®G/`ÞÄj d®+}Èr‹Þ‚uB>(=ÏâLöß”ü¶kMÇõ|ÿ" 츙Øþ¡Ö—ÊIeD·ÉFÕ‡(@1GñÕyé7¤uÂòÕ`GÇé’vC±½ WàÖµ 7qyJCÜл@í»²â¹ÆØ Uæ«ì5¤ÚqíÇSàöxŒ×ì^÷eØU}ÛÉNQ¥JSoér¥¨–4›~©PrBñ´/6Z9Ö|64iÞ*a™¤R§CòŠŒ¬âÙOÒ½æ—YÈIY™-yRňŠ*Q1¦bZŨŠ#*V1¥â“*&U «È«RñŠƒ:¶ãVûq›ŽC0˜ü¨ŽAÜ¡c·0ù11ö:t<ˆ=:£_Ç6éÇFI0¸“ÁV#‘£¬öi$u|†±}¸]Ç1>ÊÞ°UGg¿w2¹™Ag ³¨ÄP€ÇÀ¡È¤D•±“Œ=Ö˜<ÅàÉ6Ìãs >ƒ/lÀq|1†,"ñT c‹øó¾ÜF¼¯ÄàâéJXfì«1”Y¤Œg<˼¯±î×Û(–oÄð8¾Éà[Ìûv€`РÂ@aeЊŠc–0 [(›^Ð.²,Þ ú!ú·DïÑo}(D¿Eô§BôÛD…èßF}à`¸tª„Qßè.MÔÓP(à‰tßI›5|÷NÓñ½ÁU§ëxn|«ÓfÏïU2[”¾Ÿ`øƒâ`¢õåKÿJœAû*æ¦ QÇßÉÔð£>%Wþ yg"}Ñú<3ñh&­áÇÌ/GE<WÎ^úÏ[à¿,‡ÂZB»«ÚDéxµÚŦÅ}+èZʼnisko ?ù~*PÇÏö*ìd+GºE©ãçùåˆØj^<{éï‰sdã± RÝÞüé_£ÓÑ?i”99‰Nò¡(“+Ȧ•+üVbÜf¨Ä Üi£¥ŽÞYŸÌâÍd†©ÓÜù>“R9>\AÒLp*«Xœf~¢÷<ÎÖñb/å—[D"={éŸæ›ë,?Š[²åÝd—-wqN_<=6À¦Î†EjÔ±±÷:_ Œ Ì\6Á'W'²±}í’¶®ù¿É§Bç?L#RÃËoãÜ_ñ7Cù=^9ƒwMƒzú ö÷{Oì:è •û^úºéÛTô4“¦ÑJz+È™† ûMC ûL£-@všF,@¶›Æ†I˜«(Oz¿l8«áW5¬Ð]"HýE´™F;‘ÍtOSºÍò¯Mã#9OÎÆ`Jz‰ù*H³&ÿ]߹Ϣ³™ÿÃT]Ã"ƒlÁH4Lp]C6Þ3Ùc ¿15¼éSV°)˜{…½½¾¬ˆ¸²&zµ»ô˺»èŒ‡.lþ?PKýÙ£w~ PKõ™H'Ccom/sun/net/ssl/internal/ssl/HandshakeMessage$ServerHelloDone.class•PËNÛ@=LB á- ±©RcVEÐn ˆHA ¹bƒXŒ’Qbpf"ƒÚê¦Xðý(ÄÇ U-Í\{×wþ>ÜÝÃBë9ä¬êf#¹Ï¶ªÍ–ê¹z ])bWëÐ d,"ÉÃø~³!ûƒØ#Á{»ÆâýÛr2ˆ_z*Õæ%¿æn ÜÓˆÔ#Ô\J…\v\겓ô˵ZmÍѵˆŽDª%Ãø^ ƒøCv_µ ;ß¶D?”Ô ù†”"Ú¹Ö‚`ñÛñÕ j‰Ã $0~ÀuWFª~æ}Þ®{Û[ÞΗ Æêï®xÄe[wù•8Zó…}ý/ýÆ›?+?=Oãäy£‘îÈ£1zÔ¦¸Ë0™â¿ú”d÷6$wV Ù¶1ccÖFÙF) Xy,Àv°ˆ–ðV˜oÌèvÍPeTÇj·Xý“ ¡3¯é9j é©Ô±~§Üü3WL9kzꉜ¦á™„,S5¹ö§»ÁÚ0y’޼L§‚±TZ0ùÆþZ”¡ñ†*"OÕ¡žY±€Ê#PKAèµã¤ PKõ™H'Ecom/sun/net/ssl/internal/ssl/HandshakeMessage$CertificateVerify.class­VmsU~¶d³él)º” …4/„TH*˜6`C[Š‹%",Ém²nBvS¨ŠèÏÐ?À>hGSGfýêrˆ!ø‚8·‚¸„ƒAD!Çþ .²t ǃa2ê’~Ž8ÄYßá³w™Lp–úØp‰Ê$Ä ñ19Ì1P‘Æu“øTÅn0ɱz“ ©×úY/.cÉ­^\Áç*‘EWq›Iž _0¹£byÎò¥Š9ÜUq ÷ØYgrŸS˜9L0YB‚,iP¾I{I‚=x›´*q…x!¼ŽÒð˜~C9)Ç4_Fl UfMà5­DzšXíl—þ°!è¹z®½®ÔÄWÝΣ×9F7ã»DÿÄüGÿÀûî+þqf³iÓ‹Eöœüf¾of~óÍ|óíé/~6„ñµ„˜¿„%žð¤„{%Ì’p„°„•ŠüGØUQeª¶½ò~9’µHÌH«Ú@ƒiì`Tõ4 ¨ 45µÅ“C=£E4ňèz"¢j†’Ö䄹ˆÅÚ¢Z*cP¼"5plŒƒLf]‰gÒªq(Ò®èº< ´¨Šn4ücá™zš˜µù?±ö4åX¢S«nÊô÷+é®:ÊN5»ÖÜ‘1&=?£U“‘­ÄYhªL­i†C”OçÞõ7û;l ü/ÍîèݫĹQÌY53'wÓì(ψ#@JÔ’tÎE$§»ÄüØ‚Á €RB«ª©ú ÒWíßO£Yí ¬ ­‹'È`là\g)%²7'û³›“šnÈšÑ%'2´vm:WR†J»›§àŽjš’nNȺ®eéÌwÚ¢ôfxü½Ó½‰Ùí-«ý›e}°Þï?L§”h½;%÷ÕŒ«µJb›k&¸ÑFÞÍRÉÍKfÒq¥UMÐዸƒ=-”ÜšN†»jVÔ†kjWÖ¬]³‹ª–©r*¥hTÐK¿8uŽº£h†¿¬Ò%w¯L@xF§Í²Ö§Êûë¢Ôý+ÿ¥ã}÷ÏØÞØLe›£/w.gŸ9S´II…~úѦ0H?•®\Õ;4sóO+Ú1vÙ…»ã ú¬åw ŸhsÁë°`ü²·g4CR ø=“'njúWKß•ž‹€å­[’±L|°11¤åàPAÊÙC¹À6E0¨³¬uç¡ugѪë”Ô¯gR©dšF ™öÓüEh¸Â4dŽ×&@4e‚øìT&÷:­è ìº9I¥º’Þ¯¤ &H2’ù™TŸlP6‘\z“:iNÒÔþCÔ‘œ²›dkƨEÄzëDDElÑ!¢ED›ˆ­"6ˆØ"âQ "Ñ.â7Ö2ldXŠ7ºPéF–¹±†¡• - ›QÊÖÅì<Ÿµ…n¬`C„¡†¡–¡‹ÜØÁ|b.Ã<7vb¶qØÃð¹ÑÉZ'ÊÜx!7vcQ1ö ÉrAÆS.ô"ÍKÁ`È0ìg8àBº à ýxÚE{‡‹1ˆgŽ0ex–ýžcxÞ•ýT¼Àð"Ã1öâ%öáeÖ^axµ˜’¿æB¯K¨—ÐMeí¡- w†4›CÒÇÝ3åFK6¡š¬÷“^„/iÝ\°þŠ´ÓOànš²Õ”.â¾%´^N«FØÁ«ÅëR·ÍÓÜÙm÷´uv;<[:»žÎÎoñFÎcËv¶t±e;YÞ¼h†Ò'JÉt=$™°#xo^Æñ`åeœXè<‹ÊJûYÌ zÜ×¥Ë8~‡“£x{GË‚ï =e,GØ6Ì6VFXÉ% ÐÏNéâfÊ9Víp@$¹vbÊ|"ŸÓç⟀“^Å»Y”츆þn¯pïýp‘ˆ*¤ÿ¢¬j¼u3uÝ$ê`Øçð9/áƒK8uïóу>{nïÃKøÈÜɺˆ×â[G+æ[ªÅéP˜Ïu:Dg«w~lm:LtZ¦o¬>oƒÛbZBLÉ ªè85·„ä ê¯Óã¾àYzÁòß>æ_J’ýmž²¼±ŽŠÎ]ÚÔUÉßC× v{‹®à¦Å¯mg™šôQœŧ—ðÅ-üìµ_Åg§pÓʵ²7†¼tðó¶õY,®<…â—*8â®W®šƒ;GGñù±"¡’7nœ»ó[È+eÈ+f¡‡¼ÅÓGOŽ.ŒvM429hdrÊ©Sõ8Ê­ž¬!YD²Ú*±Â*±$”ÜlsC¹9͆rcšÊ· ¬ ¸ '$’¿†ob躘å'8lxLë>{øG ñ]Wó¬:§ ©­Î‘¥×CQåŽU>'ÁŽ>æÊ÷¹;·íø4·àâØÌÁqj>ûØœÖ;ƒÕù-kLëÅ1âáiˆ=D<æ0ÂâD‡23³ù€ªèë3`ü*WÓ“â¯`~Ѫ0ÿ/PKÅ{2G­ PKõ™H'+com/sun/net/ssl/internal/ssl/Provider.classTéRÓP=—­—ZÃ.¨QD[–„PDKÙ©†—q˜P"KÊ$· ¿} ßB˜Gg|ÊñKÒ;E 3mÎ=ßwîý¶›ß~üB%úñ’££ŸãÇ0Ç]ŽGQŽAŽÇGÇc™c„Cáã¸Ïñ„£›ãÇCŽ{£ •ÑØÃHtiW?ÐÕ¬nm«+›»FFŒ•3±rŠ!ú¯T¶imM•Sî)WÇÈämS©i;w`nöØ|lžg²¦eŠ †šñ¨Jå¶ †ºEãhFψœ}¤¼Ò’ íD,ë–¾mدå­×ÔRÙÒºiÏ–aëdó%õDk´2”ôbJ‹'¤ò0é(M[Jå,a| A††Râ`°ÔguI+õ!â NQhæ¶¥‹<·<•84ÅŽE =\¤›Ïhm./òa-—·3ÆŒ™¥*lPŠò‚¦MËû…ÂEͽý¬±gX‘É_.îâôÉ~–}r¡.òGãHvÞò¯b¦ëä%Ô'{1ÇBäìÀбêºþ¯Äì-CË»)ÝÙÉQû×âJ¢?žˆŽ¼'£N¿M†LnOqò–bBqœ¬bRlKÏz‹-¹A…¡¨‹A_M2\*Q.•ÿÙø0 ]QP2B ñKenãJcK\¨)áyj&Cï…"¿«Á(_æ}6–þÞç~NË}Y7ÉT’©$SÉS dÞ"¸Åt LË1lIAE”г´IËùw¿Ì }›öó"„ñž…ð<‚8º"¸…›$Ñž¢#‚ÔZLb:ŒfÜ¿Ù0-瘼kX é$Ñ@jÝmÕº*zWêDnÓJ¢·ûÔHì‹_=ÌÜ“ öϨö<{¤Šúc,žb©Gª”ª¾ay½Gª–j|’¸j¥°®I\—ê|P/5øà†$ù 1Mh@‹Ôê? &ŠuQJîÓzŒô4þÄä›S¼¨úŽ•õª¤ƒ z½ÜþPKš}ûjí>PKö™H'2com/sun/net/ssl/internal/ssl/CacheEnumerator.classQKoQ=—NÑV|UûÐZ ã#Œ¤‰ >"Ici\L‡k™fÌ0hý)F·†Mš€M4©;LÜúôoˆß05Æßãž{¾s¾¹óõçÇCHÈâú4¦â©teÇxnhMÃÞÖlípÓ+2H©ôºŸk ‰ÔŒªçZövQÜæR›Óii펭ÙÜÓÚí¦fÙwm£éJ†ÙàeÛs_kb`ê–e[Þm†™ñM§Å]Ãs\†`É©sv—!=±(Cì_»GªNÇ5ùšÕŠôÉÍ;F»áÃE)“8@•ôýJŽ~%ªu2¦(‡é´ˆ!@B=@VÍô‘SçúÐÔÌaù÷€?xÆ—ôÇþ8P颤ö @a€Pp_‡®ô¡‹îËðG’ºÑC>X¯‘ÒkÄ%G‘× ÐÃï¢3ü&í]ÎÓ*#—ä ºÛEÍ—ÃòDrúþ"53Ú%ãï—$L{…׺øndþö–6bìW?—8F9€™_PKŸ³¤0÷PKö™H'&com/sun/net/ssl/internal/ssl/Ref.class}ßOÔ@Ç¿s×£P r?Ôã„Ê]›³O/Ÿ.Ñ!1ƇZöîŠekÚ=ÿ.LM|Ô„?Š8[š5ñef¾»Ÿùî\\~û*ð^t| ü8ÿåûcª'„j¯Hhöþ½ÓçsO#©gãyr$Öžø˜Š0PâˆÐ½ö&c?«×b,R!CÁ­­ýd–†âEóËÖÛ½ ›&¯Òdp8|°;î>>~ôŽ@¡NEøAçX)a#LNül&})”Ÿe±I%RĹàŒŽãY6eÿ¡õ¿ÝÚš+:ÿ±M°ù‰ÌT¤fŠå|&ÔÁ4’u‹&nšX±a bÂi£ªe [ŸÝÐÕªKZ¨ZhâöZ¸cqèXhcÍÂ-tµ¼«ÃºúÂ1.›x1º?W&W<ŽcU+¯Ë=ǦK_±õÈyU0f*œ—KÆõΰ}:Úb®qÖ`Ýý‚­‘÷ 5:eòÞiA.•c׋–«WäO˜ÌÝ¿6ßÑ;(`§€›îvtÛE.z£Ü„—÷6Hï(G¥ínþM`…é¾ûí7Þ9ÜrBóy\Àœ–¿PK‰––kÄÜPKö™H'0com/sun/net/ssl/internal/ssl/SSLSocketImpl.classµY |ÔÅõ3Ùä÷ËòÂ’!—;lT”@€@H8 ¨é’ü+›Ý°»áozÔj[A-X[ƒJÛ dCŠõ€Þ½[k[{ßµ÷ñ×ÿ÷Íov³›llˇߛyófÞ¼yoÞ1›Ï½ýÜ‹”EåòŒ)6™ôS4˜ô-“þdŠ|S,6雦h4é»&}ǤФý&½×¤v“î5éë&}ä‹MzÀ¤÷›bŒIŸ4ižIGMzƤšô{S¬6ÅH“n5é_¦ØfÒ]&ÝcÒÓ&]bŠÑ¦¨0Å¥&ÝfÒ>“æšt·I6Å“0xܤ[LºÝ¤¸I7é˜ 4Î[ {-Ûìˆ7ÚˆÙQo äm77‡CÓåzUW®]7ÏëT¨(Á€Šy·ùCÑmþí6Æ1M‹Ú‘`Ó“–U2½BÁ*A¾’éÕ`>3Úš²c3£ÑàÌ@(fGBþ B+Q*»/T:Ðäå‰"˜=y Ù«-Æ´™M«­­®µ£Ñ@8TÕÜÄŠÑXq­§f <³*ÔÒ«El3(cR(«[c©¤ü)è5Í\½åZ»!Ök³¡¦^Ãë¶Ic*´ `Qcc²T˜ µÆÁ™•¡Öf;âAhЊ5mwò€ÝgºTYbƒ‚›”LßœI orÚ>•]É`C'j À‰¨=è°9Íà÷ç`3ÌN·Ù€ÌS",Èà«xA—~òä>¢_ÿ6¯U¿°¥)¿!ŒßÀ1Õˆ&ãÞN+¡Øº=-\] NŠ0¦7ø ¡ìæ–ˆsØú­ðöÖ{i£mˆT”VeÌÈÆ@”ãÀÒp¤Ù[¼ÍnØÎµ¦š¶°€æÙ!žScïÒÚC ±w´úƒ<qÊP±œk!sk§ \‡õ×qX“Ówž}' ,±·ú[ƒ15c0T©økæ‹qŒ˜ÚdT’Ô˜Âk†€°<Õø›mg—”J91r+†¨.Á8†«7øƒk„E7P]câ(@®#¸gcg剋ZcÃÃ1–~ßx~7›¤zxÃÚp52›ÑRغ@³n9'®mmiÁ²ž Òº†–šð;èßãèk}ÔvdX¥ŠI9r“ar&ûÝf6·!s9µ§@âȃvS"ÛzålIb¸wŽô6G›ÊœbT]“zj}‹?íÄøTî@h'lݨÂN ºDj#­ln‰AvW ºªHZʼn²¤bOÌ^‰ø÷¤™g\/rº’óôÊÕK“Eîn²:Z2šŸ©6J™œR%FU"Oa1±{´Ê9÷¢HS+;Cʤ)“àÊÐy=ˬ´!§TÀµÎüPMŸ»å@sÚP¿G¦ …w9iGûˆÏ#¢½cçhZHŒ¦…Ä¡Ñq/Ú+îeÁ˜Ðˆ6Ý0Õ.P¯Õ‹n ð®s‡ÄÂËíÝ ï3cáDW ö´†P˜â’âIҜȣ[CÑD€N7š@õlìägüj$>Ò9w—?;NÙ»"*Í‰Ýøp qA?1è7†¸Ø _b¢!fb†!fâCø 1Ç â"CÌ6èg†(7视¸Ð ß¢Ìçb‚!¦ô¦!¦bª!J ê0è ƒ~hˆI†8ß ôsCL6D©A¿0„× _ô;CL3藖Ȧ}šZt'­°¨“öZb>=k‰ ªèÝgÑK ¾Æc×Ò!žwØÛèÿèI^ÛjÑY0•ô1K,£‡xl'ƒ]–TɽݖȢe–B ,1ž9ßIWZô<…-:ImŒF-ú­g±„ËÄBZh‰ËèrK\νE貄{ˆKX  =b ›X¢ž³D÷¶pooTCÛYÜZ,zÝ9eƒ«-úÍ·è-ºÌ+i“%Šh¥%,ZIJ\gÑßh9÷®µÄf^vSè«Ó|rŒ}Š·è9úÏÛf‰ut£%æQ‡EçvÒjK¸¨ÂnZl‰k(Æ\ÖXb,ëj8U[ôjáy |Ÿ–0u/Ÿmók²¨‹>d‰ÞíNZkÑ‹ô°%tƒ%†²Ãä±ÌW3˜ËL GÙ-zìÅ*ú¨%Ö2ïœ|³EáyãxË?ÒRK˜¬çå¬û³Tc‰艭Ôl‰¥ô+ñˆ%Ö@HQŒ=Àù –`³º†ÁM–Ø@×[b#ÆÄ•,}•³ÑÞüü"ÀÔ÷=´Î¢·Yȳ´Ê¢o3褛U¦XÉèU ‚ÌàQ7Âì‡rgv#öp£wÑG<Êà1fpˆÁaç"<~„{O0ø(¯ý¯}’Ñ6Gxì)O»ÇžáÞQ7âÁÇ|‚§|ÒÐÎà£ÏºáÝÇœ`ÐÁ î†cl·èdp’Á§<ÇÔ.7¼ü8¯}žÁ ^dpŠÁK >Íàeí·Ø+^u‹ë™iH¼Æà4aðŸeð9&|Þ-n_`ðE_r‹Å—YÒ¯¸ÅMâ«nq³øÏ;ë·ˆ¯3ø£ßäݾÅàÛn±O|‡%ý.£ßË—ïóÉÏð¼×¹÷o¸Åíâ‡<ö#7túc^ñ&ýÄ-öóÉCΊŸºÅâgÜû9ƒ_0€&ï¿dö¿bV¿v‹»Åoý-SÁù½âwLø=ƒ?0ø£Ùé8Ÿè-bmüÙ-îeÃß'þÂËþÊ`.cðwûƒ2øoù/¾4ÿfüƒ·Ýâ~ñ¨’ГÒKÉì_Ïï“Yà"]PÌfãHÃ-Þ/M^‘ËÀ Ñ䃡JãyÃsŃ2Ï-’#`néhr¤[|@æCW²€Og“Aú½rƒÑ ƸÅ=|Êd!ƒ± ŠØÈÈâ\ñA9.‹ð` d1p1ÈfàfÏ`<ƒÓø”2(cPÎ`ƒ™4 * £7‹ áa‘ ÷1w~6ïþíü$ð·RðOÿk þð¦à]è!3°ø©U‹H¢Z„~Õ^¢[„KÕÎ×øÝ"•¨v™^_­ÇÒT»V·ˆúªÝ¢[¤Õ6é KµHWªE¾à–sŽjÂU‹(®ZÄ\Õ"تùOµ/©¶³¥j_žª¯WRpÖ׫)8ë÷µüyà§Sð€ŸIÁ_þ™üðϦà/ÿ| þià_HÁ_þÅüà_JÁ_þåü5à_IÁO£÷5¥ï…”KwÐ à÷+@Ëÿr=â¤\žwL¡¾ž¤šR‰V¢ëë”^Ÿ«CNd0‰Ád_N‡œÂ½©¾¬9ÍWÚ!K|ÏÊéÒçóuÈR_V§œà°|ï:¬µC1f¾.áB[å+×)Ë`_Ö!gøÆuÈ™óÔÝx#_\–wo–C±'¢¶óëíê(ãD«°]¡« »Sžÿ¿Úr‹ÞòJ}ÂjuÂYm—³ßíŽ zÇ«ô!×$yÁÿp×F½ë&´¼kÍ ®I9oVàâÝR7*ã ²yAï=»ïŽ­wÜŠ–5»i;â„êC¢{QÏqð9£hˆƒa·ìC”{„žh£¶#ôØ1=’nà60æeSyF±qŽÐŽc¾ÒNyuå¥â]ÙFWé{¢6È9L#qÞk\‡iÚzŒÃ*Êä£arž·€ÕYÅò=B*P^å!w +t½rj^6àSÙã sœqøíBe@¸µ #Œ»T[*nE0™¦!¦<ˆºç\—gè8Åq…¸= ü+¨¿'®Gû½!nCm»ÕùÚ.^¯÷ˆK’ß°ÚnÃU㳋å}Ú ,e:À°ok|²¿J9¢Ä*T‡Ó}XO¡”çt‰}ÊB%²MyB}v\6êîĹ5= íÂ&ð¯Z¸ûѲp{S„[©…ËÖQneÊÇQl…Ï„€lñRߓ䆿›ÚÐË&‡vÌ——Ûø*<}ê “$W°»®¦u´Qìè‘=Î&Å\¬Å¼Xù†f7Ê~¸-Úk;ä–6*ô9LQÕeBÏ´áæ_tüŸ¨YòyÆÆåöƒdùþίtºÄþ:Ìè”-§ ]EèÕî¢È‡ ¯ºÚÓ6Ýãþ;YÑ^¢_ )w´Ñè„r‡9g1ˆ²Ž©{ê";^ÖšÈ?0i.#Ð2—l¾FŽÎrùM®Ó'[…“­ô½¸Oå'eä åìËz'!ìïÆéSó‘ hh¡«çM=ÕϧðÊ•¤˜¤-'(#yb‚,’BŽÖä!ŽE_w&¶x‹.Ó6j†íYu)þ2Wû ß ÄsdÝ:©m_Ä92ÖF ÔÖ6«Âa1_•ÄpYja¯mW2,£e½²ê_ñ´p$¤m6 fœá âr§.×0¢¥æ_õ‚ zA6® 9.lw®é…íZ.\mgúdÞíÌØ}††#ÐÜU‡%»:änJl“´¦ öu6Ø“PunFKÌIÝðr‡\†PÅd/È{Ïà˜]ânVø|SÁùºÉñjoBŽ!ýÊq‘–㢣zºEUzúr]—q€43м>ëy3.oP±kUÙËì¿ÕGÈ,m/{åTMÙ+O9ö÷Pœ`,T5Ys !dŸBܨ…¸ñhš/ÞƒoX¿ oÒ oê½pxòêæi}ºà_ ¥äAÛ}³½Y³½¹'Û bDÒL#õBƒ/²ëVgêDþ%Us¾A{C Ŧ(q¼k]No“uI3ìX—ØQçÁÃî]’Üzf8½Ûoñò ²Ûeòªy $ÝÇ‹8W¬ÁqsšwìP¥Ý^-õœèÐ^ë+êKv]âÞºNy;·]⾺¬Äeê”ûQåv“Wd ¯TW᤼£CÚ ß™wvÈ»º»w³Tn\¦•â6uø&5Ø\œòl8·Æ!2²ÀT'®—7%ߢNrYŽywñísîe9ëæ Må aÆÞë+Åkèhõ^Ž×»ãò>õrj£\‡RöJåà²d‚×’4+³¾Î&öKšœÅl®±X àÂgåy§éVÏø“ò~”{žóРȳòCª’E{R¾/.ˆË÷£ïñ¢-ÎFbd6š]ìÒøD…ODW3“PÌàAS¬^4“jÆa3î¤|0.B¹†¼Ã¥³Üê¤Y'‹fγŠí°u0Ãy®qy%‡©I…ðŠ€ê™š ù8èBOK:äÃȯ,ªwÜA0T9‹úe§qiÑŒ‹Ër&Òeç4ð)NÖœ¬]ÝA÷öÐîqEòUZ¡]dŽó*ʉÚSÂyZ?IÔƒÓƒqyðœÕù\§pak­Ñ7ä/޵èGêF&\êdpÌCÅýH2ÞñÆ{¢ã©sùœ s Û2Íg^Ü/KÚ§¨‡y‹ú0o¹cÞ¢ÞæUä¬À¤™Ò¬]ŽªëÑrh÷Q_y\>ÆÊKgè‹=”;‘ÿ¥•ëÑ¿µå°«WÓ‰¤6 ÒèôuŽ2§iz‘¯ô¤ü0û·²ü°”J:½tÜåë3³Ÿ£ ä?%Ù;Þ\¤ï­å+BÒ?„êŠpÔCéì9ünÄéœåS4ûB½|ˆµæá6U ”BY‡{.ü¨þ?Þ½øñÞ;×%¶J Î?›T²_¹nåXʳÃÄ7mÚAŸU6.ËÁ|.ÌGTÅ(h:•Óù*"rù¼F³öiÖãYgSøWž©œÊO«Ð¸÷„ü(«å‰„.¯J¦šrI'8¡pŒ–%/5c{ýD&{S "µA–&ün¦ò;¶`¦åì{‰åûtfÙý_yÉŸö’{ÈyÉÁH;‡§œà¿kÍîчkæòÖtÊ'«K¡¶“òvÚXê™Å GÒÓä)u"êS<„HZê™í̹@Ïá+3¼ yÚ™1¼Ô ¶O;Ó.TMò·(Na«µ’Fj1 Ÿ‹ŸF½ì¤ktæ11•cÙoÚèg:Véä”ÙêÞðÏsÎÇ?¡Ý›ÈŠ: V»ÔOÕmÔʦë{‘Ÿá ÇIñ„ìˆË£ÉÞÇãò¾BWV¦¼Éérv¢¾s’À$Ð>0ŒæT—¸§ÎsQ§üä)õ³Æ¶Nßž7úÐ;U˜q7„~ì ±žVÆå³Ü®ˆËãÜn‰ËÝY¢,º™nÇy^¥7é½îÛ'Ôm:A þñQˆ›Dˆž"ùÿPKçq×p^=PKö™H'7com/sun/net/ssl/internal/ssl/CipherBox$CipherNULL.classËJÃ@†ÿiZScµ^këm%Ò 5Æ•¢¶*ªEAŠ‹‡v4Δ$Uë3¹ÐUAÁð¡Ä“¤JWb`Îíûçäœùüzû€†2VÒÈ0hÅRa¶XªßØ÷¶éÚ²e6OÈÖn/ôb³R«…² Šš•RÝQw¦ß•¦äéû®)dÀ=i»QR6÷*ꑌì )‚}#®žž×ë ɪºæT;ztx'Jú ™š”Ü«º¶ïsJ“±Òh¨®çðcá’>×<´ý¶:óTùÂÚØ*[[›ÖÎöÃÚÿæa°þ'\V¿æŽ×ëq9ˆÖ¢·ò¹ÓõDÐ3OU£ë´Ü–¢´}÷»Cö–÷Nlú‡°Ý†x¢%tªÄQFò‡¡ÙÒŠß]GVÇ¤Ž™ t$ ä±h €EXdó?,ddG)›"ÏȧÖûXzŒŠ©ž Ÿ$ŸX~°é?Ø,C,l›Ð~ØÜ,‡¢! ;häÓï(\ö±ü) :áÀ tæ‰Ç}²ƒ>Ú4‹e ŒGvcÑ%íœFþPKtZ×·PKö™H',com/sun/net/ssl/internal/ssl/CipherBox.class•UmSU~. Üdh‹¥jð%E¤ K€¶Ôh² ºhm J±¶Ër¶Ýìfv7 þÿ‚ãGpdFǯþ(Çsw×бԆ¹ç9ï÷œsïMþúû·ß‘À4§ða #)\Háë¦#EÄ炃¶È•r J¤˜¯Ö éHùL—´0Ûõ[ߨ×’š»K{+µ}S´Ëu|ò×Gxšmø¾ q¼·ù* ·ã™bÕ’½\Þ®þž{×s§7‹3sÓŹÙâÍŇԙÑn g—a¢·±Ñ˜{sïNêZÿh±Ç¸çÇ<{¦˜0dþ¬!á¡­¸èl{ñ=m¡Ð›cXÈØ«/Ãäÿ:ÕÂK¯¹Nà¹6CÿnÄw…é´â„sƒMDûß§kÎpŽdÝñÃ1I’¯dS˜ë5¬oI1vòduÛMÃ.{ÍNK8A÷~3\8qº³ó”¢éºžþ3@# ¾0;ž¨ën£cî•í¦Kâ^빤矉ƒ5ƒš´ ;ª…“&âÒŽø&j‚ÞV—ï\‚æA/?p£m9&9®pÌs\å(pLp,pÌqä9Þçç¸ÆñÇÇÌBÉ` og0 .I&ƒR’œËà,áÓ4J¨+XÆš‚InKR–¤‚uIîHrW’ÏhRW•Öš$«XK^¡ Ë`ø„Ö›rC Ò¸Nš,I#„òK³_qïg4~ E& ‹].J§þÉ#ÜÍIF(ƒ!ÎH$³ŠþØ}(vïKü§*¾ÌFñ×É&ñ†Dªl‘Väû'iúý³ß‡¹V}Ò÷*-5Öý»nceë?ã6á&a™ðsBmë•­á¾#|‘=ÄÖpâ±}„/ÿˆ’_k¥bh½Ë´fŽQ¥)Gð+ÂUÂG§äLžäŒÛ»¶<¦eøˆ’©ûð.Þ"œÃ•]¢£y^J*Ð _KÊc.‘6KgYÂë„«„—‘ýPKþÚvzÐPKö™H'0com/sun/net/ssl/internal/ssl/ExportControl.class-ŽÍ1Eïço!V¯ 5V¬ýlI„±¨Ñ0“j¥íˆg³ðJÔÄ¸9ïÏó…2"4 ­©VÖqå¶\æ‚®un±H¥Úºû·½2:ÚÆƒQ†ñd| ô}e6WL Ǭ•,UNÅe!óÇMçÏÑ’ÐNíFýMŠ¡“ñ;g’«3[3‘¸ÕAÕu4~„j¾Ô—x+!,¶RÁ•/PKÒýÕªÆPKö™H'&com/sun/net/ssl/internal/ssl/MAC.classÍTÝsUÿ-I“mX0 -PÒh¬Û4mš"¥|4-H°¥h¡ZZÄ%]Ò”ínH6@ù¬ˆ ~<ð(3>øÄŒãCÓ¢0è³ÿ€¯ÎøOø$žswÓ– âød2÷w>î¹çžó»{ïÏüðtà /ËØ$ã ¯ÊØ(c¿Ú––Ш¶ Nkgµ„¡™ÙÄðÉi=cï¬uØ…œ™Ý)ÖŒJðªmã))¶|j*-ìz55žJ;ºOM§ÄlR}6›º¨gJ…œ=›Ò‹E-«ä²z‘7oú«5”k“:žjÌX3‰bÉL˜º(Dδõ‚©Âêë§uH üª(ˆ4yWÆÈ™9{7•¶ËU$î¡ßšÔ%¬ê·Ì¢­™ö¨f”Èì;ŸÑóv޼Ô×Êz"—×&«º%t‰è“Jˆ<§-1t“ØØJ¥ž É%µ› 9ttpBFôQý„G+zÉ÷a߉$>6JÊÉ£wÚKò—ØJ±p³±– .Ä"\ #Âñ½#D-46ÓÈǤ .Å<\¾ Ip–ÌÈm4³ëJìÌ ®’°*˜»ƒÖ˜×ñæqî' 9sŪ1 D+žM”w‚ÏüËDœè!ÇBžœÿQ¾†—Ú>D# ¿ËkI‰d]ì;\þV6 «ÝénÔÑØÄÓ·á¿»Lê•/±*ŽGš¼ ø \Õ®•Åúßg½Ô@«}$9ý¥y|È‚ÆÕy\wÕÁÞ‹7nÍã£E»«ÆVkìh½¾ÆÖØòÓ¶cŒ‘Ð*¸ÁîðÒô…%õ¢«6yƒò…[‹FUãžçñ±ÓØ';j:œs;l®sŠ©ÒÓùz™œ{ÝÛçí܇bcÍCÁoakÈ[IåP]9ä«Þ&bâPKeáë¯ø' PKö™H'-com/sun/net/ssl/internal/ssl/CipherSpec.class•V xÇþÉÒJ¬)Y0`Óà²ÁG!Å¡ñ¡Ô.6P˱cÓT]ËkYf½+tœÞ-½“ô>H›¤ôÀ)І#–Ó8¡ôL›Þw›£GÚ4I[Úô¾Cß›]Ù²,ƒkóϼ÷þyïÍÌ›Y=üÜý§áÂI’Ñ!£]F›ŒV/–ñ"]2®—ñ»dì±SF§Œ°Œí2Zd„d4ȸFÆ dl•±MÆ•2®“ñR2n”±[$¸ëÛ$ëÛ£ÖHM*cÖ˜zº&•2jâfZOšš!„æxbHO6Yû·JXs!rGc3Ñ–mXÛ§Õš«ÙÙ?¬GÓ³Ôát2nƶŠ<º%¸ëw7I(£®©,ÐVÔ§›ô4ÛhkjâAI M(ªm}ÿǪ³ÏN¶)38¨'E6EèÝsèû Ü;kš¯û½Ð}NOî×v7Íë`6ñ‚Ôü}Y(rœŠÜ5âf<½M‚¯!nzL3hìip”¥»ÙÐ%”6[f*­™énÍÈìmi EZÂagÔn¤y-­¶ŠBC¶ˆfZ¦hTO¤ãä…üRÉæŸå|v¥Ü^bJf’ñôhM˜z§fX#\b;®oo§2i¹Ãáöˆ„˹sÖ ݰkggW¤§­‹ oª475G­D_Ï„+ˆ µ„¦9å³8L™2;¡Äfœ/Tå\¼ÎæM"v´\9•M:>yœùÌ6s€ºú-v„Ul¦­š3…ŠaŽðËgØg„.›aâc±]Ñq5#Íâ&1˶2ɨ~]Ü b•èz-à‡iÙî-5díJZºë6Öo¨«¯­»zË–}¯$*¯³TÕvRkä_úˆn¦éòhFÌ.Xbј*’‰„n½ŸZT¢¨ „3ñ´é¯+TÔÓ%‹fºC‹Rí&uò»å*g½n«2%m×G鑌–I‹[;¿{$aÝ<ˆá„N™ÏË íOXÉ4½é¤eH¸ôB—“VÏ»@©út{ÇimKtSë7ôæé= —Á£ïÍh?ƒÔb´G1=G¡3'E8“à 'KCÔâ&ž ÙÎiK㩈.fÙ‡)ôôQO½J>ú3TvMPïéf>?;¬p&:ÔhÄ,‡Fòâ\2÷;•‹˜IÇšnJÁ"ÇÒ*Â=úh8~3忌F´ èe G´œ¢ÑQHÔË#ZT‹Œ Ðõð‰¡™1Œœ:5D¥+Q>S¿)W±ÊÔX”I)‹Ti9³ß‘í¢&A xRx_2GòÙ¢}Úµµ½Ôxt4¥©Ü1v&x$‡Š„wJ¬WI‘×éá'qêB,Ì â>Èi+wHþLJŸú>Ù‚óò`™öEF´aÞ_ÅM+éÅë½0¼xµ¯òâ ^¼Æ‹>/öxñ:/L/^ëň‚͸LÁѬà Ö)øÃÇq•‚O0¼= Þ„kè,2lÆzT+ø0V)Ø‹µ †±ZÁЧ … ’<º õ ^ŽFqÜ `ˆá]¨S ¡IAŒÅ»îd¸ƒáVÙ}€¡FA?6*x#ÇèG•‚ ÒÃ8éÃNùq7Núit/Ã8ë²  ÷1|†á~†I?Žà†N3|–œaëçü8ŠÏóè ~| _äÑ—¾Ìð÷à+<ú*Ãà _cø:Ã7xÆ7™ò-?ŽãÛ ßaÝwyô=†ï»@?kÀ°€ÁÅàf(að0x±šÞM¿€O @HgÀù¨_Cè!éjv’üÑùc3d‰ONÌ{®Òÿ‹ähžÌóòä“låÉÿ!9‘'ÿ—ätžüÉ™<ùÉû§eñ{žŠGä1ZÇ+ ò8P`sý-yÞRç{ ò|_Ažï/È‹ Sì/Õ¦èïrú!§¿Sô+ð¶‚¼ÞZ×Ûgä%qq‹ù1ÇÏ¢÷ñårRô>¾rBÖs})Y6á2’·t1ùä¿…“8Ü;œÂO…Ä×Ö!m%­ë‚øQÐ3ŽG‚îq<ÊðXÐ5ŽÇƒ®,~Ìð“1¸{Ny*q9>)íÃÇÑ¥T oiÉr{•+x/~ÚUå¦îg]UÇEXn¢y6û0ÜôÜ~O>„['q¤×ã™ÀÏ·U)‹_Õ]ÝKzzÊ}ý T– \$ðyŒY<ѰòAípmÃEÕÁŠ,~yGÃ\RÅÊCçž­>…')Ÿ,~uÇŽ;[u3jœ7Òúø®Uº®C­ì©òúª,~}%îcHå¬:}èÜÓ®cÎÜwàù4‡ç–ÓLÞæÅÄy†Úo¨ý6‹§í(/ä MöOS{'í¤=g¹s4 qÏRû}¿›Í÷œ1þ@íÙ¢1Þ3gŒ?Ao»³+œS. ®$öc÷áOãx&WU·ã ‡¦‰iž`Õ8žÊÙéëà„] °—'qO/»z„Ú£øó8Ξ˜ŸÞnÇñ„ÿ(Ñ?"ˆtí?/µZj›©5Pk¥Æ·©‹Új}êâö1Ôª®QUÂUêÂåêRBU-#TÔe„õâöIïU—Oà/tÐå„ÊÛ›ÅßBVWŒ¡D½„LêJÛN†¿«åöø,³øG®ºÅ%ïýPKóûJÎPKö™H'3com/sun/net/ssl/internal/ssl/ServerHandshaker.class­9 `TåÑ3o_ò^6–p„X.Y6YBÂ!$\9@I,jXv_’›Ý¸»á°‡=hkmk«=I+D´l«´ %»"­`hm­Wía­¶µön­ÖÚÃVÿ™÷Þnv“ Iä÷;gæ›™o®ïåÑ7z,àT>)Ã;eø¬ Ÿ‘áÓ2æÈð­2Ëp¯ _–á>¾$c È8K†e8$ƒS†›d8(Ã2üEÆé2DdxŸ aöËp@†÷Êð)þ(ûeè–ᤌE2¼GƉÓæÍ³×z¼ªÏVCûÕuá° TÚÒfæ ÌØ½ c®îéòìñ«BØÊûZ ƒ¦Ç‚½­G˜íXÐà v•…{e5RûË®]ºhÅ&õP£'àéPCUs‡Úê GÀJ2€iˆ xüú¤VëîTCînÕKÐå#Aoð|áNÏ>µ‘$¡#gÙH8nwƒÛ»6Hë#õ]Ý~BtŽˆh`Õû¸€€÷zö{Êüž@GÙæ={UodȲ;"mÒòÔÄr—'ÒYV£uÔ]C!…‰­°êí i‘Ce¤ÖfÆ{Ó‡ì5‡´ýžˆJ ´]4t»g_ó»tw;ôv'‚èX°‹®s>uƒ0¼j(¢ßS- ´vÍKÔ Ù‘€<8"¨è¨áƒ²5=YAýˆ÷PèTOW#»)Aóbë´5©Åfªæwé,Õ^Õ]5m(7Ô­dƒÁ®ª1 [?ü½šJ¬ç~²£f¨P¼ÑêÌËÀÕ_‰¨|sEŽú¡F\ÓÓÞ®Û«Ý1˜÷4-Ü×ïdBk£võ¡Rêò¯‰‚_S‘:­½]S7¨~—'`è¡J·÷²Ðë6¾ÖôvÒ¹ªÎzã˜0†¿Ä„ÑT@opüš›â[aã®ë®€Æ5¤µ6µzÌdtå²Zƒ:µWBÀ0­ª±’X¯´0e8а›Cj£'L d‘!5bØÀ¢2D¡ò‘Q6÷DÒqFqL"}p¶a”ëGôîSü4"lj2ÛÉô§: ûÔ‚l™TnKC“×e|~R&ðƒÈ$¢Óðd– >8ù]£Ô'd´…£@KË‹“2!ìfÄX‘i}”‰rmÜÁ¨¬}¯ÖíñgP‘˜æÈ\$BXÆÍaPHÊ-Žÿ— j^³á·3Óó헅ЃùÆÁ º·{¼j¸l«»zØ–r· >þŸ‰‰Ž‰n'{,ñ9&ä,e„h‡cTW=PâhÁè@uÅä”Ú#‡ºUû*ª»q!BöJŠz‘Õ«ýABîì²wiÄ{ £”@Šª©–?Ôì ÛImTØGìážîî`(¢úˆ͸OßÛ§bŒ‚Ä<²×¹Ý‰å<#¶Q+í´2ÏÙôd0Y#ÍÙÕƒZ8ÂÏó¹@ö`Âù4Ÿ~¾þ°Píž±6èS©ü¬sW#X)cªÝÚ“;'ƒ¼½Ë0>º±G xUû~-è÷0\©=!ý*¡'ÈŒz¿_íðø—Îa])ÓêÞ`(D&« JÆbO¤i„üzÓìj( 1|éXò<½nFW÷ô°+/ez«˜Á˜Lw”(›“é†Q—Ç1’ÓV•ÂOטRÇhàÓiU¦§1r¢Ñ?², ÜNʘƨ8îI5írÉaúåâ=‘F£È9 —´{NÊÏhËV6øù$´ÝåJ1SŸ¼^÷ŸêñGìíP!ȶº ëÚÈ/Û’Ó6¹8MežEZÝÁžW]¯ùÉ ‘"ŒÀéaò®:O¸3Ø ºv”/¬p•W,*_±üzr˜Áá'=Г«2Á¡‡’§»[ ppÙCÑjiP‘Nš{¦x=~o¹­Jf ¤Û# ‘§Kîó\ +N9fÛêùàÄkÁ`XuëN^í×<„åð±f~»Y ÎOÆ _P óŽýz•Koi”EáØ”º73uO·ZØÞH‰œy&Dâ„ÙæJ˜‚ ÒåŸ>ƒ ¢X* ÒÒ ˆ²Š× $3.ÿÁ„æHKÈŠFùzBXöö^IÎÑGAVLj1ÂûØ" …›1½èMx%**ØÞ6úVÎRá½k¯ð9FçÛ~H!ÔŒ —‚‰áNiWyyƒö†P96Dç¤âjdžÌ/ïcTžAÁTÞª·[§»uÙ“õHNœÄ w_0ê¤N9w,a*ÆPŒD|Ðë—žåcÿÚ: ŽRjŒ‘ÂTZ…1R@1¯4EïW®¡šÖK Ž’ ³|F´Ëñéù´)x€Ö¹ÒTü}½I=àNTÂÙdý?§Cõ §š¥å5ž°›˜7}=þÁv"ÝNCέDÞÚ¡Ì1å§ãQ¬&Wlj¤ÚË¥µê«‡{ÔPX‹Tw„TÕ—¸ý‰´’„j¼5žWS“/S3"M²Ì¡ìF‹õ*Æ©<7(mÒ¼ûhŠ$#2q9h’g MšU54ôt‰wHzÁ¬ÐHGýøž›¹JIŽ­dq…0ëò…–þ¶±ò£Jóøµ›!Kão>T1$î:ñ2õäžEŠÔ†:ô¬ÌÁOÔ›‰÷‰‰z´~sòa“²šR¥ÒÃaàE]Ë•AS0âN”Cu°”ÕüÁ_ ¨àËüu%ö±Û•Ft[g(x€-“ƒ™ªfRaz5XØOªò7ÁϤŒßj¨Ø¹ü7z²^¦%Lßm º{¼É§oÊùöA¥»ÖðD¨zO™‘¡¨M±¾!‡ ªïSLoÞ¨ôÚ0þL’ŒRØq ÙdwØЫR-Íf #AoП43ÓßdÒä›Lû6ÕL–mÉ· YC—çÐ*­ÓÞÒå[J2°Ù§| Ûµ¨]|f^ ÇïO+y-Aö젞ȗ»ÙâýSºCAÒP8 ãVÈü³b2$"…†*ª}µ:—©•lžùÀ(Â¥o äáåäȤ3—ð„CQ¸EãçH–þÑ€÷‡’¹ &œg^J½ÏAì = ¼áô/©ï‚ć4p²èž@Ä öÔ‡…© i[—g/[>´²/‘b°@üM‡ÜÐKï@“½Hö“ˆU‚oJð¨ÿ“à;Ü/Á[¢ÿ’ˆ&¼&ÁC|O‚SüM‚3Ä%x@‚ïJðºg%̒࿼*Á›ü[‚¯KÐ/Á% þ!Á+œ—P”à[<&Á÷%$ˆIðO –àœJpA‚G$¸(¡E‚Ó|M‚oKð†ÿ‘àï|C\«@Qà(7ÇÁ¥@ö(ð[¸AçÀ£Àïa¹¿†¥ Ü¥ ¼—5ó 'Ã- <gÜ;œ»ø"lTHĵ <½ ¼^Ál¸YÀ­ ¼Ì G¡•ɯdÜ… ü¼Ö¥Àá°‚¹ð1 àà ¼«ø*,fòU r‚3¡GA¾ à$nì *ð8¬`¬d&˸…lSàìTp,QpO3W†ðî ÞÝÀÍuŒ±†×Ú™@)³V¡ÀS°‹7ôÃ÷qS¦À/ŒéV>m‰¿aàlâµ-Œ[¢àlØ¡ÀÝàWàW bÙBÐÉM#7M <Ë⇠¨À™£$á’l3¸Qàƒ æÁ‡˜Ý*ðjp|BÁBž>QàI¾²gí¸y¡[ø ¼ŸI‘€Ïó•ý¼ ü :ø Ÿ?‚Ûxš›àzþõ ü–)ð;¾ä—àj†ÛÎlla*›yZÇ£mÜ4(pKtšy£šGn§òÕ† –›m´FüõZq¶äà\¼–›V+^…;sq>îâæ:n®·¢oÈÅØfE'î¶œ‡›=9„ëåÆÇ¸*7íV,ÅÞídÊZºp¯â¾,C?wY±V¬À 7Ý|乸CV\‚a‰äàRìáÑ~+.c¸%xÀŠWã V\Žyzˆ7nb¢ï`¸wró.+®dà•øn+®Â›™÷0ð{ùŒ÷Yq5¾ßŠkð07àæƒV\‹Ê!Œ[˜À‡­Ä.¨Æ[y÷#Ü|ÔŠ5Œ±?fÅZnêð6+®Ã3åOðèv+®guxŸñIÞø”•Xû4sðÆý,7Ÿã#¼ÖË£ÏóAtÚ5øÖÕVÜ€GY%Çr±„•]}V܈wqsœá‚¬¦»­¸ ïá†p˜Ó5âYÙ'¸‰æå¬œ/ñ(ʲ}9›ð^Þ½§'y÷+<ú*ƒÜÇ÷óôžîåæ~nNñ­žæækÜœÉ!ñû­ØÌG6cÌŠ[0nÅ­Ì¡æ7Qnná[¹y›³9Ô<ÄÍ9+ºñëÜ|ƒ›‡­¸ ÏssÁŠ;Ã…°†¾ÉŠÐGßbòßæÑwøH}í"+움>ý.ßù÷xô(‹ð}žþ€›Çî‡|¿C9mÏ xŽFi„Sõž¢¢ÞSˆÔû'ÌžÏuæKæBVb![_0© èMjÛIíYÔ×[–‰–ÕQ˜SjY\r_,^Ü¥¢1wÓ,; y‡-B1¯<|×[σãç$‚Œá¯—‰“Ä#¶˜w¿“°PßdY……NF›®ÓNt ëL&NÆÊÇÞmY•éà¿1žÂV÷jS Í^wQóOžÿý.§ñ¿RÆúZ ÿA:[ß2œUÁ`z›Ð—Ñ­¯£; SZt~KlVâ7 r ™UËôqsu1D˜ ÐŒ+` Ü 7“çqVêýX5DL·!&¶÷‰›2 ùo óóz/¸J†“í´ &¹ÿ‰wÓ°6% pK‹Az–Ž êš+“+NÛM#¡oš¢.©‡mœaÏõ’5ŸÈkÞpZâø_õG Ê07…·tÁ›lãuÁדÜçpM«-/.€ `Lb¹³S‡œkBNO@æ†.XÏ—f÷ ì™Bi¿PÆ[â=[*ö ‹¢Ôó ¥g„Eýø:댎+ãˈ ¹4,?#T ¬(Lhq¿°„N¯k=-, ãú…e¥±¬_¸š6—Ç„ñGà«à"Ì£îÉ^˜Áë†RòbB~/Œ;‡ë[mã„óNìÇ—Í+0ÐI„‰M®‹ÐGBÄ„I•¢ÓE7ÕÏ©b¼ÓYR(Æ…ÉÉ•"#ÆØ+äJ § ç(ÐÛ-N¡«¶AWm/äš×¶2qmC/ØnÈP`Èå—/Áb|Ebs’¾y—´:Y1aŠÑM …ŒQ¦•‡°\ýB¥9ËëªÌaQ¿°Rçt¡iW•êF´¯ÉIF ’¼²úËcB±!îbgÂ-„Q˜Ùļé¨S•t:“LD· bV$O8e„æcÀ>ôÂ%S˜©¼+Zy1.Ø›ÒMÓeÄ[—y²eµ+‹”gÂLð^Ž¥[ôüÆ¥€ÓüùÍ_CâÇД¢ùôç/`ÉYaÖ@žv0½9ÜÌHŠQhhॄ‰O8_|#‰3qñÐ3yM_¿`þH•tš!i=I*èLP¿„ :.Ì&Û£ÑjÊðQxµ2+ÉCñP˜e\£§lM~«xÐÖ9Üȇ®‰ s*Å(Üž˜'˜8#¬e>¨‹ s"8:fŒž»ËhU¿ð‰æ…犺Î+Œ|n™\Ï W!ð9›Z ³˜N\˜_)f$áH’8‡ Ñ çL9Š»’S Ó«¢–Þ›…uB³àÆy–NK¯åN¬ÔûÍùÓXeyS,í´Î}•9ßA‰ppâk0ó»‹z®¼feŠÀÕ|)%1¡&&Ô>,²AÀED’Él3ɬ7 ¸ÊLdê(¾­ãXÚãi¸žCê16šVÛLÕ´xMfúšYÒm¤üÌôWQT¥P³…ô·¡Ÿ-FXCÑx‚bB}fé[§…M§…†¸°1@`€Sf×{Mº;Ìj¼‰²u‚ärA¯¶áƒB#׼ńš ذ¹2ËÉFÔLõu?ù ·ô «Å“-T†"Q^kp»îˆ¿„Eæ´ÎŽ)ŸÃÄöÖÌò÷(¬6µ·Á”Έ€³Lí&BŸL´È°O zÉô7k`™•˜VÄÕÐo<¬3«›Ã1ö’6vÝ˸ÏÏ?®¢ü¼c0?Ir¶î ÂnΨs(\¦/ºÏ`»‚š,3Ô,¡_®~ûy´ÄšÌ§ß^]jÀ©t.öì¬¸àŽ Û¢(±÷$j«m.×(F°e˜íqaG^L†ÑÝÂhãàáomMdjº+&5#I\h‰ ×6E¡œ@šÍ#èv6éQÕyÞ ÿ·ž§¬+좧• ®I¢eÛa'‰.ªÙ_‹Â5Dj™I꺸p}–ÒÊÊäùÆÎ q¡- EÉ3®J¿)ýŽÃx]ù²“Rßî|Àú“õ÷7dýµñ?3 %ãòôƒ‡+L}fVŒ žÆ(œ ’m~gá„̵t(®5øÇp€i„‹ø™§¨t£ˆåŽ*:ïÀnŽ3¿@WŠÀAõ$Âçt§þüÿPKÂýæÚ"4PKö™H'-com/sun/net/ssl/internal/ssl/Handshaker.class¥W xÕžçÝÕ®äu¢ˆˆDÄ'\ŽlÙqHÜà!&±¢*¯å¥XÖºZ)±Ã™à@ËÙ”£M€r0Gh ÄJÊÑ‹–¶Ðû¢½ïR mi éÌîJZÉÂrZûÛ™÷æýófÞ¼yóž^|çéOöˆ?• ,A¿Ÿ—à ~ ÁF ¾$A—ë$– O‚n vI°^‚Ý\$ÁˆJ°]U‚—$xB]‚¤C¤$Ø)AB‚÷I‘`‡Q bh H—`W3¿Å  kæ¯ kƒ z*ÞW“ ºkˆÆ“j"®ÄŒÎj%Þ§G”µSÕu¥_]Ê ¡”N0¸6ˆè¨ïŠ¡Æ,ÔØ¡ìT¢ZCG|(• &ª2ˆ#33#1%ÞßÐÝ»C '—Îm4èV|Íüm-ÄZH&Ô´´ÔÜ b£´;Zx@MÞl3íéj8•ˆ&G¬uµEûU=YbÔr ƒ8_Óav;:(È·šÞ^8ÿBKkN,¬g¬ŠÆ£zDí3lJh1\¯†µ„‰¯/ïN%óK(`ÈLk£HçÒÒ:¶0—Ķj(6Á[iþÙ5ÙY—@´Í´¿fb’t;²ÄÆI¢ñþ¥%¶MíMõ/5ÂRDu²Œ`à-¦³ñ]ä˜ ç‘o?yÞQzm3²ÝAœŽÃldã5a¯ª²£v3ÛZèŸÆÏ«ùÁÌúúúê¸Vݱ±z»–¨G‡"j‚´,ÃLN®@W—Y †îzZ»»ºÚ[7ttwU¯ißrA{W3îxk,ªÆ“Õ+[«w¡µ:¨†j‡*¬¡.-V±ï¶ú&¬c#Šfä‰Ô”ñ­ZŸÊÀÕ>V‡’X€t4§SB7{c˜ Jdq«±mƒ~ÆÔ²fÁzG<[ö§¨Òm+•ó&×Á "(pBçn*øüJ^w"5+øÚ>:"E6&E±ÒïÀ…ÄÔ8êv¶-f0­SÑÑ@.3f¬K¨…²éÁö`0/µ¸àê• ÎDBm«ÛCmÁ`¨}óºîõB›:6¬µµ-µ¶´† Ü\;ΜƒˆP{[{S9Cì°e*¤Äµød¦æ½n}ë¢Eϵƒ&÷džÉógâ0h\¸Ä´p* ¯®|Wª2€w1?;o<Ï´7o¨ëâµkÍ)‹È‹L•çfñ!KKMìÄ$(V<¬¡lñ°úöâ‘'2‹‡+¨¥auU4†%„a©.£B{ò¶6EhëZ`ccýÂ@ãÂç.¹CXªf3…S‰õ·ZµÑmô–„‰„2Ö†F¨½S‰Æ”^²9+¬Ä©˜’TñÆñ8à¹[£Ž` «ÈŽ˜ýò°ÇÁ“ƒz3°w±®šv‚)\ž›p®êm,,Ĩ„ ê'™‰Å“JØŒ$™Áþ&ïÀ’/g{kl †Xª4|T á˜G»É«kDI(a´ÇÃX©1(gM­O ˆ Âàì)ƒCjÏbéòŽoIAíÃCZ"I55¡Åð!vb7A©p¾4ýo¯J|´Ÿà…S*ŽY ÜÃÚÉ‘êp[jp(»ãÕ¥®1ó§üš-eë‡íÇжë®ÔÞç]vøöã¡ÅS> }fî8úŒZ€§Ülti»€ÛèVãtä»Ô]–=<]ª –Ôöí%a{,¥GÓLëGöU”=©`}cpöÖDÃØO$³™âBivrg$³]èTDу2-Šña˜ å4z°mĺ£%‚ÑÝ¢dU¢z›qºQ½ÝðÑ|TïÆ©+¢zH5NYĪ2w}ËHR]I…Îþ:Eo³?»³¯4›ÔöBÀXî}ÐJå¥KKSCdKí› lÀlÒi9i§’ÄPºmâ|@ 9“Tp,9ù£]Z0ެŒõkØ ÚLBÀál–`bØçMÄ»$©…µ˜ Tõ·èÄÍ ›Ž}ôZMD•˜¹"JÌÖÉØÂ›Õ?¤düÁmÂ~z:92é€Û4¨$ðÙ[1h¾™t«´Ÿ4¨ŒôªA5™wkpƒ}xë–šqØ02dÈ¢ôÓŒDÐŒ½Do†hŸbæ¡„F|6ñ2‚PÂJ+!¡êdr:òå[6-^e3u5Þ×j¬Å^›ÝzÁ6õŒ^…žñÛtÑ}£pð˜ãÄ¢Cè3ÆRëÑKsPT(}lÑ’e}gÂvå¹°›½ñÊ3㣡ì}çH õúâÎР²CK˜­hœZ‚áµ·‹p§·‰pP„‹p÷‰ðYîáC"|F„O‰ðiá.ža¿áiîáY>'Âó"|D„[ExN„ŠðIˆp‡ Ãù2<›eX ®†6jC­A­ Ãå2Üï•á{Ôú!\*ÃWá*^!ò;è”á÷D¾ [e8[dø\"Ã/àbz¡F†/yŠÈã°R†ßÂ"í2< 2|šd¸ΓỦ«exÀG¡U†oA‹ À2ì…m2ìM2#7~!_!Ã-Ôº‘Z¿$r3‘_¹‰È¯ˆ|z¼ŠÚÝGäƒP'ÃÇa>ÉVÈðX&ãäÁ×ÈxšŒ_ï‘áG°X†9 õ2|€–z=‘/ÒŸ„f^¤ÑÇàlÆHw”È·aÍŒѤ?%Ø…dh1 ,%‚/ƒâ‚?2§^e.ü‰•»°%»à5Vá‚שû›æ‚?³éq™AÄCä$"3‰x¨{2‘YÔMÄGä"s\ðWVé‚¿±*"§ºàMv‘j"s‰ÌsÁßÙé.ø;ƒºgºàŸì,ŸMþÕ¸à-òå_l¾ þÍüd¨–H‘Ù¨wÂXµ¬‘ÈB"çYDd1‘&'Úx­r‰ ÞaçR«™L.¥Ö2+cˉ¬ œG­ó).+i´…Z­DÚ\Œcí4ß*"YMë €]Hd ‘µD:‰œIt¤›È:"¹˜ÀÖ»˜ƒ)Ĉ\ìb"[îÄÖF~.¼ Æ$¨F‡9f¿Á_±8&½ÁñSßàx ŽjðßXÁñ<üaƒûè"÷€Ö@åAìy‘ÓŸÓÃŽ±MO±Í‡.ÃdZeä&€G¾Ç”mñóã,ä¯g=~nœ)~6Îzý~OYÕQ¶uœ…±É™Í>ÿ3ðÚÿ¦â·½I¿¾£lÛ8ëDZ׷e—Œ³ #™Á4»´6ÍÞûxÃ&ñ׳¨¿lœí0]Û€þ?‡ƒ{¸JšÇQ‰í½FÛ_EÃטlÔç*)Þ×pU{FDF¾—?-~/OÐ}¿–âu¶ª‡t÷q^ÞRFÆeך²1¨ ”ØGÄP<Àv›1ýµ¹;W˜kÉ#ö å‚gymÆ)çoVw´oŸ'³ÔŒnnm¯å&(b3«Y`\ÄHœ]ùþÌ Ñ|s9ùì,¼5…¯œvÍWŽ #ŒL¾yÙÀȸòxæh±Ì#+è«°û[áås=É6¿¯z¤cl×øÕ3ð¸áæò'Ùugšw!÷•[Ó¢ Ív“¸<#¾2O,âÚœ "ƒÛ““MËÈöædÓ3²kr2wF6jÊh/@= ÍÈ íËÁ=Ùµ¦l <$> Åc nî00n÷gîoðvA‘¸6S$ 9‡|¦¿ö({'N×[—fð#¹¾°¸”Ñ…néý¬?1êB—Yx÷‚g¥N#Ê‹¬(×e¢,’s3­({Éw±6ã¸á­y&vsM x… (×x$\“ƒj 5F0kŒƒy^j oTÞ–…|.;4 9¨Â(=ëÜn¯¡ê¢ Ì+8î;~ûÌ®õœœŸKu˜JuOຫ¡£•AžÑC; Þ­(¥È´Y‘Q1žò‹j)0hó†Müsðf3ïã¹@ÐÇ?±©ò ø»ˆ'( 9ŠI…Ì(š`6þ/pßTز$Œ®ªO€ßºÍf §ûŒÎ]ï´¡¨p5,°)`ê-…9¸R˜Ž ;Ü3ï1®ž?d]‚_Æ{Ò\(¥BòfÞ üašÝ¸ÖØ}g–±û.s‹o¢»®?Ín6Ù-~Ü–N¸½ÞÆï+ÐhºÁéFLL.äŸ3ÎîðW޳Ï9È­¯|ekÀü›ƒßøÑ›à1ü^FËñ;ÏÄd>¦ãwO¾,oü%üÞÂ]<;_^†oвðû,~¯£¬Š;ä÷ÌN³ýAÀ&Ï¥Ù‡¬æ8»‚ÈGü(»Õ wXß°‚…=%ƒ=Æn7Ÿ¯#oŸÎ›.k'O§òt2¾U[Gë°cO+Ú±§e±nGÁbÝBKvtµ ]0µ‰Îócn)tž'ó&DÅ-z$NˆåéE´ mMÔ:#çYqy«>Ó†.:wÞªÏ*…¶­š;´‰;„ÇÍÅ]Â]Âx£2à(«28ðp¿mÜßfëÈßG’Þ½×Óñ1ØEMœô ñ4»s¹ÉïZaò»«î‡r³ùÑÃXøª¬¶¿sêC·ª'ÍîÅL*š(;”f÷Uò÷âÝdé`_šÝ¿Ùšûîãûr%$çï÷á\Ëßa,˜äo_¦ða=GØÃ]Ï=ÄìKÜ=ó(ûXgnÅÀ«ïAâiöP±b6VPÌÏ#ðü§ñ¶Åb» z&µŸgk«Ï*ÆT2ï*¨¬—É•ÿPK”RD¦b"PKö™H'/com/sun/net/ssl/internal/ssl/CipherRC4_40.classR[KA=c7Æ­ñVãµµ$±®k$-•‚FÁJ1 ´Rʰ›±“ÙK½ü“ö7ô!íC… úÖ‡þ¨â·ë¢}ta¿3ßž3sÎ~»ÿý¾BžQbÈUkÛ £ÕÚÎÿÂ]ŵﶢ@jÿuJî3ªë .ÒjÇ37Œµ«E䆡r¥ŽD ¹J›¦¹aÖÍŒú[<ºPK,U–ô®‚PKö™H',com/sun/net/ssl/internal/ssl/CipherRC4.classUÝWUÿ- l²]%¤€`IM¡Å@R(*å£jƒ ßòQĺ„K²í²›n6…Ôú­OõÑ^úUCœoõÿ(s7¢E çì;3¿™ùÝ™{Oþúû}8Æ.\qá’ w\xÇ¿ ­ޏ€ú@GâòX‰hŠžŽÌX¦ª§l眽Þp)3’_[c&!k u€ƒ»%jDâz6oŽ)ëGƉ¼ulå ×+ÿ¯xtž`?™P¢ÕqN°JØêÀÒ/,’ŒÇyWÊ;²IöŽ>nî"… ‰”±ÉåõˆÎ¬H.§ETÝb¦®h¶U³fŽ›”Ù5˜ÒT]µnQŸËgÔXe”xt3Ų–jè9²3%îWO/c+y>£†£ÖNÒa;+ mRSxÀ¦åWÖ(ÎN/NÎÆ'Æûý~éþ!?9F­°5ÃdþÑñ`Žéh/õƒÖûÝ=}D{ÆÈ›)vGÕè M¥q)¦ä2Ƥi„纻zÂÝ=×»oö-““T¥ÐR£d³L_%Ë õ:¥è1C@øôfSI‘aTOQ·Líçëùù€ö™ZÏn²€à© »l3–_Ï‘¬^-E‰«,e²–™Ù¾Òk!©%‡”fV’årJšúX“Qr6'A¥K æ&t-‡Ã)XlØ4•BÅ«pñè­M]¤ kÅ8´Ú÷¾ÛzlkK+Ú°™Î¯3ݪ5žüîx*…œÅþ]f6cÊ ¿#í¶5ÇRySµ ‘qc&ŸÊ kiƒÔÌzE©Ú‡¬T¨»ª¢Í¨O(T$Ki'hÔJmTÌÙaä©îìá-&x–Z£T.Ë(±ñ®ˆ°ˆ!ƒ">Ñ%""bHD¿ˆ>A·DÜñ¾ˆÛ"¢2Úá‘щ«2šà–ѽpqõM VFdÜ嶸­ õ2zðm‘q>£¸ÌÕ:¾Ôó,2ßy%ÄqÏ1,IHàS I¾Ä±,aŸqõ¾„ |.a’;¦¸:…/+¦‘’0ƒU ³`<Ëš›²¤Ýø óPùò€ç{(aÇŽñ,cÐp…Ö€*¸ùáh'p¶$%²¼EŸ€fÒ®‚ÿ꼂·ê%Öç¿Bß‚s~‡€ŒZ|l7…Ô‘ä¾êÎ];v´€n\,»B ªIn÷[V}¿àÂ’‹»Ètþ†§Á_°¥ˆGó[ðö;¹§ÙY„¹‹ÜÁ |ù Q¯ã%¬gØÃ$åû/ðÕ¦½Î]<ö±QÄf…fŠY¤l»xBˆ"¾Ø‚HI¾çt |ðï!èx„9›à³ žÁ ú| Î8¦Mð2Í|šˆÍ!…5»Án¼G“)ôØí¨²þ¼Ü_ºKǽËpÒ¿<0\šØ×ÉPÐÜ/â›ÎòÇSÎ!TÄ·[ð%÷°°²‹wäTBe&;öèÛ(õ¢-oØDÞæ…©à}ÃË”jË3wx<‡ŒFNsÆÐX¦{›¤“d/ægT Û¡Wð„öŸ·=øçñ~c$¿‹ø!¼mg«dDð¿E½5Ûå¢mö}¿öPKÊ„+ž PKö™H'9com/sun/net/ssl/internal/ssl/CipherBox$CipherDES_40.class•RmOÓP~.cëV§„©¨àqo]7äƒcÂ6L– 1YBB!¥Þl•î^Òvþ&?`b\"‰?Àe<·môΦ=/}žóœsOîÏ_ß õ4² ‰b©Ã0_,í|°N-ÓµDÏìž#z›!¸Ë`wl90ý¡0LßwMGÜ–&MWÚÇ-ç¤Ï½MÅO÷›Ê×ÈSt}qT×”gÔN‹ ¨4õÒNðŠ!áííîáFaº%ßs† åõÃV³Å oŸÙü$p¤ð‰Þ‚{-×ò}N©ñÞGöÕÙI«+‡žÍ_;.5Éï·-¿/ßyÒØmÔÖÆz½ñâùmÅ>²*ÿ!Ͱ6Ùhi“W·ìÏÿl‚?yýÑ5úEYÁ?^9cÒçAç”!ÈèªiXÐpGÃm y w5Ìg‘Á´2)e’Yú% {•êæEȹIŸõ1}‰ñ—Ô»ˆGž í,M@"°B~ñ7PKÚÂ/3ÚPKö™H'4com/sun/net/ssl/internal/ssl/CipherBox$AcmeCBC.class•TßsUþ6,,l7µM»­µPiŒ‘€„&6˜„¤j©iÀRSi¬vYnšUØÝY–NâøGøêcŸòâ‹…N3ã£þÎøXÏ]¢©iÙ9œ{Îw~|çžËo>û¤a„q%Œsaœp61³þ•þHÏ4uëa¦ê¹¦õ0' ˜Ùp1Q:êÍw¶·™K˜tbݰ[™vÇÊXÌË´ÛÍŒiy̵ô¦È7mãkÍtvͳÍ&ú¹L;S²œŽGé˜ÞÊ åŽ÷·•¨‰£­ý§ýž)±•/•fJC°®ÑÇõЊi™Þ5r¯-¦å5¢f7˜b”’e1Wkêí6k»ãÉiuc”Ÿ€©ãñVïðÁªCºê{ÀV@²¢7¬wš:Ûõâú6…Ç Eív­r§TÞXŽÇ›ÌНÆ¤Ž€ëlÛvY¼¸ñ´\µ;®Á®›Mbzn« ·wìŠk§7çfçÓsóWæ–ïŠRò´4Lš”î8ÌjÐøêœdÕü†BFÝ Úÿc,4ÅãÑ;º«d(ZÝá§ÇûYóö.-Ó«§†7½ðŠ#íû…&_~­/Ê ¶[è´œ!É`£%5˜áî9íó}ý§E:ö¢Ù.[¢ƒ¥ÉïylÍuõ½‘$àÌð]•‹»s<Ó¶F¬#›F ðâ÷,àÔˆc¯í1Âìõ®uæð\MÊ>î²–ýˆ W&ìÙý|&%\’pYÂ[¦$¤%¼+!)áM q ³R N"È…¤ †3 ¦1®`2·E\DHÁ{ÌñãI( ÞAXÁùð¡ÄîÐ#ø‡qwò µT·FuƉCèwQðm4+²Á}L&B5¥ŠôuqG Òñ‹Ù *öQ Æ?ÿý ¾üÚ„ðŸ~Ük=l.‡žàÁ–jc=ÜuñYµ.î] WKEc=l¢‹Ï÷!ÝÝG I¶.îÿ@½¬ øÝ%þÑ]ˆw×GêYÑ/\<,¼:(PaÞø r°_Yÿ]ÚçzÉçME»¨™FýßU•(?~þ‡*òîÎã&nùÝáu_^ÀýÊäËÒ¾&ÊPKwäî@ îPKö™H';com/sun/net/ssl/internal/ssl/CipherBox$BlockCipherBox.classPMoÓ@}›¬ãÄMBSp%F!‚Iˆ‰"q¨ UHqímjpv-Û©*œòzä H\zAU©Üù1üÊÚ âÄagÞ̾™y3ß~|>B-œËã$A¶~¹ŸÚ!^üÜÞµ-ßæck‡ßNòj}³Ûï'¼Ü{ñ=‚r×΋žì°°+öhO¸Œ€HR±Ï9 {¾E,"Ðb:ì‘çËÿÕÍv´#6BѶ¯®·Úë×Ú·n>“,Ûu7ä“3 [I÷÷RV\rÄÄŠ¦Üâ,¶¢È·<³Û~ü¥àÆÿ/þ«¼œ¬4dN,ÂùÄ ŽÐ÷}6¶ýûáx:a<~¸ç° ö—‹paFí03f`»æÖt{›…¥MÄ.[ì¢â„Še+Eä-¢ŒB‚¨§ XÅ U¬ÑóêäŽDT"Y"m^FUd$–‡8ÛXÎBí” ,H¾,R¥tÔ¡:m|D-xµ9¢nš\¤Ýî~Giéô J_P}ºBa|Ívr5ct÷=*ÍÚ,Ct…ºûOf9¢çtåÝñw,&WRQÉäJ*P’Þ¿¾OývEî¡Ho6ecê^¯àøU‡Î(™‹y‹¼¡S÷À˜Wf°”Ú"4é5Ù#¹JµŸPKÌÇ{ ó»PKö™H'6com/sun/net/ssl/internal/ssl/CipherBox$CipherDES.class•RmkÓP~®]›6V»Í­êÔÍÎ9Ó—4í>)am'¦…ÁC²xiãÒ{G’ÎÍßä‡ bÁ?À%ž›„QüPkÈ=/yžóÜsOî¯ß?~",ò )£ÜeX2Ê{í3ÛòlÑ·z¡ïŠþvî3˜Æž#‡V0–࡞åŠûÂö¢¤åIç¤íž¸¿­øiã°¥|ÐXœ‡¡üÖ k“M¦6qu×éñh8µ ££[«iò`ëöÜѵ¸Ó÷ÝðÒ|'­¾ÓÝõ:’Únïvô ÙS~¹o“‹k{–û…æ§ÑJ\eÿ<ò‹É€‡ís†t(㫦aAÃC 4ä4,j˜Ï@Ç” )’§ï)1þ²šcWÃ3ÏDq÷• y¼À],ÝPKâêðüÛPKö™H'5com/sun/net/ssl/internal/ssl/HandshakeOutStream.class¥SmoÒP~.:jÌ sóµ¼v NŒnf8$,3’,1ÄĦ\¡ZÒ•¿bâç}6Qf4ñìG©§ŒÆd/1Í=}î=ÏyÎs{ÒÃ_¿#ˆ* A%Sóã.CX©V«è¨ëVOu¦jrWuœ®j˜.·M­ëozÃÒ÷¸[ëõ»÷šõ×ÚMu¸>° w¨nsÇÑÚ|ËhsÇ=&ëõ )µšg£¨Ýugàöî3®[vË/•f•J =Pþ×Dø¾aîƒðÐjqéÑ;÷]Ã2†Ü)Œ1äOóñ¨SÃØ:lt©m¼¹¥9ë©mvKÅr¡T^-Ý­¼``-A=Rû‰f¶œŽ¶ÇÉRõ¹ÖcÈœØ;Y?Îù˜>•Ξü¢4æWÝÓaHû£0,µ:tù¦mkÿEç§ùÚÎï0Ìú§]Íl«ÛšK2ÁžAÇÌ&á·4S.b^Ä‚ˆó"b""’".Ȉ è…°Œ(fd,BöÐYsxÈO0’‘‚(!«–pÍC×#„nDp Š·ÍHXFÖC9 —‘—p…þ£J/ 7ž4!PÄíòÓ,g¿!ý|1 x5û ¥¤ °š-|Fù#à«D˜T.øšÀŒGáæ”'FÀg$|. £½+uöu Äs9"›¥Ý§<Þׯ#íïôº~oãnïþ½· Œ3tOt}ÁÕ0Þç"Tý$üÁ;í Ñ~;§KãÆPî‰8y©?2ÌIE½Rí•VÍwü¤6ñ8ŠøÑ_½óe9|5¹3ryŸŠTLÎ@Žèn©ƒ ­ø@Žmœ³qÖÆ‚ys.lT\œ1²ÇdU‹¨¹X3Rwq–ƒK¸âà2Ö”]5Ùº‘kš¸n䆑›XÇ*æ±ÁŒ9é }§È(ÖÚßqëk0Ú,Ë Ey¦ý ^†Û%AãÄ"±Š C¬dh•ÈÔ¨0…t2´‘-‹ÀZt¨þçÏÿaë»L{ÅÙܸ¹šáÎ4N·4™£Jo1ÇZÿËr6¥€úx§"k¾åØž€¾Zq¶ ¯n¶ô Ï«–íK×6«Á¥h×êþsYqÜÍ%b–œº[‘O¬*…(¯˜Þ;ç™ëd×sÓ³ÙÜìLnqáµ€0┓U57(6èTÒÿû’ÀÔ¹ÐRi5@—|WšÛœ‚zKgK tÄrŒÂ®/º®¹û¼÷Ø]|zÒ‰ÓOc£Û¦ûA “U©^«9®/ù5—\„ ³Ý•žô¤ô)èWpMARƒŠ¨†atjèF›†D4Œ ¦a¯#,ˆk‚¢á:Ú5Œ"ªb *Æ1Ç ¤UÜĤJ–ÎŽ)¶2le2Í^ƒÅ ‹\t”Üc(;~˜¬N²(’—è–¢=¤ú!fõïyˆÛ_1w,Ê“>Fö1€˜þs ÜÙŽu‹ t„Øaú!Ý«70ŸOþˆ­é™H²»/2Ÿ›h=-i Ñz[Ò/¢QÏCÚPPÐÍ´½|2ÛaëÍ^seƒ']H†¤®£ÊŽ9Í”+ÿ¤$˜2ß‚r•ô¥'ìuÿt)xIÂùq9\»ÊS™Ê4pïhr£¼C!¦?L ÎêËÒñpiÃBÈ™áæ÷à ´~­Çÿ )©Ëd·¡ëPKòìÕógÝPKö™H'.com/sun/net/ssl/internal/ssl/InputRecord.classV |SåÿßæÞÜÛ0DÖ¦rÄ4i)Pì´å±>`tã¡RŠÌÞ&—6’&1¤Î‰ÛØÜæ^Lç8 Ž­›cÓ"¤LöÔÍmN¶ÈæT6uO÷~?Ø9ß½ ¡D°ýÝïqÎÿ;ßyyâ…µø¯†jèÓ°FÃ[5,×°^ÃG4\©a¾†k4,Ó°Rõh¸ZC«†«4´ihÖð6 -¢44jx‹¿†& ’.Á¨nc»„Iêe7›Œº˜ï©[•IEã=Mcɽ)Óˆ4‰3«%èêu7m†³©h¦¿n¹™N=f[´ÇLgXhY×ÒÞ^½Ž.ª ´Ÿ}GKvÃ3EH™¸$3XNôÕ¥³ñº¸™©K§cuÑxÆLŘشF“½fª%±¹‰ÑµçA·Ç“Ù̵f8‘ŠüeçÁ/onmª¾^¬€¥h4a‰ ]M£¯©@\™Íœ¦²`éÂvòîÌ@‘á+»o2Ù¦’þ–¶— _]8[Dõ¹ l3»³|OMÉ£o_)øê7 “ÿ”Àº¶[Ì„SyOØ+¢- œ;yÎÍe “kô#¢YOGo5%L¨Ñ¯]ÜÜÖ¨ë«V-Ó7I˜z&anN[♎þ¤©/ Z¸ FïÎn˜3ã=™^Aq1(ψ͸½ˆEgRF<32f¤˜!Í’ ÍÇ¢ñhf¡ç|{Qµh߸!›&|·ðªÞk¤{É_ú¢Eä§æ˜™ÊHð4'“±hØÈDq½ÍÈ.)eb±jÞÖ^ò¾©[•¡¯Jšaª¦ÖD„áZ¼9l&YZšjq©¤{Ä(3Þ\ªø ™}5Å7ŸÙd ™.a:ûtõÜY³õ´™Úd¦Òº‘2õx"£§³Éd"E>"·\¨¤I¦{³=’¸%®GãdQŠ:ÖOº®JdSasI4FúU^'z¢'NÆFDÐzóÊ“,ýºxA´`öY¹¡óídl)È&V°5¥ /5c±„„г ÖiN‰’¸Œ›Öäum§ÄÕ©Díê9³æÖΙ;{ÎUW®'{Î×ú¦¯ãf¹^_Þv…Nºë«–6ÏA7Ó”‡ä9+c(ÄN#™4㊑JýáD²Ÿ×›ŒhÌèfoHݤm7åA/I$Š.\”J)BQÜ•p,‘¦µçn¢½FÊa1€RƒzsMWÂ¥çÏjâç-57·eû’…»o¶…STÏ×½©Á„NÆÕ8õ„±¯ÿIOñK1C#ÓÚk†7REI$×m ;¬VI$ „²!–M÷Òš\1®ÇÌ´ÇÓ#&°J»F­ähz%ÕŽ?_[-ý³™£_ô|Ðó›g/^¹¤PʤMá­YY’ZRDñ›U.*ꈥnÜÄÃ<\7Þɸwà7zQåF¦»ñæÆQïÆZÌãaµ7ðp f³Ði<Թщn| SÝøo1øfT»ñq^݉·óY¯cñktã.Ìáiµº›øì'bQ³ÜØÆŒ4Ÿ¸ õ.|ƒå¸_äáK.܃xõeö•Óö+<|•·ºð)<ÄÛ!>ý.¢=Ì«L;èÂgcÚ0ƒñð5ÿˆ ÛqØ…8Âã<ua'Žñm_wá>|Ã…Ïâ›å$þ[,àÛÌøŽ »øÄÝxÌ…^íÆã¼ý® {ð=žpá~|ŸåýÀ…Ïá‡<<é½ ÞkøæÐ‘{ á Pi$/4ß`Ï"1SøÄœsGWÌ`š'¢ 1ø‹i€ þó{¥Cxêa<­Ñ:ž;::egG§*w<Œg†Bâ0ڧ梌VÀÌàĶŠ#Ú0~tij<<Ôb„‡Ñ`ðFâ¸u¾Œ£H#/ AFóTBœpx&wð,óà¬k…ÕZk²˜<ådÑ<.¢gÝrÔOÄ©Û=Úæ,V] CJä´H rH-Ð4›¦xœU]>¹«ÁéS<úýhu,Äì$í¯—»H¼£ck™ä÷è>%²çÔ«!ŸSð‰íSáyô) Ä â²¤HWãÑóÎâË‘ç˜+|ò¶ŽbÁrA°ÅvVYgF•®•u¬'´¿«~.ç3>u«* ŠÜeyè4E!ÊÖ2‡¿jÏ©'}ª%#Ò ŽU@õh·më8‹J$¡†ÊÛ1\y,Ü!BO-b S­MA¸Çi<6C-biyí9‹¬ÄYBŸLév¯Hù€‚ëá¤àšP?Yàߎv>ìP”ƒ9üT$ŽOÖ"9¼°ÂÑ  ¢BxE¦@Õ×ú”ú(Ž}[ɧø÷œzMØà°Mûìlï*dû4;Û}A™ó›’üg<Œð0š/ê…6üB.<ì¨ÏË[‹™6`)î ù"ËÜA-$ÔõçðbW‘ÈDA¯-ÒÉ<;T˜çÏ&•±d’3BßñÈüÊ]$ßN§ã•Ãx‰7#…jä®q©}z"Í,‹îå‡lö%Ù'*Ôò<›ý ˆûñôchõ–ÂÏ·£é0¶wãÊ~üö0vtzÃx¥*‡Wsx-‡_V(‡qOgÈ_5Œ_"‡_B]3‡£ADkâ“ç>½"d¿Ù*K>n/ÝsêÅòdyò,äIF‘ª¨}µP¶w™­üt ;n ¹ËÇI0RÙÅ‘㫵¸Â>0…à»qÁÐA¼¬9ˆ“yЇq¹ÕÞð(9„ÛêeâïX”¶ l^G8Y'Ù‘±ÏÅ®ÝÔüœ”Ú¯ó±® ;ê¿ûh+D^Õ:˜ÃkâDè€øFòýÃÏC„¹~–C)W ev“¯ÈÔã|ÇñAŒ?Œ]^y¿?vfÁí¢ï.T[F9ž¢ž­Ò|€d<·òHZ‡vX8ˆ kc Ó« ãǪÊv³ÐÂV@%ß!ÒÀy: øÆ3Í>€gwHwZuã™< 5ØK߀dÝF]ûŽÛ·ãq«ûË»ñ¨õh8wc‡õdìÄ6ûÐnôÖ›!z½“zƒO>¢5*¡ %‡?­å¡8¹6*‡O¶ÃøsþáÕ&Òz¾Wi=ÏÎæCøK=„¿‘5^-‡¿sÏ!«¼åÖúõB¢ÕìÇ39ü£&‡B&7ÝÛéu ã_ÇŠ šb¤ Ç`D‚ëVÛª')4Ø|7óEŽRü…Ó§,‹É!nKæ}˜u{-ç'u->ë:u˜|<þ}L˜lßz¦”ñ,Å{YN·ßRËïÂÅÖ1ºãyš¸åÔ^„ —{¬ËGùê‰öÕG‹n¶êãÄQ-²SEkì¢`‰_Ž ™íù`©wBkàV4Ú ;(ñü"1|ŠOÎá? }J½é>™^K¹ªlôì8õÒ˜„Í^ceEl_±cûÇðQMôMÕLåß9ôÕÒ7Ïëmt¢Ö{!O3½“xšêõñt‘0r2iåÙÕè,vGÛ¤½¨-•@SÈÞ‹,—Œ2§²Âö[‰z/¦]…“EUž•„TÃ=L“±Kª“¥øüuîâßÚvóºŠêœûy­H¿iÁŸ~‚TÑoò/¹V¹ôgŸxH¹žèWÅ‹>ûÑ,n+Ä3qÝÿPK{»a¶k CPKö™H'1com/sun/net/ssl/internal/ssl/AppInputStream.class•R]OÓ`~ÞÑ®¬Vü€¡âpÎÏnc”MäCÙP’‘KÐH¼¨]•J×.mgä˜ø¼ÁÄknðÂD§ñÂ{ýþñ¼Ý0 ‰Ì¾yÏyÞÓsžçœ·ýñëë7ô ‡[ =jºÚ•Ð>bÕr™Çu)½ÄS+†[×ü¦£9f ù¾­YN`zŽn‡‡²Óh÷MÃõj3œD;$¿Z­T]cÝ Êõ†VHêj©-µ+˜#í·f2Èw^f#°\ÇgÈtßÃÈÿ4ABU·éæ¢e“êàêmÝ_sïynn%?ZÈå cùé©Ç Lgˆé/tËÖŸðDѰ]Ÿ|öŸZÅF#ì­x¦^gP»ã0bbq¦û‘úk–ϧXt½º,¬™Æ:Ý1{ÊxN#j–«•6³èyúÆ>•þÝ×廾C_µuç™¶¬kô/Õ- 3¾%ÕÑ,‚¿n5$Ä%ôK”0$a@ gÄQpGœäè7ÃPœFUpLÁ9n8êU„(ã<®Æ‚*ãÒ2.!£X–G¸ÉɸŒQn4W0ÆQž›U¥( >¹:¡(¡$²2¡șϸ–É~Âøð'ÅÛ¤ÅsÂj 7óã-\og¡-Pü"mš¦Ã·7w²…‰]6«Ã6æ#[jNmBŒlsÜ.šn»›;?Ûhfû/EÎ×Ûá«PL$?ß ßp~Áì„Àq6Z¸ù .Ô »ïh,S,J¾˜,ma²Ãñ}{4’¯÷P‹ÇÅW-Ì=L’7瓱7ïv¾§Þ¸º>Âû PK:ŽqÂf°PKö™H'3com/sun/net/ssl/internal/ssl/ClientHandshaker.classµ: `åÕïÍn2“Í °!@È ‚Y6 !á¨ä€DsŽp—Í$Ùd³ö`«Õjµµ‡¥µ­ÁVÑZÓZm“]E­­öÖ¶ô¾kk[µjm«ÿ{slv7›KúóÍ7ïž÷½ï½÷ÍòìÛŸ ” ‡$\%Á& 6JpÕl–0W‚Z .”à¨÷JpJ‚G%xX‚‡$8!Áý<(Á}<"ÁI âÄ$–`H‚$øª„²Ÿ‘°R‚Ç$\/Á€„K%øž„En°\Â\$A•„4~L‚Ç%¨‘àË|B‚Jð´ÿà#Ü-ÁW$¸I‚c|J‚{$o„ê2)OHjuU±Y®ª‘;YTA÷ ×¥>Ø×oïzfö0SªÆB×ø;•pdý$É+±W3©ú¬¤î­Ò¥TŽ–âቲbRíM2²R†Wêù>ÛU5ÚJFlt¥ §…ë'³„ ìcþ®Qüi3Ii“PUèªôUÑŽ-¾³\õ{xý;]“Þ÷“Ý…£=§ùtÓšÒsÆ’¤øm w7UZ®Su}}}}†E¥DºeªRkêÚôLNëT{Ø×Eò;õS•´Ùô‡©ZhÜN•[{¯íÊÁ(¯:K¨›ª ¹1^å‚©ŠÒÅè®fUg! F êV¬˜@H†äT>5-6›¦Æ3fá$T?I#š£‘TÃ'ñ®æ&ãÊÈ,e“`Q}=J$Á±oJÒ&—j¿ÿÿOü–?×¥ûÞ¯j3Ù}%®Ñ•œ˜Ÿ‰|–¦F'‰)-Lš) cš²|lòLe&Íö¤ê”Nï´.|’-ÆExÇn^2¶Y®Ì]›¡P´:Û8tÊp´O;l–pÔQœ{éMªÕv…tÕx6Q4ÔxÅÙïW^¦Ó §¾ >P:½Ó´®Þp'åÕû½»³OßIÎåíÔñwvM]rY¤ÓÔäÊ(üŠIV¾ú ‘¿¨Z¾ûæÈl¨êLRHs¢îÐÉo|½JmW|jˆÏW¥SJÙ“¡OËœS)è“?ZxÌÏX>¨áëX0Î)Ð1Þ®§ˆkô“zÚ1Þ@§J]½ü‘`Q“rÈÜ8N©ç(vò†“Î÷MªÓÜ%~zS¥—BZ#¤@'\b/šr"ªñ±€¶°e;ï²"Þ¦¥¥IûÀ qòG’vň8‘E¼1–e[M]mil«Ý½µy{KÛ®ú–º¶šZϪmÕUÕmž:’¸(™N#XImµ5µ#4ŽQ4L’@ªÚ¼A58žªÅcÑm¯^ÕF„5«öèDãÛ“D“bÏh4+(¯X«kXÀhîÇ2a¾I0†ú¹)øÕù)¨¦ ºÈ ð ¢RÌ̌Ҹdãƒå:^êå‰ïO”vƒJ»óPH¥(JI×jh$¯Û}›XTÛlUK•´kú8ø¼SûB*y(œØwÈÞüõ7‘C6á¬0õÂÕššäîÐÖ{ø"³i-J|iW•0†é7ééH{[NœFÞÁ¯%;“°ìoÐI+©(g+mÚrr-—‘Ôi£’‡Ù—¶p(Ñ=KUß5tЊ•Ãd>m/§¡$Ù]K£ÁDâMµ-±’Îü{4Ñ·{&)b[¯·[ é3^NZÓói¢¥ú^˜Nù>:ú"üag?½Á!R£ˆpFÄþ$ÂEø•?á%þ&Â_Eø‰ˆ³DxYD»ˆ DÌq¡¿á÷"ü\D§¿á×"üB„?ˆð^qžˆsDœ)bžˆsEø?áEþ.âlþ" "üL„?‹ð#þ(Â/E,Ñ!â|n„(ý2žWÊð:<É×Èð_¸N†Wá—×öž&iæÙå2NgŽá ¾‡ѳ÷ȸŽHÐMDžY` #ÚY^#ó^̈<ë’á9ø‚ ß§×Àí2¼Ÿ—qÜ!ÃkðY]p³Ý)Ãð5æ Ä›ðuÖ«òc½ÆÃ9¸?Î$Gùñ9ÄûI¶ê&ncQÛñS,åÓ6ôè³Ï°Ê›mØ¢?°¶c6Ü·Øp'~–aŸ³á.{+Ïn³án~lÕaÇm¸oçÙ¬òó<ÜÉ*¿À.¹+÷â þÈ_bÄÝ<|Ù†mlÐex«¼—¥|…‡¯²‹ïcŽûy8‘C°ؾ!†Ù±±\ôbœÙdŽ!²á|˜Í8Éoô»ýQæ=ÅRã÷bÄã6ôñÐŽO°¢¯1ìIõ?~ÝF­éé"~š‡g˜÷9Ôx>Ë7ðp”‡0ϱ†Ø o²K¾•KMé·yø[ú]ž}%Ÿuˆ¯ @¡ÄÓ°ò„sZíBÿÉ ¾®ßÞÉn„,»5†oÆð_1|kr‰ÞN’ßÒÙïtëÄÿ¦·> 4 y†4›I‘”ëô Åz»HÇ × ,6FŒ°çVÝüÿÄð¿ºþbùö°`£Yî1r8ž†i'±¹Õn‹ã;é$ÄÆ—ŠïÓ 1ùÌ M²Î?h0åjLY„Ÿvªë‰xÜÅÉa—ã‚@î´ˆû4c:#Ça?ÇœÛöéæÜî°Ï0çyûLcží°ÛMðL‡=Ϙg9쳌©ÕaÏ7)æ:ì³Íù<‡}Ž9/tØçšó9{9/pØçñ¼ø¾”mЬíÃVcËTRhqà.7=\H.Løó$nkÕÀŽp\8籉Ûè*†ËŒ¸;AA¨%-.¼Š à\ž[oƒÂ„¼ù©òôMˆ¯€þg]>ã9ªßÇ»àzº¥ù]§Ç ;C›g{+rn\ …™1ˆ7Äc@hIìƒx=,™!‡s8°fØì bBQµT´,ùz@ ³-1aΰ°t·2—ög’’ˆÛ¸Î×ÕÆ¥’¼š‚p0ò÷ ÚEé‰ô¬LþßDýÁÅÙÇ!—î—Xïwb›ºI#i§Ú©Éy“ ’v-£†)Z<¬El¶½1{‰†!¡qRÍ„MÃB‘Ù&èu›€Í1¡f®0ªt#Å6x«ee©eåqXÊsëÊR+Í Xi ɤ„Íziê¾7ù¶V{‰f•uX¸HßÚËn4¸Út`éhW˜Ýuz°\K¸º ºö˜P{ Î×_“S¦;‡Ø=+t÷0!=•Ý‘7çxÛ,Lb­ÐY·5W $jHšÈ󭬵ÙèÑôpÚ¶˜­Z‹±v æë¬4_‡Ú›‘7*u'b¸n6&Rý*"'ÿÖëò[Rüà‹ø¾A™4=~‚züXÖPüäÐÝ–)~¶ñ¼Ö®ÓpFÏž&¬´be–eMö Ôc%û×5$tåg¯´›}u¥8ù#À¬ã Ú×TŠ¥eLhyHØaJkõ4ˆ¼k³1?Û ?uû;÷1ÜÅ…º´Àú°S€¸°«2K{ØMQİƄÖA­qß yLky{5ºAµYöd†ÅFŸª¿ZnA–ž ¸ lˆ {?˜¡ào3.Æíãë$ú™œq®Ïqa_¥Õ]@5Ú?,tX›aýIìn ûiº‚§ÜÞÇ„KãBAŒS†S—¡T3õ²ÒKéæÕovoH²{—q¹Ó/7›@,=1ÁGVŽoÇXwLh·¬ÉÒKAw~–¥åÚ,Ìg§uÓ½\r^ÀÊìäl­B"_WJƒ°˜“tyV…Ž¡»¤=ëY—n%O`pŸÄûÔMlÁ±@JÔD¥’ÂcK„é`Lé.m¡]öóµý¸À|\«=N7×ÑcZ dkŽí,ÈNó,%zêR¨z„Ø&D…Â0î×îOá>íþ|b7%w)=F^nœgÚOn‡¬wÐé7&ôfªª~CÊ6ã˜\›IJ×J¼ rùž=ÒÞVrº¡B¯ÒÕò<4,ôŒ(J68謚ªŒ}C˜Ãû Tµä¹¿Õ¾>.D´3×ÒÇQå¶”{Ò˜5‹§Ë¾Á0¢ŸšéÅ6êüH1õ{û(RŸÐNÄOýPKày›ìe7PKö™H'6com/sun/net/ssl/internal/ssl/SSLServerSocketImpl.class•UÛSeÿ-,Ù¶-—B›ÒÚµŠ ›¦Ô^èE)…’J¡5¬ºl6dKØ»ŠZoŒ¾øàC}ó‰qƇ2# cgZÇ>8ã¿áÿ¡ž³Ù¤´ íÀÌwÎÙsÿ~ç|áïˆf$°Æ‘0^ ã•0^õOêörÒ-ZIËð’®›Oš–g8––÷?&4+ãæ´%Ã9'`?yßÖV´d^³“Ó · Ý«S§=Ç´IÝUUsâ´­/ìÜëŸñ需îXÿ|£È–X*Å^CÄŸß^:=9j“bÕK-òç8¨—ƒjuSDF2Çp]ß:±£u×…b»Ü]ÈÇœˆÕCT÷¥b6ëϨ»‘ûÌú9^ÝØ]ŒùÅ{b ĆXCCÃi†Î›–é]¤œ£vÆ[Õ‚gÚ–+ ±+@²•‘¢—3,ÏÔ5N¢èeÑ\1,×Ƀš0óÚBÞPtÃñÌ,»’l;4é‚M­x¶BIʯèf!g8Š[4=ÃUîäL=§hŽ¡gÈœ¤ŽÓvÑÑq3Oí ZÏüeÍÍÙ×;13xr(1840xöÌ-ÚùÆÌSa…bÉEÐH¡é  …‚aeH»@GСkÖM×õ{JsKôô¼m?þ\¨‚‚¡¿ÈóÉ›¦%~üiÃY¡´þfð ¨/ Ùæ,ðݵ¬€öEûldµbÞóoFã?Hª1ç4½Ašæ¨cøS%Œk¦Ì64(¦ƒ Sió&m/C%OºX(ØŽ÷¬;WeD}ïk• 4©·‘`]þÀL;™š®-&E=û;G 5~sô´ž< m` 8ÄúÕL„̶GêŒOtwFÆÝ ·™v·îúaÏ®\@Â[.JHJ8)aX ç$“pBÂyQÈLºd¼Ž61(2ú™ 0Ä1C,õá0ûíe©•¥&í2ÞFŒqÝœ •c[d¨Ø/#ŽŒÓœ¹e\†$ã8:#ÃõÆq#‚+x·H3yÉM&3LÞgò;ÏFHšcçy&2¹Å䣮âc–>a¢Eð"˜„Á2¬3"˜æBW‘ei‘I–®6Ay¾IßÞçý8Áàó!ÿ{/IQìAÑ×8ýÛ‰«½‡Ëȩ͛XRÅMä™,«Â&,ÖÙ‰¿°çÆg;…2ÌGjbu ·É¼þëõ{iBŠ2rþ}Aþeo!~ò'ÊøtÇQñé Q±Q ‘’§è¼†pPà隈©e8êoÈßCÏ\™%±@g© wrûªª2¼É8 Ë%™[%¬¨ñîÐYߦP'¯KPèÒIĤ(ûÄ u2þ'Ë?ánãºSO×JuպĆÅD Ÿ ·4Ÿ ­£7Ú»CC%|~m ½Ž½ß…„îPT|øóÿTÊU`jb˜â׊?~´AíÊø?Ô!õ"DùÄâ-ÜÆ¯¾£€7јæ¶Jw_ük÷§S s,Usœ®åhÌâîVƒÏÔ‚»I¶J —¸V §'8t’Ï2¤öÒnlö¿5¶wöV5¾…/k‹!àRãKUûh;ŸöíaµW\£-¬zÐÓ<úȃ»Œ>Àôlgs_Ñf}]Â7"‘¾­^ì(Ñ&¼ü?PK«æÍ'å¼ PKö™H'(com/sun/net/ssl/internal/ssl/Debug.classU[WUþ†f’޶M/Ö^p(…B¸°V ´JÁ*-´”^Ô“™“d`˜Ig&Ô7€Ï}ªo¾ô¡­X²–Ë']ËårŸä$m—ó°÷œ½÷·çÛß9'ùëï_CøVÃM ×4| aVð†w4ÓpBûŽkHh8­á”†“.ièÑЫ ³XÈ ùäxѰ ëyÃËœ™9#Ç\+ȱ5n¬ó `Y® 7¶4Œ¼o»áÕZ<]Èfm7k˜Ì5ÒÜØ´-îr‹|˜SÐ[ã[YîV˜TúRÄ ÷Yh{®!¨Š¦y‡Q–ÃÊ>7=ß2jiÑTÆÊwYÚáFžû2úÌ$Jû _G³3Ðt‚ÍÍj„™¡½a‡[BÖ î§½€—«ªïªàËŽ÷ôέ² –r˜›M-†”ÈŽ+ˆôô.+ˆöÌ ×ݳ¯d>½ÊÍp¼)êD³Â qYÝ;«`´Y|ÎôÖSAÁM¹&Žt…"Ìqt­Þ|#,ø®!Î0Åjw€Ø³|ž»ÁÒ Î¿^eºåí‰E ø“sú&÷}šžmº—‡²<œuƒ¹¦$W–Dµ]‹ç3°ƒyWÁ±&)8Ò(|]¨¢ÍßüÖ×n!§Žíõ{=išt=§<7ôIe9, Šƒ4ö U™R-ß\‡HvÐìT±}*v ÑjýYù¥nòv‡~ŒÂ­Ê™"YBoÎÛäþ H-ôªÓ¨Ì)ðùŒŠ[*n¨˜R1ªâºŠIŸ¨˜ÖчNWpQǧ8£c ïéô§pVLJH‰,½ÍT ÕMàœŽq 긊.ゎ÷EÝG0tÜF»ŽË8¯cg⸃å8æñY ø\˜•8îâAŒÌÃ8îáQ‹x,ÌqÜÇ—12_‰&LZ˜G¢ØXKÇ’hº„Œ0YtPú€(‚½Åï²!‰³ï§ÕýÓ‰ghwVÊ6r;°ÇÂOX…õ?pšl «•e¢¥„µ§hÛó²ŒR„ ²ÓQò ùÖä6ÜJ:&ô’éx¾{¿l"RB^øhÅËh«Œ¶I¯J¯I««ŽËè!éõºì[2úv-ÙÁ“*¹«¤R…\¢¬ЖLî xQËwÉüÊ NQ:|ŠÄ.î®l£p»¿ïlô¿PªÚv‰¸,;&I¶?Ñy.ä;\ÂfË3´FÅ*I²ŠõP#?"}.©IÖ‹h¹Ç9¢¾‹¥•äÏØØAq[‰#%|]Â74ÖˬSÂ&´î8;J°¾hŒ Ýš”Ðö*ô?p †ÊçkäPKFû«|0 PKö™H'0com/sun/net/ssl/internal/ssl/DHKeyExchange.class••ml[ÕÇŸ›ø-î yÚ¦iÝ6m’6ÅqâºIú’&i›·¾¸IÛиiMšÂµ}ãÜÖ±Ëõuš@76‰¡!‚ðecŒiBlÒ– $Ò$¤Ih ‰}˜Äñ…mÿóØé($HTòïÜsÏsžóœsò»}ï?×oP9…ÉÒ¨<ØÕh]°iè¼1mD¦ g2Òg¥£YÇL›v—Œjä 6õiF— taìNÖ£ÑbHÁ±2‘“F6•›êR9j‚Ë x‚ѱ>õ]6}(XÉÙtäDâ¼™tº¢K¼ŠªDÛƒK§Y6{`¹ H¶~¹1u"Ë þÄõ#?- ªª+Íțɂm9³‘õ`–ŽUN¡þÇC$Æ×ÌXYËÙkè.=¸ús)÷µ\±þ‘\ÁNš‡¬ ¢ÊÔ)ÔŒ ùÉܰ ¶no ·¶íhÝÛ1®‘fhTaض1›Ì]œE?~Âr†ÌlÚ™D?‰›Mæ¦"ùB6’5H>Ÿ‰XXÉÎé 4gÎ$'qÉXNKᇶҜ¹˜³]­m}F}¾Ù?–K2…<Â&4ªJ›YÓ6I† Ë–7NoÚ6ÍNÃ6¼xSLâÇÓÍé•è ÛÖtq²Fºê+)Ý*+í&ŒDÆDÔ”*áûŒ·¼™Í;æ”FÕK**—Î]²ù[—õç'­ 礕žD>=ÁºØº£mg±ÞªÅîÍ¢}ùB± µö '×7똽êð±Éi#S0OLxi»—6{©ÅKaª©B§ÝäשžÖéÔN5:µ)lUÝ-ê©A¡šÊuZ¯ž6»^v’®S+¹uj&zçÓ)BU:Õ©M »È¥S-i:m ~ÚC] ÝÔAûö+PèQèUèsSñ_™ŸöR¿z5 pPM=¤pXáˆBTá¨Â  R8¦ºÇNø©“†QbùIS[À“¦v!í¦R['m@‚´í¥~[©ÝZz¿¥ÔovUÐj|H5ZCäz…\ªlןWÒ/^óÅËù«XÜÅ¿ŽÅÝüm,îá3±¸—Çâ>ŽÆâìá€^þ+èã:°‚_ýü¸‚?u~¬d/xï«øÈÜ®ä ¸Š;ÀÕ\ VóAp ׂ5\®åËà:Ux\ÏÁ ò~#µ7ñ£àfþ¬ã/Ázþ ØÀ[À-ü&¸•ûÁFþÜÆo— A^6ñ#`Hò4ó«` ŸÃü0¸¯wHÍ­ü7°w‚íêˆx§Tµ‹×‚»ù4¸GVìà߃{e_²V—ì½›?÷Éiìçzð·€=¼örì+ú¹àOÀƒü"xˆ›ÀÃÜ‘”Q^ •M J!CüxŒÿg?x‚mp˜ÿÞÁ‚'ùmpÄÄ8žâwÁQ¹³Ó²È¾Œó{àü8Æ:x–?ÇùIðÏwñóàÝü>hÈ‚ “ü0åL>NÈÑ¥ÙNò>Ðâ ð'XœxCœø—8Q''ž'râD£8ñœ8ñ8ñKqâ)qâq¢]œxLœh'ž'æÄ‰9q¢Cœ'ÒâÄgâÄå„·2Zº•Q¹•Ó‹·ræEùÔjê_üŒÑf*ÃÑêÐU ½D±:‹æÔÿ?˜KÁ\޶J‚›UhË-«Jƒä&/Ú*е;]ª¢µÍWé\§;ฮÐ]ž€íݪ­½BFùÜÿ ¸XA#­,%#±ª >$ù.±@©PèeÇ/…ßÙ+”\ sqê6º­4u?¦ªOv[ów"¯Ðı–ž™b7=GkZn¸R¯ùŽ·¸Âåá×h2üBË ¥\·ËY©\ªujnµðâppÉ᳋ÃMK§‡C7‡›Q¦ÞŒaóªYbwjdqâª,M\…eh=êjR‹'°VýçJÿPKÀ[‰ PKö™H'+com/sun/net/ssl/internal/ssl/X500Name.class­W |SåÿÍMn’^ TR(m¡ jš¤´T­J [: ”*ÕˆNBziƒiRó@Ðm¢ÖNÙû!SÑ=ìT¶UÅ­¢î›îé[ÇKç6{¿gwν_ú ¡¥ûùë/ç|ÿsÏ9ß9ç;ß¹·Ï¼ÿØnXP%fY n³ÃoÇvX `ñT6 LóT®Xܬޣխk×ë¡dýÑâ¶d<í$qIVœJ†#ÕMÑT·&ñh½á¯Ý  (žÊÕ‹j=‹W„bÝÕ‰T´:ª'«‰Hu8šÔãÑ`ÄKõxk*Ù“JÒz°»ž=(žæÊ%nbùB(Í'_œZ·N×›ÆäÃGlõ¸[·#)Œ¬žæf®E1ó|{ÖxÆõÕÅüñMr2¯߯ 9oÞ㶦­.GÙl„æ=š ¯ Si+»šk>`×9úÜWÝ‚z20Q£ ”óäq|¯ZºÒˆa¼3ºèŒšš•ÁnÝPžá19«>º»Nñä^Ú¼MáΧØ~ 9íé÷äz㺹ó©“ûéyäæ[žçÉÿ'á}b˜·ãÝñÔcîhŒÄv*d,nh–IÍ„JÅÃÉMÕç‘r(ÜŒ•¶zV/f5âÆÈ*ðWØB‘p4œ\$`k AƒTYëМKõž¸ &õMCzß„@õ„ïPQ¾vq¶ÅRñ~N8B»¯^LtÅ΋ǪÚçÏ«­š_[3ÿì³.¥PWÓAÎg¾6¶7֯ŃR ÒÖÁŽŽ¦ˆÞM!RòÁž=JI:‚‰„ç$Ik-ýBô0ÔŒ7’VÅxЋ`s›º"#›nýq ª ÍxyQÉÆÛ:;F&“^w,Êà²X˜ :%KE“ñMÃÁ?Rµëfõ©›\zw0iìèˆë‰„©¥èÝa>=2ZѦ_‘ FHW¬£_§@a§žlL˜$0‰Ð’¡­ét lìl‚&ÃO‡i·" F芨„L‹)´jw£á«‚æù»’#D9&öÐFáPhœ£$] «‹Üt-±¸Þ4”œ$]æ}aÚ1íÐ7¶R“Â=£Rëʳxñ¦¤Þ7n†&tëÐu˜•Ž—£:Íuôô%ÊV±8ÿà¥ùzŒÉBEÊûy–õ>bFQ~—ÓL\Yþáž(Œê“C·±4KV+–6­ªHaT]@ žY…±xçˆþ"ÄÇ2,Q᫨֓|(Ãâ©äJ§–YqG"µ6!s·$ƒDÉp2’ *::Æd,[&…8ÕTÝÀ×OÒz%•EWѤâ#*:UÐz©ŠsT4ªX¬¢KÅëU„Ut¨ˆ¨¸\Å: óàÓð!œ©a“åLÎg²ŠÉ¥LÖ0 1éfr.NÓÐÌ$Æ$Î$Á$Åd“MLZ˜DÙb-¯æÁ©aÜLN×p4–yÎåÕT&ƪLÃ"œ­a!ÎÒðaLÖЊbÖ#òILâU¹†ó0‹I¥†‹`gY‰†«yõ ThhÀ–M×ÐÆ²¸4lDµ†Ë`c³R «QÄ»Í`x’†›^NÖp%¦ñÊ£!ˆNÑd³phèªác(dÛÙêq"+;¸Ÿv`3>Ãä³L>ÇäóL¾Àä‹L¾ÄäËL¾Âäv&Û˜|•ÉLîdr“íLîfr“¯1ùº×âNZ}“á½N\>†ßbrŸ½¸Ÿe8qv°Ê·$ûŽ7²ÊMø.ëõ;q3{éѼzˆWóƒL)Ĥyõ?È0ÙŶ:q ËnÁcLv±J†É€Ÿ2ÃØÅ›?ÎOŸpâ:<à ¸›<ÉzŠÃxšá÷Øß÷¸•ø ?`Ûòj¯öòêGL~Ì*Ï0y¶·á'L~êÄV3ÁŸñƒŸ³Å/p"Ñk韼-(&JMþ—:‰x ·¸Á—I¾\òó%_%ù¥’¯‘<$y·äÔýo–<&y\ò„ä)É7H¾IòÉ£ÒßZÏ‚UpR¼5ô}PÀÁß©>î X¬­ÅÞ°ª­›­õa<—#u±øù\±JârÅv¿˜+vø¥\±“Ä/çŠ IüJ®X#ñ«.C®œžY§ZÎ¥'E¢5 ’ÈNû\6…ô^À5‡ð\¿|¿2ÁóØg‚ °ß/à€ ^1ÀA¼h€C&xɯ›àU¼a‚× pØU˜ ÎFÁQéL@¥èí GæòU)p—’ ¸¼tr¼oš~Þ4üyÆÑp£€ ¥Ä ˆOñfð–W<‚·½¾ ~m*ÖÒO!õë “ÒÄ-M^_¿Éà·ù”çŽéÿwùLN‘&ÏÂ+ñ'‡MÔ'ÐûÞóîÄ{¶ô” Þi3PíNüÁ2€(G:ëäüÝ ~o<´ŽRµŽP=ȪþªÊ(Ue„êV­¡j¥j¡ºUK©›/ÅSÍÅ\JQ%>c8E—m8Gû¨-ìc娎RUÇÊñØ•ËÉñØ•Û?*DZKwÈеN v¶1jç•í1ú†k7€¹&lñúó´n¿ Í!…jB6âs,uJYµÓ|nkrt7l½Šèµ ·µüžÁwÜÊyUVÒd¶ÆE²•mÜ÷>z›ùRŸ^û2ÐEdÇ3±v72øK ç¼³,‹úàâuy­?¿öZD9£Ý÷ ¾ësÕèoGû>‘?d Í2ý…^ß½°*; S“í°ZvXöa&ËÊj}MãïÛøAo(“ÛJŽ>"¤Ûy2¹“|Ocóíм¾§°9ì ¼Eâ-iüs‡eضRÚVR˜lëö`sÀ÷(þ%Á¿ÙúBRFíŠ(‡Q"ÍN#Äõ9U¬ä¨gÈ¨ÓøÏʪ=°õaʈ˜Tõû²ùÊÁ…²Ë…QÚÝJGCÎôï5«[J©ÿ·¥spKÀ¿ ïg0XTzHë´-½b°ôŽÁg½~j¥ì€ü(]PógÊÂLöÒíˈ‚4¿„¥?§A/Èk±o ‹vhÒb™ì”E²SVL¸c|i¡äîpaÞ˜ö}–ÊâN%Î'gõ¦…µ_–%×á1^œ×âà—äµ8tL îˆéÒâ,zqpGø}{aýT[ õì\à6(²Pøv GZ¨tôaÒŸ}nË"œ.ÆciPò)L/5!-œeÔ]kFÆ[¥æÝpÐÕŸ)=l£È¸Œ[¹}Ò¢ðv¨´èçÖÈ¢}ŒögÑ~F‡²è£×³èuF²è£ƒYtÑYô£#Yt„Ñá,:Üï¾KÙ3g:ÏgO &énóuÄI9óèö—×fĤ6ÎÙO ç¼ùÙcö͘ÎB#þ²o4_‘’“yŽXL¿àÖ@FLi±,²Ô©tP®vÊ}hq«Þ»[q[3bêš:Õm½ §‘Àªtð ¾d;Nv«ÊvÌ.±—ÓìEljó–Øüqi­aÌë”»Ëï¦}§ê¬w ÞOiá©îO‹â:‡×í0c"8}ÓíP:ê é¨9kwaoá`‰óQ1Cà)ô¶ñ²D`Ûà‘|©{dê5ôrçbÎ;îVVeßtØJï*13#JÛüUiQ–ûª»zè–É;Èwÿí½P½£×ÞÎ^Ç3ŒC¬ûPKƒ:–u¿ ?PKö™H'1com/sun/net/ssl/internal/ssl/DerInputStream.classÍWy|TÕþ^fyo^^pÌ830.àdA HZYÔ¡ Ô`4 –—Ìc22™‰“ ¶Eۆ]k´Ð\&©A´­Ýìf÷}µµÔÚÝZ»üŒç¼e23/‘ðG[“ßÜåœï,÷ÜsϽïñ:âBë¦ññq k%|LÂíî°^Â^#a£„«%l’p„k%\'¡CB§„„„wJ¸KÂÍÖIHJÐ$\)aƒ„Ë$¼VÂf ª„n =.—ð:®Ø‚„Ñ®pnlÁe=¹¾æÁlsVÓ›2Í鬮å³jƘ¬H§Y}™€'GêåóêÂ6Ÿ »JË'²ýƒúŠÁ-[´üt´“D§šÔÛr2ìºîëµ=‘Ô²zzKÚÐ?‹d®W·©Í5›jîÐóélŠÈu6yPO“ Ugý™NîØ‚M+xb+®X,1ÝH:aÌô†è¡rºéD1nâvšÝFÔmšvD<±„!죞ÿxŒ%Lcé\³k²§©}Ëx1-±ÄÆiî%% ‰e¦ï’7–Ø´Â\ÐN4îh¶(vJ‰q*"öúH¤>6åÒ1çÖ°HÃ$ôÄ$$#¶M1g2½ÄÖÆ¦†y·!ݧmÌeµeîÙÐ÷Êñ¥JVª-›TóF:PèVßÉ{A='³HsUMQ¢/OgÓz;mÎÊ\R£]µúŠhJӯܰ’MDIaJïjù|./à æ¦9œÑlNªÑî´0\´DK˜Ù2nÄÁÍõèÚn‘ß]ìÓòt“Q]MÙÆç— .ѲȤoÔ’†›½¹¼n2© ½õ¥³Ûˆ’¤Õ‡Ktpµ”–/µ8§„MÑ–æN(·0¿<5Rh/3B[Ðjwƒšj ¯ÞÞ£õëé\v€ÊÏ%—o?Å:½šÐJ—ešŠîlÉåûT}ÀÜ–-ÃàרÛÛ×75;n²çMÁN©ùn5¥­Ì1qÀ)ü`k˜Uè¥þU’-¿"äJê:´µlVš 5”¬%s¹#7˜ïÑ.NgèÔÌÞ´J¥ÄXŸÏÅ;[.Ž·,^Ôrá× TBªÉäêŒÖGW7µ¿ŸÎ(Õi•/Êž\ÿoSÓµ›U ݸi]²tCœB~LmæéÉ|°«<%é)]ô>Z»'™N¥)Éû434Ñ<¤m×ój4©êjTÕ£'Ú“è6ÒÀWèìÐÚ;¬‚!ñt‡®Ñq©¦á„G54›¨ ´4¯ÈAS$‘ÐUÚfÚ"cfœª4Y;˜É¨µFMÑn5i¸EH´u‰Ufð€K˜í«´3ÇÄup6±º ›vÝ6mZU–j>O(héTVK–,Rèpz:Û“Ëç) Q.7¤>—$æB:ö Çq0r¢l g/ÀuÅâRJub+ge¯šWia ååG©>ùW†íØ1 k¤´Îy5QÜÊ[e¨‰èø'ˆÖþ»ûÔüVÚ÷~MÛÊ & ùN,sg£ÊͬdZ;OWót9O*ÐWðV¬PðF¬R°¯àæ|»ÐÀÍÙ nÃ2×c7)8ˆ,»„µ´)Øóxt¡‚,V°¯bî%L»˜›K™AìÇRž’æ4^©àN¦mC³‚=ìx/æ+ècï÷¡UÁ šdÜÃõá|Z¦æ!žŽqsLƽx˜iÇe|È8„GeÆgd|Ÿ•ñI|NƧð7Ÿçæ Ü|QÆ|‰›/Ë8Ê Žâqn¾ÂÍWYÕ1Vú5÷áë<ú†Ɵ넌ûñ„ŒðMâ[<áæÛlö;Ü|—›ï±Ô÷eðn~ÈÓ1ýˆ›³ó?aÜO¹ùOÎÃù_àLÞMæè€ó6Ò(B#Ú-j_M³¹¨¢`fÃ~ÙÐø žlxOÖ üê¨á'ƒ/¶ÀA¸ p v5Á¯'`—Z°z‚¹©WLX8R‚¢²P³ Ÿ‰ ð›Ãb;šÈ#®¡UõëMÄSÞ;Q3†{»êªFðÛG˜8ŠË-æn‹çbÞ0:&]ά¦~²ÝÌl:bXºŠ~n²w¯™³,›õÔ³WJ-Æ-Í;;ð;($&þòCRÏàF²ÕxÜ6æacG²7âÜ¢-—ik ‡ºX~O;}{=Ù0ñ-~žå˜_¶Myí€XA)à÷NEo@ƒ©¨êyˆ˜Aý3¶¢z[‘h+¢ ñ×°¨Ri¼k]',±[ýò(žém û“å”ÍD’¤2Âæ¶JD{¤Ð>ä¯Ä,qÜå¨%nÆðT`<Œ7à­Àx‡„gC”a¾_܇¸CB ˆâðÂ0¼®%bd/î;0/â¯>ˆ¹·îAÔ<þú¨ xýË@ˆþåû­xú8žu¤å£øc«”‘€;à xb J.wJü¥Õôð×¥rÈ}'êB’½OÕûôÔ!ãÜÌäšB¿FúM¿8ýöÒo#ñ"ŽÕ(¥b5ŠS¨©ÀÔ^’¨™X‹ÂžÌ–‰³¼7P³™ZJÞ]êRy»þ‹vk&·«±]1ƒAßl¹€¿}Îó°³x°YëË®ÇóiÓ9W}ÅâQVÒ^Y8||ËYØíðE2sF{¤7ïÜ)Ò6Œë"þ›v¶GöÀSu˜ÒJŠˆwa!û2†£]uþ<)àïuµ<¹ R]Ý0_É4ŒâŸÎªw%— n²µ&탽gvž5yõ{bEƒ¦ßî뢛â_ÎȾ¹x¬¶®‚ -+¢½CÒÒ4iÍ÷LQóß‚ó,å1«†ÛʿȖmhðo§üÐÔò-¶üé/)%¿ä9βäÛÃ{032=-o³‹ºËmõçm/N·åëK‹zµ]Ôƒe‘óWïçÒW{—Å=ƒ¹•GÓQÃÃþÅ¡<6„*ñ‰aøŒAæåWØŸû_öЩöYøOýÒŽ~ÙøÈÿ©ÀÏ9iŸ{’ÿvÌ+¾$Í©ã%-9î$©×‚$Û¨š¬åIÜñ‚Ãý]áø^¨´YÅ_IÖû6/ýa÷æóF1Nß5‘cR«»1t»"£Æð@׈ ´zÆp¸+è º BÕˆà¢Gø0W £Ö`ðZp—¿Ìé[çc)™ä'3}¤YFÖsÞÇØPÉ#þ#“_RÁã¬ó»‹•m/Ñ|Ôßb…¨*“äz‡ŽXå$¼ô¬†Ü&ç½kÇPè I#‚ØêæGmÜ|Ô¶ÒÒ‚ž‚ Å ‚ïöñÜÙ÷Ä™Æ&’°Ì'‘T·J®%^ZP xƒî€· T?ŠCC^Ñþñ§ƒ’s«é“oÒÏ A±@_‹%·½»xÛ 5kã¡‚0#¼Û¼ÂB» ÂiWáž®øˆàwZ:@wÒ¤–jX–¶P[…Ô‹PK}Íð‘Á jPKö™H'1com/sun/net/ssl/internal/ssl/DerInputBuffer.class•TmSU~.»aÃv+Hµ&)ÐÝdCËVJi,ªAZPZlJ[³$KØ6ìÆÍ¦Ê'¿à¨3§Žc¿ðÎXpÄiõ«¿ÂïþñÜì&¼¤3msçÞ½÷ÜsÎó<çÜÉßÿýþú‘¾ÛÝÝ â£ > BcÔX†!¦Æfòöj²Rµ’–á&+•RÒ´\ñôRí6ÝqÇÑ×.2$_å;i8«\uÓÕåeáˆnЏ§?Г%Ý*&g—îy·É<ï:¦U$³¨ÆÓ ªšy%§bÆrk™ØC«šYLó¨NǦÔ7â»ÅR›‰r{ü%öÌKL5’ø²¸= zô$úzž­c¦eº)bûêöÚ˾N¡lS1z©ÓŽÛKÚ üŠW´h8IÃ"|G'ö]¹o–©l®í½4 ƒ†% H8+ᜄ! g$ôK8-!© „.¾t+8… ‚ (¸€6nëTp½xWÁy¼£ ‚vQSð?†pTÁÞ’1Š)¾\‘qŸðݧ2Æ‘q ÓüøY-3|¹*#…k2.c–çdŒãsiÏï ˜BùŒ‚a€B_"Iëq:u¢…Ð×¶1ÿüÇï»ýûnˆ4€`\‹D·q½îä{ Ò_ÏoáÆŸHÍhl ÚæÌ.eµ-|¹›/Èè ñ±Þî‡Ïø—ãÚ/ˆ”%{‰¢²‘6„ÔôÅÅ-š‹ÑܰF[ÍÛÖî×<ÞýGÜð‰ÅÃË|Ò—Ö©ý…ÔC(qØmáö†P÷íÜ`ÑJ28 ÊMóîOh¯£?D€mr^ca±ðGðjýBÌ%²ü†;qò ‹‰M?såó2ߦ]€¾sõÌeK<ï®4° ©æì;ÏFÛøjT¬78B*9Ò Âá2ažýgÝA:Ûٲ܋Fú ¬³Ý¸¼ýfxŸ‚â2Âßó‹Ld nɃx›¦H@išq‚ðdËJcµŽñ$)á¼ø¡0O ‰¹á¸’[YH¤ý®—ý}Šô(kD˜?Œž½âx¬…¬7šˆ¨Îi¾ê¯¤xu›•5ÓCïßÃŽÕßír‰5`Î=ÃݧMÈ'hß‚ðÿPKýÑ;ôPKö™H'+com/sun/net/ssl/internal/ssl/DerValue.class¥W |“Õ?·Iú}M¿B›–Gh ‘gš¤´EA(PH_,m…PhQ!¤_K MjòÁ9`Š›ºÍ ·¹SpÙƒmeƒ-ãå¦ó1÷žnν_î¥ssïÙs¿›ôKÓB;á—sï9ß9ÿsî¹çÜ{ûÌ›Ÿ”³m¦ýCCC2l’áašeX+C“ ×˰N†Ze¸A†õ2•aƒ ~öÊÁ.Ãv:dÊÐ C§ aÀf309Ë| 8Ëš‚ÑžŠx_¤"¢jñx¸"ÑÔX$æLm¨ÛÑ–3(»²¦æÅ{Q·âJºõjÌéíÓjûººÔØD,6h15ЃUW²hÙ¾S j¾N5¢…ºBÜKÚì ìT„‘n¡!F¡H÷rž¡6N;˜e[ji¨% (ÌvÖvÔ–ÕòÉþ¡ØY— •Z¤Ùé+«càÄaœI/&ÕËâ¡S»Ó§ë„¢ÆÑþškËÖ2¨tNh?u¢&´%W4iéÓ ¢וmÚá>•;˜îs¡c}Bgæ¦_&«SFSïà‘fÈ}£ˆ|>EE×gR×ÓX6ôÕéìo!¹Æ¡šj_ *SµÛc&ÕâÄŠ÷‰±ZG2’p¢ç@Æ™æza5Ò­íp¬t îŠP$¤Õà9D-UíTäÕE#q-ÑønãÚ’¿°[Õ06}ñG$ª9Ží!Íç„››¦†Õ@ÄãEv¡Τ_sFUÓñj[Zš¼Í¨µÀ¨ÕéëQcMí$¼`4ÃvhîjÔœeÔôy#¬]×z dQѦÛÑ­ÆDLô¨¡J‰Q¥ÅWŸúŒsü¼0ísPSÓ3…j$sèB Ûe4hE©ØVÓÓ›JmÚ üKªŒjÈ¢†µaOPíÕB¸{¸ŸXN_¤Sí¢ V“¹W1uHfñ¾ÞÞh SÊ |‚—Ä8õSW„S´CÜí‹ÕÆPëj²ß»f«·µµÉWçõûZš±6IR×ÒìoØì\ëz_›×߀UIÜÆf_[Ãú Þ&YTÌS·Ôâ;¢­±hy[ÕÂEåU‹*«–-½‰Aþ–dº0C}á0Š "¬^þ å,€mèíU#˜‡œ5^0Ú»—满0m *mG¥í|õÈ‘ îļv]0¨úÇÑ=DŽW[O#e9ÓÌ×qŽ›9¡ËD|Mõº1˜4sg@£$òâRirK_ ŒEèT÷h±€ƒ>;ºC»ÕˆC‹¦ṳ́c&ÖÔ¢ˆ™‹UíëEÍ@¡sa]k›mŸK3>§oì´ä÷zÌlš¥=ù[LQ=…© ¤%uR¥FÝ¢¤4Ýñìá+Ыݰ7Ö¹hÄü‘qš(™µ©£ß¦éº{㚊n³õÓ +­'Û…¶=¡xW4ÖÐ0ÃŽú†õŽÝz%ç`¬MI] ™:š†F<°£-15®b82yý–âñÓ†1¤îpê¥\–úÎ¥ÑÈpñ&Ïs|W¨Ÿ¦å!Ýj¨[®”\Î'+wqÆÒ-$Á5‚|8t›Úéõ¨ÄPÑ$UÒ2q͸<,Wš&»W΋œãgV9I7`ËâšUU’méÂW„.À´åˆIyT†æàØ#Øä±x œëF-¨¯$W‹¦ ÷Y‹Ž<ßfaÞi9q~`k{{U­8š„·ÜûM‚û%ˆJÐ+AL‚mÜ+Á{$x¯ï”à> > Á‡$x··Hð> Þ/Á%ˆKpHF˜­@8hæ%R©À‡¡\G`;a³*´)°Ú83ˆ½F’Ùba±’m„d*Ô’¬šf¥ „êT»JÈ" .R©S –*p†T9«‰õ’r•{àjî„«ØOä ‘.ð(0@³F²P ¯ ʈ]NÞæ’Ì­@©Ü ó‰ÌQàýC½» DwéëXHc÷Ê­°HS¤×ËxÌ¢Ù+<Ïùº‡ç­0ß òÍ8 ß"òm"ß!ò]+œƒïÑ×ïÓì"/Zá<ü€È­p^²ÂE»?²Â%x™@Lä'¤üS+¢üÌ OÀωü‚dÏù¥¾¿²ÂWá×Vx~c…§à·Vø¼BÞ^ €ß‘íï‰üȉüÉ O“§áU"¯ù3Y¼N³¿¿’í${‘f#³¿[áZåYø‘ÒW¾òûoÒûÍ^#€ÿR,|ÑoÒŒ¯w¿âŃ‘>G3†³,tÉLÄšif±Â³ð² ð‘Õ¦¡¡¡D.ˈd11±É&b%RH¤ˆÈT"ÓˆL'2“H ‘J"Up†úÎf€¶Â`à#tÖ„ü~ò7øfäo6ð-8î ð¨1øˆmÁGìíð ƒ~+òŸ2ð7 ÿq¿ùÏø ÈÚÀû‘ÿŒßˆü' |ò' ü&äOøÍÈ7ðíÈÉÀw ÿ¨ß‚üÇ üÈÑÀß„üç üÍÈ~ÿ¿ùþ4¾ çàDzJÁÌ÷¾Ú5À²]ŧY®ko÷$˜t¾<ÀäÓLqyÎfy(lwbÊË9Í&ál’%˜õ$•Ǭ„,Žy1-8>È1Ý 6ùáºÏ°|Â9Åò²Žåø³•× Âùv÷+l.G¿Eå 6e.¶°©Õf ÆnFñ4Œ¥ ms ï(ä Â¥v[Ö›~>Œ_ìî)þËK°#bv“ø®+Þ¬½‘ÊC¿ÄÃ_,Ÿ† ÉÂ1—‡oÂÀJFS¯êA”™qÜÄÕó ùR¬T,õ¬ÜlZy&——¸Klæ!ÿÁ,VBz•§º\$ù²éMwí®gbš)Rw¹:Giœ5FÀuÂʸÈ`UR:À£ØeÑ-J¥½‘Ý÷S`ñô»ÏyÎmÃÕ¹Må&÷¹3ì*©œd8+ïç09 Áa\ŠPd\0£äÀ¡šâÃSšïÀYé Q>xô‹øZ1ÿT’õ´]¹ 6Û­ïæ† =«ë(WXB4`yÌ%i²,LTn”ÎËÌ^h"$Ú@ÊÞBÊu‚ÍwëƒËý(XÌ'x©áï(žyÄ(nîoA2Þ=p­À™)plî‹pö0(.÷8›`Φ¤îmxüék[Š#ÃÑCðù…Ç@v%XY?ç¦êœKçŠtÎÝÏú3Öð¶Þ½¸'Ôj»¹ÍÌ£0“0O·ÛÌÌ£'j!e„Ä”¦VA”·R,ü8ÌÕg•5b\bv—æË{¦˜·ÝŸ`U›f •àï¡¡—ŽCö&Ö?OP¡-êÇX*ñ±£Jðv˜+"¼ã£óÍÌ6hÉPßÒ«3|;Ô¸å¢ä+ŠÀü·ùv˜# ·‰ýdi6Âe——¦"é*y#=N>LE$*Àèw ¿«„ß«ùÞY¨ò¨ëÐ7çš[œ¹œý©’X,`Ëô¢2Âæd°%™`R1Ö°Edf1bY'âX!PkÅ&.Inâ[DÆw¢@^!â­ä‹O«ÜQúáqâ^›‰yGª‚÷#&Gq²–ŽbÄR‚-=b€VF­“³ü¾RÜ#§<þ=Á–†Ùtæc#U¯cMÇ/0<²–°M8^sdèuwfXwŽ±Ï…Æ¥Nç>¬È6yœ`wAÉÿÝò+Gƒ[ù–Z~Hü‹CÙE8R„tÂÖ$Ø*½Mé²[%œ¾V98¾â½XMï>Ö¸J `hŸç ó?enÁOµKÌ–%–)æ)¼«³íÙ& ÊoÏ6—úéyãÁçMµd—ìÙSP+Áêì’á™#Ó%l—íÙü3‹î6î/ýã~@óI¼D§“gcq彄_‹ÝbGŸE.ý55êƒ#ó¦Tñ„ÔÓ5KÜZ…W\Ø—‘I&|癓WÜÝ)å™BÙÆKɱ/ß‘©;_èÎWç ê‡#â¦ÍÍŸµ¯x¤Í=)|‡À/JS2µGóPY¡Ëy¸0R{WJ»Th$µP} Uv¢ì,´CÉÏÁ<ñÙ&bÕßá'EMö¥št½xÕŒ}‘ç»Å ÎïmýÒ~5óÒVð1·(ãÒ>•:òæ‰Hìƒð$hC½h“ï¤[“Ù\§ùÆ“qƒhÿe<Ó•GAᓪc0ÙPrý©.Èèà ðÌž£û0~[òUÂ1l„/©»ÎfC‚@ü%ƒl[¡þ¢Ê>Ó¸r‘®ìK°µ¤ÇeS†ƒ°MEq§Û¦ °Mƒðl»mú»þ<÷Åÿ—øþmá»øPK Ôå ˜PKö™H'&com/sun/net/ssl/internal/ssl/RDN.class•U]se~Þ,da»±˜6-¤¢µ)°P>l%¡ÍG«h(5Q ‰Õn`I¶C—KõäOÔ›NoÌM.Ú™Ž«ÞèèðÊ+ïœñ/XÏ»,´f†áìûñœçœóœ³ðÛ?ß=€ª.L¹ 0~ÅO6Ì1œ —î¨÷ÔhM56£+fC76ÓÖe‘!˜_*×ïF›-#jhf´Ù¬EuÃÔ†Z³6‹Z£Ð2·[&9jêÝ4wrrüq>ðÿ®sŹtp!ÖG!rÆóâý]þ“U¨¿OQ­µ4 ¼Ú\ظ£•Í\E3L½ªktp@r.é°Ôkýµ\^¼aᦇzÙeJÙÞð@ÀùVµJ0L_{Æ&”¦'¹G3º¡›Y6Oã³P¯h Òµ/ËÚ¶©×&Cd¨a¸0p;¢Cvƒ[©·eíº^£,]«—c1?ÉÏpj}QmnÕo6ê‘büb"OÄâ©™[ çÖû¿TºJ:¨ÛÛšQap«Í¦ÖàÅÓŃ¿µb˜7‚&j Hù¡äé—©%”£¢š¼XÍ([Õ>o©5ê²k‹ìvÿ„5'z=š+<›Ï‹CøÜQw ¨GϪiƦ¹E?n¦J8—Y﹈÷xµ…*ƒó‹†nj".ŠˆxCDDÄ´ˆó".ˆˆŠˆÉ˜À¨Œ×ñ*_äF’‘À)Aœ–Â1—!ÊðÃÍÍq ^â+¯Œs8##‡Œ7á”q ¯á7/Kx WÜH⪄æ$Ì`Þ·±ÀÍ¢„4®ð³k|u¯Þ‘ü®„ rnÚ¾ÇÍû—øm^Â,nHÈrª, ÜÜä&OÁ’  áâ…ÐÊE« ËNÒî4F茅:ø äý3ß`ù1`¹L@¦K[‚z^å0eyâ0v€Tiœu°òƒc6äëú Ù]L†ö±)nï?}t(äì‘M¶jâ4 ¶0I!ã˜å¢LwE!ן1é}¶iã3QmÝÎ’êwo//C›°`K³ÀòBf—¿tuö’·ó”ê²¥ð·P;Øi£Ü»¬´¡åwóÚ俆{ÙúÈŽàì¿PKWLýÊPK÷™H'&com/sun/net/ssl/internal/ssl/AVA.classV{|SwÿÞ4ɽ¹ÜÒ£cÙ²â\š¦ôÁè€ÒJ_h´¥H¡ÐÁ—ä¶„¥¹ÝÍ Ð©sNd(Ói΢®ÅW} ÛÒ¹*lê˜ÛÜÜ 6ñ=ߺüGÿ³žsïmZV>+5ŸOÎïœïï¼~çw~'yö¿ŸF*ñO ê$4IX+a„f ï•ð> ï–—°I í$Ü-aµ„F ï‘pƒ„Z 5Ö (Š”Ç”GÊÛzU6—©ÊhfU6›®JeLÍȨiKhÕŒn5ÓêÔÌ¥Û¹{¯–0ãI-c¦zSšA6KÈf¯ºO­J«™¾ª.ÓHeúê­àÝÜ‘òÍj#ÍsæÐ™3r&Ùkj=Û.´ÌöÜœëíµÂº#ñò{‰³n|]rx]äí“hênª/¿I@õz”l]Moé¥G4­eúÌ=d”Öj:eΨîÝè›Q}’¶ÑšF¼”«U%7åKr1MS›Þ_”¥ƒP‘g–­ÈT)Ÿ™2ÓSQL½PBš„¦^¸SßFïÄhQ³t%nB¹T¹L670 ¦– ß® î×$Í8Ï~#ej"t;DÜ.b—ˆ;DÜ$b»ˆ´ˆ="öŠè±SDFÁ*,WЋeÌU)èC©‚­¸^A®P°×*ø®Tp'nTpZ¼m¬Òª`¿­rµ‚»XåÃL’¨dl¥‚›Yï&Y&˜˜LrL>À$ÅdÉn&ûQÀu >‚‚â*檨ˆ±çr&ïä Vpºe 4ÙkœË„e܃OËø(>#ã †˜û¬Œáæ>'ãc‡ðy&úp/¾Àd؇Ã8Ê䋼A>Ž/1÷eŸÀCLF˜Œ2vL&‹!9ý “¯2ù“¯3ù“1&ßdò-&ßfòGØógßeî{2îÃÃ2>‰Gd þ¨ŒOáï~ŸÅ“,>È!O1–gò0§1Îä1&?q?†PCÚ÷pCàû!Nà+¢µÛ°‘¤zâ]’|ë y $âWáį#d/<ô¸%:ŽÇ+ò˜èˆÄOüÕ#(žÀÁž€0Žž‰öÓ<~ôNŸÂSŽ4q gmîÌ0®eå ê ¸Æñ„çñd?f‚?ïrò=he%Ê,§L8ƒÎ Za ×¶ +VØ©º\”ª— ³"ÇÇÓ”òÏêÜA·kÔI¸ˆãÝCþ†,Œ“Ç3ÛÇ&/Ä(•<žÍã¹uîRwÀÇχQ=_PÄ1\ ÌSÀ^´°³„y ØKv‚0‘°£(&N*ì¾lí>@˜¯€½baw&°W-,MØ‚vÎÂv¦°óÖJXq{ͪ [XÀ^·°« å/¡ò—Òážw*?³NCcðÙLÈ™üOÈ/Lþ+tqíBþS²ß–ËF±fʾ$â‚:^\#ðñþä›Ñ ÜÛc×ø¹q¼@8†Î×èTÄi»:OÐ3Ôôñò¿bÁ?6‚’¿Þr×8:ùÌlw³[ˆf„ÓÄë©Ü´VOàö—κ)=‰§ò¸@ËYòö«J5-¿®¨Ìã7yüv¶OšEŽÏ­.Z½QÊùw³5i$9 ¼ÒÑ,ã`VÀßcÇ$él8 ±h n÷q§§id:¶W;¶Š'qxJ´â ÎããESº4‹m]WÅ–híâ8Ô·V_ÀÝ>FOÆ‚^t A'lè%ò4bC/;DÐ}6ôŠù´¡WH&¨×†Î9Ђœ$Î;BÐzÍŠ ª´¡×hAWZm 6µïæv¯¶3ì¿zêˆQÁŸß ,æ%jUðÏüfŸFÜ–þ²Îó¯àv*¢ŽŒÆKJ=¡Uâþ’»òø+ã4 ,B¥žÓÇ&Ï ‹Šê¼üDþVçaûåôž‚!KïïÜÏî:/µ9‚¤tlò ç!4½G±¦Ô]DŠôvuXy×”ºƒwÒÙX4-É£ð’76ocó Eu¢»ÑzÁ!G{¡Ã’ê’ 8ìD¿Â]'ŽÁKêœFÐãI›|!è†ó—Îm›Ö‰AÑ_6™zm¤±Ëª@Pœ:wÐslò<[/s¬Ç°pûîï ,Ç?Îð+{„ZìM×W µ67]‡õ[±ùPK9}u{PK÷™H'3com/sun/net/ssl/internal/ssl/ObjectIdentifier.class•VÝsWÿ­wW+ %UÔ¨Áµ6mhd­%Åvë6Ž­6ŽSPp­;NÐâµ´¶7È»ª´JìR’†B¡…P¾ &eÀ/y VÎLo ϼå…a†sÎîÊubµ=³çž{îù>¿{­üï/·!"• ÒA<D6ˆƒAt‘ ¢=ˆÇ@€˜ìÊ Øì=«ŸÓ³eÝšËfÎEçðýâq§jZs‡]›I½ÉáÑ¢½­Õ­¬e8ÙZ­œ5-ǨZzÙÝŒÕBÝ©Ô24ô…ÃlKæ[ºìl%®ÏÎU:•蔌åd>ÏÙ>Âk+/“Ÿ™QÞ¢„|ÇìóAMš5ä·oBQz¶g’@›-ííݦMþAŒ<8äK†å˜³&÷í´€'’[Ór&±VŠä ÕBžo!rS<Üêzs´<å;çB¥û34ïCV¬•º µ3n`¡‹¾Œ€À i™NŽ xÔ.vµ­š£[Τ^®Ó>tl±hT“¤d@ Ž“sÏ·igOãfÏIyÜ®W‹Æóf™,÷½ôÔÁC™B~¤[¥)Tl‹Ú¬žc¯ªcÛêŒ9'`ÀÓ¹oÉ.5VKº£«fÍ:਺¥Ú®ŽšQ“Ž>§©²Ÿb¼ —gíê‚QRM†ŸëŒFó)–í¨†e×çæ}åýŸ ÜMªj±l[ÔÒ}tgÏŒèµyûDÕNOödzÓ=½{=ó²€¶3Ü-rÐ+Ã* h׫U}©hW–˜?§›e}†;%ÌÐW¤Ù°WÚkÛ¸RŒí\ ém] JŒ¯Öõ2 8Oµz@QL«d,fIhn %ÑÄÅð’cájï þpó<_ØÀÕ&é&4ÑÝ”ŽUS/›¯yÍÚµårˆÜ»îyè§Iµ¾,÷ê.Õc#QW41_µÏ{±E»N®ƒ•ªQ4JõC©pÆeª¡½VŸ©ù‚ŽÝŒ©¸€ç.É竦c(ø’‚ƒ Ž*È+ø²‚çŒ(8® WÁWV0¬àXû±ƒÉî0ú°‡Iˆ·jO"Âä aœ@8Œ~>xšÉsˆ†QÀÃa¼ˆ½aaY…ñ ’¬ÒÆ!|.Œ1ö2ŠT_Å.öÜÁÜÎ0rx4ŒgÙ¬±0žB‚]u†0=„ Ì„pEæJ!œ‚Ád–É“ù&Y6“ÉÙ^Â7˜”C˜Â‹·v;y©0y•=WC8Z;ÎÀ áôuÔ9Ð9Þžgn‘É<Û.1÷Zˆ”¿ÉÛ×åÅvþ»´çbF £‡NÇé¿ÿ4$tP]Ä?A'mx—8êø·µƒÖ ÑÚ<ÿvOí&þ‹$ÙKÚh¦Öð­ÔMLLik¸ ®áâûà¿ôId1éZ=â[¦$ZÇØJkàÒå¡x$°õ&&§nâÔTTX÷ã |'ÚÖÀwX^Ã÷þJŠß§ï’TÊ%ÞÅVŽŠ|’ÒŸQ%ÊWè·Bë;1’sb¿”?Â[«ˆÆ$i:—šúoIÓ$Ñâ‰~0Õ/µý~ýîÇâTЏ[¡ð6ËÂ@`k‰˜ÔÀtøvL^–…ŽÀ ¼ÙÀ ®×;þ©ÿã¦ê†ž—6'»ÏO¶ŸÚÄM}Ìm*•ü“;øÅMi·Ý„ç>Àå(Åýéûd!!†Ïãe×Gq^‹“œ[œ»‰W¦Öð³º9¬˜‰$癑2Ó ¼#çVq™øù²($¸ÈkëÿÑ"î~±µ¥„}?Ë£ÔR†ÓÓZêO¥ël©Ñ·Y¼.­b;Žg4—ºÒå6!î¸+]÷ËÎ!î;Üë—Õþ†“WNiwp²_^=Ý_7¿¼ç(4—÷¤8$®b_gDYL’r‰ÈÅ —»péÂUÈnPåÚú¿\¸È —-EÑ]ösØM+ý0F|ýª_{‘Ûømñ#ß!ì2’>”@A>ŽÞÔnàJ.&]Áp"’|í„BW"r‚x‰ù€Ü/'b2Í ÔïÂ@ŒÉw±@!%“Bå*ŽpX|ûö»kpúVh@v-:dÑÝÀÕT‡ÌÑiç¢ô´ ÓDïIü뎻®ø÷$À…oç ãóÇ9¬¥þˆÍa¾ÇcÓ¼tx#y“õfêÍוnšì¦iuø=óÁ8¬Ü ޱƒGÓñNÓå šÛëƒWAw)îêî*v¥Òñ>à%ÂèrÛzü·ëÿM¥Å>Úm­€w¿‚ý މCQetýñ+ØÃ¯ Íå7ôžDƒÞ[2ºIæ•@ Ë?.âïÚŸ}xjîø{þPKçy2•«O PK÷™H'2com/sun/net/ssl/internal/ssl/DerOutputStream.classVmWÇ~­XiYb!,ƒ"HíÆb%,£ÔÔÁŽ[~Q Æ Ä­!n³H‹XWÒbi•·M‡ô%m“R×iÜ·Ô´ IÓ/y9Ö§|ë—ü‰þ€ž“/ý^÷ÎîH(–lAuŽfæÎ}î3÷Þ¹w¤Oÿû÷Mx0€¿ú°ß‡ç<`€‡¾ðáÛ žhÊÏ3HÑþÙ†dtdy£náÈ4§œË‹E›ÄVÆâ„ÞòÆÍÏêÄw,3 ¦}œjö˜XH£T\ ÊÉ+icÑ6­B‰zãôÄ4£.9Ô¤>–lÃ)qãÊd‘éöM¦õlÅD™²ÊÅ´qÊÌ‘'-¼!÷ÌŽé¥ë\Ñ8?x090˜<4øÄ‘‹äÚ,W3¾s$Í•ç)–ô‚^Ø 2|/ƒ2žW`àY¾Jã ß[âÃU ø.ßûžßWp /*ø^âÃ59¼Ì‡ë|xEAËü*~À‡b ø¡ ?ââ\æg\Æu?ѿƇŸPiš![à癢ÿH~ž,š{hµ2i¿HÒ>BðOèô øéGxýæhõ³ðÆŽŠñ| xÍü—WÛÀÏ·Ô»„:Hlœ¯U‹l`¥¢§,Ò.ׇ„ÞÓÖñ‹uÜp!ÒW"à<)é¦x˜ö<4Œ­ã—qÏã¸öâ-tjñMé¹uÜÔ<ëxs ~’¹÷ðùW÷22œ¦]ÆýÄÇïÖZÉT‹Õðh±Þ0œADØjÂõG4‰Ãi¸¹…v­w7|M=C ‚¡šü[õȯU#ïHU (Žo¸Uÿ:Â?FqµÒ|$È>Á¯'‚-gïàÒ… üfX Kñuü6,Q|¿[ÇZ ›s†½NÖÂÞ†q£Kp&n~ ýZ`ÈÓÛdèyr -Ö³Ž?¬Ðör ëášÛw?«'›¨Ö%kÓ¼÷‹úWÀß÷u#BW¿J鈬8¹~5ÒÁ°Š x™Óˆ]+ô¬"¢®;›ßÕ•íS‘ ´ŠýZàWÚ{`šXv÷»+€†Èz·'©I¶¢dN”>ާº¸Y?‡Ýêâv=ò©jývŠ|ÈšLÉ^­‡> U@÷ˆæQ´HüC¼±?6jµv~“öš_‹oþéaÉ3ä]ÃÞ°òÞAšƒ?MÅCÞ$—“ß[°ìe!o|óöÝ…¥Íb‘ ·z†ä5t†[C2Áä$µ÷Բ̸D°‡[>Á;‚lØçòSù„}÷ôƲŸ…üò3-¦¬­ÕÇ6uŸØ^oÃt£îü? ø<"ȉJ¢ù€eÂs| í±Þ$5Ù[ËÖ£þ£ÅÆp~ÇDƒ‰¾A×å>¹ˆÐKs8Ò{meHê¹…¶ØË×ZHªV*Ã7ïû\xü\t5..ЃËÙ~ŒÞpßÙÊ{ß øhÿ½Œ³Û‰~gSŸ¸åˆqàã/ÉÇxßã Þzúéæ{…ùnaþà߈oUÝGÙäv¡ê±ïKü8)ÓÐ0JëhÿPK$#CÀ›PK÷™H'-com/sun/net/ssl/internal/ssl/DerEncoder.class=ŽÁjAD«uãÆ˜ƒ ~A’Ãf²ž¯*/!‡Él£»¬323+~›?À SMQýúÒuù=ÑD‚gÂàõ³”) #²Úïk¿ò–ånò¶&<ÍŽŠ÷¾0ÚX™Ú*žú_Sé¶fiM²N߇I:üHÇ£o‹2;áj-4{á\% íÙjYÝ`Êv¦•ÉÙÚù½{…Eöÿ’н]+©7"û)YùqŒ‡­P\E¡ Ó…l7ÃÞ@ôPKl€ÆéPK÷™H')com/sun/net/ssl/internal/ssl/BigInt.classUßOÛf=ÆNY(,¡MÛ­sœ@ág¡t`ËJ7Œ¡I5Á„TÁfŽSµ}@›ÄëúÈ^PQ5ÆÃ&m ­í^÷L{Ú0v?Ç YAÓ"åûq|î=çÞïsòûß¿ƒG–xpO_øÑãÇ?ÞöÃïG˜ƒOŠÐ‡ƒP™x5šáТF³õGz¢¨›ùÄìÊC#猼 Ï9vÁÌÜ^…7tg=1QÈgLÇÈöˆ›nr«Ñå !5}6~¢¼¶æR5MW& iT3Ël¡ªÙœµ‘(•Í„i8‰R©˜(PzÛÔ‹î¦"7ýœC«zÖ4ÃãêY×ÿa¤õ<:9éPϯ’=ó©·ždoª¯`phX_É­kTÉhÁ,8cÚ*1ÝŽ•µÌ|<âXVd¥§’ÓÖªÁ¡9m™%G7½X¦½r^¯¥9«lçŒéB‘ ¬«mË“ziݺo[] ÉîÞ®doOrxè œNâúæ¦a®Òf…6¹uÝwÈm®h™ãt–ÂŒ/Ëz±Äáú©ŸL±häõâ¸/o¦3õ8gl:Ëäpõ”t¯¼±bØÓ–M«cÞ<¤A•J©¬óχ.áy‡Àá’I†œÂ##RÊŽU¿m¢íÇ·mý µÁ±ÜýŽU‘¡ŠHˆÐD\Ñ-¢KDLFoɸk2zq‘m/ËxM2¢ha[EÆ;h“qA¶ ÈèƒÌ\ba²„~ܾ€ŒIÄ CxŸaãawØ0!áÒl˜”0‚)¶šfÃ,âC £,b$iì§7¹ÞirD«¼‹«´»â¢>H´&K4vò=B]í…‚öЪ ¿úÆ]í'ÜåCÏæ÷±R¸=D4_ð?}6Ï–‚KÑCJÃbZc=%P£ÔØ>—ÒÄz^û)/PãÕB)äG°3Þî_&ãͳÌxìÙ™8Ÿ â«­4¿ÄÐ’Âaæa;hÒ⤵›ZüXXu……±}YòNa5Þ™šßæ¹Îøñó“¿N…:<¡0õ‡u(À„4Rº÷Ԣʤ3ö˜SôsÊ, k±ïàˆ;;ÃDŽãÇ»ðñ<©¶¸ª)u!&ìRžŸü)ÔR¶z)¯xâJì7 ì@Öb¯1pˆû|…ÛÀîÇý†Äyš¿~‰[KnNßú>ÎÆáŸ,ò·÷±S|ìI8%> \Ü:ÄÜ!ækà)"›ß¢nª]„cJ#˳…@‘J±@„‘·¸°WÃÕüé^I4{Ö:Èû¡“\÷ U½3í2ÍŒÖÄ•FWI)÷Þ2Ò$ÉÊr%Å,éè’"añ?ʪl£»ó¸RQ'[Fë þª6¹¯Ö¸ 'ë£þ¬*q»{ýPKµ¸5&PK÷™H'+com/sun/net/ssl/internal/ssl/BitArray.classUMwe~¦3ɤiÚN+!‰ä#MZB­Ð/Ú@Ñ`¡`k!´Ódš„3ÌÔd‚ŇÃñp\žƒ¸°*Ðr,ܸðèÆ¿Àzïd’¶i<ÇÅÜû¾÷ã¹Ï½ï;3¿ÿóó:Dô"ïAЃ7ˆá]áî‰ê-5¦«F.69CËXƒõæ)«X0rƒvÎŒ)Ü=›¬¨«¬R ÔEªQ »g*Š‚]áÔU޺éÙ$/"ቌy3V*1C³b¥’+–V4TÝÞ$ ÖX±¨Þäà®ðN®Œi`O50¥v€84Ùî Wɤ+‘d±Éz†2zÁ(X#Ä{ÈY &o[ZHej!Ë4C¥¼Y´h*j‹E­¤Vh¾`9æB(W¸¥!]3rVž¦qÚÌjZO›FÉR kFÕË´÷Ž/e´E«@V 5pAË©¥:™¡³ªŽ„â§Ìr1£-è”ÜÄg²{öŒJT.ÍÞ™ø±¾ÞxßñøÉ×éäfÙ-¨šmNs‘„yz2ÔiF7 Â8ü¿Î‚r²ôP¼[û¬¬êDVÌi *OÅ+­íÌÏÉΚ,[‹e‹®©7„7ÏÀö¦Œ¬¶D!“ I³ldKµI8¸šÒuˆ>VÌ•oÒˆ·ul "Î9­(@©¿ÛL•£ßnº]²4"箞“Xâ¶Ú,3išº¦Nû-d¨¶E][fËõy±`i2ŽÊØ/#.#&#!㸌c2zeôùÆöÀÍ¢Ó‡Cøpû}x>äûheo»'àåf!…χ“ØÅ¢Å‡÷ sÜÍÀi/†pÆ‹aŒóö,‹÷½ÁìHyi{ŽÅ‡^œÂ„£çíyXLz1Æc¸È⋼HbJàÁŠ¢• ó¥•ÀäIïÅaÒöѺ 9ÚS¶½{›]A3vÃM–½”ü 2ä©¢ü‚Á´(¿ô¤EåøtZbábá&1•–zâäqÕ{âÕwCçÈ[<ñmu< =œ£¸ë]µBʼZ%ÅŒïlIinè²³¼õ®ÍZ- ]v–o‹k{[JkC—ÕVïÚ¬ÕÞÐEYO1ý#ì“£«×BK‡‰ýZšH¬âcÿ7h]ÃpºSXÅÌ«ˆÿ9.GüŠgNÊ*ý¥ç9®TüôH3lCµ9Pw醹I[;¡zÖOÞÿcjª¡×ÀG‚í—:°Ñ%-ÝïwE‚vÁ1ò WÄà ¤yÁϺ”ݲLt¹îÜŸ®çÕÄoaå¾â(í¸E?óŠDŸá2÷EúÊ ®¾Æ`­-n¦ËI:E@üú$*IëœB/+ò\uâð2Ú"h ±‚Ù/›„ûoü];bsa°.‚H7¯a M€×~pB"ôjUBf(D"}.ù.éIô7x£¿bà!\â“èk œï!t®ðˆ-âÈ2öð‚‰[ÚÖ/E!håñÆŸÒ§}zœtÎ:æÿ-~›-Ú×0šö¿ÀõU|òŠsiýi‚Ä܇ÅeHPu¶£ôôØý0d­xLGÄ!G§²ßŸg”@bnÈ ³ùË®v¯JéZ~ižŒ‹ý·—¿˜Ž{·]’l’"ïS<‹Ù¥*}i®.ѵs‘ÿ¯®¸£î¨_ <@§=µk‰.éîýéetÔ¶M÷vÜ£Q"s¨F¦ƒ Ú\‰‰^åÑOØŠ»×¹1˜ÂKi¾Ñ@$°uzËõˆVŸ~Nêg -‘Ú¥¬°?Ûôˆðù†|µ†±ô*æíg£?aº2pù ¥ýNŸ(¯ ³i¬™4=Eþ¾¨â]AvÍQ%D‹Ú!IÙÇϳÎÓýÚ‰ûx”ø2èëÃá•F}ü±†d:ºm U²oÙÿ‹Ð¿PK"Ö…†² PK÷™H'1com/sun/net/ssl/internal/ssl/CbcBlockCipher.classRoÒP=èJ±sêdÎýPçüQZ;:YÆH4ÆdÉþ!þå%k†-)ÌȾ•‰CcŒÀe¼÷ÑbL̲„ž{NßyçÞ÷ʯßß" ûi«ÐЬV«p(àZo¼ðCqx9*‡ý¢ŒdtúJ4ú¡wÜôG2Úc¿fµ\uªÓƒý˜çb®Ä|,=WóTÈ4Þ4†}ñî”~žDž|é÷iwªÝXj¿è ÂwQè–¶Ên©¼]ªVÞSv‡ž. ×å„ÿ”ûyÖEÛ 8çZ›]ï÷æùîØexá`¬öÑ8=ºÅžô¢ñ`DL ;–ãéÀÚPŽZé⨾–cì§0Šw§2 ×±¤ãºŽ¼‰U× ¤L܆fâ L~wÉÄU\6±È°Ìps&n!kât+,בÉá6sØÀ=†û,¸‹‡I‹YÁfpØòˆ-.ÃË"³m”hy@‚G &xU㺬ªFÌ ?'}_R¯ˆ¥¨Ölg‚=å¯xl;gرí/xú#{†]"»iVßðdö¶2cÕπʧÆ©o¡S Ažg°’žà™ªIZ5ŽÜSëIƒšZqó™X&Ù+³ìzœ]þ»¯’Dq;¥)`‚çÓ˜Yt’µ¦n‰³V)‰O¿à¤ÿg\Ÿódc£¡4A=±Ì¦°ðPK\%2™ ñPK÷™H'.com/sun/net/ssl/internal/ssl/BlockCipher.class}AKÃ0ÇÿéZk»ê¬N=èE¼t…Úu'ñ°‰Ð›0Øex˜]`ÁšŒ´;ègÚEP~?”øRôjïý^ÞG’¯ïO´`Ÿ¡õr;Ê{'Ê›ìEÓaNÛðÆ¥¢¾"g¤æœ‘îÕJüF”tp0½žU u«U2ÉÎI6ègçw4å¾TÅÃX<“ê1­V2•¼N«ªL…¬¹–³²)†F‰å‚k†ÓÕ?ËóB?-k".r¸hp`ðáúè ô°ƒ]û„bÝÞtˆl"‡þ€ÞGÕ!,b ½c/>~C÷f…¤³_)lpâWtצk3lÑ$“·M¦ö&E ÞPK($bPK÷™H')com/sun/net/ssl/internal/ssl/Cipher.class5PMOÛ@}ÛÙÄ„òÑ8†HEQS7DBTBUŠz(„cV`0^d›ªáˆòø 9åÒK%RüþgŽ\ ³Nâ•Þ¼7;ófÖOoÿ¡¡†O Ze¥™à>ƒ^iª`T¶Tä›IÆTl,&Gb¬Ó^àśԾ-#?sO^…®øáù”(ì8Ñ©Ü em¿þuµV_ýVÿ¾~ȰäÊ ;º ì@Ävù¶Ä" ?ÛÞ婲®¼ìlùÒ=g˜>s~;¶ï'ö¯£3áÆ´å¹èìy×4'‰ø§è0dþÈpÔ½¡L8ÇÇd¤r˜†i"BæôEÂ<Ú]ÝKËÐ/"R¤èfõóÕÒ=Šÿ ¾,>$•ªfq ¬­}Ì~)[F»Z"h´º³ Kï ^†m34„ÚfÕ;ÿª[QROÜgÁGe òÎP\ÖÖx E ¹òçí"¼¹mu9³¸•î žÇë}¤¥†Ÿé1Ê4_ÚìÓ;ÊZ««±ri¡Ý¼«&SȽPKQ½CžPK÷™H'1com/sun/net/ssl/internal/ssl/HexDumpEncoder.class…SKOQþn[è´pAŠO,”òy- MH AI 1q,ƒŒ)Óf:U$†•{#[7bLܸ10ƸןáϦMÃC÷¼¾ïœûÍéí¯?ß~Àî*¨TTP§@QP+ "¾ĵ7R®]t¦Ø5uÎ?ÕŸéq3_(8¹‚³ä؆¾q›±æ30·±õ p%‘:>xÑ6­"œ`¬ÁÃ2ºõ$N€i=q/=$w”„VŽ™–éLÊdvÕÏl¦œcf­<±èNNÄ¥lÁN³f†º|+ Æ•i=¿ž]´³±å¾žþX_oßÈðC£Óy, >~áùEÞr²eé¼iÑ ‘ˆ¥³ñ|ÁŠ[†Ïç3qºÑ°-=ã&ÉuÝÖÓT˜±Ò$Öèú'ÎØœ.läJl±J² 7;RPw”$ kk†½hk榀<*²¨SJKÄåR}q+©…ÒÆÊªe»æŠQEŽë\aŸ¡ŽŠç¶éAD‚è¢3ˆë*êVq M*ZP£" ©¢*nà‚Š+P TcÓs*ºÓ³ì ¡ýa2aÄq“ÓÁ·ât˜Í££ln£ƒò€O¥Hð`×·{ž´W("idÏSÖE@UôcQ)¿+{ÿ ¸ ­y´jòLó>yX[ «ñ0¿”Eð25ø\pŽU‹~Á8ÉîÖ{ä§ÈÅGubw¢ <ÚÃ$“¤òª‹ù;’Óà}]/Zž7ÿyùsQÿ’Ñ®$NÒ¯¢Ê£'éï'?ÄÃé$¥ò²‡Ûo<-\*Ïëü¬Íϲ´=LŸ}­¤ä­7ú5õMKùÝŒD›;(@ƒ4,ÿ®W>¡I¹{ø»´?ÑySÚ€Œì¢Ú ·> ÆåTç#¤§” }Ìð¾i÷ð'×÷1Ë»Lr‰Ö™<.9įÑûåî“t–œj nÉšíqM†è*M†WåÔ£Òd/Q.jù?¥øp.òSAó_PK!d»ûiPK÷™H'3com/sun/net/ssl/internal/ssl/CharacterEncoder.class¥S]Se~–lØ.¡†²ªÔ°$„@‹j”P¨QZ¢©ÔHkMÃRÒ »¸Ù8åÂ/ü^zgÛ‹xÑ‹:£aF¼÷Ê_áÏÏÙl’¥ £3N&ç¼ÏùzŸsÞ³üýë1<ˆâý>x“iCáÉõÇù¯ò±R^ËZfQ´d;7L‡ë¾¢Këû‹ÜZ~o©iܨX-+'ŒtNØJñU¡ðJ<åK³S9ù•JÛþ+áö:vìH†ÃİS‚—p‘ôÙä»®->ˆÓázQ/ZI‘•]3_°4sU/Ûš™Hhö!UÙÙṈ̃¢N.=_ÓLÓ0ˆ+äà_}RÐö­¢¡—‰kó¾ ‘i\GAY£b´µb‰2†·näË»FÆ4¢›ñéÙh|v&¾¸p_€üðÀÒÊÍ\¶Œ=\/ê”-{±rEéš+—K±!¬ìæO‘§¾êìéòúÁ)êîI@À 3¦¶S|òŠ1K’ýu#siĹL¨ÑFÿ)â¾lšù×JÑR´¹Ýï"`°¹ˆͱº­z§XרôµbµþNƒ.K«f˺ñð±V°Hû"Ò>—,Q˜H†m=¬Ö*¥ÒŸeÔWM¤„ oJxCÂe oIK¸"aBƼ2BðÈx>™>aIÆzd¼Æ¶QøeŒ³ã‹œ—qÝ2¦qŽ¡,C©C‘!…¨ʘâ¢xüˆaÁ,²H°XbqÅ;,’,Þeñž³<‡e†)†+~\Å †« ×ü˜ÇÍ‚ïó)íÇÛø@' Ðn§S¨/’ƒ„làUñáOt€(pw¶±&75….;ü:u“¶ÔÖó%¼j¤†[êTÈ[Ãíy1(~M5kØð$«˜Q(.óEP|Ž€ ymXÃGUôÙ0(*ÛëQI‚OOþ Š\ûº«8ÇÕ?®žàÉûÝ{Ï=Ûýóžô”~ùñ'B)ñ™&Š‚f£ QÉ`3è ~)j>ŸÐ „N<R¡+CE™aC׊²ÕŠì@`&– <“´QÈTȨfûý‚@ØšMÉPB~›³â%/mNÒ†( V)F} E>à9,–EÍoû™QªÚ(;…Œ—cà@-±Á 6XF|I-ÊÔEGGiF,“4£ /¡‚å(«@™fzTø5]Ø~bœ@Ú,ã™À™Ñ.êÁ»¨ -¥£šÔ„*/1“‚70Ã.d4ÿcí¿B+¥?ât}]ËÒŸ&ÖźöýÑqbíû¨X±±öý>aÄvîä¥;0Æc€ÆôçAÌw*›ûlÈw²-”8€™šÛƒ“'ŽM;3ìæ 7Ñ·Ï™"ë½3žœºåØ ZøŒùDù‡gÎÜqz&µ¯3Ý•êìêèìËßû;}Âw˜®{éšô‰ØäÌÉÌìCÓ™é©3™ÙÙ™cÓg¦NO>ÅØ‰™ÉãÛ::uÚ'Z¿QuÇÔ솢ïâÈÔäé³§ÎЊ’²¦¦7V÷Ñu?]Gé:F×t§ë]'隦k†®StÎÙ©3»¦ÎZâ§–˜‰ñpˆo.$yöÏ–xö8Ïž`x’á)†§žax–á9†Yñ@HãÏzãsKhvZ¥¸g„(•ü`£Q—öU{B“Åñ ºmÆ' Ÿ0¥Ÿ°¤=>a[ãÒ4,}|M¼&+¯'4ÇW˜ÐaÂp´Â„éè… Ë1 ¶cHݱ-Ç&´a <*h†£<”„%¡°ÍÖ°ÎÃÖ°Ÿ‡Ò°EÂr”БQÂmR–Iöêr€r (+ôšx]æq†<Ÿ¡ƒÏã3Dù •t>4ù8Ò–}„ÙI”í„%²0$«·È0áV ,Õ ¤ìç4ºÆ9ø8§Ñ8ÎiTºÒ!,—A æ¨RVÉ,aµLÖÈ&ˆ&¬•9Â:™&¬—­„QYGØ Ë åVÂ&i6Ë!ÂÙCØ*S„m²…0&k Û¥K—[|¨¤$LÉn´Lfd3a‡ŒvÊ2Â."Ìr9»e aÜF˜“%„½&Õö )¹¶TK˜5ˆbSR9-fÜ–A.¬ qaåV.¬,åÂÊ0×Unã²J—«*+¸¨²Šk*k¸¤2B5zSv F[¸F’käUÜÐbHÌ*C…¨P9*ä Bœu©‰ U¡B*TŠ ™×Uh*Äg¯ÐQ¡ØuªC…šQ¡ôuªE…ÚP¡.T(‰ EQ¡ *”@…:P¡VT¨j@…ºQ!®\]–DǥРi”%#ë‰ô·ä(n¨ ßK6ßK%|/…ø^Ú”_w+©%Àº2Èzt'Ar¸"[ØJnu¸.¥n"]ç›ÈáÇns¸^e@×qø.VÀC¥Ãu¬rÊ«5Ô*GuȨ¢H©Y4r°&øiFr-Pi¶©cH®Vq„O @Rm§ØEId¥ž;¾ ®³Øí†UJ(Õ^ÄÌ+QŽÙ„õ¢Pü5ñ¶Ç¶Ë¯r¦<À”W0å:wy¯Jp^…ÇW5(wA9ws‰ãå`\G—³U)¬¤S ÆëÀx¸Ž€ë¸®×õàº\Wƒe¶Š8ì§Qê SI¬á¿ ›á¹:­Ðoƒÿ$íÈ-ެÈ< )HÒÐÌ «øï„‡.xÎ"ŸnäÖƒ(9Hz!É#Ï~ø€í ü !·aÄ!5ñŽ":ì·™é&¹‘In¿Íà· ü¶€ßVðÛ ~-ðÛ~[ÐÑ1澈àv&Ÿ;–ÛÔG™Ï1ðÜž›Ás<ÇÑÓØfI.j§N¹¨‡ï(¼6`ÞˆšTèfX·`»ÙÇ”];´âp•ÀFGI©í ²é@ÔNøè‚ó, º‘GrÍ!Ë^çq’>Xõ« „ê̆áz„ÌÖÄ»^o'‰ñpô57ÐÄ'©å¤ø‰’ý¦?õù0ßæ;™ù°8Ò»ÐÔ¬+ñQŸÝôÓc$É”«i¢rå°"-‚uUņÕJR‡奖ӡ&ç€õ*`û ؈|š°Ý¬¶Û Š)_íÐ#FBßIðÍ–i5dTvðÒ©¼t¡ÇUÝÕ£ÒÎ!¡^xÌ+QŸŠÕÓ À r9Ѱr3B–kâ=¯ßùË‹îdùÉÒÍMß³ñÅH}­1Z¿­ß‹(@èEë÷ õûP…~T!‡Îà28ƒ¨Â Z~ô£å‡Ñòy߇–í#L;§D¬€õôz?H7@:GlT)6A©![h+¶Û\ Ú±G˜\'±›R.Òp‘ÁvòêD´.DÎBÒ ×9œ£ò¦¯Få |?Úûní}ÌßÃÌ«—®R˜I¨†‚ù¡É±Q;þÊC ž}Tªíˆ"°«…]œ×ã½/Šyæ0kRA›aÜãV%jƒn >Ú±‡×2KB5…Ã¥á/ƒCwâp]H/ ýnè÷ÀO:yèôá ýÀ•ü †`= ß#”åšxÿ¿ Ó{ñ¬8®ÞŽé­¿ù‰–8½ŽØ—ÅôuêjðqÙ¯Ä >Š'>*s?ÿàà™¿* þñP\Ôr––3´œ¹"žN¸Æ’áK{cNOºf­sxAšsšL׆K?[Á¹¢Zº:oç¯-±mÒzÉôÁöÞÚ°•# R^gziI›°Z²|®%åòúÃG~Tœðr c‰Hü}ñ‘f\Çyæ]W.‹¿b#åê´wuóÔ*þ ]iü‡– $´tÎJèéœéZÖ¼k.:“ 9Ã5]c‘E®aÍ-æ,N›Gnܤ“ð®i̻֢3Å›oZ¬c̱½Îcó¾7¥­võ9Ò¨Ÿ×ŠðH!î¿Q‘HËò´¨NöŠo?YEÈ”¸#m#å–¾ôbÎXkä|dÊæê«âGšçuQ Þ夯¼M‚ÊksÓo¾¯|yª«_uöÞW½sƒ3ËÕw”©õ]gj}—™šœ©¹dû\º‹–¿|…kBìêóßXÖ±X‡Ïh£?îûJت{ lNݸi¨Þáβ¼Îº®?¤ê ›“7nrOšIÍ5 I"¢°ÙáÓªÃ}w S„hÜ%óWƒý`Ÿý%t›¯ˆÌªxÃ5²hOk!gU\#ášæ|vU¼æZÙ… ÂÒW„®è @Éä—×ÿ¥åHòŸÈru}.g­ˆ,uõ#<'åìª×¢ËÖ ÓåR•ßtõô!Dм,dUÐ5(š™.¬l.däHÚ‹Y^ÿ\F¾Æ8ÿ-Œ)ÍÏx¨*¸*Þ¢¦/ˆ0§u0½*^wt±àíÈÊC›öæ¦rS¹¼þ÷%ÝG#z…ãU%©Ëâo¢sßúAtùkDAþ©×ó¢¢ñÓ»A\UÕú‚þ’°jôÅÁj}þü@µ|tðâú5oyÁŸ¿öàÅÞPÚЊ¨HD²WÄ'EI"r0«/ž_òûèÅqyý‹xBW©|Ohêéøéf"3ž·£t“ƃ`oO²–zìè¡xkJÓmr~Ü“è2¹)36dö¦Ìôd”3êêËëïlF=éE¢N ên¶…9ȆÅú‚¬œó–º' ObxûšÄT¯ˆòÒFÍÂíñãÿPK2ô¯„m GPK÷™H'-com/sun/net/ssl/internal/ssl/Des3Cipher.class}kÓPÆŸÛ—%qF·vu/¾»u©]šÖvÿè†P(LR³4®]R’LèÇÜ&*~?”xN–l C…ÜßsžÜ›çœ›Ÿ¿¾þ@´²¥nwuW@/mX-cd¹ûÆË½ÇÛÝK^E‡³¥^‡5GÚ¥‡ë©§Cw>Èlz}G ´m{‡Fpä®A02†nèø®5ŠÌ–lÇǧ”ïÈ·çÃ}—êu ½-+x¯|¯²k®Õ*f­jn´Þ ‹ºZ¾oMloQòL”ÊymÊÎ’úg4Ë‹ÄZúI×£šP§ ÒVTWòÚO‚ò—µÎƒqró"¨‘ÍŸßðÅð _—ù#­É_°QÖd2ÕÄhdÌ3£ÃÒ>xŠ'Ç4cl«‘]O¬ÙfÒM&¦ üPK‰ÏÞÑPK÷™H')com/sun/net/ssl/internal/ssl/RawDSA.classµW |Så?÷™ô¶„À-Dž!7M)H„òÐ#ÐV‹h·¦Í¥ ¦ILRlCdÝýœî¡8§âܺ)sTi´+2g™ÎÇæ6_s7çnS÷T·ÙsïM›ÒRñ÷sð»çõïÿï|ç;_úØ;ÇûƒR¶^†Ë¸mûÛpñç_=ÈÝ8³ïE“Ïpƒè0Àá2ÔÊp— e¸D†ëeHËp¹ û¸×ž¸ïîÖã/¾Ã9–lÙÍ=üôK¯sMëç2¶Êà–áfËP"Ãf1(±Ûܵ>÷%îDʽÁOdÜÑx4 Ç¢×ê?ƒ"»í²ê`u0X¹)¸mý:‚ÝÖTá6xÒâW[¼8çYd°Ð³hSc¢¥,Ý/‹ë™²t:VgôT<3”ªhS0žYÉ` zî ï—ÅÂñ¦²ºL*oBóôœ¹%œi¶¼õ&=…C³rCi½±5Í´—Õ‘ _ŽG-è°`”ƒ±ôÎp£ž.[WWYN…[Ò+X·2à=‹¶W«"MôTm7Õ32í8¬!Û>þ×é©­áX«¾’Pƒ&ªÇsVy!מ¼åkvéh+"ßY9VµîÜiäOË}ïöà¦à¨à¬Hv>-¸1Ç .羕 j´}Œm §Ë3váPYúÏ4v¦Z[w† ï&ùž`Þ—%oÿ¿-ù¾„Wâ9íŠÖ¦¢»Ã}£Þnœbñ¨ñÖ†X´17¼ðôá1o¸uáFz¦“z㎳êÐ`¸ óŽ|]ZäÛ±l$̲_ìÙ|;ÅÉÁíAª>Ù”Q\Emv v“µ‰ˆÎ pm"žÎ„ã£a0°¯Ó“)½Ae}[£žÌDÑ…ÃÙÂÆºõÔ‹§nLëzÄèÚawC{Fw‡S©p;œ)˜âñ;ç¼³ë›â¥ákPgà0w]´)Î öóº‹*ËÝ‘h“žÎ¸3‰„;–ˆ7áê­©FýÂh }&P¿º}]8Ýœ¨M%J·–û—”–/Y\¾bù•4Š[dalÏáîÞN&Íqa”õ¸a¤6&’¸YÖ€_#ƒ¹gÑX±o¿[ËÆ“­ì0zô½›wMk&Ï}þY½ïj.»6ôJ†Sú–n7Íp¦S7Eãú=3T¿øH›Æ –žË°a«žŠîlšX7b¢Ý2“S¹,Á²RsóEýêÖp pºžJá=Þ˜ˆ`v§‡ÏžíÄ›oÒ3™Uz¦­÷Ôd6M—0(@V‡èˆ¨›Æ+LB´fü¢øæGã»ñ7IdxÙCÞÒ“rÉáݱ]ØgŒ‚Ž&ʪðzTRÑŒ<±É¹ñ`ÍÐ-c0gøe ÆbzS8V™jjmÑã™<'ÇéÖôØïÚHßötFÇ•§ŒuEœ3òÍmaßË[yá˜>Cçšç¹`¤gu¢®µ±¹2Ö”@µ¹%ÏqÆ™ûƒi§ §Ý}†‘qs.uI<×ÙãõÜtî(ÆíH£¶yšÓÐË‚t\Ç܃ô,ތܩ¶f¢tgÍT±«ð‹á‡2×’ îOHO¥1_"*µ‰kð-hie¢Éõ/L’×Û2FšfvsêªI3p÷UºñËzjÞˆin€QHâJX×CudKé-áh.Á'%ø¼7Ið >%AH‚$h”@—à#à”%èà£D$ø’Ÿ‘àsÜ,Á¸–+p+Ô(p „¨‡e ¤à\ö’úAXªÀ7a¾{`íàQ`T*Kø0Ùv‘´Ö+Ð ÛIZIdµa"ß/­±–ˆ_{ œ$Ÿ 4-L$JäCP¦À50ONm ¹;` ¹\DÒ¾sh† R*p'©×™K t±·Ñâ·Ã*¾FÒ—‰|…È•D.†E ì‡:>@$Lûh£Õ®%²›ÈØ¢À½°„v~í¼Ô÷Á#68DNÙá~ø¾¾ ’ú˜Ã#D~@äq;tÁ#ðüãÙŒ’£ª0xƒÅ£ßeñŒÅ±Þ Ž•jðë,Øà·Xv¬nä.8€œÁ&”'àÜ‘§s¨ß§ó¨5O`ÊXA(oD‹9C>ÅëdYôrÝø×šcJŸÜÍXпjüxôùبBQÂyìeDšˆü9GmŸ}³—óqÞþ£l·ÆáðPîSy1âGê#þýÄ‹,î@¾…¾­Ä1{Ͼšž¡¹æžÁ'5Î4Þ5Á4Ñ5ɰq{'¬W¹M3÷ìSEUÚ«Šö«òÞ}õª­Þ§ÚýõÎ õkT9`S¥€¬ŠŽYmª(ìÙT! –„;SíŽ);¦ :á‚‘xˆµß„*@(n|¨¦8<O8<¥‚£B£ÀTi8<1ùñ1¦*ŽU{«…ã„WˆPÂøP…L-tÔbxrŸ½¢ÈUÄafU¡¾ÆUÄczU‘$s¬J$‰˜hU&IÂlã(6Î~5DóÄñ>Š ![­õKɯò÷’Ïr£6+Àß<üfhý|}Ÿ\Ý ÅZ¿`JN­_4%YëG®q¥œF5SÚ/Å0L ˆPíŠKUQ¬_: ÷Ö ¶ÃºP¿Ô!·9Žû†L<šmN)Ï´Ô1½Í‰)¯é˜À:D^Kûv¹„Üf°[›¹Ã呯ÒN¤ `ÀÈ}§0Èä`×ú}ýw‚ÀâÖtÂ$­Äï+ñzÇJ4„};d 2¸ Öe*6.$6ÍiëaܽG˜™ëo¶ücp¾å¿/¥m…v¸ föBW¨‡œö,´&ö0)ËäÚCðÀf¯ï³1èf IvYV0ò†vá׌~$¼`ø¼À‹Æà œòÇù³vªùNBϘáõú‚ž,›ØÍ&b7Ãv0­ºCN%Ë' ©¤®YI€×¾—‘ïõböJz˜s ³HÁo6†>y3Y²øPRÝ GC¾¦fÙÔ ž”RKzáXÈɲi¢Ktñ=l:2Y/ô†‹]˜W–ͨ\R›yøò^è 9‹²¬øÆ´Òøÿ;yYèÃ/ šUEçb¤tÞŒðcýwAa/ô‡œ³Ì}‚,Þmãë±­ÎÜÒeí5 Z«갼ĘN8‘{ò1´bí%xU ´ËA]Aši»o§ˆ¼…mf˜!-ËΩà]<îvN…à¸%=ln›·Ù%ð–ˆ—±Èܲƒ¶<"ϘÂù<™ŠòÍ.½€ð/<„!ðàƒ²QYÂßOÖïÇ=R`w³Í0i.&ÐIøù³ÌsV*žã¢Íé½¼t¨Úí0Çèï³w3?IMá æÂwØ›e¾jêp<:a¢‹WŒº´¦C`Ø<¾áuñøƒÏš¸ƒO¡ÙDuñ&&ꢕTü™fÅ~FnCþa\&Ä9'Õ„x§³&$8'ׄD甚äTkªµÒ£¬ŒRÝ/5÷ÉV'[‚áà&qÛ KPE©»¬*9¦«²CnŽì¹iK‡ÌTY:8ør‡ÈT,Oì+÷B6Ä»„,[ŒQ—Sa‡µÚ «/¥ÔQjlp‰uKsžá!Ï*<ºL–j ÑNñÜ QÃ|-Ã5*ÿ " d‘òñð¬…׈xEÈ/‡ît©Œyˆ¸´B6oÙ2C±¹x—ì£0íšËf.»«€&(.…ª(t–æ-Ø0´ÉÆÉ yø]Zh9,Ã\Ðû³ƒY~ ÜÈV @ÕΊn¶+ÜÛ 'CYvjä3 QiA8­¾-zñÎTt ½¹ñÅÖø<¯ÖÍÖxµcl%õÊY$­"©„¤Õ$ÍîB¯²fÏ·f»¼xTçÓzØƤV94…Ñß'Ö”WpO4åçÔMtù C÷oZè ÀNjäÚQV…­Ü9­‡­%'‡£‡­Cûú¦üñéæxÉ™Æ]æøìüq£e»Ì°ÌÔ `nþÐLsvQþlÒOµ åÔH bËCËôF²¶ýPKçj5Ü ¤PK÷™H'-com/sun/net/ssl/internal/ssl/CacheEntry.classÁJÃ@†ÿIÚFk¬¶Ïz²êšžÅKU ŠB/âa»®6%Ý…d#øVz<ø>”8.=Šx˜ýfæþöóëý!ú躽d4“ORäÒ<ŠËÉL+wD{ɘÐ8ÎLæNµ¡½×º $#e碬Œ0Ú‰²ÌEfœ.ŒÌ}1”jªÏŒ+žÙ¥ó›uóÆV…ÒçYÎŽ›·§²œÚ«ÂöÇéÞ ŸöÓÃ;^%9&аóÏ„­?'¯õ!.´²¦t™«œŽÐаógM¬£ƒm´™àŠ:g„Dž1Ì€³Ð¿5®ÚLbÖwß°ñ øÁ5ßü‘[ 9 —…¶ä-–¿PKÕϱFÿƒPK÷™H'1com/sun/net/ssl/internal/ssl/SSLSessionImpl.classV \×ÿ?v`–ePY݈ ñZvÙ¬Í!h* ¨AMК:ìŽ0ºÌ®{ ¤MÏô>ÓÚCÓ˦Iª•¨,5MkÚô¾¤÷}é}Ä~ßì̲ÀR°ðÛï½÷Ýï»Þ<ýücà@@4;ñ!'>èD±ïvÂåD«7:Ñ&PºdIus\S“Z¸±ºZ ŒÎ-FŸÑÃYœÃ[ÛdÂnð{k[CÑÞ`"e -L$"AÝHjqC˜‡f=Ö£Å;bZh€o*î-‘УFK˜˜gó~µO FT£;¸¥k¿Jzþt‡JÅõd›j¨ÝZ|‚XG2®Ý„žk£Ùn uápœ¬Éc“RI=Ü`¤zµ¸š$7ˆ¶È¢ÎúÛÑÑjyÙ%׳O‹&Ü% ykwS*hÉçDz,>a¹ iñdðÎËW7ÓFß§‡(ÞÄéµ9OÉ:ÏÛ2ñÒM©}û̈HÞMì^·wÚ™šn’&^°…-Ýr–òkX9…† IhéEÖ°¤*ɬóWÉM©]êXyk´n Æq ªÈǾs<ù±*~šžµ">EO®×ºR\¹KóŠNuû<Œãn}b¯Väc*¿‹Ûm">°ƒÞI=O•²DíäMº&¶ }š‘Ñ.yweDv7ÕN³© ™—d*½»ó{ìõNk’0kAMoçÚPD7ôäÍEk­ Q%5GÃ=ÔJ‰¤j$wª‘]‡´ÏÁñÑÄ4ï¯fÚ/ž^]Ýðÿ´º@`ºbÿ´;Š)V=ÜJÉNRÊ5µ—ðî|½"çíØ¨&z’jW„Óçꈦâ!í6=B±TŠü,Tî^O<Ñ­ñh`gýu ú†åõ«WíX2ÍW¡x·åi€´’œPÉ”oˆh½Tl”Z5ÓŒ0Qºè"C=ZèYŒ±"-±." T_¡HÔ ß–M3£×NO†«Ï&Íá«È%M¢)2IÔ6kýS3Z)§ÖEcý-F2Jß=$§Hn×{µ6=ѹú9œª"í`J0bÉìÓI“~7§—îíèÖ(úÅ›úÛÕ^–Ó>'yÍ=ªnÌ`l&¨)=Il3Á^ä ¥|fƒ¢®$»…t`Kx54dénUÉL2µð¨`éS(ch«¦Å­á)0ÇBLô©Ä¢lŒ&èn:û®¢°˜ÈÜÌQg ‹R{ËWçõÐÅzÔD[4®Y¥ÉX|Ô³•4zôIJ/öÓòôœÀ¬ñ“>×&ýúÞiPê¸üÏXÞþDRëµ}0QÛ{âÑCÜÊôE™ï-¢Ñ,z‡qÀˆ28zÙ™)° O?焞^œÿÍ`V?"£*+ò~¦Ú~AöMìNŠ\”îìð`qÚw}Zœ¬já[s'{Ûh°OçÙ£Á2[«NQ7´Q·&Ũ[‹¦ñxRA Ú: õsÍÑÀ”[ÁunPÝf'¥ nwDS¼‹QÄ(ÕF4Y­¦’=Ä`ª¢Æ“c\wĘÙIЪzq~äQ\ëö¢$³±Éd^NØQ“æ¬pP,HI2j¨«¹›¢)ÚŠyØatñQÆ2vÊØ!c—ŒËx™Œ×Èx©Œ»e¼NÆf¯ñJ¯’ñf/—q¯Œ7Éx‰ŒN¯•ñj÷ȸCÆd¼QÆë¬B¥‚ýð*hG“‚wá&÷c£‚÷âV¦Ö3X à…(Up>Ö)ØŠÅ €[Á{ø˜ÄÍ ú|·)¸Í ö`³‚»°ZÁ^Ü¢  - ú±AÁ[ØÆ} Þ‰õ ^„¥ ð(x?«ÚŽYìË\aøôðn?DØZ e :Øç·aû²DA‹Ø$‰½³¼ƒwÛ2Zla–æ(8EÁnÜÀ„Gø–Û÷vÞÅ2ÖTð,WðaïcÍ[QÅÀ§`Ü.<ˆ'\8OÓîIŸdð)—]xˆ©ã)æû´ ðñ£øŒ '3bO»p Ÿeð9ŸwácøË~‘Á—|™ÁW|•Á×|Á7|“Á·|»˜4‡­=ÃÖžeð]6ù=N³‡XýÃø¾ â.œÅ]8‡¹0ˆ³W?qa?eU?sá<~ÎNþÂ…ÇØÓóø%U‚üš¿aÍÏðî·Ìò;&üžw`ðGÇŸXÕslòϼû +ø« ð·\Äßüƒqÿä›ÿ‹Á¿Ùçÿ8À5´}—P#á<”ŸÕ„[CûÑD;ª,Ú ..s¥ú2W*1s¥*£µŒ Ò<÷Y+ž¹Rí™+U¹Þg©Ìõˆ¹s˜ëýæÙÃÝ`Ò©¼i­&ÊJTÒ¹‘NËP`Þ`ÞìÂóg©§Ï !n1Œ+g…ãQ“Ap·YB×¢v@¥ou iw:†D¡(E£ü ,þ{ ‘pÐ7$dß°pŠ™¾âA1‹äO’?;}†=.¬›Ÿãv;]/û˜bÃÑ™ë;'Ü—1ƒZÌ;Ùq’tÒ’Ps¢éWÄ+0 2­;;ý*Sz+Žkà½Y¹Ü€®¶ÉÇp]6H’¤L@¹lÊtçÆFÉ#=‹GA~_èôqMc¡Gº„‹žÂóbmêLª'‡Zgo*€}úаL­µfæòñ¹»¹=0^“`M’iftŒU[šõ焬Ê-Ãæ¶Š¥È·&ó(ýú¢ùüÅÐñc<àÉx¿Íد’Éd¾4©ß¥ù™ÚÊ¿b´3Ÿk‚ÞÅ ß—±(£"cYÆ’Š$³PTÌ£ b.óèªbZÅ9U, ¦ Ž•244º. ï’¸. `UÁy\QpWEx «„ÔúãeÑŸ<&º§v>µ2!2$ŠË-£ñÍ|Eýñg4?¢õ>MÐò˜ÊI " ZÕ †a¡mœàúô1•TçÔnNµÍÐÐ4¿CûD|:Ç0PË:%tJ¼\| Iz—7š¥â¬Q•,#;%JS¸,+‡›dÅíæë?Q2Žq£gþ‚ü­žy˜wœ;µ£>†kiRÀ+)¨dZ­L¡õz,m†îÔ¿PKvÑfnóPPK÷™H'Fcom/sun/net/ssl/internal/ssl/SSLSocketImpl$NotifyHandshakeThread.class•SÍnÓ@þÆ 1I ý!i¡´”B!Ž“Ô¤\@A)Q)¤ @¶É‚Ý:kdoªöUxÎHD¨gž‚'ÆI)¨H-í|3£™o~¼ûíÇç/H¡—P°Ëí±'Ü@¨7îÓíÙÕ BÊ.oä Bßnwþ”«¤vã8p}¥e¤D02:v'ìîJ½Ñ4ÆlínK ú2ÚÕØ½LðX¨^ì‰]Ù 9IjÙkíI¥IUÇ>Ep枯|}Ÿn†=I°6”’Q3q,cBõ4­æOèžPš°'BñI¨ý×ÇϽHŠ!× QW>òn3Û9PÚ“Úïæ^>±>‹ÂÚV}m½V_¿U¿{çŸm>äL>áÁäÁ«'t;ëý5 aÊñfÉV û<,ïwúÏÝùYüç öÿØöc-ùçòJîë£"| £21o¢`⢉K&.XÈÀ°0¬…ä,Ì"oad¡ˆ3æÊa+Y,áZ"®'b5+¸‘Ç2n&Z +ì\ø-Ì$\ œGòQB:Bæe4XË ÍÒdë*ÛiÆ‚ó ¶S¢ìT‡pœÚ•Gù—G9IômÖ ÆÒ{,8á¢JøŠåv…­Ê!jÆî5»ŸßÇÎäÎ2æ˜j‰ËZ0~PKQŠåö»PK÷™H'2com/sun/net/ssl/internal/ssl/AppOutputStream.class•Q kÓP=¯M›5Æm:³U×Nçgš6ÍZuSÔÁ:6&2C]4MJòªîÇè´€à_RïK«l s#ää¼ûÎ=÷\òíÇç¯ÈÂÄCV¯Ø)n1äõV«%HƒÈºu­¤Z¡Ç­$ ,?ä^:Azh·×Û‘ûÒãv·Ü=9ݶ…U]?¼s³Ï{}þÈs£¸“6Êúv‹ZÅü»~èóei5êx ʃ7®×ã~& ÕcØ2ÔŽŸ&µ£~ìzk~@c§·ï;ÉNô0ŽÌ­F½i6š Û·ž00‡Ötƒ(!QíPÿ•^o¨ÍcÏé2TŽþÖý µqôM)þ³ Ÿì0”_8¯ˬÖ.÷VâØÙ=h:õûÞÞüóÆÓjà„Ï­ ‡“M¶ëS™Ådü:ö¹'ã´Œ)§dœ‘1#£(cZŲò*& ªÐQ1)`BÔÎá„`LÅYäTÌBVPÂ%e\.`W‚« Îãš½@!1Ì£ªà"jDæ¨ P1„˜Dl,Åæ‘'hƔϖ&gö`î¡n˜a½R e¢GÈ‹© ,` Ъ”‘õÒkûô™‘ž´ô^ ù¯žVéW©–£ïRy(¾ñ 7%Mz‡¢(TKš4À"áÓ{eMê,ï³-¿ýùýok†“Ä3ÿPKë5&ŒÛPK÷™H'4com/sun/net/ssl/internal/ssl/ByteArrayLexOrder.classeO=KA}›Üíi5O°ÔÆD½œ‰üB0‘€Œ(¤ knÑ çìmÄ4Vþ KmlÒX ‡µ½Ǹ.VÊÀ¼yoÞ 3_o Òp0K.–:ËÅVŸÝ07`á…Û>ïóžÜù¯” è®úrÀhD'ÈœFÑãM?P$Õ­ÌwX|‹ÈéTÊU§R]¯lmž”{Ñ•B7äÒãÀõCÉEÈMêCÉ÷…`ÿm K \3¡çÿÞB0§¥ô·¡mLFÂBƵ0a!›S/’ rÈcÓ f¤ª† C±‚®så…@K“ÚôÓ>QVKasõSGk*mé}Æ’cÓÆw ÆoáÕLÛ|µÍÑ=%6u’'dmº`$ãO'Qèô~SŸa}PK©V/7‡PK÷™H'4com/sun/net/ssl/internal/ssl/ByteArrayTagOrder.classeOMKÃ@}›¤]USAOzÑVM×Ô‹_¶"b¥—âam–šwe³zóyñ$xÏþ(qÝ£20oÞ›7ÃÌ×÷û|ÄX ðÍ>ÁFãbÌŸ8˹±ÞÝX Íá¥yNP=ÊdfŽ ‚®JAx­J=gYn‰7è, Nyq¯®´ŠûI«'ídï– 5T¬(%“°¢ÈY&Ð’çŽt&FœhÍ'7|ÔÓ©ÐÔ°÷>gïóÍ÷í}Nøû¿?À…6ü$a›„×%l—’°I€„6Jð ¨S. p…[Ö…[úΫSj,§ê™XÒ65=Óí$Gháx¼œµXª`jv1–äTõ´1ÙÝ—2&cVAéÌŽYV.¦é63u5ç,’ɾ„ž/ØÊÔÉîÄ"¤S›Rmvœ»ù·ºVúÖ¢Ó…ñœ–ªn'–ʈ&&˜IbÜ”¥¢ŽðŠ|û ö3Âü̆pV38_½6Õ^Ú¸eH4>¯|äû§DË;\'Ô³bƒÉC‹ºwd…êùn-×bä Åù½p<­%ò‰DËX\@[$QzrÓmB:<ÊeÖª¾2`²ªEŸ$@“Ù­ÊݲVE€°S€wŸ¦köZŠ»ÇH3~:Ïò¶fè–€m˦—ø¥l®ˆV.°¢¢¶bL(v1Ï8Me‘ÏOÊ•2½.E¹DÜvÐÄ»hz1*°²†i;I"›4 fŠÑrļŽ÷býX¯J¦Ñ6Ò±sW[Ç®ö޽{Î’D•ôªù<Óéœ0N)[W–Gí]¶èñ·²êv‚Y–š!­ËÖ/Db—-§&õhù,3‰0÷¤ËœV¥ét1o'h~|i£·¼vâÃz%^Åôš*†Ùó$ÝšÕ¯ X[}D‰þù¹×î>û™ _¤êníc¬)®y‡Õ]çíÔ¯þ+\P>”5‹ê8Ÿè–…o"¡O©9-]¾ãUÈ kNÉB*{(—1h™¬)lzñ[‚ò¢'-`ûK½fyÝôüLéB/¤]?YžDÓ3v–FUYÑË !êlÚŽmFoГç} :>GgÝåËï¶œ»,ÙF¹—T2ÅÌqÃ"ÏE¢ÇD´‹8*bŸˆn»DôŠèqXÄÛ"‰8"".¢GÄADÄDì—±õÜ4Ê8 Œ7ñªŒÝh–ñšdt¢EÆNn¢Pdú‡Ff6ÈØ YÆ[¼® ܬ“ÑÏ÷ú8TÖË8ΣãX#ã ¼&ã]4ù1ˆ”I¤ýóc˜G#|oÜdü8…¬ïAãæ<7¸Éñì¤cÐydøqŽŸ=‡<7rcúñ,?TØ<*p3å£O^ôcÓè ˜An\ Eäx’èøNÇ{)ÚŒWP‡-´úøÈÿ™C1è}ŒÑŸQÉÑ€0‡F=J÷p5èŽÜÅÕ.5znòüðh n?¼‘Ñ9\î’‚RÐû£%\‰%^ëâæA ŸÜÃL„âWç=\s"7E³·á;xò.®5ßBˆülèÖñŠ'¨çîACûMD# íœÃLß*áS,Ò|šà†¸HˆâÙ¡;$l7ò°pšm­4cØ‘»º"÷:ÉÉO;rÝq¦*×åÈ}ÉOUe{‚ž ûδ•ðÙmº¼*è-ás-è)p)%|A}äÒ †q¶ÂÑK̆ñ>íÃ*²œe€¼ÀsNœñ%æó«+yWCC5ÅÚŠD‹d»Èg¢÷qn4àžÃ—¼Å%|ð”ð5o3Å%|SÂõßðà xÇ·7°'KøÎµÿ66…nÀ H´Œrö¡Î5xz¥„ïgë„#ç—§ÿF>‚¸ã¨íöIâ_¦ÒH¾Ž¼/Z¾=?.-S\‡ÈÿPKÒUÐO7T PKø™H',com/sun/net/ssl/internal/ssl/RSACipher.classTk[W~—l²a‰±ÄÖZ¤Ò\ˆT°¶„K ‰ÅbjeIÖdq³›n6Hèýò?ú‘¯íó´ÑÞð{TŸÎl¶>Ö~Ø93ï™9óžyOò×ß¿íþõã ?^óã¬çôG¢™-e[IêŠQJælK3JÓþ…+Š]N¦´RÚ°Õ’jÑ–'] F¢ù/éhZÀP$£Ó­ŠšZ¨[šÝHæØQW£hV¦¹F¢¬]Ç‹EÚš.on©{:} ”æäPä(Ã#‡¸ø1™Ìì%’­—IÞuFut+ŸO1Ãx䙑h4EëRPkÉÕÜÌŠ¥m+¶º¨6œû,¼ »¾©kN~Ñœ}‘|Ê‘ÅÏNÚJv\§„AßuÍÐì¤ã¬YT)k~§ VmÍ4j„ݤ6´´fâ! úÈ&Wgsc)Ý,<_QŠNt\†ŽÉ™u« .h:ÙÅíOçç”ZÙ\±ÌÄÚØÅñÄØøèص«÷Ô¡K1ØXºËR³Ú``—¶7 ÌJ²V7’†j'k5½5CÑ€ZÏjÕ²JÕ=Eµ`5ªvšîDg͹Vìøó†ë÷¨F[–\Rí%µVSJª˜Åº^§ë)p/5¿S5 Õ ôS :Bb}‡òŒOÀùC4­ëjIÑg¬R½BmI½Ï>ù(רÙj¥£Áí²e>R6y®ýÇý> v>Ž´±­èZ‘dik;Ü™“5sõByF/™–+ÏO|Þópá?½\g8oç@É\.ÓÖMÐé£É÷Øfªa«3üÙ‘pY “®I¸$!*á 7$¼-aJ W%\—0(á= ã&$¼%a:€H ádáåð‡¯³é _ïÂÀ({C8Ŧ‡Íi6ý #À^wÆ"Œ á•ÆZ¯²‘eÌà¶Œ>”1‹5s¸#cwº±€d¤±Þƒ›¸+cyö>fìW|"#ÃÉKlR¸ÏfCÆ-(ìm²)°)ÊX…Úƒî²yÀa‰7ʤ&3hV|9ò¼äÑÕÑ…0Eiúãï¢5{ -‚]O°õ Œ=œÍü޹õxCJÁ¼TžþD%"N"ˆ÷õ> #ÎÐ'ÒásôÅh¯Õà;ÂDZï=|¶¹äýÙuOüWT4ñin]$ßjùÙ‘ ˜h¢ûÆHöbKÌbÄeAAÆ ê,¹Á6QòP“˸B”xò³ÞŠKÍO—ˆ^!—ž ÍÈ{&Åøþþ)/÷Ž{âûa¯§‰G“bHd$ì ‰MìlLŠ{Nù¸uØçö{÷Câ‰T°ÏŸ öMyÃÞ©a7¢9 ÂSb#4¶]›DÃ!°ßÄî6Ÿu²ùüÿ²é¥7}é›ú\6ßæ¥u£¥ÙÙ;lÓì«–?%&ÂDækæ• 9¾!Ѳ,ZÂ-Ë¢%\ѲÌ5Ñ!Ú®:¢MÐbÙYWíMŠ»pþPKÐȘ·d®PKø™H'<com/sun/net/ssl/internal/ssl/ClientDiffieHellmanPublic.class•T]OÛf~Þ|Ô‰k:p +´c›‰ &´ëÇ€n ’F&¦J+š4^‚WÇŽl§šÚ«þ‰^îª7½h«6T›ÔËNÚŸØ?;¯>ïyÎóžsÞ#ÿõÏïoDße0˜ÁLeðaCH íCRŸ¨2äô‰ÚÏÖ}ËlYáŽY²›U7äMîÏF€; )}b£$TUxgôêFIÓz­áµÌ ãš.Í pL›2}×r"g}½VuÛp=ô¹Õš)Å÷§¬uÂÿæäô¸:Û3ë>¡„{!Çr›&ÛnóÿÏï2 ëïnTä¤õ¸«Ñ|>¯-86wò½½mó wœ–åÖ;›ŽÝ ÁMjD4g·ÚäÚ¡f»Z#Bk h>s¶k #µàmqµ\ÑâdíßÕæµ_‰@^ü¥ÁÛ¡í¹ÃøÉC)óÍN“C^÷:~ƒ/Ù±&Ä‹ m”­`Ç«û^áNqj¦Pœ™.Þ¼ñ#³®HzB‡c﯆¡p"¨b¹[ÁŽu¯ò °šT¯qŠUa˜<Í–ÐÛmÅE©MÆÅ½¬ð]z;XsÎ,QuípöGN¬Ã…wm C_+î¦ÆÝf¸Ãp¶ç¿Û¦ÓmAÁ EÚ!òTÀÝ-‚…^i7ä·}ߢr¤ûÜßô.á K—0!Á—0&áS9È 4\⬂¢9ô)01 @‡ª`JXSP|†» ã f³¸Š9_`^ÆuÜâ+7𵌛¸-¬’ Y—e|‰Eb¿J@;#î$+C•@r˜¼!$Èäü–òì–Ÿ>‡s˜aÒ Ò}Æè¢r»H_ŠÀ×¢„ó=Òc Õ#¼Ÿ#{KEw÷ýë?¤ò/±¼‡ožõ`“Q¡6Ú+q@ þD:ùToÒ?=íA ‡Ð¢>dÿAPC¯mú[&Iß5TÖÅÊ ¬½E]M¼Fí1*†šìb5¾A1Ô9O0™œ‚K#‘5Ô4">reû»øöQ‚D•ü¶ÿ·¡ž!Êã3™¦’âÛ{3ÉF$]ÔƒGÉNàò¿PKA´– ÙPKø™H'7com/sun/net/ssl/internal/ssl/JS_ConvertBigInteger.class;õo×>f]aFf Í0F Íh'F) Ÿ¬Ä²DýÜÄ’ }§Ìtϼ’ÔôÔ"k°$›Mf^f‰P±s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈ`˜œŸ«_\š§Ÿ—Z¢_\œ£Ÿ 4³(/1Ìñ ŽwÎÏ+K-*AØÆÈ vDNb^º¾RVjr #ƒ6w12p—ä;U–¤:%V²3p²3p±3pð0°00ò0p30q1ð0ðs1ð20(2ð9 ÀÄÀR„¬@ž ˜ÅÀÀªµAp#X'P+3TÚ H²i+­m B>ÚÌÆ3Xµ7hïcY¥Söpø2Û-gёՖeI0‘Ì!-ÌŒ²:ûþ£³l&0øÀV³PK®V×5|PKø™H'/com/sun/net/ssl/internal/ssl/JS_PublicKey.classSkoE=ãÚY?Ò¤IJ)ÐZð#öÆn)-}@’&ÔMF­ BÕf3q¶ÚÌZ»k ü!¾¦¸$ÔO ñ£gfÝt•FË{ïܹçÜ;÷ÌîßÿüöN ‰¯Š8SÄ”ÀDµÖuÕu.»ß¹Nાsoû±ô’W¶{Iä«>·OTk÷òÕÚÃevU—¨u½p߉‡ÊQ2qâ8p|•ÈH¹ 6z¶†ÛïÝ‘OXÀJ9,r±újƒlÏ•Àc2þ—n-wweDøìqp¶›¸á+?¹Åï„;R ¼úƒ'‰ª˜{©¥Ã“2ß ‡‘'×ü€à¹‡·Ýx/ÜŠÂæýv«ÓlwÛ×®~+ \œ«XÞ ¤Úáζ@Á BEÚ<•iQ™•iQŒÖ eL°Ñ[z$Pûßê±6ëw}&ýYÞÚ £MwŸ+»/“¥ F~²·Ï³3\Uç$¡Ä`-ŒöÝD ÂõºŠWydÍ¡üÐéÉÈ×5Ým=ìä‘;8dg3dÅ¡Ú9”PàBÂá é ƒ0Jdvê,혩¿²ïKž'ã8CÌB̉ïêLròèkÌ{;þ58m±ô†”쉓Ѹ¢ä÷/%ªÄ2á=­­šœìÉ ´˜„iU 5 ³Þ´pÑBÝÂ{ª.XøÀBÃÂûÞµñ&lÌhÓÂIo oã, :aÛ˜Cņ£Ã·Q¶± ³M”ÊXÄ2Ú¸YB·tø‰i:¸©WŸ–qKÚ,k³RƇ¸­Íª†¬åçiùñ_ÃǸ¾Dº=€2W<í댦L(ÔŸá³§Ð?¡;NŸ§'ë?cýO”µáó@΂œ6èsôçXgã9:Ý”0ÕHwž£ý Ö†8É'Oú%>os”º¦C^àŒ?Ëøó:F ó(ŽißpÆ<ýÒîvÇ寧Å3l6F¸7£aëW|qwa„/y®Í&a½æÁ1þ“] àM\1~ WÍ„§™Oû4éõ„gôD¡ ^ŽÖm˜RüèxŸs$k*oqL­Å™­7¥ø ¥uÁÅS3t…À”6M›Ã©PK,õ£>.»PKø™H'0com/sun/net/ssl/internal/ssl/JS_PrivateKey.classTýoÛT=/KêÄñèÚµecÀVØ MܤclìÚ®…vYWÚš\÷5õäÚ‘í Öˆ_; 2ÚOCâBœ÷œ­VW òqï»ïžsï»ç9ùûŸßÿÄ 4ðmg‹˜«T;Îþu).;OÛw‚ž}oë±t“7¶»Iä=nŸ¨Tï ä+Õ‡KíŠ*Qí¸áž;‰Ǿ퉌Ç×Áz÷Ñfä=qyG>e#%±Ê¥Ê›²M—}'ŽÉ˜û\ºµ4ØÙ‘áÓÇÁÙnì†xÉ-ž~9Ü–æÊO®ì'^ÄÜKÅ0Ê "W®z>Ñ3o;ñn¸…û­f»ÑjÏ·®]ýA@8,íôû2ØÈ9ûÜÙ(¸~6KmšÔ¦Imš”£ùJ¬w Ôþ¿~,Î.ÅYoŸõ0Úpö¸²z2Yô{aä%»{<<ÕÀå¤$”¬†Ñž“”¹^ âÄ \²¦´T^hwe䩚ΖšvüÈ-\8²³²â Ø~-¢ÀÅ,„ÓÒôûa”È,ìôXÚ1SÍ÷eÏñ]WÆq†˜…èÏQ™ äÔÑ'™wüƒ"pF'bé(ÙS;+r9?jTŽe›Z]ѹ“É®Ìb‹I˜Ö5P50cà— Ô |h bà¢ Ô |dà '1faJ™&NY8ƒ¼…s(¨„eae ¶ ߃iaNe(™˜Ç -Ü,¡[*ü\…4mÜT«/L\Æ¢2KÊ,›ø·•YQÕü,í<ÿ®á3\#Õ€ÉDû£  µçøòÔK¨ÃŽÒçFéñÚ/X{ S¹!¾zä,Èi`>GžuÖ_ ÝI õ”qçZ¿b­~ ‰ãüæI_à÷ÝcŽ2DGwÈ ¼‚öçahAÅ(aÅí{Θ§¿BÚÝθüݤxŽú÷&s4Clþ†¯ïÎ ñ 쵄 ¬Û8x F² ¼+ÚÏãSípUOø6óiŸ½šð¬šè/ÄÁáhº.ÅŸfø^ÐTÞâˆZ‰3]«¿–âg”ÔÏôÐeSÚ$m§ÿPK,€9%0ÀPKø™H'/com/sun/net/ssl/internal/ssl/JS_Signature.classU‹[×ÿ »0ë8\ uMaÔ&MPPž1Yƒ%4M‡ÝaY\f¶3³ ØÆØÚØÚ4éÃ>Ò§}Ò‡m!‘ņTì#´Mi›>þ›~=gfw™e%ýö›{î=÷wÞçì}뿯߂-ø!Z|ØïÃÃ><èC£AÞçÃ!e ýŠv$³™¥ÍvÚL(SJ(¡h±Ðã£jÄ*`‡-#®Åˆíih²×§xG:™t2o_+î$8r¦Iqk&æú¤¢EõÉ#Yäì¦{ }p»u,¡˜&yU\.ªæ»VgjlL5~o1¸A¿Ð#ƒwFæ\Pt2÷Ø&ÁùYëSgº•ˆ¥3¤¢óÿR‘—x‡7¥¤xj Ý+æ2™Ù±zʈO)–jK ­¹QìþnSW ›MÄ#YÕmë¯Í¤ u$b:Æ'O)†2©Zª&6yO­*`ÿ»’!#¡w%0Ò# ´a¤“'K$ÚÓÃ:2;â•kqëQš·czTp蘞JDšnø"®$â³j`L7f<¦Q9Ód%`«X|JÕgÕ™ýÜPlJ5âc3 JÇÕ¤¡F(ÿQ:t‹¨I+®k¦€@o¸£»+4ô©xT5Q]5mIÕ Å“7‚˜©dR7¬@4§<@9×£&™ôöRúˆ8ÓáuÊà/ö·Twç†ÞåL¤+â¨;Sdjç')~ødG›£zʈ¨ÝñB §´Þp¸K€@eª9®˜ãú)CojÛ ¥í@kÛᇟPÂ(œEãE°EI&³*Ëh¯jQ¾™%Ü(}jˆHB×ÈF0¢O†Ì”ÒT+dš‰P\£ÆÑ”„}è ?»6ï ÎÎÂ&°aJ‘bQ2)óª‹kê Õʵ®€r‡ÙCyc¨€Ê5Ƽœ`8OPÊ0m!Ù9<•ŒR¹cVÞ7×ìšP²©(ƒ¤BÀÖ˜jõh¦¥h:ItPMS‰Ñ¡š9¿s&©S+ø"5ágÃÑRÅœÓR'Ý8a‚@»£â:õ’aw„2ÊÕ®X÷úPû¯ã êV·žÒ¢¹°Ç ¡‚$ì4¾ê†U­ƒ9]ú{ 5¦$:" Õ%è†Ø)¡æ¤ºø#—gôô¸¡O;Fëóç鄪©†’gÎ.½­ùÀmŠr-ü“s‰ì.*BíèÂì+Š)¦í¾^ õp*2žs­ kÿÙÞqAîßNÆ©'LeÌé4jˆrûäá,} úhÎË5Uò]vð+™átz–µUS§×Z»ÂÌke2à³t§†4)–¡hf";ú”ˆ˜ˆGE|H„*℈„ˆˆxZ݈ŠxFDDDTD—Sij"FEtˆø°ˆnˆPDŒ‰qFÆ>”Ë8ŠÞ½GÆc¨–ñÜ##ŽV¾8À AN3ï¶ËÐ!Ëx÷Ë0°CF'¶Ê˜Dóje<ɸ£¨â‹Ã2Þƒ2ÆÑ&£;™'ÉÐ|~Oa·Œ!TʘpÜØ+ã/¨—qå,|VB /I˜Â˼|Ž—ÏK˜ÆË[p_àå‹ ¹*ÑîKfñe^¾"á<Ë^`±çñU^^‘p_cÜ×%|ßð |SÂ%†¤ð- Ÿd-q••~{ ¿Æ»ï°Äw%\Æ÷x÷}ÿ@§|Ù±ûC W-s¼üˆ—óò^~ÊËuÆ]õî¦ÕB >ƒQ ó ¥$Ù4‰#6¥ÔÛ”ÒH´ŠvûPGr t:N’^¢­Á%ü,Øänâç‹xmug–1=¼Œ©aÉ~Ñ”Æ| Kxu%زˆ ¤Å‹rlà I7Óç%δm­œVÖ ÑíÁxm“4ƒXlŸŽCÎxòQÑ–`é›Xê'“7oãÜ@ó<¹r~x ¿\)ÜØ"~ú}Ô¦µø˜M÷à9—[çé;‰{ ˆª‰–•–qaØïYÂë+¶3Yô4eœ£FË87O7"уÞE¼IÜð{oby ™œ|ã6.¶¤ñ«v¯Ð^JÞßò^ì®BfÒ^:‡ü¥œÛ•ö²š2>ûÛË–qi¸¦,ÛKøõ ç¦ÆKëïkJÓøM7ß’ÎßÍ¡ö ýeŒàmsFdâ8ŒnòršŠ˜„‰lú\^I.ÙqìÊÄQ›IrEó*|ÁæE¬)‚?,ä%€Ezíê±È«™Ð_ zŠ…~™Cÿc6ô·(ôCëBß“ =˹sðâàÿLZÿ’ ^Ü ø“賃7h(^°éóÁ÷á>Wá=›*|ÈD_•I˜Èyúë@~¢>M_?*s£äôU+ò¦çîYÆ•a¿o o¯8ÿ·~‡þ½i¾ŸïšìXÞ^!-~¼—~nׯÐ7@ãåèî#»ñ÷ ß°§öôÛx•¬°ÙCùúÇväïÌ¡r€-4g,,ØsXÆ"&öfLt¯”h›KuSÝ[õ®Üᮞ—us•\ÊwbwòAšCGù‰ŒÿåNj¶dSÓäiº•Æ?qÒó¯ºëyΓ¢mä{}úÇsÿ4Ûˆ²Ü‚ÿ¶k䦌 yµ¢—'#Pž(æ3hz@Ö¡é%Zö\Ï4ˆv‡»‡ø„öÿPK(¶Šï´dPKø™H'0com/sun/net/ssl/internal/ssl/JS_KeyFactory.class¥SùOA}¥[–¢ÜRñEh eiE9ŠˆÜ·hCˆ1Kp¡Ì’Ý- •& DùÑÄ?ÊøM[èAUˆmæøŽ÷Í›7ßþüõí;J²uÜb¨óæ¶õ}]KèbK‹9–!¶¢ ¥þÀ CØ?§‹h`.nîjvRh‚;šm'4C8Üz"eÌÄÞ-&×F|–2B˜Ã«`,c_wxTï¿LBñÉ”,¯‘|HÉíWK&E2×ÖFdÈŸ Ù<ž´ ç@“· ñ1ŒKÍ)<šÐmûÖÞãq™£•ŠôÉ‹‚óî½4çAûÿм¤ÍHrs“[ÑIÄà4„á 1¸FÍ Î ŽŒó=Ç0…M¾‚2Ôë?5f&­8Ÿ0„ª^;Âü šwøA³<½‹¡amL·ß›‹–Z wEBáHw¸¿ï-£’%ºÓ!õÄ¿Úî1¡ÇÓ:¸BrVQ†À•? jo.¶ Á'¹àá3eèã+ð§ Uçn'£2‰”v-Yº°ç<›gR¥Š-îL ÛÑE\ FV–ë˜î&UÒwN)íªK o˜ZŒ[†,¤¯K¹ks»Ò<ím(þÐ -ùÝ1-ö©ÔrñÖ M—z?#zlÏ Ý‹ôW¶Œ §Û¥‹;fšƒ‚w4)(¸« SAHÁm÷ø´{Q —>Ô˩܋G¨ò¢ ¥Ò¬ð¢n™¢HÓãE›Œ¶¢Lš.¢åèÆ Š0ž©ˆ ª’9$wÏ¥oXÅc¼PуO1*£crG^ŒKsÂÕB³†ôctÉ@9íª¡Ò\CVÅKiUƒÇ˜ v|ÅÔgÈŸÌver*S6óÐ}Ü ˜ mX¡u!øS5ìÓ󧈬cf!Ø:Â쀋湲N_™Ïu„ùÎ, ¸}î¨è75sÞ*ð•¾(çÐÊYÅD¹b&LÝI”Ë…„a:ºmjWÏÞÍTæ FŽ(x”Ó݃m,kŽî9Цr¥Ù÷&Ô}»VÖÇèÜLiývu—ß‘‹À™½¡ÜÎGë"ít«Þ°ÓvL×;–Kz.q¥·HZ,f4[+êÔÔ,©ÞÝ:î®@êÿ 8;&0þ_½o²AÃ4œKdž4Ó´œHI·,»qrD«=+ YóºÀ!Ë,;šéLi… ÉÊðÜ^r Ò JO'DbÞÐC‰’½~¥ÏK‚«bçô£@ÑŽß2ï™Ös9RªÕá:)‘ó״ò¢•±­øTßÙþx_ÿ¹¾‹î:Áú´~&&“URÍÑ—ðç –IñϽïyT_ë¨nê¶æX6íøÞ_”@÷žŸ,å5/\0Èh¬Rj-yS¯¦  æug{¬ûIs{Ÿ£ë$í$»=tÂ!²dWÊŽ^Ü­‹ôÔnž·QÅls‡cX´¶«Óæx 'wf6Ä}K[N¶R*Y¶£Ïo›€ê®yÎë,©ëo.ᘹLXóooì®Øí DiAê·Ç•-Q‰§ß¼“¶²•Üâ6Ú.u©¬-ìô[P“ŲŒK2Nɸ,£GÆ2.ʸ*#.£WÆç2NË8#cPFRÆPTœÄA>µ¨ˆâ(‹]*¾À1>‘5YE?ZU|†ý*ºYw~Ÿ"À•ÉpHÅ'hSñ1ÚÙ·YÁ² ®á+øµ#˜b2Íä6f\Ç×|"2Ââ8fùô ëî0ù–É]øNA š‚IÌ)HóåLFc2Ï÷tÜj ˜ø¤ãd‚_â&ü\¹F—SÁÄÃTÕQ’>`üDòÙ]ò#(tî@ˆÎaÒ Ð?_Ž~&¶‰…˜ô F¬÷–b=!±…ü3Ü[Cóôs Ï„|›X|±NÎÍ8‚NŒ’S'}i†Ý$80‡ŒPhA¼-ö÷^Aa¶BLP´uÀM•æPM ‡¸x%P|‰‘”çÕÚã¹™/qüzž¸Ž5À1úÛ€­ÄÐÛ€UC8‡}Uóä$þ G| ¿x"RbR¤I4¤ßÐjâZKÉ@¬UB8°û´í±ò¤Çtï*É@| ËIù9&g°¼‰©5´L ¢û\ÚôÍkèJJK/’þÞW{7ð0N<¾•ßýTMZp³Ô:æµ³y«É÷QÂõµ=Å’ÛIðN’²ÖŒ ihUwkè£ý®†¸O:?ñI¯~i½óWÈTê`ïk„ªÅO®Až¦Üc¢“R]M{üû¤Ä>ñ°DÂ1?mÇ‚tOš^§ Úh¯º¨‚´¬£ôÇ|‚Àá®8_…Ÿ¨Á7‚íñy°.oË[˜™ I›ø‘¶Ð•à;¼ƒ¸üÆ6rõÇÝe?ñ/PKŸ£¹sæ^ PKù™H'6com/sun/net/ssl/internal/ssl/RSAGenParameterSpec.classuNËNA¬ay"/yœ¼8i4&ø ‰F" ãaX&Ë’e–ìèßäA‰‰?À26+ºº»ª¦z>>ßÞ¡¡Ž2ƒV©v •êùXÜ >ÞˆšFGyÒÎ^`è3”*¿ s1ºo*Ó;`ÙCÉÀ(1ÿ_^¢gûŽ.OM‹œùëcáŽì®c×ûÍíV½Ùj4wwn(BP º=ᮯ¸’w]‹›ä(aËU¯}&UW8b"‰îM¥Î2¤wa}Ëw{æÉÑõ–©ŸÜMm%•Ç ~g eðËÁXêDUÊ•ºï˜Þ=w)Œ·-æm4ùq#†L +1d“ˆ@Kb±$’XJ ‡õ8V‘ŸÃ6 s`XCˆ\u2R×hŠ L¥­LzºöŠB­Æ)˜Ü8yJåþŸÓv‰Ù:Íâ+<7õ’hÝ´íU_14˜JéM:‰n¹ }ÁttJÏê1:’d”¥}}2“Φµ‡©[×›±9׫ Xn>Cw4›Ê¹ãê¾A5›TÇ_§[;Ô¯òµ‡›:›zbѰ€Êptc$Þ ÷Lت"m͉ö)Æ®Hk¬}’Ñ9˜Tûµt.;  ¶äþÌúÁ/l‹tÆ››Ú#=Í‘ŽÎžxdë6J2bd!ÇZoNªšÕxtcÛ¤TËÛ77ÇWó%æjS[¸gºcULñvÄsƒù¤Ú’ÎÐ5×t‡•]¹ö|ÎßÕ°²Ñßиªaíšʺ£ôýS¨0J¿ší%e'¤ÏmlÖ‡«F_žY¼sj²Ù¼pê’J$À?«ÍÄoWòÔÎãÍBõLÞÔ’îô€;›ÓÜ|Ýú/_%a£îÕûÚF¬d¨Å„>*GŸª™—FÕšPB‡4•hó&,_€D†°¢qeh¦W”9±¤¦jÆS0‡ cOÆàÅUŠ.좑¦±›úF é\€÷iÊç•C“o·zl=»é¬Î[?“LcÛ×Lÿa ÷ÐÈP~´ÑDl¤éç˜£åÆ³¡—­åÆJû™£³ȧ5UÂÂâ‘Ð)a„‡$¬—Ð!¡KÂ6˰Tƃx@Ɔµ M !†C CŒaêe¬`hd¨ch`¨eð0´3/À³­<[É3?Ã2Ô0TÈØ‚jÝp²ê–±se´a¾ŒÇ˜÷8|¼P%c;\2šq‡Œî”ñ$*e´²[ ™r·ŒÕX"ã Ì“±‹Y½Ëì.ÇSØÃaØËeÈ1ô3ìcÈ3 0h ƒ û0d8Äð4Ã3 Ï2<Çð¼ƒà’xÑ^¼ä€Š—yö ë ¯1ïu†7xõMRLNá-Vßv =Rx‡á]ö8ÌÙ¿Ç«4Û…÷>`øÐ…Õ4>bõc,¥¨I5(çêѬœ ¨Ëµ¦l2eÈ”S¶˜2¦KWU—+LÙhÊ:S6˜²Ö”S¶›þSßjê+MݯK˪Kª,É9´ó=¨ ý^ lD²¡¬Âi»æHXÄXB´ÆÖJ˦XÂV%Ä™ìN)vGœÒí) §M$ÞÑxVâ+g#ÞñxœßP <;ñN”ÀsòÆ' "‘D§sœI$©ªŒ˜Ö±€§FÑ“¸€#E|rŸÊQ]9m(Çtå3C9®+g eHW>7”ºò…¡œÔ•/§ÍÕ2å.ÏNgu§¯JpâB3œÎéNç å”®|=ÂMA-² PÆ‚júgRFRòú,E|c¼4ldV°S'טä,‘ËIîôñ­ÏZÀwAÉ%YƒÖQô&\dø¾ˆÚ¼þ~¼ŒáÅC˜çuIbãeŒœGÀ%]ÏÂÆ Mw°AÑ%Šb?í^—ÝÂôéóXdt7É2ʨà<¼>ÚÊ[?îÄD·I¬¥gÀÄEL…š|E\Øâ½€Ó·:ÑÑ-k$Òôy:5}fåOÆDêéðwÔNá*®¤Åæ(ÊЙaÇS5iÝÄLjRJM²Vî8µ¸ó×tóPK=’ûÈPKù™H'7com/sun/net/ssl/internal/ssl/JSA_SHA1RSASignature.class•‘[OQÇÿ§-ݵT*Û*xCQÁ–¤=]ž$“Z5"„4n 1ä°=¶G·»Í^ˆø©ðEü|(âœÞ¤DÜä\fþó›9;svþë7Ò¨¢b¢`bÎÄME†R¹²óE î ¿Ã8T~g“!]®ì1l”/k×ñhÖ±‘t“PÅÇ<êK—7¼N@V·×¡èÉX†¹7+;nŸªòÿbö·²/•¯âW ™fЖ ¹·ß\ÙUàGôƒé¼oØ|p]_yk»éد½ÀýZ·[¢M $¡+ß)²ÜÙ#¢nÐ ƒêž][¯Úëu{ãÅ'&èÇÜ W‹¿æË¸E^Mùô$_xãƒÓ8ÐU¨ˆ£:¾ˆ“PN '†S3ãj¦òæàB¬ùY‘ ¾ë·wd ¤ž^!ÿDy,/àÆ¨ØY):SìdªÆ2­EÌŒ’FIÒVæd”â.Ìk¤¸¥ý˜ÿPKbnÅüÌPKù™H'4com/sun/net/ssl/internal/ssl/JSA_RSAPrivateKey.class•T]Se~Þl’ !´ÒTÚ†æ –¤Xùn“6%¶±2KXÂv®n6ËuÿW½Óg¸á‚Î80Õ™ŽÞ:^ù¼òø¬çÝ&iaˆÉäÝç<ç=Ïûœ³›ýýߟ_BÀ06è àb½tp¡7Ë?’ËRUÖ*RÑ4T­2ÅÐçÒ»²¹#eÕÊ‚f*Å ”­1x£±R–Á](ey|1Ú$swó‘R6§b.Gß–•ìÒ’]êŸV5Õœ%Íœ¾¥Ð%/ïÑ9¾ÂR®8Nç­3 ]´ õ±l*KʆpKœ[y“Ê­¬2‹zÝ(+ój•t/•îȵ½`èÃk©‘ôp*=ššÈÀd¼Ç0RÖw¥Z]“4Å”jµª¤R׆&W­`±˜ÙxÃEüŒ‚æÍ~固\­1¶UڢPE13ÕŠn¨æÎ.C7…9ÃÌéÊö¶ZVͤˆ›ÓÊ4š-† æuƒîŠXÖ·êÕzÍ®¤Ãv•¹o¿Ö5*,œÀݳ,®Ð„‰ï±17ëîvê›UµÜàz­Û©êRQ1TÞ…¼É‡{¡q—sUÚj³½'=C 1‹®)å:õýÄÚ¶\VjRc¾4kjCmìµ62š_—¹£48ï‰xW݈„ˆ¤ˆwDŒˆˆ‹ˆ…p®@ ¡!\ç(Ê—_†ør•/×øò_úxEB¼6ÈQWÂAŒb"ˆ&;‘Æd70ÅÃiNs4Ó‰1Ìp4ËÑ,G·8ºÅÑmŽns”á(ÃQ–£,G¹ >Â.:ÇÃù:í …—ÃÇã-Ñzž¢nº2ºúâÇøô9ø‡qÿNºËŠéç¦hNê/xèMü™ø égø#~„…ådâW¤_`‘áKÂ÷ð Äç]~¹‰§²±gøŽÒŸY鱸ÛZVpù{­üŠË[ùU—ÿ¼•_sùõVþ —¿ßÄ{„§×¦t„î(Þ‡ßIŸwÒB;t’ô8ÉIø¬9 ±|ü'|Õã9BiùܸïM†Åô1¾ÌÇ“Çx¸ÿ:Ë'©ÊCÒƒ¸ié|ˆG'B¼‡{±TRÉ'„ôá:;´Î>G_»dð_^×ו׾É——®7_¾†/Á²%Ìî#”ô¦„Õ§ ôò‡Wÿ´ø¡§Ë>ôêkÝ §ßÈÛýNiw€Ú´e®µ56ÿ™c‹´cç4™†¡vdN»‰ ™ëí Ýûÿ‡mÇž÷ {þ~rdR$ÂíE|3ûè·¼$ú]/„¸—§Ö|õ·û?¸d‰\þPK*Øæ¡Ì;PKù™H'3com/sun/net/ssl/internal/ssl/JSA_RSAPublicKey.classRmOÓP~î:Öm&È›¯€òÒnŒ² Ž˜0ƒŽHXêbH)e+)­öňÿÄo~ó 01#jbô«?ÊpîÖ™‰Ú¦÷ôyžsžsîmþúò ²XŒ#GOã¸ÀÐ'+¥}íµ¦Zš]U˾kÚÕÃP‹>ÐüšZ4««¶oT —$AV6¢²R)2ÄäÕJ‘ã~¹ÍæÉξ¡ûå9àü§½Ri”.š¶éß#«ûήA¡¤ÙÜ~£¼Ä ѺìX¦þØ8dHµÃâòC²ì®n¬˜/}:7³À0Py y5gÝu²›¹é|6—ŸÉ-Ì¿``CD³²ºs z­Ú†¯zž¥š´-×Ö¬xT^Ú>ÛWùGþv[nÌxh–Çß3)Ã|KƒIUÃ_²ªŽkúµšà²­ÓvwV—¸)¬9»P}¦ïò›—ŽmØ”ÐwÞÇ`oО¡Ôá°9Ýž¦žzvŒšK~ÍøM‰1(bTĈˆ7$H%\GLÂ%$% ó·~Îõ£SÂMtó”DcH'1ŽL'&IbSf9Ìò·é$d¨ Ê›áj£DŽ‘$(R#Z»õPd;Ò'È¿ïÊ] LOK¢ÁBé!"ô;…ÌL¼Ã\ºŽ[kS™ï˜øŒY†:æ„÷莈¿Ýâï´ñÑ#á(4½|Î8uÌ·z^AG(§BYèeÇ¡xñP§"Ü#ý w{#u,”2Bþx‹RyM7ÝJ£äÚ9~BËŽ?g)op„•ŽQr\ûŠÉgÑ)!‚Béb[¬”áö јMûáÿqˆþÍ¡—ÖúNPK#÷³:p2PKù™H'4com/sun/net/ssl/internal/ssl/JSA_RSAKeyFactory.classÍWé[\Wÿ]f9w.&É­1ÛÐb2­Q I% ¥™”tÄ'Ã&;8sI¦MÒ€1I­ÕZ•¸6©MW›¶:$Å&mÝjÝ—¶.u×ê?øXß÷Þ;0B¿•ç¹ïvÞóžwù3/þïéKp¡ÿ’ñ.2>"ã=2â2ÖÉØ-ãÝ2>,£YÆ­2®•‘–±VÆu2š$xCµÛâÆuŽ0JB5 {ãûãá¸Ñ¾qÏ^=aÎ2GÍtÒè#ó’œy0nö‡[“}톩÷éiZr…j»$¸CµÝ­ÌÚY«µÏŽ2;pëpo¯Ãjïnå!N³v["5Î aC7ÙÌ@8IÇ¥ø€¥l‰îîÞ3LlÕGhsSˆ+ZÀžtrÜÔíMÁP‘Ûç°Sb‹‹Ù»¹äÕEVŠoµÁÎ<¢U sîâñ̶wÛ½&T|pÖ¸Âs,α…Â=õ†v¼¬œuÈÉ:£'†ÓIs$Ì ¨-b“ÐZÌ5¯»mñLfÖÞÌž`Ï(q ²¾0ÈësÝOž=8ïõI#in ;Õ–êÑ%(›&ô!3™22dÛB!$¨²ÆH™5;¢- jXå£jzRzÆZ n$úkÌ~½fŸ>B.•Ó.3Û\Ä$”¹"üWè­›všÚvì¤ Ø”»Œ*òUkM §úæäÕPy³±ÏH08+ :]ͳ‘ZÂ=XÔ½1žéOu¦Sõ] MõMkׯ»U‚DE—Ä &£¤í¡v%R…n¸ÊõoÙM©QR›ã 3•Yà†ü†Ô/hÃL/¯ö µ¥ŒýzÚœÁ*½WÛ“_ÁUó³¯]ð“*ÁG¾Cñ´¾3E3×¾¤¡ß ›|%lÓÎtÜÈ äâ˽I –¥Q¨}ºÙ2З"ä÷ÒÐImK›m)½·7™Hê†I¨ Û&#AÀî‘PJJ»‘1ãFB·—¶§z†† ç‚”Žø nG¡zõM‡hà†ÙYÄvåž³uæÉdØ2÷#ç=ÀiÒÆ¸wlV/füüÓ¶i7oÒÈÐð$¬äÛÜ»é ª;·¶E×9õM·mULjQ‡¦=—Ïë9í¶l·\¢¶×Š"^·\»v}azÕÖ«”L…£z:É“Œïá+[Qðô9Ùå,Ô Ž”J¥M½gú’PUàf‡ó¾}tÙ‹?‡¹Œ Þs K¯|ZÛý”-בwxå¬7œnÀ•6 ÿ½ñ„ž NÁêU|-Çó:Î\©ÕE~f2ç äe¿²ˆóÜ*pœRsz^ ©"nE UàU RÝ~_F7·ÑƒaöÓE7S­#¦Þ’NÇGnØ+Ð+`$ÚÞ'Ð/È|@àýH ˜ƒ›ö $6 \/°Q G M O@Ø£¢ËTlÀbªØ‚·³í*¢¬¶ À«5l{ “•LÖðBK«T´¢ZÅ,RñA&û±‚w,e²\ÅMx«Š[x¡‹É.&;™ÜÌäF&ðNö{›Šah*>„kTtb‰‚ø,“{KqŸS0‚Ï+Å|  á´‚ÛðE&÷*¸_Rp_Vp_Qp_Up¯ÞÁ«Çxa _S0Ϋ‡p_)Žã “³ >û9Ê×™<À«ç8¹œ`—“8ËÒƒ,=Ääa&0y”Éc|Æ7˜<ÀÛWpŠ“¼›Ïý4Î3y‚38ÃäANã,“‡˜<Ìä&2yŒó{’ë8Ãä,ó$–R¬(Ágp‰¿˜h=iAú/G"î[Ò$žzü'ñH—JâìâY=‰oæ–·¢–"ÒrÉãPà'~Ïš‹ø=üRÙ ”Ma4(™Ääåº,.tÔ\d?]kžÃ¡ÓùËkžÅ¡,.FÜš;àÎâéˆG#65…ÛcnÍãjšÄ·#^Gs[š˜Âá˜æÕÄ$ž‰Èš|¾>ూ_7opo~ð#1;ö¥ˆWóRaHS€£…ŽfqÙ gñ¬à¹ù²s5ËçPÎjPví“¥ ÌÊ¥û^ÿÏŽ9‰?ñi>:×gûÚ¼ç* ;×Ñ<–&;š×Ò|Ž&,Mq4ÙÒJÍo»ª9Õö-ó4—ŸÃ2WsÅ9Thž`yS°‚Šª‚¶FUý{¬\ –ûÅý¯¿:…1«>MÖ|š¢•jªV6‰ïD*´ ªµÔªµkÞZÕüZÇ!}7âu5 «©®¦  ó…¬pSi~V¬2޵kF쨿L]R2^2Ž[ünºþ@}n‚ð(}Ûr`ÜE¶EÄ›(½ãè%vçÊ)·;³øÑó$¿ˆïKØnK?ÐQw/DÜõL=žgðɘKsG¹}ш—.Tùü0"4pk„¾5q?"Äئ¶tÄÉ ©†Ø]öIweñc¢|ÒÉ‹ø‰}I?¥“lég"n[ü9‰[ü‰^[ü%‰ÂE¢l‹¿&ÑgåªX¹–jnfªæaV¦y™•sz/Ьdf~ÍǬÒ/Ûe)\Vi4æÑÔhÌ«•EcB+Æd­"ó{5?Q¡UF#»ì—"UZU@ÑY¼ìi®¶ d‚ÕMÁ 0(ƒ–fA¨Z V[Òª.à•HP«"hAîщ ÜV´G'¦{tÂê̦ñ’5 ™§ñ²uO©y·”Rù/wẂð´NÅ“ø C‹D?‹Ûëò5zBQ¢•h„2æËéýf¾ ŸÊCÛ)ú¶yS³ømîMaµ Fi m©&¾ê>6–:z<Wçâè÷»¨ÞcY¼Úaó?ä ¶GêuêöpÝÞ(—Ë=›Àó…AÆœ ÄÿhjŒ£yláO Hø³'þb‰„¿F|¶ð·7Ž&MaȪ”³TTe ªrUƒÊoªÒU ÊXâ*Æ'°"W…êT1žÅß;ÜV¸ú(?!öcPÉ/€Õ×üëÞë0ýVº!?HaçuØí„=œÅ?:lþÚ‚:|$/7¯äHÿ\pnëI.Á{ÿPKª¯#õÐzPKù™H':com/sun/net/ssl/internal/ssl/JSA_RSAKeyPairGenerator.class­TmOA~–^{¥”òZE=”—,ˆ ­1)ˆ¦Š@¸„„4†e½ž^o›»+¡þ?ûô $jP¿øÁeœ¥•ibL¼dgwfžyfwf÷~üüx„2xE"Åå(ºB©ta0•^yeî™zÅ Êú¢mÜ€[ÜË6”Tº¸ÈЗjÀÓµt#ðl×ÊI÷x {käjéóRͳƒºîWyIÏ;– ­\Y7=³ÂîdÎþÀrÁ7LwWTré•R•ö·òÿ‹T‰ÈÛµƒ‡tâ%±ËbËû%^ láú #'lšÌ¢¹"Ð6Œ¼öš×µªi{šÅÝ)ªæzmDZK߯ —»¡íعB'RCÔ¼l;”¡¿øÈôËbݙ͙©ÙÌÌìôÌÂü ê‘É0Wݯ¹ºËÝ÷ݦÆx®é+Oü6>ãõuÊþ„»Ü3á1Lÿ%lû_C( aÏ“!úÒ&¿ý†1`ñà”óG5ë"Ïs±[sj¾q í&C£@ËÍú0ôͨû¯œ Ò6M§FA½Ç}³u̳eNsGÖ®çôŽ-9ÄÕ°ö¶ºÊtÂó½/¸{D´{ñ¦œtœaì|Ȫ0j¥òIÄ`G ëÏ{žYW1 â–Š~7U ªV¡©¸G'bqôA•«ö8®"Ç"qŒ Çu„cEFŠ©Æ¥HA!i)fb˜À¬w0LîQ´a·„éEwB%½‹´>È´O$X‚bîäw‰†BŽ1´’Ü-’bâw@†d ÷îýv_A¼™Ê"F•æbøsl+4´¶¥$ÚÖ²Êäw&¿!ýŸÚJ„qÿKR M~Eúóky!N†ÍF’‘#õ]«4°ŠtåÖ’Êûs›OѸ†Žfú.ÒšÛØET´£÷PK„<öº¾úPKù™H'7com/sun/net/ssl/internal/ssl/X509TrustManagerImpl.classWûw×þÖZyei Ä`ˆ°•8!Y0$¼lÓ8`CëÄ¡iY¯ÖöÂzåì®N$MÚæÑ&M›Gí¶@Z§ÎÃi¡ R7éôœþýGšÎ¬VF’7À©ÏÑÜ{çùÍÜ™»ÇÿþïgË …†ðPɶ†ÐÂ6øö~âÛŸUÎ+iC1ÇÓ'FÏjª³_@s™mkjÞÒéôIK7U}J1ü¥ùQCWiÓ$½¯,Í;º‘îÉùÔs&‰¢U¢>3?©YŠ'ÛX%ëwX’³Hpo•`Hc|~Ø¥O Øß~ºŽªYNúÉ®Ý=´ÑÇtUq4²I“ šâ«SfG{}ø>š~õÚUi:äP­Æ÷×ÖÈU ¨ÉÏløkø„°Ëï›|uœæxÝÔUWs£¬•ÞºkßV¶e•‡•~àÛjžn8Áø]iö³ÓÝw¥ZÓ9l¸çÿ1tC®Wp{]ÌÄmŒû‰ÇOû´Ž¯BõÎåiÈttudº;:»*öÝêÖMÝ9@Þ“Ëjêəޢ›vkÞÓ±È~-1 TÝ¢hY2Ðí¾É).zXç"ÜRÒ¬óšµ¢Ò½·›2¼Õî+­&`]íT±JÏuÿ‹%àAE€M_óœ ¸ÿöO¥€-wnLúhú}Þè‚«zÆ}¿uôE[5it «¿}ÔîU ·éÞX„ï*é+8•g‘­?G!%'wزnÑóŠ‘ç¹©§ËÑǦ%“ð„„ Kø¶„. Ç%|K „ Iè0,á„„! '%ì’ц{dì@DÆ)H2z±QÆ~lñÖËø&Æ&G°VÆiÔËxaßÁƒ2ÒØ.£2޲´ M2v£QÆ>Ö{kX¥•ÉýLb¬Lä “£õC–ñ$ï#$c/Ûö°«4¶ÈÈàÞµ0i–q€UÒˆÊ8„ßÅf{ÐÆ÷0Æ& ž‰`ïl& ò¼;ÏäY–^`Þ4“ç"Pñýdñ&?Œ`? CÃEÞ=Æ^CÇEÞý˜yd–Å‹L^bò&?eéÏÆËìï•ÎáU潟óñ¬÷z“ r oðñ—LÞäã¯x÷ë0L¼Åäm†ö•*K.äPG”J ÐJÕ¦U¦]î#É7èt"‚´Î%Šx7±„3§ŠøÍuÌ% ˜˜Çxû"fÜ€6˜LðÛ<Èëïö‰QñKŒÍàhâSÌEéTÀïG汇¥—fæõ2kÝÄÖ¨¸| ±¨ȸ&ëK& ÿØŒb\0ûÕ; –ðÞ绎÷K‡?Ðòþ"þX‡‘kà¿8ýDÊaœ2 æðòôò8Ò~‡ÈáŸÈ!ö´/A;Õ(1¿ˆê0ƒ6ÊëÃÝb“XwÑØ%4ÅÄl“8‡5KÐO5ÖñÑÕQt7J‹å ñDZw’›S7!§±À¡Äk‰TŸ$’©–"þÜ2 ™¶Eüe îæªŸÛ˜çö˜çö ¤ ~W |àø-õG¦¨ R+rÑyçJˆã^ˆCâ@9Dת[Ë!6§–Cs#tÇ4¥^Œ‹Ä«£ÕNºE¯ “¬¾€Y4%kCŠ×\ïAö^2 ®6œÁÆÛÖÂÐuDÖ&ZZ#ÜIüõÎ^uÕy2¢žÒ!BÎõÙåuÝ"þ&€ …jõ)ÀØ uôuXàØÁÔU¹kÿ#”½õa‹ç­‘¼q%êÉ"þ¾àɽ­œ+Y–Bÿ•I´¾¹„IÈÅÀy\LÆ2û‚DÚ ø,¼‰u‰h0VÄÒ<êG ’ñÂ&.ж€Ï÷ÕÇÄ3ÉåËhNÒ&CÓXÏszÝÍaÈ&Z_À2é¿ ,x Y³ÞÜ(¹~) Ä’Ëï}õ‚¸@0éùˆSM<i-Aoö 7y©5p!©›¾,gŸpSÿPK²œÜƒâtPKù™H'5com/sun/net/ssl/internal/ssl/X509KeyManagerImpl.classíVéwUÿ Y^:vD ìPÚ„´U ¥-R¡-{A™C20É„™I¡¸+*¸‹k«¢àp„”‚ |Ásü“ü Þ—¥MÚ©àw{Nï»ïî÷÷î›—?ÿ¾v.„qÛ‡j®š%m¦Ô,ÙtPî–#ºœŠG6wT{Õpq‡mj©8‰g”Ä–ªdLÍî‰l!¢¥eÝY›éÒ5e£ÚCÚé%mÆÖôH³¡ë”J3R¤ V¨ZS™¤jÊEÝÔ ]›Í5†IЉŠ•—M=mÏÓÝÕŒḻ×Ð= ݯË8 ò¼'sÊWë osµñW8ßg¹KkFžŒÃ©t˶Z>àä°}95²ÌIÞ9,ƒ¢šv¤™ˆv@S(åYyß~;—Õ¯¬ô]âàÛÙ<¼­B?klGKÇ9núo!:b̪Y]¦Ê 'xg×—$”kj:ÜA&À»ZKiö£|Ír&ž°£s¸›ýª±õ¨¢¦ùU±è@ Κ‘OeS¥ªœ$ÿÉe÷dƒl%Úå4IÅ#c*êzM§8S;[Hal1ðö†¥á†Æú†•+ö’¯cï ïóXY“uM¶TªÏ+§Ójj¿€*Ù4åÅH÷Iý+t•„aXj³®©)»‰» Ê:T³[5‹²jÅHF¬L*’Ríˆeéù¬}»œ’ãªIµ 7 (T3%ë%ëú˜œ¤–#÷²+‹Ú–LëT¿z8#ëTƒ+®Ú$¢MzÜ IBжeÝ7'd-%`—õÄað“¨Í²2ªÙ£ ´£D„1…ÊÆ7tƒ ‰¿¤…eðã²ÕN£×ª«IJEF’˜z”Ê5‹ÜZS¶I¾>­ø¥zKÃÒ¶ypˆÊ¤e#D)‡Oe…¨04DÎßÌJÛËV“¥ ;á’°S$,C@B-&HXiö`¢„G IXŒyê8 q²A b¬„ÕœÛQÂZTIØÁC­‚WÂCpKhÄx Ã#a%ßÎÂd K0NÂÓ|ÛÉ·»y˜!áQžh˜„½#á)Ì”° sEÈxFD' žõc?žãÜóœ¼ BÅ‹œ{‰›¼Ìµ¯TáŽsò*'¯‰D^çÚœ;ɹ7üHáM? ¼%"·ý8ŒwDÄñ®ˆÞóÃÄû",œaÈœ|("ƒDtãc®ý„ø”Çëå¤Ï#ø¬Š ú ”I†€côRàè´Ö×P~eÄ̓ٴ»I€óµýø¢ö:ºvõãôd‡ØsCìùº¾Œe‘ à+·ºë‚îÎôBÎ3g£ž ç¶=7O#ô¸o#Ñ‹– ç6´>Ì ù $¢^Ò½.Ú]Å×AoÔCΡ¾‰zk/ã\Ðôäðíâ³Ä{9O¿Ðw÷ÄEð¿9ôï£&âtj(ŒéDyCÕ$uÓ:©¶Ž"~ ßìƒG¸v5^È{ÎÅÒAÛEÛ5¡;ð…Èp1¥äMþp ÉXøTçƒüˋüŽ,Ä¢lx`úM†©ÅÀó ]­Óx;<^{(ß?Ù‡nA+9Ð<„qT‡D²¿¸C? àg±"ðQw¡¾,Ü®åÞ,®¿àgy¼X¾bÃHˆçpaäp©']Ë}Y$]Ë«²Ø#DÅë°v=*²úu—ôãJTÌbAÔ ·®ÃÞ5IèG.èÏ¡?‡«9 pöZ3ƒb(à#·ë½˜@§ÂxVŽÇ¸ãUB ŠŽòÌݳÇ}BÀðž¹{*àíÃØ!3ªø7~|øÜà„æ >€ßÇPÉ(Y] $öш÷àh›(&9€™-ÙS³§æêÿÁÌùDÇ`Á?PKYOYOB]PKù™H'8com/sun/net/ssl/internal/ssl/KeyManagerFactoryImpl.class}’ñNAÆ¿m+ÛžQ±Ö"B©Ö£ML$ƒbhL.Iãë±i×\w›»kcßJ F£àCgÛZ­—ìÝ77¿ùvnö~üüòIT±Ê,¯2Ëk}ߴݨ«]-c7ŠwOöŸ -š2Üd˜/ï¿=áFÒï†*îÛ¬›Pn6¶­CzË”Vñ#†©­‘Hm›cÉà<}çËN¬ŒŽþÛæÕƒõ‰­ÏtC_Šs'"j™—¡©Öî׫µúzmãák& g·Ì°|vrGøÔzßë(†ú¿˜Ò± µN¯Ùmw†Ò¹EÔlOÛÜs¹É/:ÏJÝTZ>“ñŸ ;ޥÁ2p¥£XDO?“ñÀV&‰Æëú­ÇAÓPØjÿ®N‚:”¾éÉP¼ $ùŽIŽË—8¦9²3³×9rY\Ë₽]DÚª¤ƒ(:Èc!ƒ›Xt0‡%,’Ì #´ ©2´l¾¶°Ü×ãØ ªµ¼[óL!›Î0Q\ãþ¾{ßsSÛéùÅTzq!½¼ô”qÀ«Uáì2(&7…гÓv}Ê;?lº4‚aá nR¹õ|Õb¸Ô´œ@x·[É:°v%áÕ¡¸ìÙJÕfHMëïX;gB8%ËwDУڵv KC¡Þˆg–/;r¢$‚¬ãÜ1EÛ#ÕUêVúfÉ€M¤Q9ˆù}·B½wïÎôº=kÏ0þrz/FÏ0Ö?S’7ÒŸa‡ÇØ(¤š×ñÑ#ìå’“aÖ@i’ÞÙÿáGÉCR<ŠŸð3¾hU?EvçþPKåW=ödÐPKù™H'1com/sun/net/ssl/internal/ssl/PKCS12KeyStore.classX`ÕÑžÙ+{··j'­¤'Éö¹€¥S³d[Øk›`Kn c#œŸOkéà|'®‚„4§W 1Ih) !¶cD2%1é½÷ é½üϼÝ;IÖË?ÆóÞΛ7ï{ó¦?ûÜ'¦Á­Ê…>òÁ°b>¸ÎoñÁ >xηøàzÄ}`ùà >T|ð1¼ÑoòÁ›}pÀ)ŒøàV¼Þ‡•>¬òÁÛ}ôa‚«±©OÒËV66m&¶§³‰ö„•iO§ãí±DÆJ%"qù±%6Ô—Èl@h?›d•êKŒd3ý™”9H;š°cw$žµH¶ãl²;ö_gE3}ƒV";³R´ÇC{b4VÑx]äÆH{<’rç± U,1Dìú<;mE³©Xf´}'­Dc#‘8­Šüj6‹·÷&²­T$K&6H‹í–ôwcÓÞ-ö@¶4h(Áݸ…·ð ÷ô±áëi˜lKöÀy)¢-Í4ì]°õ<}Rµ·±o¯sâeù™Wo¡U?­æõÓIÝöŒÔwK.C 8öWcc‘JZ¼ºb;BE{÷–n™ê×îŒ ÒÉ”…;Ú:ÛÖ­YÕÖѱzíšõmmmôÙÖù|‹«)væ-®oë\u~YluOoÿµ½=½KòÓP2 H¦BéáT2;h †®·FÓ$¼1%b™ Éø ÒCÝ‘D"™ %o´R7ÑZ¡äM‰PtÆ+ÈrÝ‘ìÐp&DJì™ISwwrÖJº“‰t&’ÈÈf€$z6ïÚ|펾„`ïöî+vîêí¹v†©õÞµF¸¥!LHÏ«÷%Vª;I§-b¹/#K#,# ¤’²5Ɇ"ñ¡$>b¬’ÙÄ EB½‰Lj”<¦}Äj=Ç&±ýœÛ>£PF¹q›Ñ,;ÕgŠÅÐÙ3Ÿ1+énN¥"£[c²*”ÏOÆ•³X—FÒÃÛ"#§)`n&²?ÎÒ®ÛÙcØkC¡4%~B+ ;8·Òm-²åJ»…‘þÃ=Œ-‘‘£¤ùMV³›ÑÕHã•ÝäÛ‚hhGÁý",ò )ãg¥µVú/ÝLŽ«õ'³©¨uq,NS¾+•MÓ|{ç5ý»{¯ìïÛ±ýZ ÷ÕkW­GP8:«÷öÐ=’;SÉÖÝ­«:Ö¯{ÂÒT$·R"D\©‘‘‹½ÈaãF“#|0)‰ÅÙN,{ mÚO“ý˜Phc”<-·")9&$¶|¿_(¯<¯”c§¾Ä$õÞçàÁç-¨I§À8'??йÍ-u7ç ½Â Õ@”n‰%ÒôM¦%Ž{0’¡÷ñʈx¤y±•ˆ¦FGÈ?BQÛJÒ GRVšæK)Y‰¡XÂÚEd©´¿»å’O‰ÚæöXq+c9^Veó.±2ݳ³(ÆvÔ]릃(ÜfÖèi8kõH}z//Zkö¥gip•ç—fòšf³¶&#ƒ…ÓûçœîVÖæmîÝB0·ý`^ë†l$Î)˜|Û} Ó”<¼rÈJðONkŽIÊò\§ºS Yô@:Ñ-ÛvÚéŽÎ£OÇ•Jg>vŽp!F|àÏ žÉ_}²†D-[‡“&¥t:k¥z¶ÛKN‹L YPøœÑŒ•É£àMýt=KêóÊ/kVú9+c4»bI‡é‚Ñô62L¯ýØ.1r­XZV·T6*b…üÎX7g¸õaë 4ä«Á–QòÎ$s³²ðƒlG¡ðÍâÎ*!y®, ³dKg¸Û¨Œ—œÞ‹Ìaå­P]ü§Ë\YÊëÖ܃wQÓp“ÿªŠ•.òß3ýÈ¡’2oIz۬ˈâý#díúçù1D¿;ç®nOög£Ã›ó]Á¬#jÎð¯+TÏæ®\•HYQîzøº43:?1™§êtYªÎ[Ðï.jxŠÈqå›sìiF8'×u½‰(ucƒNSžѹ­Cþég¸é¼wz ÊbEÿù‰|^‡1ç”BAÙÄî7‘3 9—ë 'G¤¿EŽaÄOf‰V𤲉–Ð~ŠŸthu–HªËFìȈD¯ß•Šp «’'=M#ÙýñX”û’|‹HÕÁiV¸8¤³##É” Yן‚7P"HYé0ê¹tdvE¸žsg’–éÑ•a†šIJËØL²Ñd¹LòôÂëÉ$ee'Á­É›¨ƒ¥òCÊ3É|b–’N6q}‚ûéH&C±ÓM°åï …2” éâËΰ|#'ʼÐò"Bì-s¥¼Ù‘A»w—ìTSáC*<«ÂßUø“ Sá§*üY…_ªðC~®ÂOTø¾ ?Sá*¼S…«ðŒ ÷ªp Uá·*üH…;Uø‹ Tá*|O…o©ð+þ¨Â{Tø… ¿Qá}*¼_…Uøƒ ¿Váw*¼C…ß«ð]°U‡»àe:¼—É}L>Â$+ux^«ÃãpH‡'á5:|nÖánèá:<<Û§ÃçàR Ø£ÃG¡‰ÉÕ:ü›E°Z‡wÁ.¼ð¼P‡Ã°EÇ2X¡#Òá|Ðëà•:ü^Îú¢LÚ˜¼ˆÉ5:üÎ×±”vÀ‡¡[G\¤Ã§˜Ü¯b¸wêð_X®Ã Z…oB£ðç×a#XÃw{5Ïßg!¤Ã»¡a´ëðeFu¼˜/¸Œg&tøã+§UtC˜oÞÀZöóê~«a3+¸X‡ÿ°œÊÐî‚ h/Ï$YËäZÆ·‚-t‰Ÿ„Ý:|‘?ïƒwèðÜÆ¨6é¨Ã>‹u,ჰJ‡ûÙ. èÒáÓ°”ï¶N‡Ï0ܯ@‡Oó=¾Ä ßV¾M—F/´èðO9e_ë5hf-&¿ç pž_#‚>:ˆVuÈòsßÈäaF•€õ:º —1_¦ÃS°Q‡¯ò‘'ùª~H²G¼BÃÜâÇZìfÒä—ÉÅ ¼DÃ:&õLð^¸”I“˘\®á"ܪÑl›†‹q;Ïvh¸w2¹‚É•Lú5 á. —âULv3ÙÃ;®Öpna2Àä —ã^ Wà ý$ò"?©1+½VÃóq““ý -ªáJä™Åä“!?6á°Ã `3^§a ^ϳ¸†­xPÃvL0I²ÜËh¸ oаSLÒ #£a'£Z…Y>íF&7i¸oæÙ(“[øðë5\Ãrçã­L^Âä¥ ÷6&/c‘—³¾WðÂ+™¼ŠÉ!&¯f}¯a¹×j¸–tá똼^à ð LÞȆx“†ëøÂøf?z £z+“·1ÜÛ5\o盿ƒÉšx'“»øißɳw±œ¼àaÞ¶‡ywóìÝLÞÃä½Lîa@÷2´ûÕýüðh¸ßǯ?ÄŸï×p#~€É¸‰¯_cL>Ä"wðì?©ɇóG4ld 5áClvéRÕhá!ž1*‚q>¬áfy~ŒyGÐQVúQ¾ô1Võq¸ ƒ° šùAÀíp3 dèKQ6Ñ7e@š N‚r¼Ï?"GäD(GÊ…r¤t(Gʈ4֑΃°’¾Óôµ ø<€Ž)¬âÿ8ŽË¹"ç99wÉù„œ»å|ò¨Ü†œzU*JОÀGÂSX70ŸÇÇhZOÓ©qœ¦iMÇa÷8>n+Ñ8/;J./¨4nXžŽw¹]]^W—g DØÕlxö…§'ñ‰C^4<áé}]Ãk¸ï?õŒ³¸Èð ÒòŒÒ¨­ÿHJëiü~xºËkx=ÃLïï!¯bxõ™W—êêòAXx _ØP×”û^R§n»}3Üû˜eRñO1Ôðôý§¾Q~Q—¿¼ªK[dh“ø¤¡Å»†ŸôéÍÓ†Ÿ8]%ÂãÌJ£t­•-"R.tÃ}û$>Õ,Ê\FÉ$~RxD‹Ð4è™ÄO™RS¥¤U®.CT=‡'i(“CŸ6ƒî®ê1(#^0‡Ÿ6ƒ‡ªÑ¨n¸ÿÔŸDÐ%Ê Í0†%´ÏU ýÏÜ "(*]¢’ ùÉ)\:à•øÙcøµ~άquÕŽÁ+D¡¾üöá¬VT¹øOØ;ªh‡)è¿ÞDc?Or¼k°«Î¨{7TŠ*£Ž7Ê]c°Ò¨{,“ŒZ£.³Ï5‰_ ’AŸ´•!’ô¾.’edÝ—2Ð^8vÊ;KÍŠcøõ)\6ôNàùþ_Êá—søž~U”¡·þNâž'ÆJŸãRxÀͼpsÃ"²í7ŽHñs‰,&âž%r_qoA„Ýl-(R¤ŸÜÌË>nžÎá775<êÛNÞnv5O·ºrø-rXO¸ÕðäðÛ켞Öé Æð‘Ý­.á¦ÿ§¥µ¼­¦[¸ín¢¿n@ºÂ8ßASE#Çš/|ËáwŽ8Ñx¶9µJ¡Qg‰æ~7‡ß{È‘:[È«häÐÀRÛZžœþþž–§IËS'ŽÒ*Iãl<Äý8ô9§u;z.˜Qðƒm-'¡±å l: –DZé8þð$ñ£§Áƒù¹«óæá‡«…#¤m9è\pû\Ñúþ˜²®4ÝÌn:Äô<¢Lxì3¶AÏY÷É™©«“\-„í'‡ÁKÖ%m?E¸ûÔC…ÓÇa»sú œë¬>í:+è:áð¨È5rø³Ç±mæ*9¸ÜQÖGöbe›NSÖfÛÆ˜ÂöÛ>Ïäðçø‹#‡äŸu8µäeòéðArÈ wÎR»É“N‚ÖJ0ïfp­¬Eñ›ž)\5 <øKÓëy W™ªP]Â{\Ñrø«~¡ºgæöäׇaÙvȈS9â~Cq7¿=A»:sø;Ó'<® ooú…?‡05¡µ¸Z(þ(ü‚öü)(þœÃ¿Ü %S¸f ¨Mà_O´0÷oLþîj“ƒ[ÿžÄšyËÿ˜Ä™:#’ê&ñß„+Èáøû¿4>þG#Á4KD C{Ž¡ Ý%tBuª€R\"0SÀÁIƒoRA³t ×ˆÒ E1ËD)_NqQÎ.Ï)îIÅcVÈ$¬xM÷Ô˜^á¥4…ëh¢¨ŠïÇ.ýpÇ[ñ6™8f¼ PµŽø“…]é¸Yýiž¡Ûžáq?äʇì# Úž»ép¡í,®:r–Ô?<Ç›¶·>‰¦MMšÔÄhÍOƒú!åGÙKš'”€œ¢›:Õ¥$§”v•%Þ{ùñ:‚:¿>×wï„RfÚ)H)ŸBs@èJÙŒ¬dƒSšsJåa(aN•Y:æh(±5tH#lPON©6ƒ"8ÝUéêªûЬ•A£ª3§Ô°X<¢†¨Õò4Ù§Tó)Æv3³…™ØÆÌZ¾ ×)û2uBÈóêE½‹” ³AÔ»ù³VÔ{:]9¥îni)#U»1?§ÔS*3•‡^~»Í1唹Dq`ˆZ'‹ÅìaKÄ’|,K8Êxav”sК²È Ñš²Ø\Ê"7—ÉÀ«àÀ[æn£  —^.–Û.M§ˆ¥.±Tºtþ@r‰tiûH vic ÚÌÅùZÉzÏ”Pš~uþÛlt¢eBYr¨ *£òþçbôÞt@È4\Ü}¼AFu'¥³FÔW(ûd~Ϭ%IÒ´a ,W&”¥9eÙã¸ÑFÔòs,ßÃt“óQÎWè»à]’›—âéS_ô†+ïZQC;yþÒ7RÎÇÉÆGÔ5dxwNi²A†[©†é­O ´øÔƒî£ƒ/Äá)*UåÊ_ Í.ú-´/¤¨™‚+œê˜¢@ãfôÅNÔÌŠ8®;'ÁàâCAG–kVM(mtߦð„ÒÎy¡e(¼œÍ'”UãøL~?'ŠŽ=ŒÍÛš¯¯WÁ5óê룰ÓAr!ñÑx«à³ŸœÂ0ŸÓÉ™¼p³Â}Ê…Ê¥ñg¶i gª|¦ðСA¢'öHÈC&³P«óè•ú ¯´f€\évL²K¡.eˆwÖUŸ¥ËK/WüäeÂÛ:’4ƒp$BlÂOçï˜gˆÇ ¡h㣬ΧºiY³Y¢‘r£Vå<štêjvj²µ4uý™ÿð ÿ„­C±(]VÒ8ÐÌyb{ë4ÿñŒ)=”.©ëät¢²E×ЭU*›T}vÚXR¨š5d¾ãʆY%ÓgWY÷Ãq™µÂrEòQ"“ m–)5Ó?÷òŽœÜq«ŒNŸ“i—Lf”²íd¦‹€ÛÉaK `j ñç‘ ¨$(&•µf© Ú·y@”PB›PºrÊ”ÐBCA[lìüa·aI¿¹hê®®’1xµ©%ùìMª%NRfã,—eî¼€]ÖQ(?†ò¦eôC†–×›1è`öä,6¥\} êò9­ž1•rÚ¡4J„F)aTøe®~NS„CèãJ+ qe#' QÊ™Hö”öËRöË1èçÃå¼q#mÔOBÍLN£Z·”Z ÅÜ#äá2mi8ï$%ç6û‡~¸Ò/ÖÿM-â€üS¢ÓqójrbîÞµºz÷à¾úxý°íè ¼UÒ;`ø§¼ ÃX /¡h¢ñm4n ñ¥ÿPKØÑ-,Ú+PKù™H'7com/sun/net/ssl/internal/ssl/PKCS12KeyStore$KeyId.class•ÏnÓ@Æ¿ñŸ¤ †´@\ I%$©“`œ^@ =4)jJ‘zh„„›®ˆ+³¶ƒÔ{Ÿ‚ âB/¹ Q!qˆàʃpä€YÇ'n±4ßì¬~3ߎþù6‡Ž6zssé!¡ÛÜGoÜd*])R7IB7©ˆ¥fÅÁ^èu÷ÄÙ0b±=ÚUMÕæþ©ÿÎwC_¾v_ŸŠqº½yD(ô¤;£‚5RÄýÐO‘L38!t–²$”‡Ñ4‹§AÈ3KÃ3™NDŒ Úh—`žøÉ$:ˆ£Î¡w¿Ûñº¼G_Èç8&´–p#xKÐ÷ò… âíÔyÕ ?e±ûêÿ¨ˆ›E¬±jÁ„fáJ*°Ê¨âV 6n+¹ƒ»¬UÖ¨ÌYç“™i«s:çŠó5§u‰ºÓ¾DãsÞrF1fp~Þúû=L}Öúû™ó6Ç'˜ÆLsUÍ?(@ß¹Àººklµ3ÍnÏujdàÇ¿¿ŒYîsƒcáã°zІÞÓ_ RSl}ëUï\£zÞ÷»¶èÓPÎô*ŠœË<ÁÆ:V€PK¢›×£°®PKù™H'3com/sun/net/ssl/internal/ssl/ParsingException.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈ ›œŸ«_\š§Ÿ—Z¢_\œ£Ÿ™W’Z”—˜æ$Íw­HN-(ÉÌÏcdÛ™¯ïéegà`g`ç:“D0q1p2pƒE L Œ @Èä ‚Y ¬ZÛx7‚€¤™ ÒB@fÓÒÞÎÀ“gÃPKp›¶ÜPK ú™H'com/sun/net/ssl/internal/www/PKù™H'0com/sun/net/ssl/internal/www/NetworkClient.classuS]OA=CKW–åK¤|h·–¥ø‚¨Œ¡$$`|¨eÀB™!»[êoñøâƒ$JI|ÔÄe¼³]–‚åaïÜ{Ι{ÏÜdÿüýñ!¤ðŠ¡7žx½—?Ê[Ei­ŠÃ²›smž?˜eè«c²e·ž Å^ÜR²†÷• ?Þ¸â®à¶9æ“¥¼Øµˆ(ŠÝÙUßக“…}î’‘hC!uˆÌEÑggä6gЗ>ø¡[”Âaè¹âÅçø:u:Ç»LÖs²lør±DÝ£oóιnËÔFzb*•žšLÏL¿ch.”¤C‚VïÌqûˆÛ fAXNYx§dÑ0n‹|ɪT*Öw+ÒÞÏ”Š\¸ -Û2#…àÊÛw¹[g™¡ƒ€úõ1 ž=a¡¼³Ãm¾}A»Ì^¼Üì%ì«­Û Cçùâ³ï÷<{—ÖÄ0 oľ±"·®µ.¹8[K«ã%žaïœ,I‚²æ7(ks4Ä4ÜÐ0 aHÃM ý5ôÐ2p†Ñb`a×v mn£]IˆèVX®èE“Â"*h¢`*kÖq÷Z0Š”NaBKÇ8&–VaJ•÷ñ@…‡ª|¤#Ç:LL«rFGOÈÅ(uýLy£Œ)+ÞI¾èŒP¦{|+UQ4Qèf³&û޹cÀS“wâ”&FêÆLÆNð´¦4è “~Œ>zª'é÷6O0ÿ ácóæNð¬vÂs^ü߂巈¦Æê§ßLƪXø¨#¤CœôÃÍ5B•~Aú&gLÏ颚y só‰Íš‘¥*–ÃU¼$Ä$}t¥ŠU²vÜ`ΈçPÍé§S=­MÝù -ôáðk›ÐõPKªÖÆX PKù™H'0com/sun/net/ssl/internal/www/ProgressEntry.classmQMSW=Ïi˜ÇØ&Ј‰‘`4Q`zfZ0&‰Jø‰ 8ƒ`´²xÌ<‡¦šîÉôÁü“°Ê.7VR•Evq‘]þP*÷¾iª0±çÜ{ß¹Ÿý×?¿ÿÊx&1-Q–(IÜ–8/1&ñ¡Ä9‰$>–¸ 1*ñ‘Ĉ@nbrÃâS¾‰j•½‘‰åõB‘Š[ÁêÖŽn˜ÛüþV¼n:aܲññwÄß¡ä>Õè¯4"•¦N¥>gÚ6»Ôž)bÞyÎaâ¶nñóNÛÒþ©D@fÂ84wH2ûx¾ºJ<·<[¯“f.ij3sIœ› uÉw–ÖW–)µJÊêÊìýïÿÒãêúÒBM POº†^ #J´á¹gó*ÝNÖ:Iycª2]žš¾6uëæ÷êݎ†2a\±ü‚7QÝf˜Énvã Ö&HÓ(c£;±Š‚½½½€ªµ::MbÓy)0ÐHâ˜N­›RÇÍt34Û´«þ¡«":V_¸«Zš9nê}Áÿþ£·B½H©-MGubÍ…ŽVDùT›õ—mªV ;uLÖkÀè}ôþ‚cì{·ÝT†o¸·­LŸçQÉㆋ‹xßÅ-œuñ%®¸¸É èâ Œ»˜a÷+ »˜‚ç↠¸‹o ¸‡¹‚y††E†û KÌ¢Êð-Ãèc §r .‘ú.Y.Îã3\À§¬ÀùWOø›ä_:á?!ÿ“þwäOœðŸ’EÛpK^ÈòŒ¯gL;Z¦5-ÏØ¸CÖEœ%¼LÞ ›',þ†åbîVÖŠþ!ó‡¨õüÒV^óª4j€Á¬Ä(#ˆ‹¿bí…¢C¹¹WÎ+«|ùLù7)¹ÙŸ¥7˜/yâõŸpšõµ_p½äÊý6p¹ä厰Î>*yŽUHž§FíjùŸñ£ïõáñF|¯ß®ïåÉàÄœMÜô=™z•}oÀJÇ}¯`1ß;}\Å=®r&Kê 8ä{ïÙ€´¾ÎÖûCÙzcÙzMöð€d£|µ tÎcí¤ýwþ¿PKe¨á~PKù™H'/com/sun/net/ssl/internal/www/ProgressData.class•RmOÓP~.í6eNeàT|ÝÚ”‡ºMc2ш`M,£Âȼ5mòYÿ„úɃ~“ÈK¢ |0ñG©çv‰&›ìô9çžó<Ï=Ý·ï×!!« ͉dqÖ˜3ôŠÁ§õ“³fÉ`É1/Ž3è‰äD±d=Ò*×¹éêŽSÑËÜ5mnTôùùyý¦mMÛ¦ã¸k/ ˆ‰ÿéJ±Äß.D}¯_4£·Š^­~°T)ó²›eú !wcx¸»]È3È9kÊdhÊYÜq *åÁ|¡X¸]``×´ÝÌ®!¶1\¸Ã±ªvɼR®¶Ñ›ùK‚­e"o83M¤Çº;3éîLWwßùû éÿ\3¥ŠÅ‰=¹kw êîUhO%‹sZ®9E÷™6Ý×6G)—ù”ù„!úçg ¿ˆWªºå •Óž3&Ådn –=ÜrËj'¦-¨OyÆd¢¦†zÛœ.;d‰ÓÍÍ·'_å¿O‚U1$Xçg 7„ÖÚC8B[Í P§à(ö(ˆ‰´LÁqQ;‚ ‚Sˆ(8$B’‚#Æi¤(¤ÃHÔPg*t‘v‰ÐÝ€$2"œ S8+P½è‰P'yY1$É™!G0(¢ 9ÊÃ;ò<åûväÊ›väWÑ}‡ˆ±ž* ”µOã'œ¾»†sp~É+0±¿é ‡€ˆº†>5ÚüÉôÿê‹e­¯É“¢Zí¨ƒåmæQ4ªËè_ÅÀhïýùcøMœ.¤÷¸”•.,bHí—ãò¦˜hË|E›´MZAVk[Áœ}‹è"ŽÆå­ED(nô(¾ <«c^÷ú«ëíÏ¡¨«TµU\X"¥&èèñµOlk? í½‹êõÔ¦¶Œ¡^9&¿Ä˜ì½¦ËÓ;&g´7½Eû’$µ)2јÚÚNm½“¶Õdô!ë«ÜV{ê«Y»S»¸¤Ä¥Wqñê5Yàe\¢ßåWhð9¢¿¼ÔŒýÃÐ=¾¡½ÞÛÿPK!»„>¥PKù™H'0com/sun/net/ssl/internal/www/MessageHeader.classUÝsUÿmv7›l·6´.P“h…4Ù[!B U( ±-#h”%Ù¶Á„|PðãÁ±¯¼8ãƒcåKÆ<8ÎÀŒF‘G:ã³>:ã8:ŽþÆsv7±Ø8òpϹçÜß=_{îÙïÿúæ>D á=¼><áƒâÃ>ö €O·*@Œ ¦<œâèsÅxªPªUéÈ2Ïþûè0áWmެ°6}úŒ•©ŽvŒ$Ú˜ê J­²Úб“Uã‘€{k³³Vy”ë×9÷Žú7ìè Äȶ<ÚU»ºÇÇÿãóy’¼»r…\uŒš`¼˜µ¨û/d¬R5W,TÔ9jºX+g¬¹<®=¾Ï¬Ì—‹Cdž·Ž <;¼sÇI}Ç;yLj13›%7f©dhã7Ëeób¦XºHǧieteÌB±Ë˜ùÔ>‚fæÍòž*}ÔLñl¼R+Ä V5^©äãÔV¹`æã ñ)«R1笃–™µÊlƒL3ó5kzV@À:W3ó•Ô\¡X¶ÆÍ …Þ=›+dYª6ˆaÙÝ˳ùZež\ÏYÕ ‹"óÑÆ=ëk÷ít»4+µÿtó íŠF¦`þ݇©œbQi;÷ÕÃØ‹•ªE½y«0W¥€»ÎZå5(™åJ[RJeË©¹\âpèS<$Š‹„.¢©ÙCÅjš%¥vºâFâ«[A)ç[Þ¥õ¾‚í ¢ F$ìPðœ‚çlÓ„ªa#“Qôðnƒ†-xRÃfÞí„Oà º4ìA·k5<ƒ^ c|C¿†MX¯!ÉwDZ†íéžÆãö¯a7‹q6¿}*àŠ—0Íä°ŸÈ&¯0I«HáU&G™còšŠ—ñºŠ ̰øÛÀq&'X<©bo2y‹É)S0™œfH†]žÂÚhâ œ!xÈnv9%K| í¨DC$éÄiýƒ,-ë`ƒƒèdž¬%î!®ÚX³&LK"äAZT×`œ\‹Ä7±±èט£5KÍñÎHGgˆI§ncÞ1ãG}îå"]•‰g¢Ëðö 7Å]ÑÎìÇêð- ‚4 ]ÇSÑ`oÏ$¤À®+Í?t)0p£ù  ÛDÊŽØ3&l–Åfø³æON+¥æY5|Û×CÙíÕY‘^Ñç=ÀþØ·˜œq¤»¨ÞAÍyRäƒ^O[ÓÀùê{ÚöŠŽÜÀ…E²_Jó««/P®[þ_Àc®ÿíä3ä ƒKÔ¹öûºASË¢âÖw4ìd‚CéL´Šô¼k"æh½= ÂÎ,°çOØHßâÊ,5Æ ²Ú2òbÛHÐ;=üMÞY¦_ÃC@úÙµ?‰äOòî$W-Á%‰9eꕨ­Qt¾×ãHNze§8“nih4—c­ió”=DþPK^®ˆWl: PKù™H'/com/sun/net/ssl/internal/www/HeaderParser.classSAog}Ÿwí7›Ö$lhˆM©½ë°ÄMMÒuUÕ""HAAÅBb/‰‘³¦k‹KO¹ôÐöP!ùÂ!•Jˆ¨Ä­­Ô[ý •*NœzÂÌx7ŠFpðÌ|3oÞ{û­÷¯—OŸAÂrG“©¹;ö=Û*ÛPóJîÊ´€”L- ÈÉT0z2פ'óoé·uç—î8˵éÔ×ú:•íÔ'ñ>|öwèç™y²Ãà=µ”d!—Ï3{ä|É-Õfé:r•¢#ÐÛ ®.TÖ½eç«R™ý…/íêjåªW[?“ÏœŸš¼I·](tZ6ý–RË•5«ºîZ®S³ªÕ²UrkŽçÚe«^¯[_;vÑñ®Ú^ÕñÈ•óíº]®’ÑÛ%·˜wkAuÙ¹/åjÑ.¯“™#‚„rVx9öúû9Ôò} ô´®­z•º½Ä×u—´»k•ܪí]ò<û~ë4W©;^ήL&’5òt]ÌßV0¨@WЫ ®à¸‚„†„4ôùáC GÑ«á$ÂЭá CúÑ0ÌÕÇxMcœ¬âR*F`D)˜Ò*F1ƽ3*>ÅdzÆ9d8|Êa‚ÃgÄ9B@‚-P%Øe…ªD)~@§Óôµ„(O5Ìǘ4bjøwœ=ÆõÎý´–A VFhE¢3Ìø>ßÅôÎ?ºDsu’­6†I‚EôÁŸŒ©;Ư˜ÌH™@`à}àr¼+€÷ ¦ 3€î0G™òEóO„Ó;æ.f®K³ ˜Ì™ ~{ÿ´‹ÙMhþ‰ô6$‘ˆ©šÿ¤}æ¿WŸYüO&¢”Ÿzòñ¯Áyø[ÕÅ9iF𕲲œ KÙˆù,«4ÌÄD¶KïŠÍlc”ut9#ý†ÑoÌx"^|‚KdpAʆYy¦¿ yrózd|ø†,2rûÁ# וŸÑGô±¡­æ Îé­æ¤Í<ßË>†Êïˆrh *¥ô6Ö˜9J£=¼‰á‘7l5Ú§‡-4ðN àAR3Èz?"Ç(zÂogþ¡ÓH¾åï¾q‡­‰ow!߯–9Èoã2rqb_Ð8Ôšú>µßaÊý"Öú/yPKqÒ±erPKù™H'0com/sun/net/ssl/internal/www/MeteredStream.class•SÛOÓpþ~[Gi­¢à¼M˜(ê膼"6d‚¢$JL¬[…êl—µõÝÄ?À_¼<ñ"‰þþQÆsºJPŒÊ’žûùÎwN×oß¿|E]¸#Muæ9' ¥ò¬b©|¾îNtN©É‚ûÔðªŽáX¾áy%Ãv|«â˜%ciiɘ©¸ ËórŽ_yÑχR“Íg¦a»FÞ)WýY¿b™OƒTöÏ©NSó#D’˜7 ØŽíÛQ·h ¨¹ç«ìÛ®ã *HÿvÖôÍ~ÌN˜Äÿ¸ ±˜u«•‚5f—ˆ’¸'p`>kz‹.õwÍõœéíêéíîé»tŸ’¦€BvÉ|ÈűBÉõH7º( ÿ•ДEŽU¬èüï]ÿü˦LË­:¾@£õ¼l|&ÖøÈ¦bû%‘ØŽÀ៧ ­ hËAZ6Ï4½ù~¶F·ÖJŽÅð±r1 )Q”\É{b—i’Ïï¸êT¬Û£)t¨*RTZZ4}I‡e’qDF»ŒcTÈRhÐpÍØ­áš4gë(‹Ø£!¡¡ {5œæâˆhèäl ’†ÎîG”-EÃIÄTèèV‘F‚ zYœeqN¡Oë<[Ê^Tq—*îãâËìösÉ€J%ý*Yƒb÷ [Ã,®¢|€ÁÌÉÌ6ЉPÓ¤ÉR¹‹¼nDèë:ôôFôè:²,rzfczf ×Ö1þùL £«à_;ïN]Ü$KnÑ×} 9º •Ìë5L| е’AÝ(lK“æ¶d½MZ¥dŽÕ0©KÌ €˜ZÝÑ42D<„P¸¯a7êÅÍ|õpJ>°€ÁDäõ¦Wõ»kÈ%ð~ÔFëñf6 Œþ ~„´üÆ¡ßm8 ;Xˆo¬‹|ª¿9ˆ¼Ç.]ÚÀ­å:Lâ÷s0Žâè‹‘nû'}´µ†Ù ’gœ¸´þV!BŽbé¾AYáÓŽó.ÅWoÞ¡iÓ[F,ùzˆñ[_Õp{XO¾&ôäʶSï#;‚–PKÀA¬ÿPKù™H'0com/sun/net/ssl/internal/www/URLConnection.class•U[SÛVþ„ÉŽ#Â¥@C cP mC MJ 4R®…$m…}0J„äHr0é5½¾÷-mŸË t¦8L3Ó¾…™þ¨N÷È2p§áÁçìÙýöòí®ÆÿóÇŸ ?HpYB¿„V 3^•pNB„×%œˆtOè‹tÇÖºêdLÕd®ê8†ª›.³MÍP766Ô)æ8ZŠÝdZ’ÙCÉá¾öHSuK0ÓwÖµ™¶N–³‹¡™)•Ôº™òò,xç²€òÈOZOW)(7Vœ¦$îÑ)YSÉ$õ‘“Z^Tg)ýKXø=‘î*¡/¡ÖGrÖó3qO'¨Ô—++ºK× wUë¦î^#øˆA4“›ç–i²„Ë’„µ’Œ¼ˆPìtƒUJq­>Z€Ð¬•±l\7xb×pç†æ¬Y·m«w¡¿o ·àRÿÕÁ{dÔè·Bå®è¦fo š9ª%Öȱ"aXÝÑ—¯ðÿÀTÞh¾ ºe õ$L²ËL·—™ +IĈWAe03å® w3M…ÕøO5c>0­ (13é,êf3šáL¤LËf£'\ÕÍä‚fdH§˜;šwûÑ«Us^|‘ùrSžá¸Î ª¶ö¨b’mæAE‹MM%…g©"zŸf¶«3‡Ê¤·_GS*C ,J;n[ë·´u25—2b‹D…e§WÔ|TÓcÙKç[[w¸'EÚÖCí„a°”fŒ$”d̶-^m‘™²¦ø@ÃÇŽÆP¼n´\ÅÏâñJiÍvE¢LÑ8ŒTaçäœc¨rŽ6N¡÷ –95u7責«®¹ë…ÎØ†ˆ÷Eô‰PELˆ¸)â=c"nˆ—ц~ÔȈ¢CFd¼…j£¨•1‹‹2ÞF•Œ+h”1‰C\zõ2ÞÀ+2FøóM.uã5ï@‘qmh’1…f—ÐÂî…0‚XÀÇüø$„Eh!|ˆ• Y’äÂVCIq݇è\ºÏ¥Ü×à¸u~˜!Ü…Å¥4ò°¼Ìsý¼"’NÍ»‰ÝU$m:ÛéÕAÈ2º¢=Ï`GËváFŸc~éœ]d~<ÏÂ>¾ÐÝõÑß‘ÍáQøz?C l¡¼|Û‡÷¢Æ‡+>¼2*ì"[7ˆ3¾}’ì<½Íasq •‹eÛÙnù­$d!‡Ç{øt8ÚB¥mA$P eÛsª€„eœE'1]ö_EµøWâ ûG òdUѨR–Ãg»x’Wd…8O¹‡ÏãTù¢—*@©¦zöÑï½þ8N¯ >S¥<‡/ž"¨TGµ¯Ü×ñž舽@{L©Ì᫟ÐSDO¨‰)’'T*Áx´ÇϽC6Sß/âŽWó5)_ó±â5Ÿ;h†°ÃK™ŠíC¶ ÅZrøzÇkhž{Þ¿Ñ÷¿ì7³í˜Þû {ˆÔñç+à›ãþ×!ûþµt{6î´ãûꊖ¡Ì[>ËÂ2L£é„÷ª`¿M.a?ØÍ¨›y{—?óJÿýST=ÇÝ%%ô ßþåQåð]Á©“Î2DþPKÖûs§z PK ú™H'#com/sun/net/ssl/internal/www/https/PKù™H'4com/sun/net/ssl/internal/www/https/HttpsClient.class•X |Õÿ?²›™Lf96° ¸‚`ÈAB„å’H‘b@Åa3I–lfÖÝÙ„xxô®½¥Ö«GzÐP6`é!Z[ÅÖZ©ö°ž½kOÛÒï›Ýl’ò›ï½÷}ßûÞw¿·<ý¿GŽ"åâN[dÔËØ(£AÆ%2¦ÉØ)cªŒM24M2®’Q+Ã/ãÓ2Šd|FƧd¬—ñI?€€Ë£x%°¾©©¡¢rþZˆYyÅój¦ϫۥuka³¢Öˆ&¬F+¦k]˦eQ6%¬lÒ”4)¢í›vîÒC¡g A7ê¡D,lõnÔ ­]ØFÒÂF;¡ÏN£ãÎŽŠ¢„ÂQ-BÔéuw…¡[ñx¤¢±±®QÇæAäY9Éf¨S·Öi!ËŒõ.³MÝjÃmäŽâyÛ«Šip6fŽ é1«â²Å –ÖÐ$Üi–N»}ŵ9Í={(>eOu¢­Í6vNq]È쪈'ŒŒfë͸eh]úV=FÒ‰‹µò”=*žôŸ[<Ò‡9Õ;cÆÿecbÌV2:;ZK`ukkŒ"´l˜iæáÖ¥ñd]Q.|*^# CÜ_kXz*Ír^›¥a*;–å>¬–µ;?!w”NÙeñ9·å6u$f[¶Ð,³F1iɘ8·år“ðÁ [¯­ñ­S¯1»¢ÝÒ[×vëFÊ!å§g® Ç-ÝpÒöpþåË\;NË5¨÷–Íu”Ãk/Lé3´HEOOOE‡eEãë ÖD¬¹@õŸ£ä*ÏT™¶ð ÷ØqwÛƒ»x{5µv˜ýö,woÏMeÞù@CÌÜ݈éV"fÄtEˆ €¼< ak¥@þrg"èó®, ìLXnš¸Ö,'ŽÕ5µµÒ®šMõõkkš¤kÙª xjL#ni†µU‹$h­¬ÝÒ£uñ¸€š¾› , ¦ÎËÆ@‡Ó/=1Óhñ3i ìÔù,A·×¬Ó÷X Æ’ t=º:îÖk´PwýбìÚL-gw´Á4ù¦òæj®ã‡FOà¬÷ºÍc¸Ëêõò^£™ˆ…ôuá¹Ò¿ÅÐvFô€e¬„aè‘€Õ3í›FRzê­µ›ÖÚbfW Ê&¯o‰ë±òÕíTAb-Ú¾F#S”o­œ¿°¼rá‚Ê¥K®˜œ#oÈÿ)£µ¶’2×Fô.’CZŒ^ó”"Z4ª´Kì¤/DZ¿C”iI9Š˜q2*pºÈÒ;j„xAù‚zâ§žtFÍ@`þùãé •gœ`cSj0½ØMôø²ôT:çȃ­fÆm‚Dè© ¬¦u¾~uB‹PiMLMjÛ 3Fg³kE¹¹-’ˆwм¢ØÎ V÷¦<&ÛsK§ýãiZŽvè±ÆDØâBf„ÙÕe)^fX£·i‰ˆÕ`ÆHDVŠÄ3ç=Bd½2)ul„}s§6¦dN Yö›“Þ©„iÐõXÖÓ¬¦C ©]©ƒ y3£ÄBÙí¥Õ°7(•ƒŒuç¤Ø4»ÉݼHØ}M=¹‰\åí‘Ö¤i‡ßHžuòŸlô8˜&³SçÞæåXÎ7LÃn¯ìŽ42>?4èØ8˲‘Ñ4ßPLÊF¦è„»hØèÖ"áV#3>¯Ï:†˜wQñf^÷›27›)¹Þûç¥Ñ[Œx"%=èÆ7Bf+5‚,™“›D5¥¬®eαq¹93Á÷úËrxxû¡f•û}:”·—šN×%š¨1öp³L;ìÉJ.ö¢TÈîàÔà—F§aöìë,㦎ò[&mb Gí _3¨¶MÛªs¯wíÎRʍñé=F/ɱ>ÅF°ÒÅÃÕ¶ÅèNuÛÖ,§v QyÈõ%0ó½/6zŽáǵªN® w—f…¨" én³27O¯l—R£ä_J`-ÔÙÓB´ÓE¹Lõê£(;}AwzE˜k¯ˆ°kík´µfHQNާzØÐ«Ç§°QÅÑ‹&feüJõh#âÍa‹Ô+M·wîèTÖ2#vk·¯Ê&§}Û¾+´Ì:³‡“Ý£eËL§z^"FÉS ËÚ¾«©¹ÛQ!§¹{bvO×I¸ZBT½b¾,aŸ„/J8 ákú%$%’pXÂ7$˜¾$ÁÐ'áa _—p¿„û$Š€Š;Yh¨¸…g× RÅÓX¢¢‹™?Ë Œù*ždê]¬îݬîõ¸BÅçp¹Š÷a:³«¸ ÌQñ}¬Qqï½g«8ÊúÕaƒµ*¾Ëg|EÝÌB3xe*nD…ŠÛxùA”«èE©Š;pн)³\¨b3T´£DÅÇÙèo3u7ÎgêR¦,ªQц*Ÿ`–Ç0[Á3øc?1ø3ƒ¿0ø+ƒw<‹¿)xg¾(ø!þ©àGøƒ+ø1Þ- –ÿ0ø/3ÿùN)ø ¥*ž‚–bœ‚ŸŠ</7ƒ|R!~&d/Š‚Bü\( ^… T'…§¿ãYÊ曨àe¦¾,&1ð*8! II1™Á>E¼c*³Lc)~g)ø•8›Át¦ÎPðk1“ ç008·¿³ø rÉo…ĸó¼&æ(x]Ìep>™/Š™0OÁ¢„A©‚7E™‚·D9ƒù¼¬àÙžU2XÈRl– ,Rð¶X̸*^^¨àwbI PI¾{ ßp4RØ#•‚=R5ÐèGá6Ó|œ¸ƒðT àÿ£´Ç»ìý‚Ó)-iOœ0›Ö—ÒjüÏ/Á‰ ‰e4YNß úVKØdÁå†qö–)pÔ…\RZæê«Rô¹ˆï‰¿«Þ5„sѸä XWRšÃ3ËžÄÄ<ÓRRÚ/VoìÃô⺾ü8&”G }k’bmYé!qqÙþa²º±(%[´À ™ÆÅ%EðØAò{ ”ô‹õ}ȧÅ!q•¨/yXhAÁlj–µwc’ßU:=).9†êû°zÏ·0¾«úņ »Äï.Þ/êü.ž¸’bcŠsjÐ=d§Ôìw?~P¬ Áå4$E}9°©<)J\zˆ~€´‡ÅÎ#b3uÙ…IÑÌÀK-þü#¢I _l J~))¶ݤrsù~¿û8¼~Þs1¹")š÷¢ù XyS :X¿ûˆ¸,jÒ’¿MPñŸhÀË-^Ñ/¶g\îGÀïæY¤¸¢_\ùxù~ á*jarj'9µ—Æ{ñõÍW‡ç“›Oà—©e:._EØñ4Φ …‚.û8Jíe,žÏ˜‘­Þ|^‘U—OåÔ¹ä=·· )ô`~ ›Y§¶`>9™øÛýäæŽIxêQ9(åUÉyUyU æU©}Øà/LŠ]UŸçxØT¯Âvø<•û¡ºª”=¢shí¹3i»OÙ‹"Ÿì—Ž>ˆñ~É'ï‘…ÏsW“¯ÀýÀ©C8Ùâ—ò|²· _t=}ð6gpý"ôø=^:±k/–f«¦»#m,' Ûëa3ðŽôðrY¹¸¯ÒMó5ÊW‡e25y§‹hä2TRÁ4ö;UG7˜Ã3ÑáqMûªŽYu’CåÌÑÒ›?Œ¹ù\‡ìÉ$ãþf±?u&ý½b³ Ëvé>Ž[ —l”Ò8Ýè.uXÖ7EÅòL²]±ãp»ö9˜Ã"^G¬ÄTfÓò]ûšóö‘ õºJÊ.`ßøŽÔw©¤Ý4¾îpX$6”‡êH5Õ}7&dT¦”ÐÜ;ibÃaÑ“» çõ]©Í_jó+ÜÃúÐ8€7[úEoýÞj)õNî×PÇ),'u®MŠëh¸~ï©w¨nx 'iG^•«>ªfŸ«ÜG9yã1œlÜã>áŽ>pê¼Fòn¢&éBgn,;Že,»ÌëËë7S[˜FÖ’À[Èx»…êãÖ¤ØC˜Ûöžz½ž ‹“ýö>ä ³Á‹8‰ßÛý[äŒáñ¤.| î•Ùë(¿„º¤–¦ïà›¡ÿPKÛÕ9LJ ÝPKù™H'3com/sun/net/ssl/internal/www/https/HttpClient.class¥k`åqfoïö²YÈåà€Â]„`ÔðP Ñ‘ðh@­ÇÝ&9r¹‹w{@ÔŠ¢V­}kD+ÁZ#-myå J…Öjkßôe­¶¶UÛjÕ¾+ùvs¹„ƒöÇÍ÷}óÍÌ73ß|3³÷ÜûO<6(‘¦:á¨G9!è„cNx× NØä„Nø­>à„§œpÂðŠšœð{'¢¶;!àD»¶9áÃNø¼v9a’6 `‚­hv ByÑìÚ`¬µ,‘Œ–Eu£,‘ˆ”…£†"eÛ¶m+k6Œ¶DÙ½IßÞV‹Eæ#Œ'ž-­²p¬¬&Ú–4ê¸h¥ ;«“FæÖ˜þ­H ÚTV $™¢vÙö Þf„cQÚ)´S¯“ñ°Ñ¾2 4éqÚ;x߈‡£Mó…Uë܈ ÍÞTÍCµ¹ª™]md·‡†lü“²á—$Å¡ãŠj²³Ùyƒ.+:·7WꉰB„H slǹiëⱦ8Ñ/‹ñöùlôpú á }æÃaÆÃ ‚Õ‘°5Ó²‘2éCá¾ EY‹·¼Ù·ÛÒì{#5=ñÿ‹ù|—aØ '3Äuä¥Ì­™E>\½y‹$qÙB³ø¼Ó!îÉF¾qÞÎiV6|j å =À/zæ0”ÖaÃf7í¬„iÓ|g'çëª!°8âËê‡~âõgÁoäÔ-¦k²[S“ql},Ø¢óÏ&Á|]gnü‘–íª²\öð”î(:/ÊLš_4`ôº5µ‚}ÆÜYb޹#æ¨1Ç<ú¼qŠ¡’0òs~H/ô܃VNèÑ&£™_È $üÊB±ô‹ÑB±úÇ[ÉÖ¶z#l!R"wÒ³Ll³ ‡~C2¡Lî2'5MÑXœlã‡eÓãüÚ‰¡1LÊ…o$¤BSŠ:$‡gÖóe‚p¢Y<ËÆH2A’‘ÒIN“n,i_heš‹ºAæÐt©ÞHFŒºXœõ%DºÒд4Óϸ:™<<³z>Ê Œ O 8W·ÈÅ2K0È£YfÏnî™ äò,3bAv·Ë\™…q]‚­J£˜ÞD¹ 5äK—r!)#›Ú³Éýù<2ª9XIÞ]kѹžÊ|Ñ$çÌZLvd[?†PÎTÈáúöÕ`ú-(ñô19“a®–Yû –Ñ–hl[”&ƒ|ÊàÆxq0HGr“E"lϬs7Ü¢L&pÄr‰eÊ œ'(¹ØZTÇÕn V8Ò{rô§­œH,ˆ4›Mn³·Œ ám­íô[õø@½E:/‡ºCœAR©-öWùœ6.á+Ö®­#6sn±9ÅJ$({[HÔL{'=1F¸gki8Á— 2ã¡™s3-ÈæU:ãzS8a†$Ý—ÈÜ#‡¹Î5Û"ât7æÊ|Qéeÿ¥Ú G\l[[ªGT¦^‹<ž“HnNXáw!ׇô¥ÄU”]‘>»}±Õæ)F¸Uña¹FŒÏâxœ¥Òª6¶zu‘ËF¬?®ó’f˜”Y#ÝO2jªò¤ßTG’ýÇu ð^‚ØEŽ¢C·rZãL4j駯¡ê¡‹Ä…7+ð9>£À'ø¦Uàç œRà üTï*ðžSHüR_)ð~¨Àó üH[ø´ŸRྯÀIN(ðm¾¥ÀG¸GŸ)ð¢ŸPàã |V{ø˜÷)ð’÷+ðc¾§Àw4¸fhÐ ‚6 Þeðèü¶ðîJ öÁd ¾hðeX¬Á~žu3®ƒyw@»G˜íibC•—¯2x¥¼Îà^>K$˜q ^fÜMpµ;a¹w±”Á Ü jð7(×ànÆý¢¬Á „Õ<»Rƒ7èp´±7à ždŽA•†2ãþÂÄ[!¦ÁÃÄ‹¹°PƒÛ˜äЪÁoXçka½_câ‹Ê…KYÀå ü`â=P­ÁíP¤Áq˜¥¡35ØÍ¸Çaºw°Î7AÂuÂ|ž-gGÐßÁ"6‹zÓÄx–ip¦òákð¨×à LáeƒyüÖi耵ü‰qÂe| –j¨A©„2 þ 5ôOƒg`¶§¡Xƒ?à n¡ÓÈ|Úøó¾Otè„–\Éà" ˜ÃJ6³j-¼aÞ¸‚[§ÁWaš_` 58Äv¼ —hðÌPq4^ªb^šƒ.¬b0ŸÁ ,R \¦¢›é\x¹Šcp±Šcq ƒj^.åeL¼œÁ V0¨ap%ƒ«Ô2XÉ`ƒÕ ê˜÷jkT‡õ9tÐZ½¸ŽµZÏ÷'bƒŠ“p£Š“qƒkT,ÀkÙ„ëxùA§0ɼžA€¥lÎÁ©ÌÁB ©8M˜Š:ƒFÚÄšU¼ÃlÇ-Œ‹°€VQÖ Æ¸67¨8ãÊàc*3·gð Vã“ >¥b ~ZÅR–7ïãåýLòËð³ >§âü¼Šå¸KŹØÁ7óƒshù+ð!öýnça§Šñ²÷¨x1>¬â%øE–÷›ð%„ÔÁ4’à¦ÙX@Oš!ç1R¤Ò˜Ã¹IŒ”žhôÂA§Ýëi.I´Þ›±žBt”Áh½@p½'vÍrš#e*1¾cžÅIK¬Ÿµö_û9œÅúUkÿ5‹ïusätFc!Q^3­JA§MïÃÑ =øè!| á^ú}ÙUw¿Ò‡y„î:„û:‰^âU™×vÁãó£dëÁ¯š$!úÉt\>q-ÔfË&qqA6b–¼Ò"~€Fwùzðk>[7vû°S>©{xÙËàq^>Á³>ŸGîÆ#¹&øŠ™°àAP})üzÈÄãOáþ^¯#ÃÖbËÖb¶µøÜ¶ÖSÀ4±5‡B~.YÈê¡‘mU|~²ôéK a>1&­¾;g’ÅHc¾iÙa<žÂgèv6h òp¼`y„XL'kú öäR¥ Ê-¹ I&*÷5Æ'ä{Œ&Áßãi8™ÂotÀ¨ƒ¸ì|¶‹ÔNቖŠÔ.X¢òhdQ6WÝ>±©rá´6÷ÓõòÝ«õ?ӇܨƒßìÅoÂU%qï£ ÑæUÁß~ë5UÉ%'àÊ>œÜPâæò\•½ ÆxeŽÂo§ðùƒøƒ¾À«ïtœ~£ ¦V9âûpJƒ›¨¿Ëøb ¿—Âïw­„Þ¥W¦ê?Þ¹þãGWúï•èÈýä°Ëa\‡Óèn'¯›¦Q{`iï# ¾°)ò‚>œNšýÈÔ{eñ È-îŧð' &™VOãjoñå[.±“Oí·ÄRoeûä~+?Pcam_Fgr~¨Þ’ÓÞªõŸ„1gÏÀâû§`ÇZÿY=ia­³FÓY½L´Ÿ&©þCw¦o±Ð:t¬|D­íà ü=ø3:cƒßVºÏ’Ú›¦Î´ §û‰ô¡÷Z¾ƒ¶ŸJáÏYKÕÔÒávÔ²*» È÷eü¢I÷æVRø’‰ÙO3ºÁ•æê´¦1y±EèLJᯘ0c×oòî·¼‘ßH_h¡¥÷X å—wQ `ïÅF/JÞgù„>‹úZ9i|z@}»mŸß“Â_ﻼÏoKá+½øªÀË m‹ˆè7U²­’Â5é•=öy•Ã5g¨4\ú“Ù*•.˜;ëQ\j³Çq½kN¨R¹ÃŽ»W~êaÈRÚyú’§ýä]0Ú¶¸vìæå6ìgÚsúž¥“‚­¦ð·»„f¦iÓ¹•7“6Ðýлą½øßNžŸ\ñ$'¶þÎLò^üýÊôu<¿ÊWÒƒ¨”­+sç¦ðõ]p‡Ó ˜ÈEÄãã‡D¾á£4Û{€Rã›Uv¯ý,'ü‘¸Œ «ŠKRøÇ“0·˜OÓYDù§JJ¾vƒ¹½v‘¥œÙ…¤ ô”}JþYäûg9ý­ÿëô·†9½ß6O'gÞC­É^JÞ 5j³(ß.]ôy`eåK(Åð“(öQòOá_ºñ¸¯½ }8³ÁLëïôà»=ø^7žäµœÂ¿žY éÁ”g“IŦtj ÚÙ¹”#Î*¾ S')³›bÿÖ§è¤Y|Ê©ü»¹,K—Òƒÿ D=ˆ¡8ÄÓÃ1èR<öP ÿÉ¡øä{ÈO×WÚ¿çôKXåðʶ ׊N¨òÊr…km'”{e»˜yeG…«®¦ze¥ÂUÖ ã¼²³ÂUÞ £¼²‹öJw[/pŸv ‰#…ÿ*Ø”§Røo3aŒö»µþ§ÊÁiÜ=JL½Žp˜óýóîÑ"»úÐßàwçÑn¾_¥x•Ô.x·‹rÆivÍóÍy_lgvÃÅtBwÌô–òOÀT¾ón®v\Ù}ŒLI@ XJÂ}}XÜàv÷HÒQ¿{Œ{lJ"ÕçR‡ÄÔBÈtSÈ$SÈ™¼ö£Ô”PêdÖßU˜’ìœw(èux(¾â*Ü}ú]ž{Çõ)ÉÑ+)|òÒ6ÔIiË”D~÷»=–Kä ì‹K¼÷8‘žJÙwU Ýk©yõ’“nÕï/|*åôJ*éî÷*))WªThƒñA Ëâf@~\å!êsÈ’Ç» ÏÌ NÑŠðÆúb+¿û݈9%iÅ6Ò_eΠ³çˆ³‹}=ÒènÉÍžpsrëÖDPnôHy"ÕƒÒ²ÍU°bÞ;ñNz[”vðMïK)ÇKWHk¤u¢ïxÓùóÜzkeVÏ<©+ü“éð±½’‡ž°¶ª$%;†ùGÍöi4äã¼!bvds‘)füùŠ™ ÔÁ@?Öÿ•r\m•—(;ÄÚ+MèÿZØ™ÖbpÓøö™M#ò¿"–¨¹V[7SÔÖ”äMI­’éM—ÌÝ­ iªÂ?Xü¬3«2z{)ŸãVôÒ$s˜Ü¯ž!àÐ(ÊŠŒ¼§[c…5^dŽÿPK›5 (PKù™H'3com/sun/net/ssl/internal/www/https/RegexpPool.classUÛseÿ}ÍÞ·)[Œ€¼fC«D(…R)¥ri)ˆ¸M¶m0MB²âPë ð~-¨õ¡ãÌÐeõÿ_ü|Ñß1ž³›ZãèLs¾ïÜÏùómúëÛëð!†/}'Ë岆;5,Óð€†bL õîР ˆ€À‚pwÁH„‡­äP:k·…Y¶»40G6/œ.†­pª”Ϥ“–c ø"M #M‡­£VHJ‹ÖÎJ¥¨ +Ÿ·³týuýCLÒÄ%I•² X27/–²ñ¬íÄ‹ÅLœ¶Í.d­Lüرcñ!ÇÉã^yÝT@üÛï± ƒ6e\‰W:1ôÓ¨¦boÚ¡zûHÉÊn’=’fÛy Wr‹h¨ñ ªRÃìæÏ…{–È›`«½¿³m›ò(;;ÈeJÃVš2ÈÖ“$Öïž]ö¥¨ÏÚv*¼*œ· Ö05"ç¹Rzò;Ÿ±’Ô®\°‹ŒC€¨àT÷KýÅJIš“«V§åýÚ9 b‹ŠGT¬V±JÅVO¨Ø¦b³Š5*Úu,Ç+Ññ0“6¬`ö^˜§ãQ40Ô±‹Øx±ŽVÜ­c7æëX‡‡t<Ž&›Õñ–èXÏäaöØ€»Ø—<ÃB-¸GÇZ„tlg²Kuì‚¡c#³]l·ìÅ¡zpÈ^<ËÄbÒ ’  )&6› ðm0€ýb’fr8€}ò“ö9&&Ãl—e’c·<ߎp¼k)ò™=ÄÄaRbr”É16¹q<€gð<xÝ,,#õ^H7ÁÒB+ˆ»Ÿîut †•î:Ýo¢÷£*‚ÎeÑi¼½†ž¾i¼4‰·®'£A1‰S—78!HáØu!%õÑ©EÍfß4^ö,¬³¬h„ÛIÈÐèüÚœÂ+ ÉôMáÕùÑ x z'Ûä 4„dsT*)¦0Ú&’ôUù÷ lõ%“˜TÅÃOVP¤„B®'Úd_Bõ¼ µê:ª C5¤‹åßB²¡LâtH¾‚37°|é9Üs ûú®aŸy¯Mãõ`Ýޘ›Óxë; 2‰³!¹ygæ6#xk<Ì„Jms3Š\CW¬MⶤTB–ª¤æÞƒî^Þ9eT†üdq‰z™Àš˜[ÍR:>Šq,¤Ëé1 Å/@¡h|‡3 ÅíéÝ®QEÄ~,ßd´º ™£ÜïE V£ø råS6”óPÉñgCÃ*3$]ÁÙ)¼7† AP"*2Æà*ÞgîÌŽD?3Å·yÌ»]Õ|É…Ç'®,R¡² ÏD¯kãЃ2E“®âÃkè¥=ú¨SZ?ùftI+ýMáãÑ:±$zýbù·… ‰*­3e˜.óIï¤^3ê£û§ß£—)Û"tb'žv·q{u(´>Ú5wƒbŸyò.­XüJèü¥:4_BæåâT µ2 mÛ%-1áŒ@¤h& $z&~íÃR®Yf¼}8ý! ‹ßÃN¾eD2ÐÒ^ò#-‡t¦®8Ÿ–½O&Å~Öª#ôPhº]=Pî{XòPñPõ°`sʸ`·܃à >Vð¤„U„NwvWÁ™P1¯œIU<îýLóýIFnLh®tn"9M3Iho'Â&za´¿ ú¡„ƒ`4Ü8Òg¶¹b%[›qªœ4Jd\'Î],/e,o—µ0±t„êQçê@hýz¨x¨Õêø†*ô%”>]Bù PKÿ¾„Š«ÊPKú™H'5com/sun/net/ssl/internal/www/https/HttpClient$1.classmMoÓ@†ßMÒ:qMIÒ¾S(¥Ø)é’ž¨ŠPj$¤FŠ”KÄÁuW‰+wí®ü‹¸‚ÄGÅ#~bìV(¥XòÌî3ïλ³¿~ÿ"Úh—q£ŒF÷Š®×cXu½·Çþ©Ï#_ŽùÁá±Ì^^2lºsµQ¡ïyWƒûao^Ù“FŒ…"é‚;êe½_„24/JÝøH08=)…êF¾ÖB3؃8QxFT« Ri&„CcôÚד¸¯âö°³½Óîì<ëì>ÇPÑ8ÌgàA|Âu"¹†kñÌ•ô#>›ÍøÄ˜©æû»Q(¤ÙèÙX˜‹2,цºO…2)Ãr¦ßžªø}ºks ôcE Lí‡~”Ð=kWf¨þûº—Ð ÕFœ04s¤E¨Ð¤¼¯ÂSš|,Ž^&Œ%=ÁœcQ%ÒÂm u w,ܲp×E5T¬Âr°‚²ƒ›(ÙhâQkذñm<Äfž C° †uúkÙIÊËȾ­lT(/Ñ®A¹@Ùn}ƒÛÚúïS®:×2ÜÇÅL¹‹­€v¡õÖgxÅz¡Ú?ÃÖW<=ø€•sTü‹ØÇ Ëky¼'³¢6k9¯ÿPK§ÞÑ»PKú™H'5com/sun/net/ssl/internal/www/https/HttpClient$4.class•R]OA=—ÖÖi© ˆR¤¬YÇ45&¦`lBI^ŒË2i‡¬³dgJå_ib£ñÁà2ÞÙš†ÈS79÷cöÜsÏ~üþóó ±C¨5vÏ£ËH$‘ÓsÛ¡ÐØ=!4ãô“0-´´Â˜D(me¦£D ‡CÑ·öˆ÷Û‰’Ú¶®Ium¦t¯Õù§sóÆ”ÒNgîµÒʾ!Ûé™$”>ÇòªTu~Gk™µ“ÈÉGbÊ„êM£¼¦›²X¾S ï,u¯´íK«bÂò‡ýÈôÓã, OšÏöÂæÞóæ«—ÙKÄ8e0)œÊ›žŠ_AXÊ=«TtŽ&/„°øÿg%ìäGFƃLÙ+qœ©K~¦ž<›Œ½ÇÃ…l =Üõ°ä¡ê¡æaÙÇ,f|TpÛÇ"nù¸ƒ² …2V°^Â*6\xèÂf÷ñM.W@Xã¿­âø\ÏÃ]'q­cÕI7ÃÕ,Šœç¸Ûä\ä\ ¾ãqðt„­`m„zްý5ç§÷ã™uÞGN7ø†mÆ£þOèKNõE&<`ºŸ/\@‰³³·š3ªPKÓ¾ï±#PKú™H'7com/sun/net/ssl/internal/www/https/KeepAliveCache.class•TmSW~6$Ù°¬–kjQZ*!Ö "$B Q$%j*4ZÚ.›;aí²Ëì /ýþ…~èg¿øAg:¤ÓÌ´~s¦?ªÓswc ÊL“Ìì¹÷œû<çíž›þýó/ô!5†1}©‰¢€lj¢¤Y{Šã™ŠÉ\Åq E7]f›ª¡*»®»ï(«$ †ÎL7ï37,§º!¤M¦¹–/=QTýðA)ÏÌtå¤#:'ívEZclÉÐXAÕvY¾'Ê;Îy¨½…âÇïNÀYN²½:¡|£·uSw„ V 8W°LÇUiðTÃ#]º{¤±}ž¸#@ ±—‹¦Éì‚¡:#ÓùÓ.‰P±<[c+T3Q«ßQ]kö2›Ùé™LvæZv~n›Uúv(=>™ž&ŸÓóÐ ¸Þ3g,Û]-3Oý¬YoG„þ!êŒNpäôžzD·a2­Õþ˜Þ¾–Ä›7P\o_€+o¬eË­0[W ýuÇ`ïAü¹ñï+–gÖ: ñ·"e_gÔñ‘ÓC½¤iÌq(9×¶ ƒ‚„x8äͳ òæ9ôÚhœŽ¨{‡Dao“"FE|*⚈´ˆ ã"®ŠH‰¸"bDÄeq„¹”ñ9d|‚>®ž“ñÎËø!®F¹ù)í¦ s5"#‹dÌ )CÁ€„øJÂM,ñݲ„Y$Ü s¸+a+rä?]å¢ÈÁ_KXÀZ?Qââ>·•û€ÄSãƒÅ—dBHR ‚Úëk?’~©Cÿ "í©"’Cd‰Ó*ÐI7°þü'P™´Ž3ŒÐ:ÚÄÍêäTåt¦o^a6N†_#"¼H†Oðà…Oí§Ø¡5åÇ.5q«:$D¨üo_aþóÿ!y>üÜg…(L?Iκ@kˆÖX¹j›ûˆ ôEÉžÇmªtšöA ’‹Òºí§×ÀÖýôT]yòw|Ÿ g^c±‰ÙjzŠôí_Ñ|†h<ñ´ïÊ™ÉÐôh+“‹4±PMF’áS¦[ÏóAWF©´X+l¢•¤˜¦˜?l½lUqÒÿVÁ{’§³}Æ0.Ò*‘mÁG ýPKuï Ö7PKú™H'5com/sun/net/ssl/internal/www/https/KeepAliveKey.class•SÛRÓP]‡% w/xA ½Z¼€ŠØÒb‘ Ž::† LROÁ'Þ|áÅ)ŽÎ8úêG9îÓ‡JGp:Yûrö^{uŸäç¯/ß Œ' ‚Ü—dh•ûÒëꦪ誱ªÄuÕ¶c meÙ¬cåUJw{éwŠ¡9ŠmëJ6›Îš¹×š3­æÓÚŽ•x:åäqŠÉÂÊŠfQMTNçÌ7Š]0þ0å G³ UW¶¶¶”5ÇÙ°•a\Ïk†㔽òÂÌÒº–£|%™í• Ÿ1„äãÕÿÙ^©œtDä“–àöñã…ùt©§f$oä1_Ü\Ö­¾¥’öÆò^†®“7îÏš+§Mçubîx>¥Úkæœe†#ýÑp$:zA#U’¡nlhÆ2KôäÂÿu ý§¬·”S4¤4mcBÏoj)m›d‘¼ímAÕm†ÚUÍ)½” "¹ Óv\oδȫçže:fÎÔ©xþ¹»ß¦¿_€²”»mÚUå»gŽ^;æa‹P°h’¸©ê-³"⚈ "zEtŠ8/⺈ ¨–П„«$\áÐÆsMÎr8‡3.¢E‚Œf —P'á2ª$ô¡–ÔK耟C„œ Ì"~õ#„A79ܪ£Oú6‡;†8 סwýPãm#b<õccîqç0Á&yÉ$I“|`\/yŒK.YR]²$Ü«h€HØHQUôƈØ>’a3àw‹˜ÚG*ü„t÷ù¹ëNó*×}@µÒŒHó(ñ d#™9gÈ# yl¡r*Ú®GµîQ½ þ@XØEµ°GÒ³OH†è)bvcÍP4³‹Arä&J=¥ŠxrM™4óœ›È¼‡(|€Ï·çÍ¥+óæÓT¾œðW <土1w€GÒÈy>¯ˆlÓ´¥wÊâ«CšVÂ*´ýPK9]6#à½PKú™H'5com/sun/net/ssl/internal/www/https/ClientVector.classT]Sg~^vÃ’eAB‹‚EmmØ$.D° HK5b †/mYÂ+‰Ýìfv7PzM„i§Þ½ƒI™Î¨œé…ÿ¡W½êèeéy¬¶åÂ43ûœ=ç<çœ÷;üó§gÀ2ƒíJ1ôD»Æ³NÁðJ¶asßð<ËÈÛ>wmÓ2VWWœï=ã*ሕç¶?ÀÐB9÷ÌÓ°L{Ù˜\¼Ç³ÂM3Î1D¢©cäè5”ŒVI*’ro•4ÆyqØÊ¯ð3›ãU¥Œñµ” ê­ŽJ䉴ÓÑÿÎ|àôS¸‚fjóvÞ¢å8KœÑ±ý« Ã®z*ZEU9ißåfÒÔ´Sr³ürÞ¢Ž[ç/™^ιá:‰LÏ™d¢'ÙÝsáü†îùª/3¦ëškY§¸Fö"=Y†ú¬åx<ÍÝî2oQv¯d†íPF¢ªFh—U]ûêWIÃ-ÑCÉanñQyˆŠ> Ê•\—äñ×W'%Jº¥¢Ï—F¿Êò¢Ÿwl†Ãÿ¾[ ͯ]7K¶m.Š“z#.½æù¼ð×TŽZ¢vWÉÏ[FÚ7³_¾ <¯¶?wmزè£PtŠt‹%/ÇÐäò‚³ÂéÅèÞD¸%êRöò_S!Ï¢%(èRÐ¡à˜‚v*ø@AT®à¸‚÷œÖÐYC+˜€F ïâ°†64ièæ{ˆh8‰†8$ ï@ÓèËW¯!&Òz h8Z G…Ù-ªœÙ«§j8%ÒZQ'ê5«H⢊³ £ øDÀ°€OŒˆKFUœÃe¡]Qñ®ª8”Š ¸¦¢cB0!ê]WÑI• ÜÓÛϨŸ^ÊdDˆ†HÒ\¤ÑIƒ²3x/“Ö€0á!² Ô8¥ÿˆ›º´…)=¶…[z| ½c Óú6ÒOÑ·…™Mˆß ¢©ÙOž'Z‰ä¤^Áì}„Ø)s?£o\‚™gS?àd ‡rTdB¨R\ <Û˜,3ÂÐg)tN^ úX:¶ñ7QÝ>ÑÑ¢aQò{4ñò…KË8*J´'cé…ÐXºŒÆõÖð<ØýMUp{šz»³7ý߃5ˆÒÐ4u$_Rðô7Ûø¼ yšô[×;z¨-´#SÊhÑ#J_Ðlñ ÖQ¨ ù`÷w‹¢¯oyôd*È>BÓ#tl¶…^”qˆðy-áãÚÙZ‚L9ñâ±, •Ñ)ÚìHÎNü‚æøÜ­`é>êt¢áëëØâW½_n“w‘à]l“©’BøüØw»£o0oZ‡z ÐÈà6YG° ‹äCl ²¿ƒ#„5hù PKÍ 4óäPKú™H'9com/sun/net/ssl/internal/www/https/KeepAliveCache$1.class•RkOA=C ÛnW øÀ7E¶-eYŠ(1›H(’ ñð í’e¶™BøWšHI$ñø£Œ3[cx}Ðýpî#çÞsîîþüõý(áu ½ƒv¾z@¨P^wÞï0O–¯¶kRø¼®Ú ;¿M´×uXµ«^xèD-îp&( ŸK&8 œããc§!e3r*ϸÜVkCQîìÔì›Õ²^’·/èl¶8§»+_×ÖÜ û†þµÖjkŸ evè&zlÿ£=K>÷岪+á#°Ö9g¢Ð(bAöcÍÒJà±Ò–ÈÄ"ûßô^¾™À¬…-á±7~ DÓµ.LúÁð§55 –¶ÝÉé’;=å.Ì& T¹¥Í&ã{ªØ%˜ùÚ~ì¾B½˹FÉ·a$ ú¯~q%~ók¼ÄÝjF•ëâEâ2b^KøòÄÙþ‘º­ÎöV<é‡\ý5¢¥01¹FÙ¡îdT®x¡ èŽ$ÊCJ†m÷ Ü1pßÀ#ZÈ ia}ѯ˴…»HXBÊÂ3e`Xx ÓÂt[xФ‰QäÓÈ¡ ¡hb &ž£¤³I މqLip5Lk˜«Ø£ °Ñ…¬Tùô“ÕþV]*Ë GEKU#*&Tì+œáE¡xŠÙÂÄ)æ¾ÆÔ΀z[ñ¦¯ÄƒÀ,©žc|§ð ³çÛ gx©Š¹6æÛXhcñ åj1ÙÆR±?ÕÆ«bËäËýlŒ·qKES-ÎuÄ~PKÿ ´FæPKú™H'5com/sun/net/ssl/internal/www/https/HttpClient$2.classePMKA~ƯÕu3ÛÌ>"4Ði=F F ‚—è°­Ã:¶ÎĘ̂ø¯êTtèô£¢qéÐÇž‡çƒ™÷Ï·w¤ÑÀ^k•ZýfìÏ}ù"¤·cè6AºVÖ~d}-¹ÛõÿAîŒ ®Ï 2ÝxÈœk!˜ìF¾RLØýx&vÉ#“úK¡GLó€ zwá«QÜ“qcà5[ ¯uìžÜÐ žP5T0M•Š(šIáGt±XБÖSE¯ v#΄>hC¦Í=S&õ’ ´ª4›v">7¯–ÿ.ùËê/•f‚ýÄR,˜I®—´'ùÜ̲a'Ð<æ_äLX(YX·P´PvEÚƒŒ U›Ø†‡Š[R†MÅpΨ £ˆáìÑ vž±:…‰‰VÕUÉý.å\òŠÝ§$O!Ÿ  ˰mòJâ»_PKÞõÍOÏPKú™H';com/sun/net/ssl/internal/www/https/ChunkedInputStream.class}V[wWþFšÑÈÊØ±Lh"«qz¡²¤D±CÔ&–McÕ¦§ uk»¥‘­DÖÍ(—m)æ^âPJ.%u (ÐI©å.œåÀ+kñO<÷™¿€Ù{4–ÝH൴÷9ûúïì#ùïÿùóÜØe/÷â„G¼8èEŸ½^ø¼8îÅüÝ9³;¯º¸ƒ=I;ƒ=£§´3Z4¯f£'­R®0Ûo;ÇHÁD’ƒÄ`²'!ÀOª!x¨œÍê¥þZåì &›D‘ÿ¡`Íš3¢ÉB±l‘C׿û9G nI›9¥§-ÛjbO61Ù#ÁÆ®ÿ®Ú,ÜÆßh·IƒSCÉ­«q>ÓTâwWpªù¡<ñ\!g h2fËfwz®\8Ýmæ^щÄ‘!å>—Ö‹VÎ(˜ê¨6¥n«ýµÝ´ûNåRZÉå©ZkÍÜΦžàšbAºkêÍœ3N”Œýã½úö÷öì=òÔ4]ÿÇUÒ2™á¼>¯,‚®‹zJ´h¥’v>mÏóúŒ–Ëk3ÜJ˜ Ì”³ÉBF?Ç£F3D[ÖÛY Ñ›µæj!MÓsZé•–lt§ù¨Y.D º5Í|”Ž¥— Z>zöìÙèœeÍh‚Ó3[¨ Áf0É‚eØÆËq-_ÖDz/m” –Ó‘ K™ÜlŽ —üÂ,=‚ ‡ÇFêÔ ØQ'}¬©ukÿM.‚^LÝZ6çf´ôé&9ö|$ˆ-M'ðè¦Õ¦q¬le‡ès ŠŽ­Q–>Ë™{7mÏ•çgôÒˆQš×¬-Yí*Í@óòéØó¦¥Ïo˜ÊV.§q6(ÊS»QºöùœiRzwâùÑš £L${‹ZÉÔ“<;rÑ0‰(2Ela'X"ñAW#ÖA‹Yž1t^ËØê)8LÆ11OËø’ŒIC2¾(cXƳ2ž‘1"ã 2>/#¡ €V‡jbŸ‚<¢ ÄÛ£¼³ˆ¢GÁa¶…ðYÎø ;¶±cÇ‘#Œ ¾Â¶'Ñ¥ ‚vãP<ÏÁìRðå »Ên…¾ˆU'9c€ã>‡í úѦ`”m/ SÁâÝÜr‡‚Ñ¡à)ø â ^¬˜k!‘cqŠ·§y•g1Ï¢Àq¯Š>Lâë>LÕÒJ,LÛÊ,ΰ8ëÃ4ÇMã‹ó>|¯ðê-ø¾Éßò!U«òªl¯q×yûm4¼áà ¾Ã«ßõ!ïqÈ÷}Ð9-‹°ø!{ÄÐ~Œ}$_ C`Ži%0붦k±õQGÇM7ek"ƒt­ˆ%¸°—v{I»Hï­àÍ{Báe\¤ÝOî€ÿºé#RÊ$;€mNZœ~ ݤºãúÓÐG¸DŸÅLœä… Úý´¸ÜÕ·–Š/¸„.Þ¬-­ÿÛ«¡&M‹S3LZ`H}ñ>Ä;¬«øYH`@$ÞbqùAX.B§ÄÊKtÖJ´®br¢SXÁÏï5fEëY_v²†m˜W°QƒÌ(ˆ”ÅoÙÜÇ0œµp24AJL1kdxkm—ª7J’M$=°Š©‰¼=JÜýb0p{w½ÇCw`WÈv5©âZeý“P¸ŠëÃË|î0·­â„¿•$7¸I6¾ÍëâýULOtºVðK¾˜*nTñnKwÍq©Á!ÖRÍqy­îqÇ+o¸=äö“«S®â=Žó÷mF.‚ß™ÔðïãíÐr ’Íÿag”ØvÒöW›[Éu‹9fÊ'™óÅCXµq¢è{À)<äðãÂ]×àï ¯½5p ]¯[H_ǶU¤è>~}/p’ûV(ÜEñ›+ó mTž&ÈúäÇDU|»Ì[m\ïÁ«Šˆ˜dƒüá.UúûDªÄ'R¥Æ¦Gëã3@sÊ·Û[{7ãþöÖÎ{yÈ7í¾OÙg2^'ÿe**‘~ÖÅ/ù·Ç݃ø#*~ÇèÛÛ?Æ®wá© mÁ-h.o-­B“ZÅïÙùš¶íV-ÜŠ^8ýGD_¾ýÈ4<¸=NÏu”I?É€Šî˜TÁ»Eæ#P¥LŒyT}1:]Ìí{ª¤zR1I•Këÿj<ý08¥ÿ锾ϥGI|tàJãôq¯Óé7éãst+}á@Ô¦Të&ÃEö*:B«ÈN„Wp‡Ê^ ÿYÕSŇYp¯®ãqU¤®©»µTÅŒ˜d8îˆ[ùÖ#&¢Š ¢ J‹/TÖ‹ªDDûT‘fP¸]‹úÓí†Çþ­]þPK ìó¥ PKú™H'8com/sun/net/ssl/internal/www/https/KeepAliveStream.class¥TYSÓPþnÒÆ€‚Š î¥¥FPÔ .¬ EQ°"hh¯ I&IE~€Â7gÄ^tqôÝåxî…VpNÎùÎ=ÛwÎMóíû§/#G1¤‰†^)‡¤¼ÏIô #’èkècÐÙ¼3­ûE[·y û¾¥›vÀ=Û°ô™™}Às&<îûÝvàͶŠÄæ¿dLëë×HvZ&·™T›È>1žºéè½¶[ ÓÒÕõ{×fiùÿ_ææÚ¹ÚÕ2ì Zšö„<&F:„®h3m3¸Dëît œAí~–çn`:¶ÏÀèfR#ØeF+CãfÆ¡ËÝäD4Ïo—H¼¢—ç=¦EC0z‹vtþ¤CÓCM'›ÓMͧš2çGÉi0Ä©†iã2xœ¶‘·Ÿp…Ô†äyõs2xa¥9CÆ7ÄÞÔÀô2o þ:çn»e>å%BѼSÉ1þÌåù@ {L÷ìO ,zÞ,CÈ´ö•ÖÙ1ðvÏ3f×ì•awÉ-دóì)yhåÄho{ùŽn–_§µ§kc#Ó†7Eÿ?¡tÚêm'¨÷‹®ëx’z¥p þ´£nA®2N =EË¢Y¢2“ªùS¦K£âU.ÚŸ0}b§à€‚C êTTRPpBAƒ†*¨ö`‡†fTh8Š˜†3P4Aµ†ÃBìÇn uBè¨ÑpÛ5ìEHäÆ5œB¥@$Žc§@šŠ\Šã,. tEÅ9´«8Ž8™Bt Ñ-Bzâä¸*Ìk*. WE+ú„¸®¢ Ù8.¢_E7pˆ¢[„À_BL"]A¨ [Hn%«–>¯ÒZ2Õ¸„›ÉôÞ2~ùB2jœP˜ôäÜ¡çîkÔ$K¸ð|·îzjRÃ/ ’øˆÛsÐÞ .;‡hêkÿ{ˆ Ü"“‘ ½ ½£ -µÈ~Ûè‰ÐI†¸“Htv ‰ÎVêW‰†¢ñKDÃóÆq¿LäÕêáŠõ9–]FkN-a¤¿1µHU–Ñ–K-atc‚Åpd~8Þóî¯ÿþx„Æp7ˆ7‚‚Ђ „b£§b£sÆ]#Q2ìBbÑ­ZvaÊ . cÖhDDR,ãŘ; .Äóίo˜YwêÿÂkµ|Þ¬>-÷‹ÃM†9†[ 0̇ ˜iÁ‡ ·Ãx qôc>.…pŸpƧì[æ+4^š&Bx@²¾¸Çã>_öyÄÓ&<žðyÒgÚ±H­„ð49EH’÷ý«z¼õx¯ÞÄgiîÌD _7ñyY]l WÇïz¤3rݺÐ@¾Ž=ˆ4ñ,ÂŒ{yÞœo]KMU0ÈÏ#|ñ]‰F(ìÛj×¶E#ÚÀ{dùhÎõ,ãe¯×Z^–k/—&‚zNêܺT‹2×IÄ\:,æíÛ˜6V’ۢÊìs¾Oƒ_×÷DãÁ,÷gÏEhø>r+CfŸH ”´½W Z>gØôE[u8D*“„Âè°ÕÖFËþH0laÛì‚ÞÍoΚÄm’ªvä˜5 ¡¹l2|_é[߃ !}Ž5œžSpæ])ÎX™dÙí…µV-Xe¢n¶ÆöYHÀÌ*Χ9/6)›,ƒF¬Ù%Cåõ÷ëÅóFz‚ÈØ–”lîävÉu#â⥅ÈɈ±f¸ŒC(€¥d–Š6£ÁÎ]˜§Æ^*þÐG¿Jei Š„ŒåT.Mª-FD…UaJºÁwÀÌãZaMµ?‰nÞp·Ä£íî~yÞj¡‚STŽËZüa]s—üá°[׌Uær‰Oh¥¤X‰%i¹®fU¥n 9†N—t‡˜¡‚”®Ž5Gß9£i¢þˆ±ÕNÐæštoX‹´mjzÁèˆÑþôšššrw0讯¯wwÐ?îµk+ÛÛ+uÝ=gMýæ9äð5ñx4.ôáÃ(iß­Åéàš½l:W§ZuMÍfn멵­­©ZEG­Ý¼¹ÁÝ®mÑ ÕÜ O}ó*æ1ATgsS¥]XÛâ­©†Õ‚ÞÆP$@J©µt¡xu˜žP#Ѷuô¨TvŒ¤‚¤”>¼’"Ý¿dHáý H*8G» ßSz¡Ü÷>ëTzâL͸²ÃЪâqÇ€/•¢wù¸é[' Z—ñZwæÌ1ýc–ü .j#¹Ëm½oÃÆFö†-ÔŽ#Sïíðfû´Ó\ò÷Ý‹|df£ðB Š`(.¢\3ên÷G:ÜÁ²î.!mŒ&âm5¡?ÅúæMUÕ5´¸…Ø[ÕJ²è¸¦¦&oU?ÉH9dâöU~½-J{·Î«˜ï7_N›äˆùþXL‹PÔÏ AØBß^/½‡·%o÷&âm N¢q°Ú¦1ˆ{©±Ã¯‡ÒŽ´@ƒu숧øòçóÉ,ôðºûàÃÜ0ñƒŽ ´i]"dé¨@8ªÓF‰¾Ñ Û™jðw ÕžÃþ0¡øq9”àì¨Jp¿˜DðŽ("*†I¯§VŒ$Wò#÷Ï=—ŒDªP«¦E,‰ˆšö˜Ñ‘ÒËÞ˜ ,ß»#4Á`³æ½ód+u#d%q¤_~P˜)Ò3T²•¼ ¼Ò‘HY*í«,‰›M!XЛBœg󵫫„0æ ¶5kÕ~ŽGl!Ò–©ºš¦2 ƒë5òáY™ÛÞNè,ˆ!ÅÏÙ’ÄѪ+£Ñ°æ'[ð¤cƒ¿ó<«C±6-Þ˜1ŠÉ´`âo™Ñ·:¤…IÓÂþ âd&7“òx‘ÕÖkZ¬*ÚM¸A«NZ­mI'j+O³ä~î5Y,pýA  ‡£{6YðL†È§Mq–Jþt\¥ivB2•iˆÆio¬%S𳽤Aš9½ÔÁʰ³–X„¹ÄÚo¢w —¥˜7:Ìs7izŒÊͬ¤øêKj¯ ìÌúc[u›?1õK˜¯C¾fš]¡‰õ”HÏ(·™)Ò{&sWá7ÓÐ$1Ñ)Mèæº‘6ñ†èG™Bå,ZAJè"ަž3§gí³2¢Æêh"Ìäjºj&ão̵š•ïÉ_ú²zÆ÷¦ô­Õ†)üa. ŒÍÌ3¹o{S"Âù8ë”q«Ê·¹ÿz”Ä‘Î>9L&äúû´Ìr½?ÌÑ£‰1KéC|%d›ö¾,v5» IënM³Õ›Ú·Ù‰î‰°fÉ™Öÿ3Õ4 —çq ¾¼y?CÛkˆÒÕLî[n µÇÂZöæ˜þ±äûƒ?WÉ£v‘î¢÷ú9Äi é­óÍrÀ%ÆÙKv‚¢XPäc‰¿äX\3Ë)Fƶ“„‰Q‰k­!Ý`µÕx¿¨«SMÒ®5šhçpÌÓR&qù¢µøac@–¥3Ø× 虬ŸTÆé™È®·4wê9‚Eö]ߦ ཀ³HÆþ~ñl¾5Z†­ÊzÈÂÖü¥XîµSÈúZC-éáΘÖZîö,q_µ¬b> |ÖLbDÓþíHDúì“Gõ!8AÅ“U…::‘ Ð"ïfÔØH9b´( ­»Ðee1ß•qªŒ’ ÿ’á~Þ’á{2’áo2‘‰ î•á>þ-Ã;2üC†ïËðmþ#ÃQºeDþ+ÃÛ2–!%Ã_exS†¿Ëð’2ôÈð€ ÿ“áŸ2Úe´É˜/cž q¨Wáð«p'¬Sq:,æµKUØ7«8“š^ÆM¥Šãà&^‡Uø#ܠŸ`ŸJ§RS_RáqøŒ Oqs¾ Â¯áb¾A~À$3àހϫè†j¾ËòÆÃõ*ŽÏ©8>«Âa‰ ¿‚ UxjU8A$ð"+ô ¯ý > â,X£Âoi ‹`kµ]…^X«ÂÓ°AE_æA–< –1É¥*Žâ+<ËR~‹TømÀÿýœ7~ÁâOót?4¨p’DÁ3°ž§›ùŒ6'ðZ6©ðMø Zy·F…Gá‹*<Ç 9ùZ/ÃE¼F¨°R…c|…»a!2M¿Å·|ŒåÝ ËUxˆã †„j*¼Ê =lN/gŽm<ÚÉÍÜ„Tø ,åQ#7[T<ŸŒå«Nâw{‰ÅÆ>m1k@Ías\¢ÂkP§b1Txv0ñV§ ð¨Rq6¬Vá ÖôðShrà¬w` np`)Jq#7 ¼qizp7,ÇÍôâžn妉›Ë¸iæf7Û¹ù7—sóAf»Â>¼²ç¢Ÿ›¼pà< :p>jx!¶ðZk­µ9hrÐÚNíâ&ìÀ¬Úlç&ÂkQ–aŒ\ÅZÅyCç5à 1Áv3Ý^ÛË$|Ðլˇxã^û07áæ£,êZn>æÀE|Ú"ÞX„wàEø –rãõÌûI^ŒŸ…•øi>÷3<ú,¯}މ?Ï—ù‚—™:ÑËñR¾ï ,þFp¾ÄÍ5Ìq3¯ÝÂÍ—yúÝêÀ¸…Ïý*K¡÷¸Ä|žN6bŸq_æk¼ûuVóËÌÅo°ÐÛYÊ>Vè®Âý<º“‰ïr` ~Ó«ñ[\‹õD|€¯ÿmnîfÞï0ï=Üäæ»Ü|ÏA’¿ïÀZ<äÀu¬Æz¼×ux˜›û˜äkp”$y”ràJìææ~V0‡È;Ì a9œàb ¢‘‹±ˆ{ò蛡ƒÆäÓüî¬ù,šƒëÓsé"æÿ÷a%îĨ/àÈë[bpHÌŸ2çŒs¢'¨=¡ “­ž0Oô1ŸB¯‚J¢ÛC³jÒŒÿ¹¨ç4;1…=Ýøà ,»+R–6;óRøƒÃøP%ñx O¤i¾W0#Ek3]Š®‡<`Ó¬ð”¥ðÅǸé忤'ï(>ÎÍ)žžöô ·9…Å3}Ã'<åGñISðGèg#Í+èBKëˆR:©Ÿê9‚Ït‚í^'‰OÑäÙn|ú(>ç±Åg 8‘¹ôÄ|é(¾HŒ/õÂèÃøC%ñyêžë… Ü%ñÖô9Öù™ôeOesú™[C¦©$^K†µQon?ê{ÞAüxiq!–ß…ÔÍ»ÔÍÝ'öœ¶$þ¤¾ü¤EøÓ,{0í>ØÞƒ šËSøò‡¯êMâ+ô{5‰?cýŽà™<~*œíÆŸÓ{9íô\æ~A#1uæ›OˆIü¥°ÒxÑÂY" ÿÕQ|–%8å$þº¼N¥Ód?”xBgA_3Ÿ4‰¿=7p÷^” §Ãây–®d²™“W¥Ûa¬5×°ç¨0E8¤ÚGÔ¿3å¥Û×m½=¥UëÉ&ñÿ€Aý(Öêú’øÆ!ë]Ÿ‡eÑlzD‰£š®õû¦`k"ê'Š“ø‡C‚Ù ‰5yjÏÉS–Ä?äyaèsþÔŸGâÔlò`>ÕWZ;‹uçhöÓ¾Þ`öYdóö“å½pª±ËüµÒî²;Ç$ño•ù.{^ÿ^){‹l®ünüG]ÙIXîë¢ÿg',ÀJÅÛoV*¬‹K)²9ǹò]r7¾UYà*è…ñ=xq³M0» Rø/fßtßé…:j]òýøo :aû”sÑ9 SøŸJ…7—ìÊ¿ÿkSÖäþ²þWwd²A^Y/Œ-ó¸ÈUÞ¦¸Áº²Ctÿ&¸®Ä%ð5zÊp)Ý—IV°½E–"×=G$gŒîÁeÍNgJ‚ãd“Þ^(c¤è‚YÔî¸qú!¬êNpúV7û ‹\áîPÞR¬Ç äúËMç”SÆKi¤ò„× ³K¶¸’±.%ÙyßÑ$Êo²(dFA€E¶"[!Þº¦Ñ;ÉÞ¤¤SÁšŒæÈ¿ñ¼Ä$7 =£\n’8ê˳Iî#xüvϤ„)ÅܨŒ·¤Ž²XG«Ú ‚é#"ºÇStw‰Ð:ëœ "}‚…9+šSÒèm¤è!ëÊ•v{ã°Âeï…Jò£¢¤4¦ æÒh¢ͦQ¡M¡Ñ$1röà%–ÑÆ¦¤q¬‡Š•;Þ>Â/#"ø<Šàâ¤TètYY…«Ò&Ôp2vÙNé­7á1ú·JôOŠÈÈrªÊ­¸*´‚œžBÐ ïý ÈÚÆ³éè§òÑÊ/.’ÈQInäkæÔR–’&€)3¸‚¶ž"÷c†Ãtܤ´ûM¶Üï,c%™¸ÀèúšSæ5ñËÅ™ñ|ç8Ó^E‚øüŒ¦˜Hw–sjŸ©LG5Oš&»âAÓ1Õ:³Ð¬ö„1H3æ´ÜôÑt½)éäÝÔ_A4wQEHRGRæH3E™3ó0>œ”η¼j©å½õÅTåÌ*×p;Lc¡å–D•¸‹3µM½Y(•›ügœç;g™ÃS]°ÅŒúY°ÞºD'”fª¸.‘îÎ:‹Å¸Pp_àœM69³-z‚n±>ÇZcÍJh–é³Ê «Êè–.à”å¢L3»“ â áú•°fI©t匂[({°¶™ÃSiïÁuÍÎÒ”TFeH¾ÓÓ-Ñu¼â¨2*ìI©Â2O·äã’¥—3ŠϵøÏá¦Ä$;Ù «¸cigÝÑé,¯T„X¯KI¬‚)“Ò\aÑ×]ù`P{œ«àÇ­„}&)Í3åqG¿Ç’Ò|³»ÐìtÂv‘”ÈòÂÓ*š¾”´PÈ9eVæIiWäý±˜‹íìoœ5• ÷’Þ†§ðé *QÑÃy|Ê \-(œXcöÿPKu”ÊÆì,PKú™H'Fcom/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection$1.class­R]oA=S ® Xk©mm¶âJŸ4#ÁIš”HìKãÃvwÛ¬383[Ò¥ Dãƒ?Àe¼³m*j|p“{îÜ™=çžùøþãë7dÐÄ6ÃR½±{äû^ì‹¡·wxÄÓfÈÔû ãúéšàÆëtÂPq­Û½9ÊÀ¨H Ûÿ2Óø¥Ö÷µžHv3âÂDo")¨qÿ?·¤],>‹Ddž3d»2ä ¬Çàô„ઓ ®*3–/vÂPÈDüU“Zap"h´b¼ôõHö•lî·í4[;[OŸ¼£–>Å!ýô"ï=ˆTXëØ‹„áJø±7™L¼±’F2öFÆŒµ÷ÚâÛ7»]I~{FµÉ„Ô»ôçÍ‘…sÏsG+ÃFº y¨Èœx}“ÿ!;©,úâ®ÍÅWCOB%"¥<ÊyÜÈcÙA ®£è ‚¼ƒk(8(Y¸já&2ET±^À*6,ܶ°iaËÂ"ná.Z4¬‚aäÊ–Icö+[Źªô[E-ç*rq^-Ð(‡,åEªžåM÷3jîö ÷ܵî»Í¸Õì u·š›¡ñ)åž*0¬P°”W#-FyÅuJÌ)Q¦Dž¢ñîdzž—S¼‚K”­—Õt¾òPK9 ¶èlPKú™H'Ecom/sun/net/ssl/internal/www/protocol/https/BasicAuthentication.class•TMsÛT=Š?ž$«­ãÖ!"”†¯b›8jBZ'm±Ý”º„&4M *Šœ(ãHIn0kþKv°ê†E™¡N¦e<Æÿ…¿Ü'ÛiLÄ´,|ï}÷Ü{Þ½GoüÇ_OÛˆ m¯ŠxE„*âu‘L¶"à\&;¿«?ÔµšnokK¾kÙÛ3¸Ø5ÑLv½ÔqeÙLùdCådŠ÷_ÌË/l?z].¤°’ªpÖ±LÈm'R¥FµjºÄ+'š™ÌÚK-Þ}çuÛ¦¯-êž·ï¸[ņ¿cÚ¾eè¾åØÙtŒ×-ß›¹3|й—m|ÁC™õR臉Pâ”Ë< t˜µlË¿.àçr\ë›€Š€’îYÆ(UÑK‰–-S@*Œ÷ì¢ë|ÝÌëýíò’Óp ó–U£¾¡õ›º·ãPa~eb|2?1yiâê• âÖé"½^7í-’îºzÓpêM6 lîR`¸a8{š×°ƒÕ=¯¦Y¶oº¶^Óö÷÷µºëøŽáÔ´߯{Z0v¿.ÄBô 7m#Ø$Zµj5â¶é—š¾é `Þv<_@‚¢žÀü¢ãvóËžéÞÕ÷ˆ!ùo)hÍð‡Û_Ûô|sOÀ…|KÊñ×ÐãhøVM+rhä!®ÉžåZ©¸47=5,G÷©G@yGwuƒÔ:ÂDßéÍË굆¹Pex‡a’á]†)† †÷>`¸Â0ÍpYÁ0ÜœQð&N+¸Š¸‚7p^Á% (ƒ¤`²‚·pŠ39œSð†¸I+ô¯EÅb 2‘1ƒ9³¸ÅÍGÜÜ–p ×qGÆ |ÌÍC,ÎñR)ÁB"`ðÐB±X×%wa³{ìÎyïfáøPâú,â3ðñû˜aÞ?^ß°…{„ÃÑ|¥^[å–\J¨Ýrr|O˜þrg„ooæ“ÍÔ?Þ&" Kßm¦µ5„£‡++¿>¿+NÆy1>-ÎÏSJµRý8„ í×[÷½0h®BC´±T6}Æõ|AÆ!_•qŸŒ¢Œ‚ŒY˘“‘—ñŒ2k¸9 Ç‘Ðð vhÂg5ŒcŸ†{q·†1Œh˜ÆJØÅÖ;5Ä5|“wŒ!¥á(nÕ0´†/!£á^¡Ÿý>£áËø‚†cìü5?Ïi0ñiŽ·SÃ×q›†o°uŸ×ðfZ‘2ÀAïb)©a ûb(cI……G™¸*à±ÎgÒ`rJEË*ªxLE §™<ÎäÛ*YŸ`ÃwØåIßÂS,}—­ßcò´Š:žáÈ+ì÷,“ï«XÄXzŽÉóL^`òC6~ÄäÇ*ü„Ãÿ”ƒþŒ—gb”Ú‹¸” Dú.!(Áß'„kÀ dâ7€¸‚vãÒ凌M;øo^×/Iň¾»Põ¡BQÒ÷ŠQ}o¡(ëÃ…¢¢ï+õ¨>BTÖï&ªèû‰ÆôDUÝ$Ú­ÏÕôѽL´W·ˆöé …wðÒÛÁ9ôóˆÁðì4$úúSº7ØÄÏéy9½_¤2ëx%5¸ŽWS†¸Ž³­]Ü%¢¼óeʺøó†¼‰_政£VÜį6ðë¸ÐÄkz¡‰×s±”KÊ~“SÙÑ·yRèÕ2º…–—x©Û½¢í€†ú÷¤ŒžÐ¿×轤86àdl*,ó5Ò)ÄÏd¨Àß6q.½…lúò%%'FF¤Uè†˜Ò iøÌC+’@âåsïÿ;cˆäiˆ‘MüŽªù}Nl¥~Yªnà9)2]Å0íŒî•ŸÐûž‘ é"^JÈÃMüñD ¿N»Q qîý÷¸ì×/„¹‰0Õ>âôi‹H¼«m¿‘qŒæ.0 ÓTb7ñát<ÒÄÇRïâÕ&Vsbf ·Òâ•-ÜDììTbëÿ‚YcuçÅsȤ¸:^Óæ77ñ§Mü™°gÁ°ÖÄ_Z¨Ó\¤ã¤y#'Òzâ]\È_ÏBŽK9‰ã7ñVNNµ¤ †ÌgêobÆ6p15dJÁõþM¼#ääUôœˆŒ(ç±#¡¬Gï*væbç5bÿÈ©Û}ßTÛ)†sÁ#žÃÃ!·–ë,+íŒñĈ,©W¦¨; e0®äù®¸F㲂·p‘g—ðÏÝ#øT}o}Wd-´nÄèPK QóÓj¶ PKú™H'Bcom/sun/net/ssl/internal/www/protocol/https/EmptyInputStream.classeŽÍJÃ@…Ï$icc­ˆàÞ ñš®Š ;¡Ð¸Ó@G&3afbðܸ\ø>”8êB¼‹s8ç»\î×÷Ç'bäØeˆŽç½.†3¡„»dH®ôªbȺ5eu+¤÷×Ü®õÑù²8æÅô¬¸8`ñg.$ K³R×d[Eªrd­$¡\e—Ôu5F;]jIkçK7uã^æªiÝ™Š× ûOþ MÚÄÛ*Å(ÅÖØ¿eØÆ1ö& µ×ħ=ïÌûàä“·~!íË€'ů–ýgÑ/„„áPK %Äè1PKú™H'Fcom/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection$2.classmR]oA=Ã"[pU@ZµØkkÙ\áIScDÔ´ j#¶MJ|Ø.غšÈ/ê«&¢Æ€?ÊxwÛb»É=gîÌ=wÎÌìï??AC†BÉl:ÇŽí;¢g¿98ä®Ú`ÐJæ.Ãléüš¹Ï`MÏ·Uè‰ÞÆYÁ•½EÐèvC.%µ2/(>?ÓÙ6L=ö„§ž0$›A—3[Bð°é;RrÉ?¯cÈ´ƒaèò—žO‚t{,TŸ+Ïe˜ëˆúÐk\t‡ ÿ¦wÄŒÄf Õ”l1^—gýìíÐ;¦ÛèñnÃ=-СÐQБÓ1§ã†ŽY7 ¤0EÚÀµ®âŠëHÈCË`Ëiq'‚•îfp«¬¡Fù<–èOÊEJ_Fôå¢fSYv*KÐ(…KÄ:eËÄIâ‚õ÷¬òëVe‚’UÀüןªnQ°XÓ …F¼f}ÅúX-âñ+bS+W¾¡üî3{'Hî±Ï´Èè"b^¡Qd"£â 5.ÆÛäÿPK™ë PûPKø™H'a0.class]MKÃ@†ßmÓ®¶~Të÷ÍCrˆizR¼ùQ!ÐKð°I—š²!IEúÓ<øüQâl *9 Ïì;óÎÎî×÷Ç'šppÊ`ZöÃ\¼ 7éÌ} ç2*¯ê²_æq:#¹Eò’Ø´ì ƒaÙÁõ c] ÆZíܽG2+c•tðÕ"ä}œH†Ap+ŠWõœ+gâo4ô./^˜`hˆ!%!ED³¢D¥ä`S ¢Yí+×—y,’x)B=ðìoÅmxT¥¿È2•—rú»C¿Ö¶2÷êϦ« Ž>Ç€cƒcÃäØm3â ã7º0â6È‚5R â>)›Ô§+[ô½š=´+î U± þÏq@±NyPKzZh“PKø™H'a1.classuTëSUÿÝì&–-¯4ÔÈKì+h lK© -‹B«Ý$XL“6Xâ³>ú_8SgœáKg” Ž~óƒ”zÎÝ ifæžçïžsî9góÏ¿¿ÿ ƒxD›€íKœŒö%WÍu3ž3óËñY§dç—ǤsNÒE=šLŒ%+clꎺp»ŸN­Zi'‘/–ºg™÷% ç0`ºì<‹8}*£‹;¶ˆðq@ ;Æž8Æ”`ð@ôhè£Ù&ÊÙ¬U:œ³§0jt‘™?º4Á<@<ÁýÓX‰DœÌ×ì¼í\'ød!cQën>H[EÇ.ä×@p•[IM–%­Õg åRÚš²stAP¿Û—n˜k+…™RapnèÂðàÐðÅ¡+—ï’Óð™C”Æ,­|F Á,•Ìt¡¸AÞyS#$¤é³5ceÍrιm™·%mžm¾d;VÍ(8qV ˜µófή°ºLg…Ž-ªÍ31}ðÈs×@àÅçom\Í9k•lNg¦øå¡zÛ's…¼uÄúTî–Ã#¢¦?Ñg±kŽEzsÐ)Ô®Š2u庙+[ÓÔQÑpEC·†—5ŒiÑ0ªá —4\ÖpAà†a q C.A5E‡“^œ2Ð…•U"gàcˆm­LZ ¼„F§¡3Q \E‡:a †WÙv/8˘œgÒ…fýð8çªM:®áVÆ‘dò“w™L7â:fØû^#^ciÜ•n3™eïû,I›”>Ðñ:æt¼yöÞÑ1“Xd²Ä;,}¨ãf8Ç]7ñ‘Ž)Üâð³ãß5YMéx i–2Ô‡qªÄ‡Þ†ÁˆS»$?vÉÏHþß.uj¬ä1É ’B=IÚYЧÄv`Å”md™,Çú·±؆½þõò$¼+íÄq=öVö°*àb¸¦×Ä)ì'„³ÿ†Ál¹:¼ïÞêÁý±*î×3¶zî}*·ø/nÞà`fTuµ‚À¨?¬þˆ®§¿³kE[Êh`•°úGðªÆŽˆ¦„Uér¯}*¤à™K*Â~‚¥-¨ìaMÁüAÅaW8ù!rõ‡¬ìÂÙD“«‡ý¤E‚»(³|o4@Ÿþ{T{'-§÷KR¢û˜\pÛGÎ.>ÛÁƒ6Qņ›±"@rŸÿ*#øxY½=¤q„!³Êcø•'$}YÅêÜEËá“à>â>žB_m˜ßÇÔ¾þ‹¦òÍ–Œ£øM†HYÐúøKñ²u{ÙÚÜ¥ë!³=Ü:HÖäa#^²êc¹uϲكò`rZ{øÖ‡z¬ Wx‡·•ÍTèwãTý÷±Îüàë¥Ò?¥¼Øù?PKÛ÷›PKø™H'a2.classUÛseÿm³É¦K(nPIsk!mQE ¥R[BDØ&›vKº›n¶µ­ ^ð~y÷Éá‰7¦€´Œha|€ÿgüÄs6›"t¡™ïܯß9ßöÏ~]Iü„ľ vñJ/!±+ˆ×‚ˆ ˆ)zM1L[QgU½¢ŽU4Å4Õ˜W̲bOhJI›Õ‹Z-¥q ÚÚ§.±@Ä"&ɵ­¢ãmc“ZÑ^#ÎÙ–nŒ“Øm°5ÚZðÒ®‹rpŽËV{£}Åjg¡·nYÓŠ3–nÏ·å˜ÐΨFÉœrìѵ±Ö&?6S.k%Ùîi>ÝÉeyh(Á6/y¡WÀ>O…Wg1K¯2Ô4û£…^λõˆå!ê-œó>—kªâÕîÎäÀ R/]hì*VtC·Ð–t¹ÄŽ£ÊÉÜÑ=Nióƒªn)¦“‡WLÀÎìÀé”USS“5µ¬¥ž2ðjV5x=u£f«†­«¶–¡}u×R×g5#E[ð?f¶¥µ²iM©¶N{Ý0³fI°>kÖíGÔÊ ñrÏ\Q«²eM@ª×(š–Åu3ScšÅåVUKÒlͪem®JJ­Dy ‚J«E+DÕ”ªeÎê%Ò«–æ<±b… ù‰qõ‡$ÖŸQØkkäœ9cµz…JÛV8®Ö&ÌAËLŽt¤ÒÉŽt{ÇáCçlöܸ¦Â9‡J„šf`Ð4ÔjU3JÌ-nŒˆ±"Š´rNeD“V`\¦3Ng‚ŽNÏÙÉ ›ôú,]­è ÜÍæIâ,è7íÜLµjZt)«7I>cVwÞølÕÔ£÷«¥.ѩСh‚Igš(h› _aNB‡„cŽKHKx]Â[Jè•Ð#á„„·%¼#!+ᔄ£Þ !ƒ¶:‘ ¡›ÁKØB{´†p1ÄÂúÞ@<„Ãu»­¬ØÎv[ìd¶…M6†°›C8Él;v0ØÆ ÒŒ>¼Çà<ƒ÷eôれ\”1ˆ‹,SŒÉЬ-±¶ÄÚ+4e×ñ.&dŒ@gãI£¸Ä "ã,kÏbŠÁ2“«l7-#ÇÚ<ÆÅÝÄ÷£ çP@÷ ¦–L½:˜Ú%ÜÌåàN‡ ‹ô4~¢›GøúˆÞD/bIö×ü·GüMÌûÄáÛ°Äßq:ï ¹Û¨¹tÑöMÇPà¸Î› „ý±eÌ4ÔVÕû¼À¾Ø/˜{™Ñf Í×¹ù%|î`ŽÁ|#@»Gü%,4Ô4fŠËêiªÝGX£ô>@__=Ϧx=ÑG0À±tŽò}üƒ”‹¹Ëwp™ñ•jò®øº¯#'~ w¥sW›‡\¹öø¯ø¢“~/‘Šùú¹Î†äŒÈ•‡]I€JÌ9²Ãk¬2hqé$ülŸTÕ¢Ûg6ºê·Ï½bû¸Ô q:ÿvël¦Z^p¯éø!¾„õ÷0œû–ñÉýXƒ™‹ßŧ§|´?FdFôô_ÇPr«?ý-„DÝÅg¹ˆ˜`aò.>Ï"‡ˆE,XÂUºÏýÝg$°˜ ãÊ5áý«~Áaßà¬÷p6ö/ãKíWá8%|ÍQó=°è—sïït˜8™ß²ÛÛu œ­ˆ?Ã/,&b·`ûoÁº…ZXˆ'—ðMFŒˆX'dü15ñmÆ}iÚ˜ˆ ß¹ôÓÎÑéFÈ@ÜÐvw™žìÒâ(Å]t”aú 9£;‚uŽsuGw3=é ä6¦ÐÄ›o‰?¤¥\ù‰g•ˇƒËøþþÍ5•¶Ó ÕýºÉw¥•ŸL,þä$Vwÿ:ZFï!Ÿ7/ã FÿÞ°ƒ> Cÿ š§“p>ÉPKf|¸ˆ¢ PKù™H'a3.classmSKoUþnfÆwæÚ)©aJ§c·PêLâ<“L’yŒŠ°Ôjˆ?Òº2våºÀŽ ;–ü`åMEB²…E»ŒÄ–ÿC9glP2ç;÷œsÏwóçß¿?ƒ†>Ñ ^ÀÄ«&ÒZ~î®@"|0¹Â¤ô0ú:ZjEíûKå^·Ù¾¿ÄAÅÁÃݱcçϦñxæœñ`\u¸ËˆÎ&“ ¦Ù1-U£­¹³Å3§ñR´¾Å%I:,EÅØ³òc7Øn¶›½[ú^§Þ¸´×yÒªçÚ^î¨Ù®çz¹;Á> = ¤cø¦ð-G?Á¥–´Ð4zøÀ·8¬û–ü+¡æ$Ê¡î˜åÐp¬r˜pdÙWžë¨!><¾7Â|˜ž xN›ÔB~Þ™e^†5û‰&û͹b'"iëb‘…H­]/Zc¶elÝ6X£:#NMÄ%…Ÿr’C|ä§ú¸ð…Nê)‰üGh¾ɧ<ÞO5‘Ð.kdwú(xîÚÌòO°¾¢kž«W†øx‡m¦²6“ø†{ìê™JeÛõžýòâ¯Â4-ªôüå¡qƒ…x’“×é‚dñQë¶îÙz&+]• »Ççœ8}²äOáõPK‘ÃØ*PKù™H'a4.class]RMkQ=of23Æh_j­¡3A¬ˆÉH¬©Vjµ ])º)b'hJÉ”6-EÓ6àNð?W®Åµ¿ÇxÞä5Îp^Î}÷Ü˹wòëÏ÷0QBΓ˜…⪀UX)®Ø…µ¥„8Š ¯[íV§BÉèÑH?Ú¯7·:­¨½ÃàY´»]o>nm23½¶žnG¥ÕòÍùRyþVùþ½ç"0Â;$5’ZC@n„{áÜfØ~9÷¤¶Ñ¬wHÎeàÀÌ +,¦Ò¸€‹¸Â3 õ¤ ”€§Ë(Ë_¡nƒcLMgXš‚‘¤ßÃâ ¼¼ÛY Þ>ð?'š-¢Kmâ2Q$–ÏZO”ñˆIw¿’¼Ô0êVòc)9ž¢°«BûTiÄ~¬MF&ÉÎ'3({K´É/»ÿÙ»¡íõ4¿J\#®+›©ØŽØ­x4®¥û-°Ÿ¡4ÖâŒ|×ÇlOˆ6î#§Ø¤èc"!F6‰wÚÂÖ-~ëýô¿áR%Ÿø9&’%kþ…ø@¼ fOöªj#¾Ì½QC|¬ªøRŽ"›‘;ŠœuH?¡Áâ#],ÿ)vÇ‹Oä ”j¹;.?LQpPå`§ïòà ù?åiàì_PKó  ÙPKù™H'a5.class¥TÛNQ]§ÎÐ:­R¤´@½2,P”rkËEGˆ—@ÃÃPn5Ð1m5>CŸü_H˜Ôh‚o’øQƽgJ¢ŸL³×Yûœ½×^g:íÏ__ODËA P  ׂæÀš€fZ–Ŭ›ÙÊ+û­=|`W÷†WµJuoÊ?Ôù°T´¬óte«<åm X†y±Ëº.Ù§ŽR‘§µÔ.V°|iÅÎyú,¯NWª•Ƭ€2ïlïDß•w^7*Nµ. ¨ ~™Hß3'ýÜZHï:µtc¿RO7jvµNÙ¡Í­C¤³ê¼©•w–*$*6쬳´`×÷5'³–ÍdGG²“›TaS…=Æc§­-"[ÛDÊ»{‡U GC·†¤†„†1¨:ºp…AבB»Ž^†›èÔq‹Ùm†.ÄuÜñYXG³"œFu¤apo”ÓPw1Á=H†Á0úqŸ!¦ƒ!†a†ÞË2åŽÌF`bŒÓ§ãÌ&&ÉO?­üÒ6CL°[oíõV•X áUÊ)×hµe2ÕÓ®¢‰GÒ¹˜‘†êb6¡œA9NÆÅÑGäeB1B†úS.ædÐ¥y‚¹SPä) ~Ñ´‹¢\?Á|<ðÞÅü1à™ˆÑ[ìÞ¤ÑaZ_þ1:¡°4È{ ÒÐ<3mž™Hú^:Z^ Íhûç(ú è§Ã£–[·œ“ƒ©ŒAM,äTÉÁ£0‰-zº½]„b†bÖŸ`¨Ÿ=ák ɛވhkÄ$Bô2ÔðDùDJçšÄŠgˆ~ƒ¹WšXúî»hâñEÁÔ Z—9 µžw' óÿID6ñT ºÑùƒê àÆoPKÌI N…xPKù™H'a6.classïs×qOw'ɲÀ?àHŒ¥pÄÉ TM0vÁ¨À! -&¡:K‡-G–ù˜¤.¥nc~„bHÚ€k0&­›ÖM‡ä0m&é‡t¦Eÿ€üýºûÞ»ÓÉ8™~xûv÷íÛÝ·owïIÿþæo_‚ ­ðW|€˜‚áUÙÇæW‚ðý Äe h½žÀ-¶ÈOŸ¡-Ûƒ°S†:ZÒiiG¾'Û|’Á> ”XrsR‚@,Ù—L;Kžî1íIZ ÆzúÓíŒæèé®$Û°¢Böb4’DÔ:£ŒXÏyÎÜš3ó[_ï²Òv{r3£y…ÛÅl~ øXŸPî $s, ÅjÖ×'p~¤g'ḣow6Ÿµ;%عÏÌç ¶nf2z¾”Ëéyë|·i›z)Ÿ³FGõ âû Ã#9˶ôì¨nKÖ ¶ˆméBÞÎæK–Þµÿ˜nåÓ… ú®ŸÏÚƒ…’Mº˜Ü ì+d,Œà¾B~Ô6óöI3WB:´ÿBÚ±³È•@BÇ6&‡GŠ…«ˆÚ˜.» góë,ùké9+?`¢¾ÍÉü93—͸FwéÖ… ©•Ñms@'çìA«HÎêŽì3Šôn°Q¤¹‡ÓæYM9ÑÓÃ4\´Š\Ý}´˜ÎÚÙs–ŽÎ ˜‘~ãÁl—Fm½ßZÖ×ÐñB©˜¶dsxâ-½ƒ ›™Í£©´šÂàL7ócúpyŸø6´èf®h™™1+ƒéÂÆFØÅ±M¹\á<÷}É~—0õ}§»$XsºÛ,-ZO¶mÙÞÚ¶}[Û«¯¼…&J˜; $0»ÌbÑKFÆp¥™ýi¤‘hÆãJgq àÄ‘Å1$AýÒ2¨bµ­a”|Gáy#8ÞÁQÄAƒ[¥Žs8Î㸀ƒü¹€žü ûðZºÐÖ„¡¶…áì ÃAÂ~HX’°ýiÀú0¼ía8J¼7#°ô0tÓBl Ã^XG Bd4 Hä Ùè&¬6Ðê‹Dn&’al[m&ðçÃp˜ìvpÿÖx!g S?‹ÀY d x;)È6L O @`$&¼SýP$0BÞ(›@‰À9’;OØÂÆ»Hà]ïø)qZýa—B&^~Nà2-ü‚0¶c‚À/ üJ®§&í`=Ògp^‹ƒ˜D!`s·˜÷‹ù€˜Šo‡ÍIAôa13^› ¹7Ä|ŒÍMpg,=Ä}°é^Fú„‡–>é¡}HÿÈC‡þ±‡^…ô)]‹tŸ‡®Aú´‡V‘~ÓCÿé·<ôgÐŒ8æ*ÂVä43ŸêŒÏá}ÃW†IC.ÕG[&Ø$;™r€íÕ‚Fs®‘2\3¢e¸nhJ>ДÆï@Ð@ꆣ«^F¤ëküxúqþ¦(³ÐfÄËp“tL‘Ž[´éšÑ(•ᶦâúÆ©Çp»Ñw óð™ñ®6ÊãwaÅß!uªQù~ýƒT´Èy~—çC^Cü+Á0>Ó&‘¶ø¿`§¦Ê³b9È–eòC&?¸àeôxðh©·uÌÛ•^Yvò­8<ŠÅ`£ˆç)Œ&Åóµ¨2Ê#ôöV4õEp—‚ØÍ¯@£ ÇT“"ÓÚø0iR˜âF“B^0_›”/EÔ®TB½N˜Ù&̼¤)3 Ê -ÑøcøÇo4…tžbXªLpÁÝå%©øÀ©AÞ5%@ÛÓ÷`€¦DPSižƒ€¦"áǃ×­š¢á·ó°Úh%÷(¦ -(Â4­3e„(•J(\]W ß‚¦¢LBÕ#NÚÔEø˜‹¢]¹{Ñ5¸È,ðÝ!ÚmÄ#bËôȵA]qG½ª<€çÈߢ,Â]”žw.{Ãv,sƒ‘ÅWEpÆ É½ ÊŒ• )2ôíï¦Ì»eÎãׂâ0µÂ8ù¯È߀@W»þdî/¢þe=Œ‰Ë?‰u†/W8d,Âï Ê ¿¨Ÿ; ‹ ¹ kÈòL½Ž–g¨´§ç«Ò˜£áJF“Í" 7°’©–/“6§(WT%¦â×°ÎF•*xŒE¸·€¡R™XÅêð€Œß¹9‰ª×9ö"Ì:|ŸWú„ºL$ð*¼ü'úÄy1* ®ÇKòßÅs2¢´»Ñs6Þ%Ís‰@T ¤:Ý, 1LŒ„Bu$ï¸ IB”Nï©s{ŒŠÉ~{ÂÿM\¦êZb+êù8ÕÉhä¡oVi~uÖ«*ºìÉ:XãæñçwÌâßXëöÀzqWYl»¨âïA;w:HMW¦.‹¥y½Úÿ†JTY$ï1EnÓ­w:å5ä³Ýn¯S+Ò‡@­¤I*·¶çD…Ô°°ÈÒmª`~O«pé÷ºžŽ#oò>¶šxd>áùÏ=XÅÚ4;Êø}Šx®àW‘rNâµ½Œ9§W Þ*£3³pØ£Šhµ¯7XݸqY]¹ü”[8¡ËŽqá°S€©jX³ÐóŒ•ûB·V¹˜ûMâfPîƒúà{X½Õf&ÝÍüÂqYWy±ëhnu3º¿¢%ìm‰*)¹W]yÌRY7!"$×Ð%rŠÉª½ŠoBöUf¦„’Êwr¯Û?B¨ ^ýw»ðÒ>G¶6 ‹Pºõ)´"i ç<|ÀläÄÌ3ËÓ|™¿^p^|^ù®^¸IÄkyt;gØWÁÓæ¹×µ†,Éä4ÒÄãÓ×êÖ‚óõ`®¤¸ÍyÖ'±Ôè=†²s¤¢´T¹§…Ý.‘ ¤H§(¢úxDîG(¶>ŸS53ÍTô½ ôíú6QoÃÎ]K÷ó>]`ô'•ô)>z Ýn¢ïàïÀ& ÄŸX0C<äø®b¡¡'©“çûá9¡`­x<¯¬ä¹'C !žÏ Cáï|v»¶AL¦ÎoV=GèX)z¼¨sX‹âóñgöµZ„öæð+©ê5¾Ÿ÷Fdâ:iÉКO'/‹Ó¬¥ÆþÀô’—ƒîž÷™÷ï²Â’Ø›_¦ßDÒç ±˜EkŒ˜%.%6½3æ!‰¬KÕ¬ÛG=½§©-Ù:I¯“Êê#÷^jÕ˜e‡s˜2öt;}ëkK(™êuŠìV¥È¾¥º‰÷áÜJÆÂÕy¨‹° ¬ö;Ä3ŒL{ê!ô³n÷ÿPKMŒ¦˜ âPKù™H'a7.classVÙSZWÿn¸pˆz=Š·¸‘Cbš­‚ɦj$6M šˆA0.ÙÚ$]¬é¾¯IgÚÎd&/yH“™¶ÓI>÷¡DŸûÞ·¦¿sQ{ƒ™ù~œßùÎïû¾³Áùãß_WÈ@]t›ÑFFû… 3zžQ/£ÝŒ†g´‹ÑF>FGatŒ‘‡Q#/£Œžaô#?£F}ŒŒ‚Œúb4È(Äè0£ýŒö2atѨDUG§ccîd,uÎ=tfz2¾°W"CG'œ¶/¼0—HÛÛ’¨6G(Ô9î—ˆuŒûChŸ”¨>Ó un,Q]O0|:Øtü÷ð‘@Ø7›˜€1öÅ“‰Tbá€D¦}« 9ž˜”¨4NÍ/ÄR £±ä"x¢äˆPªuøÝÇÓè[åÁÀ:·åÐméÄÜûÃ}•O$¦Âƒ}ž±==ÝÙ=¾Ý)èÉ´$¬ŠáX¿W¢ {$ܧEöø“éøùn–~Ÿæ÷åöËÇ x°¸Ãþ [yrjþ Î5ðævùò«|9T-Â%æãÞ°/|]ž.oA£z°£ë£6–иîÓ×°&öx{%jxêX‡nÄÎìyÝB\õää×6Ü€±šÓ—Ó)_߬QïP_pXÛ+ѹvBá¡ÓC¡8 ºN!À–ЦDe™eAœÕóW›©3×)°„Ó‹sñÉDÇ»<<;OœMLN Çæb3ó8¡â’U÷Çæ§ÒÃsé®QÏ/æßíÙÓ{J¢Êñ\wÍ0.DR êØnZë º„Å%2Æ“éÒ™ãé™ÙØÜd$~Ô"¡O: ÃbHS°lZ"5û㉮L^Œ<KÂf`)˜ˆ: »›ƒa:¤Ò"ì"ìì2ì ìªB/*t^¡ M[éE­ô´Òj·Òê°RŒÚ¬4N.3½J¯ xÝB7è ]£7EkÉ‚¾· „³‹€å¬TÍ*Ô¨Ð" U@›€vjBÀh9¨‰Ÿ%‰ºÁ¶Ðûà§uüð—uüCð¸Ž>‘Å'uücð³:þ ø¹,ÿTOdñ¤Ž >£ãŸ§²üé,>«ãŸƒ_Ðñ/ÀçtüKðù¬ø :þø¢Ž ~1‹_Êâ—uüð+YüªŽß%‹ãÄ ]' ¾dÆßk;F¸‰Ø)âT°£jÇot-jàR8*ó-á¨Q€‰ÂQ…Ëá( š¸¨pqhæ háf` ·­¼Xªa·Ëy)PåeÀ ^ä\Vò `ç@¯Vó*` ·ky5°Ž×ëy-ÐÎë€^tr;p+w¸ØÈ·›x°™7[xpo¶ò`ßlç­á‡´,f|=jPÍЉÊêr$jT#Q“h)ê?‘(SK#˜· P0%‚*Rà12M²]HÊ 1Aa'œ¦"¡Qò´ÃÉT%WÀ?…¿Ï[ú´ºTe3U On~ÚTK‘ÉU±7jI‘*Yˆ¬ù ± oi!Òâ”<²¼ð2Mëeª*+@$Æ+ÚZT>^)•>^5 Ae¾uÓÒWåój›oËçÕ"WQŠ®¦V]má;ÀÖw ®H‘VZ}‘"Õ"Tö"UÚ¤Å¦Ò tª–BU¸ÚZàòjÒ­›’jµ6lJªýÄ4nJš™lÓ¦´Úî7oJª]­–‚ާ1³1âo«ðñZüÖ|·©^xÛŠý)Õjh/V…›ûnþ(^x_ìX{eP¾%ñöpýLogÜf<;WÝ£x•Šgåaû·d4ìsܦRÇZ^‘'îPC¦±ÿ.Ù\hÚ½?Ñ;·Èt—J–$Éî¸óøo)†Gìþº)ÜïþN×ï¯çؾšc„d<}ˆœ"Ç›|›ÊlrV–]ò]ªrÙÎ_è=ù{‘źdœ6i’QB–e§÷ÿø®ÕøG0ÿ *¿éô®|‡,÷®;¢£e¡ë\öÍk“{4ÿ’,a¢ !ùáñ_ò½Õµ{A{½ýPK&ËÀPKù™H'a8.class}TÏsÛTþž~D¶«´Ô‰R vQhI ;‰7mRSú#Å`J!4!É0ÅŽ™ŒT·ÓS‡ÿ90áB/¹t&q˜iï½Ã‘#ÿWÊî“ä´S{Þ§ïiw¿·»oí'ÿüú*JXQ5€˜Âp ÈàuUá7¼9©B°…œTgrI@sê“u!§¾Zç½ÁD²ŒÓØhÎIjÆtír]:?Û®òþˆÜ§VËi|ãßõ§¶ü°=µØëvÂö‹dµ†_“>.ÅcNñ2“ùNØéÕ(³+Q+È]»× n÷:Q¸- È¡Rïú[–„ͨEêìàÞí Ù Zv$ý-»ç·í0êٽ͠”œçƒØ„Ñö¦ÝŒÂžß ƒî6¹æ£;Ýf°ÐÙ¢ÓŪÀØÚU{3ºÙJK3åJi¦2=s~ö+]&NN¾€âWfi·Ad£ÉТÁB_ÓjÓêÐ iEÆ ¼eàŒ7MŒaØ„ƒ×L¼Í0†¼‰Ó8nÂÆ1†gÙ`ã “(šp&øƒFŽ2áX‹Â¼8ÌÊÑ|Ìd * ïäPÆ»üî=†jS8džÙ,±óÌ.0Ì1̳ËE†Ãûì|‰Ù —Ùå ³«Ç4=ùcЈÁ$Ž ênÄLÊë,/ãæxeç\¯di–ÞG½š!’Y¯j.»±œdúý%“ÑÚ³t+Ӫ걢WàHŠ]ïã£ApâÂå4ˆ ‘¦ÈJ; âLbÑÔþ©¶ Sn~ÁÇ)ËÔpSÙ}:Âùþ˜hpn^HȆ½JK£¶•eëF“®7è·®Òó’ÛÇg®BùÈúOy\@Ÿ{éÑYopnzèŸq®™ÿ_ÊÑøRè–å¿θ^á‹iæ5©o²øËÄ ÅŸžþýð¹ i8CôVèruKse_q+¾‰ê®ì¾Þړ–æ%½ïKŸ—ðGø‚ÃG’öÜJ†²îÒ¨,óy¤4[ÐÖkp–Ë_öНØÇÒúäéYEYª*ä+>ëwÙ†¥½¤Oƒú¾Mê ¸>YCÍ{6Sÿ­çË´žxêì—Õö(eȺùl< /ªµ@\Á©PK“O»ª… PKù™H'a9.class;õo×>f]Qf&Ff Í0F6›Ì¼Ì;Fçü”TFFOF®àüÒ¢äT·Ì €X´KbqF~@Q¾n˜¡ž‘®¡‘¡¥E,#S¢ˆ°êIâ4 Îggà`gàäÚÃÄÃÀÅÀÊÃÀÃÀÊÅÀËÀÏ $@„ ƒ"&3À$ 'f10pimgÒbÚÊ ¼¬Š‘®Fª†,¯%ĸ•A¦Š l";PK-†Pß·éPK÷™H'aa.class½W{|[uÿÞæ&÷6í¶’.ƒØÎe$Í£Û:)#ÈÖmZèÊ u³«7Ím›6MJšnkQ7ê|LÙDÁ„¢REÄl@[Øè•)>xãQÁ" ˆo¥œó»7mÚÞ–ý£Íç~çõ;¿sÎï÷;÷ö‘7îƒ !É®â]*Ö©X¯b­ŠóTÔªx·Š÷¨8WE‰Šõ*6¨Ø¨¢N‚ßïñ&S¯¶]‹'´hB÷¦’^-ÙçMµz3íº7¦o·è=•^Ÿ›¯‚¦Ø}õñ iì iËZ²my$“Ž'Ûj„Ñ ²¯¢y1Ð7 V¶²¯Ž=*¾zM«ái ˆj«©×bô$„¤$ÉšmÂÓý&Ms¢+„…ÃGá0±Œ c™½¥7Ïô-0¡_¬%c©.a¤²‘á‚È“,dóºº:Á}3£™ìºÞÖV=Miœli~y 'n¡¡(YɹRgX*¬jç·°´ ƒ*+¡ây_—øÞª†._}ÍäFµ á|!¤=É >ª'o¯Alá=»0Qkƒ†‹ ²>ªYT›"+úm|"ò¹~âÊ n¶¤œBmTÆÌ¬µ²ûšEŒý>‹º[ˆêš·YHOhj3’)»{a´CoÉP«Npqr œ¡KTÏ5-‰x2ž9— ¿Æ$–­õžY»qÃ¥‘¾®.f¶ÔÆ»Ûõ´7%Öã».aií…›*Ó=ZeGÖªWž¿öÒµ‰6M_—HµtæTek›õñ6½'CëX«)V]ëÊùX<Ãh£®Ç¢ZKç¦TL·Šc³ÖÓ³#•ŽE2tµtŒ®É ›‰Ì6k±U&ÒÒ®w‘·S§YZ•AB¨VKrŒ'{hL\ËèAoo²3™Ú‘ô®Ûp±WK´¥è2´wyëÖWJ8m¦}˜Ú¨Ù-½mñíz’Ì‚³˜eÒZ²§5•îÒ2qj·9óÓMói­[4_¡ðvê}ä!“òj Ùɵ¢PójS†ß-Z¢—øSjS½‰˜èæT;¦e4šáܰ³EïæÅzè”ÐpYÝ/g$Õ›nÑ7ÆämQóz­§=µ9 mYYYZYµbåÙ«/‘PjÙŽ š·‘gmƒ ¢ - 1¡•¡¡!ÎÐÁ «uwëI²•xftÃJ†*öeGQr$‘[‰-™&Ÿ¹”È£D%ò·PÄOQ÷JǵD¼Ÿßmüd赉TR7¤%Ó¢ô­»=9龜b•ºèIÒ“¢§›žËéa=W˜î‚šIå|I½ô줧_Á= zÄ´+д*øˆ‚”‚ ¶+Ø© OÁ 2 ®Tð^m ¶*xŸ‚&Û4+ø¨‚K|@Á¥ Z¼_Áe Ò ./F‘bt0t2$ºpq1’ )†n†s°°œÂbXÂP]Œ(³Qf£Ìî@)O+emÃ…¬^Ngê –Æf¶”Ã8¹N-ÆUÌFQÅZ+*™:›á «ÙËb†·1¬XÉẙZư´»ðE†/1|™á6†!†¯0|•áv'®Æ×îpûu†;¾Áe8Äp˜á.†»îqâ“f# £NìŽN|÷9ña“£N\ƒûÆœØÇÚ}8Æð€ŸÅƒlòÃ7Ùä[<÷ÛEøvâ:wâz<\„Ï3{¾S„ÌÞÈìMø®ñ{ù;ø¾ì~~ÀðC‰ÁÆ 3Øå¥¤¹Ä­X‰7…Íx_h,äƒ Æsì4Ç„9v™vIsL™c·=è%. ºóˆßކ/IÄïÈ㠈ߙÇÛˆïËãeT“ç5XH’óIr dðßnù¨Üd“õ˜bPM2s;ò¹'÷cw“Í%EšdWA¤Éî²E!•‰~J1h;[HlAf—ƒTO;òT2«XúÌ!‰ÄÂŒî$%®±?Ê©-Õ?Ω£pSXÝM¹ÙiŒùmÃøÉš²˜ï—ˆüéÛQ5[vTÝä –4ŠÇnÅY¤h°UËC( ¹å [^ÕH`kÜ-Kn¹lpüå!M ‚cƒã¯‡²Á¬X}=NZuÃ|\æ`CÓ4¹Hâíf”¥ôßBŠ? ãg‡&©¤À'°G¸YbºÉ—ÆE%Xê äš-W˜Ž’T¥qßâƒpùå‹9÷ŸWËœ©1U¤ZvËf¨ÜòQ5lg¡ÇnHÙJ1T;Uèû¿ÜÉè,;e'a½“QËì´ØÉèÄNÞbîäµ”Lþf>7ûf>g¹™Ïý63j±™ð›ÙÌŒ®ê¡)S÷!OÃL&ƒòŸÀ"qÕ»à2;ÁdÊ͸Ô?Œ_ÖüjS 8Š_g·JY2q¢„~Ÿ“’¢mð¤ùfû(ïàÈ1½åÌÀy©½ôЫvF³¹ÏgÍfÓ‹“MõJšÂœNêƨ¿ÕÛ΂@9óåU‘Ý’ ©p¯rÓ·OxŸˆEÊš±Ð›^ØìœÍ†è>*„¡+1u´ëΜ¶_dc5³¿Ì:?D7K¡ñÎÀqÌ;‚½M.e¿9æÏq*sQüvSÒº¦ÁOdX¶UÛ‡pQÈm¯:Žù4‰Åï"9ÈÂÐ(~vxÃïq°`/ÞƒçsôîÁ tzš862<¶Û. füN^õö5¹ Gðmå]N‚EÃx™#¢|6 M¿ýygh/qœÛYfnÊûÆYRƒ¿¬¤¤d™4ŠW†àÙ*R+fGydˆŽÌ«aÙ#ûˆñ'œ%7üÊ-Áµb,G(wwy±=t´èSËX® N‹;i¼D ËRØ.…þ±jÅ­ÜN3n[ÎR“¯¤§†žÎÃx4,ÆSa*jú0cæIfôÃx‚™gÂv~gò=U‡pÝSÕïVåËè\©’[u Ž¿êq\0„3ãq¶:lWæ°Wröv)ôK%Åj®yÐ0þV=êqVxT[ÕƒØuŠ˜z»²R¸ÐH†R¹*/ŸÓL¾ŽžÛˆ¶ûmt^ ¿à)¼)À\×dJFðzvªÑͦ‘_ÎIe’^ï)Æ_ýöœÌN²[ØòoìÜ\ÓØÐàïÓœà)ÿ˜î<×T÷7²ôŸìþ¦¦ÜlÓÜÐà_'äþfK÷fFŽœÌ1eɃS—¼97Ç0Á¿³ÒdÃåµ_|W†Ìó¾†dÜ3½ÆiÅî°>éÂÊI¿kÅèž8Ø¢ï‰÷ñ)bƒ¯˜³Ã|pNí•st®Í¡ûð¬}‹?y*Í\Ñä†ëYÍYå¿pÅõ™¬Îëéû…åyïyæ;Æx_yÌ Î5;{•?@Ÿº¢ÅSã&ï->0ÙçFŸiò“tõÜ/µýâkg¹¹àÔ¨D ïÌKa@¼aWM“4âÌ| ­Bÿ¨™«6Psä{–øs¨\¾>ê«ÿm‰?ÐäZ0‚7Ž…ÆøSiþÖI }7„lnyãÆKt)Ýô½À´u—MY—%åyD\9ú *‘0õä¦e'nê=QÓ͢Ƚ PKã`• ŠPK÷™H'ab.classmMOÂ@†ß-è** ~kÒá¤éͯ„¤Qc4–ÒhIí’RŒúÓ<øüQÆi5ÐT“™}æwv÷óëýÔpÈPQ5£/žEÝþCý¦ÛwìPOc3 \ÿpFÕÚ YU³Z {ªáê?ª¡c7|­›QáÜ ¿'ŸôH[T¾Þ1DO7„§kÖY4ÞÑ: %Õ:kµÆCøú?ðm '&´–aJµZÑ‚Üå‹í BWúC:˜rØÎ•ë9 UëB åm kíÆQ³Öh7NOî˜`PD— ¥Û Â&CÛ“>±åJü2WÒ›Wxî›èF®“o9®ehŽ„No|†rJö3\L5­¢k³ŽŽ ŽuŽG‘cc•cyša{P°ù,Cˆs&Îæ©›¥¼w¦d‹Èâ¯vñO§LÞQg‰H”«¿ÊæÊí˜Ì&ÈNì6“"äþé$¡X ZAþPKÛJKRr…PKø™H'ac.class­V xTWþß,ï½¼h 0$K “mc;ª¤ Ð´ …B ð2y$ÂLœÌ$$RPZmÕªµ­v,mÕÐ5h’‚@•E‹û®Up¯»ußKϹïÎð’L¨ý>¿ùî¹g¿g»÷Ís/=s n”+šŽå:Vè¨Ôq½Ž×ëxŽ*‹u,ÑqŽ7)p—Ì«Q0¥d^m›Ùe.h7ã- êšÚ¬hªj4»!•ŒÅ[ˆí%vW•°]«ÀS2¯q™½ÕðVõ’ZÓ¬b1aM 6§¤6Veûë´¢éd,Õ³ «ÞŒ7'¶ ¥ü’Ú¶ª µfsU­Ù^%<û«qYM g–Ø>b hM¼#¢à,Óv1k´B]:5R#P26[æ‡sðkr°jÆ8‘µáÔsòIZ.~#g4/‡$‡.UOA0‡nã2»j mvhr6ÎCü ¬GÅäPmD4‰‘Ɖ ^À²¨5ãU9˜½Äô æ©r‘êÍ\l¨H¢H2ÇÉÑb£?CØÝ/d2—¡8{|)Ç2cÂvMk2Ñm{T¸Hí´HCáiåêuÑꦵCC­†4¬Ö×Р¡Uà i ¶i°44khÓðf 5ܤ!©¡NC“†í¢Ú5lÕÓÐâÇÕÈ÷cÞàG#®cŒÈµ˜ÀØ?êQÍ@¨Ìe•|¶˜ÉäT X:—ÁTDÞ‚?6a’7c"«LfaëPìÇfÜ‚e,­ñc=ûKÛîg3ï Æ®bðZ—3ûµ]-b•B>h“ Ê\É Ä Ä-¶ò4¯a0ËQÄØB?R¸Ì ö‘s tážvà>=¸Ÿ±û™÷–~É|èŃŒ=d`'fìCÌÛË`“fìƒ,„«ýL>ÊØcŒ=n`7>bà­ø(c1ø»ïcpÀÀÛð„=¸‡<ÉÒ§Øì ;ø¸·ãŒ}’A?«<Î`/ƒ9ÒCÞO¸Ÿf•§ Ü…Æ ¼‡ 16ð.<Â#>¼G|†½ˆÀ÷¸Çø´ãLž0ð<ËØgÝ.n^* ³I± .¼ïƒ [ñ,‰:/v±ÓÜѤ¡¹Ž¨;W˜Þì éÒÃtÐ.¢›´›è¨ƒöwÐ^¢ZE1á4û¯%Î$ÚÎ#|Ÿ;ˆÀ®F@Š )í—±8\:€“aÏNeWeý\Ajìg)ž?“§áçmgè?™Ó†îé²Í2é¼’l>ݵ¶ÝäRÛð N —ŽdúìÎò~Š<•†ñ\i¿ð·”A^ß"¢™+=wÑgímlñ¤PÄFq:÷ÉÆëåb¼L®öÉ_¤ )-Æ—ÜXÎ×èT[ôeú^<‚ë ”ÃøÊq¹ÍNÍTM)EÃ2K8-ÆWÝÈz —Qfa=[ v¡’áNÜ&F&_:™J.8|CéçÈRûvòÁ‰v; s€ñÍrň>8ª ÅAOÀ;Œ¯©¨TÃùª³õ«F}¶7iÙ›˜#´FGhŽp¿I®Æ1½ù:÷&Wk<¯̸­ùƘÖxÇiMã«jM}¶5{dkºù·:òouäÏø­rµ^ª5ß­ÉÙ™W*Æ­9Þ‚A|+s]7¡@ŠgKqÀ¾¦쓾­ ß}Ôè—êMä%S[ݰõ¾Cz#ÎÞE«¥óQÚßÍhóPO–:Óä{ácÂa|Ï…ƒR©S<¸#“ òÚbû¤x-QÜð•ü¦œWégäYì~8ƒŸÀîÚÒA|¿À;ˆç\"0€s¼ÿpç¥Öê°BóQÖ/ÏXE/­ù<g€ôÔÿº#سþ0~|œÞ¹ŸÑy¨Õ·;б‡ ÒÙF¬ ÙA„N:žCaBÎ11„ŸÒ™îÅ}¢üç ÝkîP”BF=záEè<ƒs‡²AÍ‘>ËI_˜ñé^"‘—R4Ö ¿÷g3sp³xâÙÓtéÉŸ¹‡?scäÙ…;Dã®’3eA “S:ŒŸ»v\ÛªLZ$_>Úp'õG0A ±ÊCðxöcJiÑ~ñ½îùK‚^Ïü¥ì×=Œ\ ñô‹Ï6]EÆ/Uô+o¸x¿:ªÂ×Çëį+óyá 77ˆßl©Ì#&]ßáw#hDÔÕþuâ|Ïh µã=è= Cøý:Å]G@î¤üëp/ýÆ>¥2·½”›Nû]ÿ¯Üþ@¹åJL ¨œ˜*S³‰½Ñ‚šÌHÏ‚‚ZzÖn£ØGSæË˜/ÐÌúiþÒ1«A•cVeÌO&è#‚x8ì?jÜ5¹*"WEäFÀÕ€!"7”ˆOR@R;…?E|}˜ôÚÔŸ#¾ d¬ÿ— T’Í0OôL<ÏA’ÿU:·P?É ªÜB•[˜Gƒ]§è·KìƒTzœ¢ßèV®¢k ÊBÿÀTQ–¸,ÞLY >ƒ2sWjœpQ¦ö‡¦ˆsÿ›\¬c¤ÁuéC—Ñù>ýÝ…ˆ¯4èÆ?ÓÃAݽè¨R h¢HÌp ®¨Õ?YÀµÒñ¯-•Z&Úyû8ˆ˜Ø‡ÂH§›GUê§a°1'l¹÷cN@£0ö“\í'P5Ø}@¿ƒzy€¾1\[¢ÿÓOi/§?ÒwS‰–ãìU~sfȉ)”-ÿ{üïjz _ —Æ…‘—~­7ŠÇjåËPK‘ËŠÀ öPKø™H'ad.classmRÛnQ]†NE¨-…Ö»S­u‚—T1&¶jBBj#I%>†S˜ sÈ0ôOüÚ§&jê›~”qŸÃÔKq2ûºömMæÇÏÏLj¢€û³H1Díl!mgëûü/õ¸×)½hí '¨žN7ßõ:Uݳ«õkÃÎ67'¦¦LM[³ë¼S­»ÕI÷P8#ß Þ—Ê/¹×–ýªš‘Ô…Íͽª1cOïSu¦M5åÅ즶3\Ï ÓÊ-Ù ñgcG WzC†šçHß'Öö¨ß¾%÷¬'½Ž¤+º}k‡û¼/áZb< 2Ѷ<é‰"ÍiÈ‘ïˆçn†.5ŸòaWîø²°[.V åÊzùÁÆÆ"¼MN‹œV…‡nsz4„|(»GÒ!éÒ§Ô¼\IßÀwyÏýÀ[jÃêº[ªy[Ñ` }:é7#†ÅSe“fö–„è²±‰&VLÜ4qÞΉ%×MX œC,ŒRUa"Ž5•*)µGecy "¸M?°¦Iχ#Ë¡rõ0,c&„çB8b| ±Ì[Ò!´é4|÷@à $%ojÎY ”Sæ± µ}‚,O!h´B.QFÙË0µ½æ38£¸ŠÙðÆùð#ú5~žxmš]T³Ó’íÌj¾s!!KSÒùïHå?"ù¹W)v„{ßÿá—#YTs‘þPKD.¦•’PKø™H'ae.classe»NÃ@Eï8NÂ+^-…]“ЀÒñ’,!°”‹bí¬ÂFÆ‹lŸFÁðQˆ‰]‰btïÝ™ÙÝïŸÏ/ÔÐáã¸7Sù*½D¦/(2N†„šã>lÇ }BÝñ}—U8áyåKçW¹Šg™.Þ½`nÔ½LÇæyè–¡ïŽÍ«·X½Ú¤93Ëbu­E膗22w™éúGƒ^pÜ?;}$$X’±‰NØÄ\c¾q¹T^—i™èÍ'µ¯¸HLª*ÚZÐÛhªâ‚gäëU¶À–Àfƒ°ƒ]XØÃ>aÖø‡Àº»Ô P©-NU¼Ád‰Ó6ëvIêÿˆøCº\Ëì-4PK)`fÞ‚PKø™H'af.classÍX xTÇ‘®Ö̼÷æÍ؉‡4hcŒ‰˜‘#°8á² °9„8fÐ<¤1£ŒF`±±sØIvã#±c'6É'RbI( ‡Í®k³9ÖÉ&»9v½ñæÚdìæ`ëï×sÁ“|Ù/ùÄTUWWwWý]]ýš÷©Óä¢&±Ý um5èMÝlÐzƒ¶´Ö m0èƒV´Ê › j7èƒÞ,ÈÕ0+*hRìö±=±9=±dלµÛwÚ™¶ Õë3éD²‹ÕVïi“c;$Ý"ÈÝ0këR‡EÁ¢˜ÖÓ•\ohÅÚ`ìg)ÞÖëi“æ¸ÙÕ–W±ÁLG“hsî³;ûÓ‰ÌÀœõìu±d<µ[^! ·.ò?¬1½á2U6´ïlÛRâ‚_ªx’¨lNmpæH¤ Ñdo†C·cÎÓ.4XÛŸ)µ°.Æúp}´Œ*zÑ$ y„YVÏö5åô[Ѭ2=el=A2¶[—:» ||tµ6tœßR6qܬ߂´à9¥½Ú;Gè@¢@€×JŠ*I¥‘”Øn†”¢—tˆTI³üv·Ç’me”ûXé“Ê-ʤÐÚ—PȉTP)ÇÒ”Ý*<®á„V‡f¹ríñ{áË”ñzò\n•èh‹ÉDf ϵ,–L¦2¡‰d<´|źÐÞD¦;ÕŸ E;f š¯zû“{Ó±ÞÐ.{ 1”’9JÚv¼éÞfJÄzûb™D*É£šÕ¨ßgŒ{Y*nó‘]–JöebÉLG¬§ŸÛõËRý=ñP‘½éÄžXÆÆ¼<,xqÿöžDç¸Ýœ i;£ºÍwtÚ½ð Oàm˜íuÙI;-ÝRþÆBi™/* çc³Ý‰¾>Æ•[UÑä%Î…zìdW¦{6fRÊŠƒÒ‡v¤Ò¡8{0ЫÂßÌN™¹Wñv2C‚IÖå°ä^¹c¼TÞs%t IaìøÅ¾gTâY2ÄE†w}ª?Ýi¯Lôð>†6tË- u%öØÉP§“ Ûm™#½Ò¾‰?yëòX_wêætª©£yö¼¦æys›¯[xï‡_“d;HÄÙÒ’ä¥Ó±ÎTïûx¬·7ƒÌ™ÂãD'†ÎžT’eogjwo,moH±ž'ž·wÄú{2ëìXÜ QVºM §S 8`ïb0øÉà¹Éî˜]vfµÝ×ë‚¢› þíT»¢kóéÇeuÜ+…Oôø· _À¹ÎõvÚ9QÛøŒBR,C”kR™õý½½©tÆŽ-[}™3¸H[d[yá=T¢rR¯T5З±w—L·¡;Úë,2eü e jÿ c_“ö™¥ÛÔË¿·ð/Í?è°{ø·—wè´]§¸N]:íЩS§{uz·N·ët·N)lztJêô¨N»uz¯N÷éôAÞ£ÓÛuz›NïÒéaöê´S§¿ÒéºuºS§»túKÞ¡Ó=:½ÓOËÉòS/MôÓ o¥5~ŠQ‡ŸvÑFtlòÓ>èî¤Ûýt¿ÓË#î…ôªB³ÎO}´ÙOwÁä>t,§L`¡wšŸö8Òë!Õ@j™ 2v“!-€4 „;ÞGs±x f®EoÍj4«áP-오éuhÖÀû[1={Áj:KF@æƒ, €\ 2ä:% Íð¾Òýôz鬱º7€,Y ¹ d6È,Ø-áY4ºëýô!šä§~Ç&“öÓI“Ð)=FŸöÒãtä ÈYÏ€|äs ŸÇˆç}tžÇ°ç¡{Á¤'ètç crd?ý5zÿäE—Lz’¾»/ÂîK¾ì£§è+&¥/@÷· _ù;t| Ò×A>æ7 }äïMž=xš^†ô-Lõm“ŽaúÇèÐüì¾ òûO ¬{ºÒ÷ Éæ÷áÚ@~hÒqúg“ž$Ó¿ ÷Ì÷¯˜ïG˜êU“²ðtþ ºƒüƯ‚üägˆüç& Ñ¿›ô ú…IŸ¤_Âî?LzŽþÒ™4Lÿ ò+¯B÷?>¡ÿù5fù ÈoM¥ßaµóÜäºG'„€Tá"""%ˆÄ¢ètϰŸ*hŒ>E“Hàô`ä|†$ç3"9'©äœ±’óñbîÅÑ“í;Uÿ]Šß«ô÷)~¿äz€¹ (œ[¹ýþ¢ö›¸ý`Qû6n?TÔ~3·?PÔ¾Ûµ·qû‘¢vŒ®a™kÓY3‘¹áQá"’Ž-§zÕ½áИ߈îÆánq[îŠÃ䋌  ·Ã?)4Ë}Êhõ„#ÃB7 #Ü4,¼aË=,ÌpÀ3,|aý¹byná—`ó¼Âáç„þùÁÆÄ•üyN/ 6"&¸e &¾:׆{„¨ƒxúÈùŸ‡]â²dz®g<)¦?ÂÓ?ÂÓO¢+NÒ“›«Ä¨œq"Ÿ"Ñ5Ok2tˆÆÕäu-nÇ&(m¼M.Xމz7ñÌÛò%„Ì«jä©¥E‚EIg9ÿã°e 45¥å=@×ç3ÝÒK’<à¶<œæÛZt 'ÅÜÖâ‘k˜qveéµ(5ÛË_÷ÖÎ)xõv*?0Kó c#ÁÂÀ ·øâñ*˜ó/εôÚ2ž é㡊PௌÌÒ/}j ™³+_Â^b­‡ù™¢*Jð¡¢ä†œU¿!œ/‰I®~¡þމk4ZÞ̪úm•ønÐó¸W:Ï…•®t$8"fr‰+` ìž'iîe€?ÎùŸù‡žÿ™¯yþÍ'/:ÿðö2*@qïl¶m ÌÇåˆh(|ú5ªä»V›†È9µ+:¦ÌçË)c5’{V¸ÑÕxzD„‡JËòrøö®U‹MV‹™Îøˆ Aµâ[¥#¥1ÇU÷T£ZÌî »Y¥ûpiÞÛ\eŒŠÆ3jϪwL4¹¨ôCî˜ü¶¯.ï×ì‚_äm&)u–æä,ޟ9‹Ùù²ÓrüXV3Þµuò²]Œtñóß1Ûr€| ,¦isÁ÷‡ËÆÇ6ó 6,‹»ßY¦ïjÕÝÁ-8¶ uþyÄ „ÏÐ3ròYz¦=2"æWyGĵû¥–›¯ À[†ÅBeµfrã Z#FW«½¥Û_—%ÿ¦“ôìæQÑz†mCÒ;7×’íã³<àÑ|2¯T•V^iá9rá3p'Ä"^3÷:YXx,”¯ï˜,Ê;Õ¤æ\Äs"ð¹¹9]‹Õ$Až¤B/ž/¬É¹³ÔKóTxØ[7öÖ© cb±‹ä—}“«‰ÏN¨ô"8FW_yËÔø»X‹ñé°|í–ÓŒ‰%”?ŽüÈËË2wø²]–O¡:×õ4«g¿]Åßyšñ\ ˇÞH²Ž¹ð…,/wÉÌ?.£jÉ{å–ÏÏ´¼M>!´q½¼á³›«ÌQñùe¡’—_?Dx%+üRÐS¤žŸ¥n~ei" ¥,oYÞ<õüT ؇š,UaH°>wG•zå`Õ¦n£ ì“{¾EŒCªvùP»,7׌I‘à ñÆVOÀãš½8àqÏ^Ü\cbiq÷TçälTîšä“³L£AÁOhöa¹ó–Öó#b…üx,Nþ•ÛZ¼¬ä‚zà qc«0[µ§ie@Ü$½ðËV/ä›G/£©?MZ@?ÓjÚC׉õ46ãÈ ú„³j½ËSëV{: ×ê_çˆìQT™nˆžÞ1<=é­¨V»“ž©òª%cánê¸£Ø ƒ1mÌp9î½ç» UëVŒáS6ºÚy«¡µ.´«Ëg&2b@Â&ak$jèøa@e¬G•syaÓt#OøÞLØIÇÚϸ7‰ù!ŒÍÉhF±Ûûƒ¡œ²Í‹K饣|úhl6å¨r¬qìrlsìp¬rlqlrl( Ç8A§¨(äè}è?bT‹%¢9Š{2ÿˆBû8 V"™S~¹‰¬#/3"sÇBÊQDá9’d‘v Ë´f°ò PKÕ÷,$O6PKø™H'ai.class•T[WUþ&& Ó6@R°!m¸Õ0!@PkÛPZiiEC/DQĪ“d CC“¼ßo?¢¾ùZÖ’`´ yªkù£\î}&!éRÎÞçìóíogŸ3óç_¿î‰8~ðà Îèà´„@t0µ¬­k#y­°8r+³¬g­äÑpÚ*…Ťș“àŠ.LÚŽäh*3šäxo4e$í´’ž]+Vy$Í}V+äÌR£õ¦›„¦Œ6ªàøÅ&ñÿºÏDÿMãñhj3™Òr$ÌøG€Ž™Ò–DÀ]˜dßB^(•y2]Û¾eÜ(Öõ骙Ó%ø¦6²úªe˜…ŘˆúI´Φµ¼YÔ zQãýHA×s¥ˆ) IS´d˜(ÒæZ1«_7òÄç೜\¸¦•–ÌÛE3>—‹'ÆFÎß• i„ЄɲYbcHðjÅ¢VΚ«eÂd(˜IЄ îlÞ,­”£AÞsÏ(hyc“C”,Qn@´Í0©aEƒ÷´ é?hóUæ¸iZéµÕU³hé¹ý3Kè8³“ýGoþP(].YúŠ„SO¿0’–§AÞ[Ð7¬É²¥S¥÷i°'>iÆ:46hlÊ8#£GƸŒˆŒ!q§eôËHÊHÈ“qNƨŒaC p³ñ(£KA:yF±³p*@HÁE^ªpðÆq6^Þp3˜fQ› UÁóð+xí¼ëRð›0^Ê vñn‹‚ 6U;›66 záóáfØÜôb·ØÜæåV\fswx9ËËY^Îúðf—ö‘y͇kx7æ÷›7Ù̳y‹!D0…nàm^Þeªwx÷]N{Æ&Ã&Ë9žélî±Yôá,¡‡’/ÁW‘¢ÿŽÄ­ÈS÷„§¶‘ï µ—ÖAZµ‘—È»Õ[€p¢¶ÝM`y¿:´ƒe5¶ûj|ù:2¼O”¨ ÑŠú3î?® z‹4ÉÛë|¦„z:Ý&àôyòò3”¾º‡‰”Mѳ9èyíá2WL"LTE_!=´´ž ÃV¥=LnÊ=eNÒpQ±«B¯·VP%åNò§©à³q!I­`=VÅ7ÔxckŸ¡…ò¦p]´Ñ]ãÖÎì;(o*8%zÿ¿ n6+}jÁ 6¹Ú >¬w¼Çj\qJa==±?pì7LÍ·K;øèw¿ç±g&6TÁÇêsh·‚OkÄ„8&é1 «~ *>¥ë®à3©ŠÏ]8|/Ó³ ˆÚú|ûyj"_€ÜC÷ýſŦ<„ùòsžt6Å|UÇ8ø7RÃÜ F~‚I’ÿõx¨å!!ù!N„ü4õ†üòèµßY¨vZËÉf·Šo\P%zqõ.PóíuQ¹ËâíǺ«øÖ‰­†¦ô‰¯’ñµï Uà«øÎq>Mƒþf5ÍiRïfí¬ùœ+è"©AÉn ºX· ïRÃ=üIt Ùá_ðýOØšÂúO‰Ötÿ PK(3O±qÂPKø™H'aj.class•TéWWÿ L2Fe ¢ˆŽÖ%LjÝbmD—š–šRÛɃ!ƒ“ m±û¾ïßì·~ÕsjÒúÉžÓ?ª§÷¾ @<¶'çýî{÷Ýû»Û›üõ÷wáC?ÐÀv ¾HOJB{¤'=¥Ïê}½8ÑwnlÊÈ9‰µêŒc›Å‰„ð‘àôŒ&]A ›#i}"‘Öó´ ¾ßI› ×½däʶéÌõexc\ЋykZi‘õqSuT)6GÖgÃúcuôÿE#òßyTŽ›"éyQYŠ bE««X*wR(#£I–M$E¶2oRÞ•MÇ͢霠ž ZyC‚2t-gÌ8¦U,I8˜*ªç“C1Õ™4ÔÔˆ:].9jΚ6ÔqÛšÚ½TºjÙy•rSKzÁé%*ÎAˆIž %&a_†îÔ £hØ:³«EÃÈ—T]µEQª%šJÎJÆ*Û9ã”Y l¸£'õÒ¤uÞ¶â#ý½ñþýG\’ éd¡çÆ&¦.Kê¶­Ï嬙92#åX?ÃrT~®`)€DÞÉÀ¸YÔ æ<«ˆF2顉˜5ß6ùNã”ö¬Œl9ÎZN¦<3cÙŽ‘_î„¶5f®sóÚW´J•™+9Æ´„m>¥V E2X4®9É9Ç 9IWh±$>©Lk–ÖUZ×hÍËØ-c¯Œ=2ž‘ñ˜Œƒ2vÈ‘ñ´Œ‡dì’qXFBÆ2—ÑBM ÁTt…°ÛxGº(ü!hØÂS|ìƒ/63(l·•o›xGǸË á(ZBˆ¡oC8ÂcP±‘uö:9„.iC+C{û°AA/(dHâÅ Nb„á%>^Ü€!†S¸ÈÇ,³|Ì*8,Û½¬Œòí+|q‰w¯ ^ãÝë :ÃÛK9à ggÁ¤ãl2¡à,&™Åd˜b¸ÌPàÛiÞ,†Ïã vC ¸€ ýåIÜX€$õVHj*É0YPóéÜA§’ÉF­ û Ãhö®÷¢‘~ÀV-_Ä`¶ŠR޽²¶Õ³K.ê2c¿Ç¸—¯j¿¡ü!5Ð{¡Í¬{ž­¾%w:¥ÅîY’ $Ïûü}œL»mQ—ã ÷1Äá“PÕ›¬>EùÐqáZX½PÁ[÷ñìm,DoŠ0[hù)XJä«xãT ä. xÙ8­÷´ ÞŽÖðN#´h¬Šwo-“ÈaÏÑü¸©MQØ+<(ˆªxÅM†…ùþÿ÷ƒúqãûa½¸½u&^ÁG+ãÛä±uP ˆt¶Uªâã{«šç±i¹¿[DôOl\Äp¶µ¡ŠOî5îÎDc|ªÅ|±»|vkÉ0­=Mè€K]¨ásjl_p;*ø²†¯üX=Ãs´S%/i·&eÙû¦WØ1jÚzz1_¯Ø¯ËC6߬؆»5|ï‡&Ñ›]šŒ†V¯MÔiîµøz¢ÛkøÁ‡Õ£>ç½È¶ÍÒÿÈY¶{Ö[¼/oƒà¯áǬžÚyZôëÕ˜ñþNs‡üa?•¶%ì§2[Â~®S!A…vjÝwünevÿŽŸ~E»[C÷úz»E+wþPKÅ¿%O÷¸ PKø™H'ak.class’ÏjQÆ¿›ù—Æ´µµ7V3ÑQ«NÒš㟊 c… H0RÐ"dšÓÑÉLH&¥Ý¸ê ¸/H@è¦ ÝXP¨{ßÂðŒçN¦ tcàœïÞs~÷;g ?~=‚„"òIœIb:‰É$N3̘ù'o¬-kѳüÖb=ìº~k…A2ókQ~É ˜Õj¾ÊÀÍ“¤ 4sýÁˆ˜‹NÕÖsšý®î,ÖÅÁyfùvÐ^˜b®WÅCõžë»á}¹ØC¡ô=ÛðƒÐè8Ý×A·môýŽeÛ4é®áú[–çÚ¤~¸À°ð_4ŒÐ¡©Õí¦Ó ÝÀï1O–º[ÎÈÏð¿na`Ä éÚãJýfíøšªýnÓyäz´jfý¡ÕÛ jÝ ¸VZX*––n”îÜ~ÅÀ,†„õV$O¤6¥eª7)lŠž†srÎk8«a6q¨id§±.àŠHs)¸Š.Ñ…á2”`Êt›"e¤Êü!®}†ø‰v‰¨!M¦D{¾ð×GÌ…LäEŠ ’±Ù,ý7$ÒtvJâ@Ïêû öÌB‰©Éx¤4Í>ÅM=ÚJ4'âfB:~˜Á©x™ ™'Ioåö0þ Æ‹éÄ!Ìï\Îq¹c—ÕœÞ(kû/p«ïŸïjŒkTãjc0üÅÕƒ67"ëTl½MÖ*©'•e=×íÂÑ ž!‰…¨¸<…ỲÌey€1û1Fdè´…Ý(+ûȸ¡\þð7±«0®Ñ`øS°'÷™þPKÂÔ ÊBfPKø™H'al.class;õo×>f]NF®àüÒ¢äT·ÌœTF±h—ÄâŒü€¢|Ý0C=#]C#CK‹XF¦ÄT‘ÃÈ •X–¨Ÿ“˜—®ïŸ”•š\ÂÎÀÂÎÀÊÎÀÌÆÈÀÆÀÎÀÈÀÁŒ@ÈÀÀÄÀPKÆê* jnPKø™H'am.classEPËNA¬Y‹+(Ÿ‡õ¶Háä+^P&$$†x`ÄUØ!Ãbˆâ_è‰D Þ<øQÆ q’îꞪêtúç÷}†ŠØa…!äæ› a7ߪ3dÝ«þÄË}î÷Ê@y~ïDÓ·U×=õ|/8#}Mvƒu1éˆaàIÄPªû©”èŽ?´…rä3äŠD ÔèØ“!‘¢ëøÒ%r7äXuÄ¥×§Q¹Ö9ÝËk%‹ÍJ©Z¬T*G‡· Œ3|@E›Áž¯çÉrC(÷½gÞÖæÌÿÖµ> _ü²GŠ‘‰”‰´‰„‰¤‰õ8¢0t [È`Ó‚­ð²ÔÈa ã0-¢lR—"d„‘ý)¶ß ÃÚ\¤éä’‡>­×%G„ìšuHgÚ…o¤ ³$>`ߤÙ;_‹Y1í%MaQm`õPK†‚éH¢PKø™H'an.classVéWWÿ Y&Ä `;î!!Ap±DE F±-N’ †™8 íÞº´Ú}·›í—ò¥P+p´Å~Òsú¯ôœþ mïLqf¤”j–J®Nì—óÃz¯¡Gú£M‘Ʀ­{vŸ°Âö}•%èeämL4º@9—S´4©“¤I²¢IMe©t’i_–¦"Þdh ÑRiºæ ªÞW UΪçùsHWùðàÎÒ­âc¹œn"ó0R…‹ÜŠÁ•‹«¦í¿QTÃZYZ£´(£ Ó:K‹îÈSÐKñâ8_o?!â9="^qDÄQÇDÑ'¢WÄ ûD´‹ˆ‹q@ÄaÝ"º|èÀ^:Ñâà LBXîCk‘ìô¡­¨[ÍÒÖ­b²™·•ë÷áyTûðoÛ°Ž­µL$&›˜˜lä3È¥+y»¾ Œ2јè^œBŽÉYÞLò^ ¢àÅiŒy!cÜKºW¼Hb‚É9/RlMá<“W½Pð»¼Îä vy“cßâíÛLÞñâ$ÞõBÅ/Ò;Œ‚sYNÑ_ÉœAnÜ6@œ:'`|LÞií’]@#ÉeČɫPŽ:,'ÍVÚ5À þÙàüÝÙïp»…‹Î?p²ßáâ·pÉ’ËH¾|Ãtw+˜¹@ÜšÁ{%s«­ù}Óì°ËH¹7Ä_& ¡m$¾8ð7\™²ò¶Áo™)ÔA|™¯ÎQ…]ŽÖI, ×ò¾¶)~¡L0ŹŸÿû'\ /çË&8ü\‰ÿ~€Š»ì÷;fðÁ½Piçä]x©§äÉî‰ÍNÇN×$b‘•®¦XJ¬ž¤Y|8ëY™ÅÇÍî€û>Öܬ˜Æ'·q¥$zWî©“p\p MµMóiw‘ê÷»fðYhŸûÝDÂ,ˆD¦ñWFÈ ß4Õ\ÂmÐìhƒÕ‘J¹ˆw Ý¡šÊ%•Ë„Y|Ù=‰À ³!§Y FêgñU³3à ÕLãëI,-ÚÊÙpN¶e¨ ËȘ¼CôŸÙvì¢)\X€—_—U@/•ã&¾?4ç¼—0Uº‰Ë•âM\¼‰K~!™Æ7|â6 Í®ƒÀ»Öì 8M"pMã[K.^Xéœ4 H +ÌÑi¥Z„°æk&6˜UÓt3 „åw³øžPõ{‹@NYÓwKM~˜9݆g­BÔ'¨® ÕøÃé_`fÎãúZe:FcÉ37KÚhe”¬’ªÂ÷áÏ]ãñJ÷û—ÌàÇ{7mÒŒ«²ZÙgwS(LãOCÄÜœs"žt¿9çá‡Ã.ûߥ7ÖŠµPÜÓ°Yg+¶,oØÒM_IÛôÒHî#¥ Û”Ô´ýPÎé¿ÒÓ~êÇžÒ™+ÉÏÍ)ÖÙ™¹3¿;3wîÌ=þûÿ¸/⸭¢KÅaGT<©â)*v¨èPÑ£âã*>ªâÇT• kVY³ŠfÌVÁÈLͱ5þ¨9ZeÒÔr朕5ËZD‚7Ò>$aW¤=1EðCÃÎJVJ–ïÆ1 r¤=Ý/¡•˜èñH°{ÙbOÍZ6³³%«rñP’sİsÎL;z¬†ü?(…PŽØóü{žÏ™#=íg%Ä"[O²µý³f‰Žø°+ü\ÅÅB¡v»éÓCâL.·ºê.H·4¨Xîž׿$æÅ™·³0¨˜\„1¶¤û‡øök‚( ë%Ú¦ IàöÖÄDÆp)%ÑÆöLÑI ×ó—㺨†Òg]´´5Mw³¡¨§3Sf¶BI~Ààä@8©¥.µSz³˶*Ǩ^½uaOŸv2Ùwbp$® @œJC<Ì7ú~WªußIìZw0/ŒÌWWè8 ï3 ØÝÃë=]ÉKIˆ+×îÿ+*¶S¼Qò ªµL=Å¿R…â×£÷°í¦S!y ×îê•WÑe¼}*FAìaÄnÙ{Ô·€çã­¾®{ØN,FÒ2~ž Ë1VÆ—ñ‹nØÿ7èa?+ñË[¸Òu WÃþj·Ÿ6®\ï^òIbqÿ:G½'ò/aA_įC ‘( *‘Eü†3·P¢_±^Q?gšV|6½~¶:›øQiXoó¶4IËøíðÂ/ˆ“5±Ÿub<¶ŒßuËaYo[Ä;a¹J^<bEaþ(Ê›bx0k±$•"ûÉö}Åw÷ûòêÞ.ªŠ¬ËÌ|¡Ñçôÿø¤jL—Zšoàò ¼jŽÆñ{ÞrM´³ë/˜|Í,ý“U©ÛG¾–q½ÛWSUÂ¾Ûøƒ亮•I;ËÚ*i} ­´Xû® LÍÁmÜðÀ{•oº˜ —póî*@ìº÷Ö¶1àΧñ7`—pkc©ß>‰Ño#8P¿“²yˆï7²ŒÅwÜoC€šèW|×jñ£3Æ­Lü…:Q„â¶8Xµ›æƒ'$ ¼n^±é ÿp}¢ŽÕ'ªKÒÄQ¿2£EýÊã]›¯hm¾þјüÔêäO“/n½qêà¥Þ¶Ëê’w˽Rµí}õ” ÒÓ]·ÅVÞÆ“¤ö•°3Þ*ÇZåãD¼£—d©Un»vÿŸ h^Sð¤ü;^­U\¥Ô/bŸ‘ù:PUÖkñÈígÅ Òû)­–„´¤{Y¼ob_¨l@Í‹(»Fiu²{K”ñ-QF6G¡UŸxÕûÿPK"(ŠPKø™H'ap.classRËNÛ@=B¦@Ë£ /Ê»c „ ­¼£¥R¤*"±ˆÅbâ˜`äz,ÇAOcÑèG!îLF­I7]\ß;çžsæÎx~?>üÂ*¨2Œ §Î° œÆ¼•ÕHÆÝêYû&ð3wnfiw]£¹0ßCQ8숆ŒÝÆÀm´Ü¡¦øý4Ìî«M]ç2®VjòàÉ\h–ÒV-Sù‰é–ÙhhE<óËÜr¼cÍôŽëZ2§‹ºekŒ¬_`um9.<#˜<¹óƒ$ UÜ£ESõS?øFâ÷Mö®ÕTU.jû‡•ÚáAíËçK& 2¡¢Má“—©˜¬C¡óE—âš"¤›6S‡ŠÎŸ†2 ²­7Øü{˜¯ÚàTeÍ~’¨4 :¦b˜¡ ų£”¶Š(èìŽcc“c‹c›c‘cƒccµÄ°‹=èuì(Ê(”ßJWEh‘ò'B–lg™^ óUŽ!yk;ïh­ó{”,sÂä/ã¥ÉK˜4yã&´;”1mK4…€c°¹ÜnCdêdÆê_ä:;™µžïPÌS]ÀÂPK€Ÿž³&PKø™H'aq.classÍWi`TWþÞ,y“aB“a) M H2“°Ú†F ‹ƒk™$šÌ¤“I„€Ö ¢ .´Z¤”ZmQeR(Р¸…ͽw­µÖ}/žï¾7“—øçw¶{ö{Îäìëσ…šÓ…7¹p‡ s\XàÂ[\(u¡È…{\¸Û…ù.Üî›]XèÂ]˜§Áž—_ª!+/¿l} 90­.^;miÕú`u¬¸¿¸< …׊Ø)âæbe[¡àj ޼üÊùD¥ô7%¯,..«n(6ìƒÕMÑPlã´rÁåpM¤¾˜Ö Íkhù ­–ⲪÙ×TÖE9¢(¦ÑrÝi´\W-7†&5!ÏÐ EÌÖ–†šbÒÎ`ÀP½¥¿ÂÒ¦X_ oÞÀû 7/ˆ0¨\ôÇ "_­nnÜ '•ó‹NÉDó‘y,>Р`–fíÆ@·)y•óÕH„ê‹VJ¦'CQ¦+Ó ³ŸL)¦Ì …C±´‘š †´‘pc,ŽUêš„wß³¡:Ø ‰TƒÆÉ. 7êB5¹ªç¹eÁðÚØ:qžßܘ&uCJ·Î{O•IÉ‚Ø"IS¶0ÙÃÍŠl)[µ$²,P#-5®7—…†$nK°&·6Ím ­ ‹;™–á$³‰Ch4£¡ÚPu€ýÑ0é:´ÄÙhS-飪á¶Áú&›7ŒR¿@cW•wy¤)Z\ª“+ž¼b]¨17ÒŒ*ÃÜp0XÓ˜ȪvæF”1²qüFWÞh\YV̘:³pÆÌé3î¸ý>™ ¹9[ H!h xPäUBTÍ ˜E0›@Ô´j¹¡êºHXèÔêH}C \!–š4"£&Xhª‹-jŒdLÙJ¹ð`B¨ÑQ­Wm(¬ŠVz¤Éi!ùÖk•xJ—&GY–sÈ÷CÃÍC?2Ò‰Ãré5CªØÃI½Cº€5-‰ÄÊ›"ÑX°ÆvT?5ÃØ"µè¦÷ŸúˆŒU¯N>ÉM+-”Þkl}T>®-;Õ,ßùZt,ѱLÇRt4éX¯c‘޵:êu,ÖѬã5:ªu„tÄt¼]Çrå:Þ­c…Ž Žu:j=˜Ž,ÊPâÁÛp§(ö ŒÙ”e‘½Íƒ:,ò`%2(ïÁ*ÜåÁýTYC ¨"¨7Ìòi–I=ïÀD*öà>Ìõàtµšž#FÜ7ø |ÌeÓPSéYQ·äП—!½d'ÐU:=§“C÷Š* ˜F0Žàf3ʃJÃÕ76bW*ZðÁ£Ÿ ø$M›ñ˜ïÁ§xði·€]”íæén7ÞK°{xº—à3û'ØOðÍ”¿´}rÞO° Oº±Ÿuc+ž"¥ØÏÑâó­n|_pcvÑÁÓ<}†fÏÒËA7¶ã‹d¿Dðe‚67v²vZ|…¾Jö-”^œ ƒ s>‚Ã<èrc'Í6ã9¡íQR_#uÌâ8©vÀNà p¤è¸U7†áãÈ‚Æi¢Ja™)…ep–!PX&Ba™%…ט8`â*×™úõ&VxœŒÐláf29¼.|ƒ…¿*üƒ½¼Fý¨…—×Þ&|ÌÂÛ…o²ðŒ¯ÓU}3D’!Xc|x¾P‰MGžy'}qœòÆqÚçˆã…„IYÒã|1¡Ç"1éö©nxˆºpFþÆ:„“² _WüÙÃø†O‹ãl²¦â‡þlüÈ´¬êÄ7Ë £ü†“oi8ÍLL…Rb‰õmŠ7IªäOK¶Ä=qôŸ‹ãñù8Î_ˆãñÅ8.2£nd=ÛïœÀC’¹Kq\"~A²ôû:ð]›ÊuGI2~Ÿ|勞ø^o“&›Eåà ]Ž‘õ"ÖÃdýÙ]ø¾mZ_ÿ«‰Ë4ý6ý».ü@C›D9H‰Íãû“.rÍã,=ƒ”L­T~ØëlÍ ¥¿?êÕ ð¼ÐÆwË<®ŽE/âUœSÅëy[ö$èØRæïÀ3møÉn%öÅ8.¿ÇSk1'¦§ ÍŒQ&Å$kL‹WôÚ ÏÊ#Ø&Só³ã2?oWÙ9dÕ?hiì61ˆ$/n¡¤HwJ¤+gàh÷ q™ÌaüBbÚç¶"ìxûŠ­š6žä±W_cBW.·'“šbúœ+>Yøô„Oû]¦“lqbÓ²:á®õôÎß,o¬éImå—v´'Ç$E´Ƈԓå3-^†Kf x‰£ûŒREòÊ'Ï  Ìt·ùõpvÃë3Çò¬½ ¿²C–€ÓdÛ±Ü ÒO!í¶¯Ê´wâ×ÇéøÚìSÊÌTKŽöo](1´^Ö³Çjl/r´b$­¼iŒCó:ÈHg^õÙY—ÝË9x;Ve::ñ»ãŠr’JöÀ%ýÙ!¿/V}Ë6»#R¾cŒ\Ð…Wlðù ;ðûö~†;UûäwÚ0Ô¼ÒWJ9YK-Ó6Ï2mó,ÓÆoNâ³Pýs%¯7µÏõraw¨*0CÆE–"øiKȽ–{-áHï2¿½9û¸Ýæ”KcýÙ9]ø»¾fÁ±ÍYSäP­0ã—Šœ­¥:æôgÏZ±Õ©É{^Ç«¯ø¼“’,Æ=ĬÜ®öµÐ,ç RU9-åt[Ê!}Ôüº-¥uß𾎸ž}•–ü#EŽä¸ÚY¹1+N;ëö:ûîh:—Ôë0¶Ôs][:ö[úÏ¡¶tœiø¢±¥8gÝÒÁWï_íÞÿÕ¶¹†Ø¶úÚ¶9–/¹y–êrÒ†¸¦Ä¶U$·­Óܶg-!÷YB’~ÔüöYBî³lÛè>Û–>̺¼uKïÝ·›®±oüm¾Õ,h¼ùGÉMò¿Ë_ ÿñtâ¿í}z°M¾·‚?ê÷þPK6RG‹F ŒPKø™H'ar.class½V|WŸÍíÞÛìˆ.° èµôÇå~„æÐ´½¤Ø@Ž‚—Xãæn“\öÂÝ%°-ÔjKÕjQlƒÚ¨­$¡Ð@ýAZJýUQêïßZk«Öúû£tæí^¹Ãò‡Jx3ó¾3oÞ̼÷fïô¿àŸ2Ü Ã2ÔÈP-CH†›d¸Y†[d¨•¡J†bɰX†¥2¼Q¯;žvÉŒ[ëÕâ ­-¡»“†[3úÜÉvw¦SwÇôÞxTOW¸=Ø<å Ø=åZ°Z€Ù(lÀu šÑ±0œIÅŽjnµNÑSÞ²Äd¸Æ…,Ÿ­èi —ÌÓ¨Õ´l—LÓ´íIÅ3} Ã$èk4#–ìâVdŸâ’¥tu£Ö7‰÷NJ[¹4ËÓ¢EŽÍ‘=ñêfžß“UnRKzÚÛõ†;'¯ù¦jJ0÷*͇SE®Ë«ÈW#oË|að3¹lcJÇîiYÒ`) ¼l(4˜Eâɹá<.6çóG‡ W[NËhrɽ%O ßg«'OÒy †–æ<èe-mÁº¨´«Ú6èÑ ±è27G܉ºPŽ5©‰&âF<³‹Wc jÝ+µõËZkÓ}]]:.ÖÅ»;õ”;É7¤'%Àµu«š*Ri­bCZk×+VÔ¶Ö&:4}ú<¹†“6«µX  G;õ./SŽiÓòú[˜žJô¡nćÔÙ•×RKo\®zJË i}ÍÄ“_ŽåªÚe«—Æ;ôtF€«òj§…uõ%ŒRf¡§ÂÉžT4YÞ ¨Ó êTq#ÑŒL\Ëè~w±ÑHn6ÜK–­qkÙ4Ý K+ÈmŽ}[ÕÑÜñ^Ý@3ÿ%Ì2)ÍH·'S]ÕcÒ\¬KÆ0æuIÓ~–èÁùܺdO"Æ;iJ×b<ž˜–Ñp…²lKTï&'i¼;ø0œù^¹bV£>ž@oôìJ[–jéÎäêT2°®²"¨ ^_yÓ· P’·M´4£{ -Hdôe׺»u#F³‘4‘ ‘"½D6ÙB¤}´¡ÐVI„|´ÑÒ6t$DQˆ"(J=B;Ž8â86à‡‡ObãNŵD|+}W0î Q×%’†n¢ÅÓsÁÌó7`t¾mŠ7YÀ;*$qtãØ„ƒôTaÌMÎ$³¾ÌRÀÔ„­ Ö0ØÈ ‹A ƒ·3xƒ>+ zt3ØÄ Í Á Ê Ì`5ƒµ " pí­ Ö1XÏà­ ÞÁ`ƒÛ$l`/‚Vh, Þ\m$ÅHÒIj'©ƒ¤N’Þ³‹ É$s‰xˆTA³)]AN» „¦×YN_»€¤k»ŠH¦%´ùœ"x \Y›ÍeåD®#E9/Ù5TOAÖ“Ä×É®’ÈÕD®§=æ‘4ŸÈëŠÀ0ýù aÜOd‘ù8‘ýD>Aä"*°ˆPpúI"Ÿ"òi"$ò"ŸUàÝð9Zö0‘Gè‡Ï+ðø‚ï…/’ÉwÀA"à ì&ín8Dä°{h£=p„ìFˆŒ+Dìa"G‰%ñ­*‘BöÎÇÔªD—¸/GåË!‰@U2Q²b¦J•0Õ[¸‰ÝVÅ¡Tµ»˜*¹Ø¢µD1=&¸˜K8ÿÜ MpåÀù—Tû*]HÚLd'O®â¢ävâL{Õ#yæâ#yæw$͹G‹­Z– Z€œy}Â|ûà´oç)^‘s~m9ç×üŸÏïì¥ÏïlÞó;ûÿ9¿æéç‡X JùÓÒÁi½¼ êlÈK½#ðFŸ÷0œƒï6ù‡Ö ôµã_?ç%° ë"`grM)R?ŽÔMËèkÈzË0ÇRWâÚðT?;ŽÝ¤Ñvó ÌòÍ£ù¼`xWÀEÌíE_Žûá§Žs½S'Ä/—u$§1.†|Ä73ŽAÄ)Â÷Nx³³BšùÆàûM~Ü쎕^C¢­J„HÀ%'`&2?Jcðƒ°*ú ŒÁCvÕ~ ‚ª€øÑ8§Ú1® ˜•Å~|žÅò‡ìè`|pÁ‰]’À'ç¢ÝÁîˆS…Ÿ`qêt ñ‘P„d~F‘ñ*nÅ¿]Sίg”ãB+Çzë­…ŽÁžÈ(ü|eÀ[6¿†ßøÇà—!Q øς٪HŽßâx~~­Šßò¯ÐoËÿÜÍŽü>ï¸ø 8¼>?àwCÞñbûäôœJ€$ ùñéa˜pÎðFàEÚ‚4ªh >ÛîI'aÛ€×Þ†•ý}H2¡;Ué(ü¡¼b}?¡,€cpW$kg*Fᥠ±Ó]£È›³‘ …Väÿ2ƒ:3 Oÿׂº× Ê+eQ Ñú'DíYÔŽèÝ„¾Œ(Ë¢ Ñ{ý3¢r•ÝKè_ »Ò4= %ÈÜØÚ)kÀW…¿‰—[ ÖÉ£=‡*B~Æ,ÐÃð䫈~0`´’ÍwÜ [;Ò‹8  ÄÌ_ * ‡d¿*“çÓÃð”`:.T MÇ’h9BŠUq%½Â+®2,´ñ[ äÜSI†ªC•èÁ9¦å‹m!iµ ? fÞ5¨£æïö–+ÅŽ1øÇ#ëy?˜I¯nŠÈ­üû0ç.¸oŠï~ôÝmµžMOYw_3™] ,ÙèòÒ°›uÃC  ÁJ(¨m–d‹a7n6ÁhÅÖÚ—"¢¶Z°"5(´B% äa[TlkµÕÚj[ÛZÛZ[­}+šžÿÎÌf’lt¿oÎ=çÜó¾çž™=ññ“‡ÉIE¢J¥Å*}F¥å*­Péj•ªUZ¨Ò'Uú´JWªt•J«TZ­Ò§TZ¤R¥J+UZ¢Ò\•*Tš§Ò|A΂É‚FL®\kŽM©%ê¦,^½N¯I—õeW¥SñD³ÝÌn.“ºË$\)ÈU0yÕc©ÀR³î‚ ¹N(¨Œ%Ê SzMS*žn™RD_KÔ&×—ÁÂR)‰yk,«ŒµdøŒ±ÕÀàÌëåö‰ fœUãe+¥ªO¢Kgºñ¤™xE¢¡)ÍÉê1Cõœ¾‹›Ò½%üý«~8 ¿" «¢Ÿ³ÖH:+ŸåGeã#¡ÉY6²ˆr²È®šc¯§€#²•YûÀÅü•[5G³,³•8% è‰I)c±‰«8åѱÂP)f˜ :h2ÈI“ÛfL>‹¨µ r ÅlZ¹Ìˆ'âéY‚¦—ljd:Ԕ؊5„®Ñ[ CIyn¡„®×62Ü‚l–Ž'Å‚JL­3Ñ™d×I¯ÕCuñf=m–M'C±ÐœyKXÎUž¬Õ )O&Ó±DzY¬¾‰é`y²©¾6d‹•KšÒÓ0ÀZÚ¼ëjô¸j$8ÃÜŠD3»¯ É~Í¥c|ã{3+õDÝÚtVvz- ÅŽKv½d‡Ö$S¡ZvÝÒ`&6°˜ž°‰ í%†Dð9ñ‚a —^r³ubðT=ÄWŸh¡E\› «ìz­ ñÙ7dlså™B±z¾ðµ-=§×rg›»ñ>êµ–ú¸S pî=q ,S<°P¯"Z©¢ âöT'dß°§ÊꣳK¡ª’M©}~¼ž{mÒÒµñÆP²AOÉæ5»:JÉŠ›½ÎJܹQ«æÆ×&¯L%‹–•O+*™6µäâ‹®æ.äÃuÄt€ß¾X*k©I6´€Ñ¸€yb5#«K¦°ž¨áwLM}2ÁxNMr}C,¥/M2Ÿó^«¯‰5Õ§—ð™IqåÜ$ºÅ@¿†‘5üšXOÈ”™¬ã¤ëôôB½±1Vw¼ˆó³NÐëP±8s¯xšø"áÉ3ð;„ï—µY¥§Œ™°ežØÓêåÈ’Û´ª©¡!™Jëµ6·#úˆÊ6®MvXß·O/–q¡z³ZÓúú^æ–®M%7NêVÏK6/Pý~®å‡U`Ø ÈMü4ó³ŸëªShBq…¾¦P½B_V¨F¡[jPhB …’ }C¡M ]£Ð= }E¡Ï+ô9…¾¤ÐÝ ±… ݪÐWºY¡/*ô•SžtªòÑzZê£Ûè Ì»– }´‘j|”¢1ào™Z rÀ7”Ó¦æ@MbQ€ó 2–Gƒ< 0°Fš‚àóÑíÛ ÐBgƒ7 ~›è£ ÀZnØp#åÃcTŒ|È}<޾ ±Ük4 àB˜*v1À3f”\ PÀrŸ…e&œÝ©³Xx-aãÝCc}Ôl8š®ÑVjÏ¡mÔÐ p¼./ÝG]}“žï Æ ¼C^ºŸi´`+=…ÝÃGŽxZ£Vú.4¾ð}€ã^zžÑh§±ñ,Às'`ôyìþà‡àýà?ö"ÀK?A,2¾Ÿ¼ ð ÀϼÔF¯ü௼+¯h´‹~©Ñ£ô+`’ü5"}à7=F¿Õh7µÃüï°û&ŒþÞÒèÛôøDžxàÏ(Äk=Nïüà¯í¥w±û:4Þïoïƒ÷w€h´þ Ëÿùo¾Cÿö_' €Ààð(ÎnþQ Ko%=Aûi ܨâŠÈ•ï\¹ÁäÊÝ&W¾r½Á\o4צÜM&}›\´‰WA—#"qÓ·ÛèJ¦7Ûè…Lßa£1½ÅF/fúN}%ÓwÙ諘¾ÛF/¡ œ!_æ\Ɯἠ#ÜIì#’–³±baTh$¶Ã‘vú0\ØN'îvúÈ’Ö3ÆŠXÆÆ±ôÇáýôáqòaé¢nþÀß/Ä^ìªðgmO¡ù¼$9KÝp·•nÅ‚0 !©uE®è¾#ˆ÷ºÈÈvª…\…p9»ÄP7•ºŒ­³äÖÉ"'ºÄ0•ºýîí”ï,õ´Ñ°H°Èô¸Å!ü¿»µû]¹ãe¾|¿š­Ý)œ³ß½ç í\‘ëèÃHÌ ,S•'Ïž‡dÎ5ëðsqZÛmuØb«ƒ•÷–¾8’ˆˆ.‘뤞| l„ >8“ "'Œ2âó`ŸÕ%ü2Ts<@Þ°qàZØÉVÑ[2 W¯,<íNzXÞá<3‡Uœâ]lËáR[À/´=V…}]¹3¥óôrŠöÙ)Ë6Ûpé(á@¼¼NêqéÝã¸cHÏc¹tŒÎ¿Ÿ3æa—Î=ÎR%-T]ª"w µ¥9f=FùÁÐ2[K1Z‹N:ÚròˆówÕ¶‘¤TóCYÝAøU¿¶“>”ý2Íç÷D‚¶fR[»ß ûUdoÆâÏÙF33=ëW2]pùݲo«K??§šûT\Ëq£‚mt§á°)œ¾ÏSHÃ|k÷Ûÿg@µ6šjhF‚vµ „«gö×–it¿ÐÓÐ2^¿ºÆTK$HeN~Ÿƒj¦‘r²to«|Y“èMæºy}ÕÖ½'lÝ{ÂÖ±ÀšÏ ó" §5†09»ÄhÍ ¯`V~µ,…ðn#-¬d*nXšÙUFe»Ät•±åµ¶z±H°Käë)4 %'ËÈÞ7@ö½'Ð83ÿcÌÅ‹©Ý–[– ÔÖ/ ª-¯g=:®yutüã5e–™ÿãÓ-ö9F»¶YøQÚUé“ss;Dx«ä2iEXy ›R Âgr¡åC§°Ùt“Í?~–ŸÒF¾åi7ÿA˜z$Ü)JöÉ]<£öØzp7+Ü›iüùæ·j”=?C®}ÖE ˆiìÓ9£†€Ìãïc!P âíÝï! b€¢}™ ¦›6g˜oŸ©–MçLÓH8D°¿þó$ëÞ]ËÛHoŒiÉg ™éNÚ×ë"?Bß’e¦ïs9G.F¦9rÍæˆó»Äù.êùc6ËœïÅlÉǼ0ß÷8~Þ‘àqAÔð8‹g<®âYÇïꥼóä›Ú1ßï2ZâBwbÔÎïRá=6Ð!.æoJ-ðøµ­.ÕDÔ+½äò.OŸ²bF”çꘀ۠fF½/ïA~VÀUvÑü€²w¹ r$‚ŒjÀ¼?û4Huyê‘hNÀÃ/û€‡ÿu>šÃ_KUÜ%{¸žX;ù¥‹õ8I¬/ó÷EU½Ùï-©SYŘñùŽæ¡ÜVýð‰ÿw® çXÀ)]²¨Èú–…͢å®6º¼‡#¢nžó¨gÐ*ñ8£ºFi/uQÔpf¾6‰¨ vˆ9Q-‚DË£J8 æÊ—zü®¾›I'sn>€¹`†n¿§CÌ«Æ eêUp m£€­Ž ê¨È:;h¼ßÃÁíà]÷^é]a·ìßÏ¥ÆÉ9ý.怼l/>ȧ” ßÌ3ä .8Ö§MúE.|3½Aoõ)<®[ļ$yæœ9‹ïüå yT„ ;Å‚}½Tvó“÷´öPKCeR2 ÷PKø™H'au.class]PËNƒ@=SiG©jk}ï\À‘ºÑtç+!iÔ„¤âb ¤Ò†ðhŒŸæÂð£Œ4JXLÎ#çÞ93Ÿ_ïX†¦Ob)ÌHÄsóÑ[~>nÚNž†ñœlEÓ]›k±ëS†®æ^ÛvyJÕÖÜ Õ»W?HòPÆ G©܇QÀ0toEö"ŸRiL­³‘aέ«Ëg&Z¢ âñ.ˆø´ÐdLclF•ª>¡4 E¾ ¯Üxú_ó¦ ?ÈÜ)’D¦y0û«ÁÐoÄ~†{ͧÓUÇÇÇ.G—cÀÑçØî0à-áW¶@ipR áíš³GÎ:M€p“þ»ÄÞ¯VÑ©%÷+G©;tV‰·°ö PK=Q „®PKø™H'av.classE½ Â@„gcôüÿÇgÐ"ÆXiíX)6Áâ ‡ž„œ$ÄG³ð|(qÕÂb™™…}¾îdà I°»=AÈvýEoC(ή:µ‰6ks‰5ס"tü©Lfgãõ‡Ž7xãÑ–@’`É”—¡}”©tµq×*Ö2Ô7¹û”[_ÊhïNB©­ÿérwTÁ™o$e!P( r„*j°PG€eò €5Ç”ø6¬û“@ö PK•F²H¼àPKø™H'aw.class]QMKÃ@}Ûnýh­6ÖoO=$‡ZS/JoõE…@›jJȆ$UéOóàðG‰“µ–}óÞ¼™f¿¾?>±‚NTMÏÄ«è"œöï™ç¦Ã²l¥±NI®hº=*ÀdhhãÅЙtL}Râ \ûÍT5;ǵ›w׋R_† KÎc×»õ¡c_‹äE>IJ71N=cpf\^<10Á ˆ7  œs \jè2¤25Ò—}Ë‹}ø ádݺÿ³_eÆ;™Zó(’qê=ÿÀÐ.ÙŠâVyôdÂÑæØäèp48v8TŽíáàÇê†-«Ä*„»¤l º¤ì‘ÒDH–QrlR&Ã}J¡×—*ös…£•Ñ­`ýPK€Ü¡%ÁPKø™H'ax.classEË ‚P†ÿ1ët·=ƒ.¬lU¸‹¡ h#-NbjD‚Ý_­EÐCEc-¾ÿ›˜yž/ä`¢Cè膳—WÙ?ÈcÐ_“èØU7Ü AÓϳyan¶±&ÝÌçiU^Å—ÄógÑÁ'tÝ©<…ñ2‰ÍµÕšÖp`GI‚"ïi<¸Û2*bÝ$ÅîÌìj5³‡ŸÝDhZð)•Ÿ²kdöÞ}Y§Z¹Áï„«a ³pF8Ÿ|)»Äf »-”ž&FÚ«±Ü|Øya£e|ß‹âÞCüØ%$xR—í›(c3”îþìFåôÙºÅ6ÏmáôÛ¯¡~šŠ¯À¥ÀµÀ™À•@­Jh  Â-€ŠÏÙ˜sjV>ã O? Æ xÿ6u®€¹‡êPKºçù°Ó PKø™H'az.classVéWWÿ Y&Ä ¨÷ ¸ƒØ¢"P£Xˆ'ÉÃLœDº·.­vßífû¥|éÔ m±Ÿôœþ+=§BÛ{'EÏλ÷¾»½{﾿þ½3"øÉƒ:vyñ êA؃ ‚4z°ÃƒÝl÷ ^@HRó’¦$yLV³r2«Hº&ÉÚyIÏH…!EJ+cjJÉG¥ G°6& *XÛ9LîõYY¬ïN+©BóBu¼`¨Ú`³Ó+`y°6agu‘>Ñ&@ vÊÍì¹9ødrÛÄuÁ'µO:¶f2ŠAî+lÝÏ6sm6ª¤ÚNŸ ¶Øìj´=Ôl8dc±+P°ÒÆ™²í·EÇL´Åø¶Šy®a!ëLÊöxúÙÞ)ïhfÎô¹fŽ®1•O«ËL˜©'‚6ÝÛ¨b‰~í3…&èªÃøáÜm{ÆÃ)™¤X:ÁRP¨àٛʪšZØGú½–°¦U:o=Ð1Ðc¨crA9¬Ð“0Ïä—!`m{÷‘¨‘—£Ãy9£Dú ØØ.kü°T-_µ‚Jú&ziÖƒ’Õ1E‹Ò?Å­`ÈZ>£#rA¥Yr¯²Ü EN›ï³­ã(©ízZPÑ®ÓôÊÙQÚ¯l×G³iéa9Ki¹ S„·c<¥ä8w^@4¦¥tÃàæ´Ñ‘¤bp9ÙG”‚bä›$e66”„Œq}ÔH)Ô,]Ø/ç‡ôCô6D# [öì>%`™í+KôÓ-Ê$ÈÛèþä\NÑÒ¼› u’„$í„Mk*KÅ“ÌÖô ¼ÉФ¥Ò&|ÍT½>®ªœU'ø“H—ùèàvÎÒ¥⣹œn&¤ ¸ƒ+VM=Ú§¨†3´²´FhQFA§u–Ý’§ —âÅ1¾àn.~\Ä "ºE¼$∈£"މ8.¢WDˆ"ö‰hÑ/ Ã"ºDtúÐŽ½>t Ù‡™„°Ô‡–"ÙéCkQ·’¥U¬[Ád3o+9ÖïÃó¨öáeÞ¶b[W3‘˜lb`²‘Ï —>,çíúr$0ÂDc¢{q 9&gyk0É{1€‚§1ê…Œ1/éÎy‘Ä8“ó^¤ØšÂ“W½Pð»¼Îä vy“cßâíÛLÞñâ$ÞõBÅ/Ò;„‚sYNÑ_ÊaœAnÜ6@œ:'`|LÞaí’]@ÉeÄŒÉ+PŽZ,%ÍVÚÕà þÙàüÝÙçp»…‹Î?p²Ïáâ·pÉ’ËH¾|Ãtw+˜¹@ÜšÁ{%s‹­ù}Óì°KH¹7Ä_! ¡m$¾0ð7\™²ò¶Âo™(ÔA|™¯ÎQ…Ž–I, ¯æýêÆø…2Áç~þïŸp1¼œ/›`àð;pA$þKø*îb Ïï˜Á÷B¥“wáY|x¤Ž’'»B$69;]“ˆE–»`1±:’fñQ<à¬ced7¹îûXp³bŸÜÆ•’üém\ ¸§NLÂqÁ%P4Õ6ͧÝEªÏïšÁg¡i|îw ³ ™Æ\ !ƒ~ÓTs ·³£ VG*uä"Þ!t…j*U.fñe×$'̆<œfž©›ÅWM΀3T3¯'±¸h+g[À9EØ–¡‚.#cò ÒgÛ±‹¦p~^~]V=TŽ›øþМó:\ÂT]è&.WºoââM\ò áÈ4¾á°Qhr…Þµ&WÀéhü‰€kßZrñÂJç¤i@bXfŽN Õ"Ì«€5k­™Ø`VMÓÍ€–ßÍâ{BÕï-9eMß!,6ùaæTt+ž³ZQœ º&T#ে™9‹èwp>”é%g<ÎÜ,i£•Q²Jª ߇?’“{¿û½ï÷ûîwN~¼ûÝ-P‹¯d<$£NÆB›d¬—Q/cŒróeÌ“Q-£QÆ"µ‚á„fš–îÒÃZ"¡Û¶žŒ†9„ ø†i;šéšãÉæ‡–Ùm¤²=î¶2Ä’ÂLW#j®GõkFZëJëT—ÑmeM×xaeÕÞã$®Okfª¾%­Ùö& 7™»×Ò’z†d‹&Èöu×Î$vÜÉfªÐSÖ1Òõ;Ìl¯žÑÃ2I¨¬jw×NË+«{жžÈf çLýþŒÕox1×VNJrƒy©¨œœZÉ´‚¥;‹ùÚ¥ T1^>PÍŒ·e»»Ý‹þz©ºK©·OÁ§ëí)ÁŸ '‡ÍDÈ÷ýo“³/UÖýÿ›Ç<þ›Ë’ß2¥Ï&ÅÕq7¦álá 4§SuÍiC³ë¼ƒEzzéqŠn]ˆà[¬$½]eÇé„ÞÇ^M/7f…íl¢'¬å,Ø{.ÏqûüS‰[ÙLBo5ØÄû ‹o×ì‹Ò¬mo¨k¬mh\×°qÃJM£¸Z_Ÿn&éÐE¿˜„Õ[ggÍ:Swêl;ÍÒ×Ofµ4å1ß#v¥L+£·h6…h Å´^¢ä” I”#½IBY£&œ–b&tðLæEiõéçLþä^…†WÁ‰\–Ñ1ž%Í„b^f·Q;Òz¯n:ŒSÔcô4JÎ5á"~ÌrZÙÌ—|‚Ê®tZOiéfwDO¡’Ó$)P™_ÜP4ü ZÄo Ò^z¥5Å=ÁÁžŒuÊ›ù{3fÅ©CòVjm)Å\Á ôOÔË%«nñ¬ÏååòwRß9^^‹îq}Ä âOègh›&h|Ôæ˜ú)¯  Ý=v|©Ç+W©_Kgõ}ÝÚ$ì”pPÂ~ q %bêµ!ab]Þ©H†µ#¸Äl%Z\'²OøAH~9* ßãhG $Æ;èæñaÏóÔ>fÓâÆ½çg:e² xjáNjÔ$.aß re\Rî¾=VýD+ImÇ€«òë'à$Úws1B­,R]ã!r”!š(CXÅ  Š>"‚K·å¹ â]@„ñ_ƒÂô€ðSÂ3@!ÿo|@¤†ðf€‡0iL”É&„ÇJ4b=ÕÚÄ9œ'<~ÆïôM±[’ǃ§ç–¤‡GSÈGc™‡îr1²zŸPÐò9ä<â`OŠ ˆ !a q¯Á¨ï`E± ë߆Äó<ÃŽ¨à>IÿRªŸ;½ÎOGðs8•½„‹Ô }!‘Ýñs"õ¢eü‚r”MÛÑE%ú¹v˜ªq—1H•cûO8QT1šÇþ¨j%]öh5ÝâJõ°P3Lž¯R®+k¿Å~€å#!~_@©fÄ•a]ã08þ7ì?ï¾ÏýÏ Ð¾ÒMzn®K P`…ôì8f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ”dÈÈÀ˜ËÎÀÁÎÀδ‰D0q1p2pƒE L Œ @Èä ‚Y ¬ZÛx7‚€¤™ ÒB@fÓÒÞÎÀ“gÃPKœìM ­ÖPKú™H'b2.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ”dÄÈÀ˜ËÎÀÁÎÀδ‰D0q1p2pƒE L Œ @Èä ‚Y ¬ZÛx7‚€¤™ ÒB@fÓÒÞÎÀ“gÃPK¤Gå­ÖPKú™H'b3.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ”dÌÈÀ˜ËÎÀÁÎÀδ‰D0q1p2pƒE L Œ @Èä ‚Y ¬ZÛx7‚€¤™ ÒB@fÓÒÞÎÀ“gÃPKL!}­ÖPKú™H'b4.class;õo×>f]nF OMOF®àüÒ¢äT·ÌœTF±h—ÄâŒü€¢|Ý0C=#]C#CK‹XFÆDF¦D  ¦$F¬Ä²DýœÄ¼t}ÿ¤¬Ôäv6vvvV6FN ± Œ,@[€l ‹ H210PKl˜çò}PKú™H'b5.class]ËJÃ@†ÿiÓŽÆ[µµÞw.’EŒ)Š;oÝ“t¨)!’TÄGsáøPâI *YÌ|sþsþ3gæóëýmX8`æÝL¼;ÉÔ~f2,Λ²WdQ2%¹m˜cÍ0}·Ämu ÿ¢$'ºn­TÔ¯_C™‘Jr <5ÏByÅ’aè_‰üY=fÊ;G#Ë;g§O LÐ ZÁ BêÆ*!›ÐPÕD‘²=™E"ŽÞDP6;üô²,¾W…7OS•rò;C¿Qöcî5OWå}Ž!Ç*Ç&Ç€c£Ë°ƒ]´°‡}ºÆ°L_âJÍÈŠEÊjÄ­ª‚W™5ò•\§ *½[sáŸc»R:uOª M§½…¥oPKœÿıPKú™H'b6.classµ x”ÕqÞþçþ»dáþ`¹—=€XpƒT¯p¨)¡Z~6 ,lvãfÃÅÖŠÖÚK ‡På¨m,µ@Ib¬-X{j[µ­ÕVíe½jom¥3ïÿ÷Ê¥m¿&ß?×›7oÞ̼yo}ë Ä.Qáý*Ô©pµ ïVá:V©°N…*¼O…µ*4¨°Z…å*¬TáZÞ£Â"3|ÓëŒðM_²ÙÜjÎL˜É3kfKK5ƒ‘EÒåë7Ç¢™~âU™t<¹ÅŠ·Vs‹×pØÀ@ôM_[c!\EG4ÐLÑWGNHˆH1ç'ù–˜ÉjkBK,ÚšŽgvÌ\EDl¥™lL5UÓB~K«­zÉú9o«¬ òŽj2®Z­GÂ6><‰SïdŶÿ`EÔ¢m £âF*\[¢ÅÚ+ŒOCÖÉhsÖbcš[,áTö£±iE’Á>ÒDâÕ 9Æù¬…ã);ÏuÉæÖ z3­}Œï«°¼5S¬1Òׯ„H¬ûúסHnouzÝ r´3j ùZòÝ`dmUŒ²MG¢¯;Î÷6‘} ¤'ûÖÖÔY3‰h Àa%©:+©œBµÉœª²pBW³] {(óô‘ñÕ†s¡•!L' ì’o­åÛ‚x2žYˆfkÌFïÊU—y·ÄvxÍŒ9#I2ÝØÔËÄ£Þ(ååžZ3™Le¼­Émi³™f °ÔˆÄÚTcŒvÅöh¬9O%[0\|L]2šJ§1‘Y›%_2;šcÞTÚ»!•n238>¢ÿ8JCyi²µi},íMmð6›iÇÒ-ol{3ƽÉT*«Kn5ñÆBâ" =ƒ ‹I”Jy[šÌD‚æi‰oLšL9)Ò1@+4=Ï@ªb¨´âA\±¸vUeM"Ý2«r…ÙX,©â`(vÅÞnÊÛ²£%k*Ø3º9 µW¤ã[ÍL 7…I*âkW®ÆsL¢Öõ‰x”kh«R­éhìÊxƒÄ°ŒT¯åk/7[6¥V¤S¡k*gT…*«fU^<ÿZÔÀx9Ìf-vhÃÁõH¬¯$0›ÀaóÐQ,Åh‚gÄM5¡ó±Õ)Œ¦ ´¢îÜÑ8‹*kŒm0[™•1³Ñjo[Ve…ŽF2ÐHGÎÅš°Ôc×·š ’lÀî½!žÄô·‘ñÛ„_¿ÍX_Ù6U·³I6Ù ik”?éÆI¦‚ä)Žnƒr7d`Í(''G“ì½ÄFÝÐF*w¸Õ25À.#0…fŒ j<åï"Ë ‰òºá³0Ê 7Xsçkpô:áœ%ð† —À7\p&Ù7 |‹À9ç ÊíÐaD˜ÂC—ÕÁŽ`Gí;jÏk0pK¸º³“9 kLC oàTÂoâ2VLFxP˜Êà,"xhHŒ±Éгâb–3+P\ìÈ‹V¼¸XÈ‹+l\,æÅ¢=.–òbÉ "Ëy±8VT ‡y¤®°"Åê0ãnÄcYDb™EŠBsá܈\@K†¨ ˆœfn($Â!e ß«ž ±1¹ŒQ”ì1¾;ÚùKΑîp ɲW b(çÀi(=ûÁ-„ÕX©«G…°«Ô´¨q9j$R0¼j#Î goD£Fs“n2&{ÝÀxj†U‹†L´U‡G4rñ(Ή]è$ÜËq|ãGà‹ˆ‡§ìƒ„·…U\¬$PßÀ–b –úó¤(à0H…cPÄ9Š8¡ˆ‹8©ˆ“ÖÅÊ–R‚B•€_O6m‚" Äœ€APB”8‚2 ä¼@*UôåbPEšHÁRšSZ0I–Ò¬ÒÜ4rOS;L®?ík<ŽnæéíG Dv€»j–u€êˆÁs0'Ø#†RX¬ a¹†u©J—1‰2Óeb0¯ì’˜.‘zæˆx“æ`el$&ðxLa?&ÍÁæ²ê¢SÑÎOÅ;}5˜> q9õ\_õ©!<ûa÷S$?g¡cY¨‹ˆˆ¹6ÆÑŠýÈ}àò‹Ø4ÐSî”!¢WÏ3:Rð& º™ÞÝCWþØñH]¬œŸDfȘKùܲH¢\:ùè;Ž2žpD¡ó¡ôFTªû)†Ü#†qB؉ž“a݉1v2ÝÉWÁQ)²&Þ©g0²„Ïad ?†‘5áix®_d·ä:sbêÌfáÂFß 6Ÿ»Al>wƒØ|î±ùÜ B|¶áoɵºRt[¼0P«“ Ûž!´:Þ¥.Xñç-ŽúÛÿ»m-Ì·­ÿ¡cíÄGì½ßÁ;ÖN|SÇ:€\öÊôÚ×áÃXòâƒ}Kþ¾lÉËvÉß·ìíZZÈ£t±‹""šHE+v C¤¢óE+¾£¢U‰<ŽÏ³Iø–Þ‰#|;n…ð^ÜXqÍ}(WsevÍIþ.fdëŸèöp‰=,xœÇra‰äÞVVX4 ÒÅSltñmz”kO²µ=ö›BöN±1ý5oƒý|âÙûu8äðî\Ö².o`ЕÜ3´á½Cß4ôðÍøRµ†KíaQx0çטh޲ƒã Xç§ÂY1˜6ˆÒؼÒ-C¹á ßpýÎX”ç1u§Ø8|×埉÷} ‹GsÞ^b¤©ˆ3Ì*÷\}/ 4‡õ¼¢+wƒ[ ‹0W± D¢žSsÔE9j8R‰Î¹Ô‘CØHBÖ–éê‚Kñÿ^ŽÑÕ…x5]]pþg½õ º“]`ŒQ8²~úU2t;ööiÇÞ>íØÛ§{û´coŸvìͶcýˆµ—n@N@¼ OåzrŸ‰#â!8¶?KŸ…cK]l¢ÇÝÅ&íãRd'w²©„§t²i¶ÖR?Ã~ì¤ØLN¬éfÓ{1­þãV½â[íkGõN¸+£Eè&XˆŽÒÛzÚySÛJÌ)F}RXÐȃMš±1Db—~œšF`êñœcóm»—¢] ÀœB»Â%¶¡ 4ä`ý ù¸^¾–ØÖ†Ñ‰'Y~¨ÊŽ@­½Ð´€UÁKÛÁÀ(œ\ãÖÍB½$ÙÆsB»UÁ…ÕG¸œßÙØœä¦³?=½vlFÎ'г®Šƒk<ûٌÞ~„ìycìy%8ÏšR2Ø”{ƒ7‚Œ.l¢Ã÷ Šï1Pa¨XŽ3%;uç~ð a­Ê U׺V±/^éÚØÃ^vjëNšN5sšÍ’¡¾Jê-ÙA„£~T1d¯¯Jê×óÑ—ÐmÇsªí|—Ï𠱋UO³Ù ÂRH·ÐÌÓ%Ç!ûæ,µn®Â½YïÍËs·ŒeQ;§ÖxʺÙÜÞ"íS\»ÖŽÄ^¼‘(ÝÛìH8a—Ÿ¼6œB ×ãF‚åÉ<èù × G ‘»¹Fãè)6i§áìÉ*è®±<B_ßå†SwÏTèîu³¹t—›énŒä‹Øaxˆ§3®†Åð€  èâÿ>@3 $æä @t²*sÕeµ–<â‘¥XõÕþ`7[P¼À üL~$ÿ PK7Z PKú™H'b7.class;õo×>f]F Ÿ¬Ä²DýœÄ¼t}çœÄâbkÍ0F.׊äÔ‚’Ìü¼b '8¿´(9Õ-3'•‘A,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘1‘‘)ÉH¤22 LõOÊJM.ag`gg`cgà`ÈÀÍŒ,Œ ¬ @­ L@ æbf ›‰PKÌÌ”¦PKú™H'b8.classuRAoWþžw×Ïu6Ä Ù´‰×Ô@'[c;nÝ@ •’ÉATG UÊfw6uv­õ:‚Vꡊ¸s,ªÔ¦ªä‹pI¤"Ñ{Gâ­fÞz£Úš™÷f¾oÞ7cÿóß_/!¡ˆ/Rø0…‰N§ 1H…¹:ÃdaîÖŽ¹g–š¦·]º³µãXáÒpº®·½qîFþ¹0·±"B]ôQ õ(j…÷y‚à +Ältª`mÇênø¨ÔçkÓ³ýÝ¥Aú &¯¹ž.3VMÏóÃ|Ë ¾óƒÝ|Ë´mê~5/’Žçw¶äÛ-Ór懠ïìz–4d^TÌXõíˆãwšvþi{fÓµ)¶:ÄIõÐrZ¡ë{m†±µ›«ÊJÓ·¾//¬™6•~'°œn“Om|i¶øk_¼[¹¼P¬,”+W¿e`&CÂÜî¹­ªp‹”·hz«é{DfÔíÐïmËõiOKJ~0·DïÙw»^„Û~Øè´Z~:ö±D†ÓC°9e;¡Û, öNO5É(rÏyÖ=š”µ9²óg8f9.qä8.r8tŽ çUŒ#¥bqU1% 5á>OÓ?Ne,¦QÁ²"¥%Tñ)>|ò“t§È(*óG¸úâ#Ê$¢òÅ„ ‰ò¼qˆ¥fŠL&ä'dy$‡Ñ/P¼„k·Œg'ЗÉf0?=£G³õ(R/›±{±„¨1,OÚ%Š“zF=ÀHV'ÔŸP=={Œ>GS $œŠçI°“O—È>{ŽÅ(i"†1œÅqñ¸…üNÌXÜþg(„ö4Y¨Qs…œÑ(ߟHáúßšœ³kÉ}©¯É²]ã]L7ôÜfu}Ÿ÷)ŸûµÿŠRÒº¡ “7•õýD¢ }Z9Äò8ú?=©¥´Ô/ý׆®¥¨ÆtôÿÕ’½#•#e§beO)—¤øØÐ«O¡Š¾Uå·X˜$„åôÍe]Ù¬É]d M&T² u_f¤ø ÿŠüï'àšlÓ A”uºž¡‹´˜@è£ëMé݋ز`Gü‘¾ CŠ?›Åô[PK 3Ö/7%PKú™H'b9.classTÝSUÿm²á&!”ºµ@bc­mHJ) ±-mµ|Ô¦E i«Y’‚a7n6P°~ãÇ¿àŒ3ÊLgxág¤4Ö±>ùà?ჯÎèŒ>‹çl6!´8Î8É=çÜßýsî9÷îýùïï~€møÜ‹§½8æE‹A îHkBÂÁHëÀœº ¶gU}¦}hjNKYÝÃ#–™ÑgºmŸ1[NH#­“=¬ÇIغ>2Ju¨‹ÝÌV"O&`<ºžØJ<ÄÙãƒ{àÿ™ì±Ë©‹ ,“ ¿x×|‚ë$"á"b#‰ŠEØ1ÛrjÈk©‚™±–ÚGØÐn¨zÚ˜ïf‡Z›Vv¢€¶®9ŸÑ3ÖE ‘^U× +œÓÌiÜçÔtš6x.Ì ¦…™Ùp>§¦4 ±Ç¨½BÎè)Ã4©a^Q­StR½FšœÎô…lÚŽ6£éš©ZZØšÕÂ}ý7ÂÆ´m]ê_ÊÎ$ú(»©Îk–fæ)‚¿ÿNJËYCÏK¨™ÚV‹¶¢£—°oøZïHÇX'GVÓä6bÌ”v9“¥ô‡&ûÔü¬1lmc§:Û::Owœ=s›â©\꼟jšêRÊÈ-1P`±Èâq¦È˜êbq–f)2R$<©¬¡Sl‰’I¤]Z–Œi34fidhÌѵ¶&cС˜5›YV§xOÇvnC/G4¬‘B.g˜––®”,¡ñ1ZÉùét°ÍÚUå¶¿ê®-å-Jlþ÷+B¥ÍûtíŽÕ³diÜheˆ@¯@»@¿@T &Ð!p^àKN ¼,ð’@ŸÀI Ý4ÃÀ 4Љ¶ž Ð{ðL§q4€.„ÙŒ ž žú™'XàûÙj hE=Sö1v˜ÝˆÃÃÓC~\Æ-ã~\Á­Z$0Q‹«,®aÂGØ$‹×YÜfñSÞdJ’…ʼ))?‘öcšס16íÇ Ìø1‚Y?F‘a9^x‹£dÙšGE½LOÞkÃMȸb€4mkªÛÖT:édQ‹H†œ™DÚÝ‚þ `›Ñ—½|ˆ´‹´Ÿ—£±û0Jœ#48Õ+4¨Ë;å°o>Ä•ñ-ä¢ßÂú 1ÖE¼-áG l¢iÁ E˜ _ÝD¦ ¼PDžák›Xàùâ&c»R¿Jãy§Ž#N¥”u¥ŒômHNUñ=É…™ö±TM~ñ?ÈËÕä¨uÈÜ77é:ozÖ“¼ÐL¯;´3ðïs¡“*~gwÌ€C>J1e>‹rÌ‹-¡dð<®õ`K%ø9 ^:…axìàç+=¨ÔWmP»eƒ2?À»tnCã ÒÞ{dGè ßpUˇìËTnL½S„»ÁUÞôÙ=»¶SáÝê »àsÈû²K^¯Tÿ”SÍï²–ô¯¡rùIE¾‡º‡¸>ÞàÞÂû9”Ž×9)§ãb޽††˜"bÁP²ktElúrû‚äÑ`)HRNƽk¨)^÷èŠWR¼ŠXÝþ+È‹öo—ÛGöK†Šø@p³¿÷žó5yš|÷ña“Ï ÊIFà£&ß|¬È•@oHù…k£—­ä&ö9Xº¨õ¬èêñ™Œ2û9¾›8þPKX¥dšŠ\ PKù™H'ba.class•UmSU~6»ÙMÒP v[)Tj5lÊ{M¡`UJk£(U%I•Mv ÁeBì”q†aÿýÐfú…q&_:CBGê';ãø›ŠçÜÝ”T;ã8Ì}î9ç>÷¼Üs6üùìç'1WŽ +©ÉV%‚^—!±y”Á`èb³!AŽ.IÐâ©t*ÅR„¥Ì¬§„âó¹ü´£ž(NR:ŽÕ4ë'„Þ:5ãóëÖk¤d• # ¹u'_N½Ä$<ëíäÅj¥X.L{9¥É»Sã¾ Å[™…ã™y+ÙJÍ“[ì™b¹X½*A¹æÚUtýnÞÙ¬Ýò–‰R›wÓ©NÙ¦hFÕ5ŠeÛYå{ŽQrÊ…êÚ°„ÁTùŽU*ÚDË»L¼b8w7)qÇ6ªVÁ(»U£ºæTâFÝï*yçF±D¥´„@fVÂéÌœµµæÞª¸CKcÃãCcã£cS“·‰aúĤb¬JÅÚλ›Ût’#cŽsy›L$H¼¯Ò*Ð*ÒZ—ÐÕölÛ[UgƒÌ%Z¼—i¹ÞÒpQÛL Qôâd#x-Šq D1ÆdõÎGñ6K—.àÕ(MÖ+|Cgõ CŒmçY"Ê Ã0Ã:ØÖE§˜"œŽÒ¼ D0‰«a‚wÞcxŸa–áÃÃuæÝ`ø ‚)ÜŒà RLãÃ0ÁG ó ‡1Ãê >áÓ¾q+‚wð){™gøŒm‹,}ÎÒú‰8)¾ ‰3'IâäÅNåˆ/D¢:; ûH»ísfoß¹Þ˜´sˆ/Ìå,Å» ,™J_šr_™ºÚÀròÊ#³‡ÌiS6ar6&9ûqèíèË$ïRƒ¢EhÿIW’šy€Ü0y—ž4q[Iªì!/t»!{fËh [â_±ý”m’÷Ùò÷±Æ[2¤yM’¢*5tšCº¢‡èÖ> :L?ÅIsH䮸¹/ë¡*LÄÓCo¬$ϵªëz’ì<SvÈuèyŽQõYâj6”‡{²™àÁ&¾N†Å ugØz˜Rö¢˜‰{eA™ØCÇ/˜ZŽi‡øæ7ñšAÊ"ûcè™Iò ªuu7=r7Žvº±[ÃYI©gÛiýâ©”ÇXágãšH_]i¼ÇUé uÅLô‰Luµ ‹êõ’-eÑ^É+íĤ.{©…y"}‘³|^?ÅRí"bˆäºPë"›eó½×~g²­? Ö%úšXóiÂ_„ýq’«¿†h[Ù“ÙôE/T{Ùºæw¿­ÈVýaÏõ q¿­á¢ëÄçþâÍ.c÷ÿ\æ"üŒŠl«÷_Ó0ˆ³^éW(HÀyØkˆš ÜD©î}gAY´2d§m™^†·—ØÄN‘s±÷uÉu´èG×gôƒÿÏwš‡(ÿÏ`ËU?­m“úÜ_?aoü PKúwqžUPKù™H'bb.class}”évSU†¿Ý“©i¶P°Ôô¤MŠ耶€FCA«EŒUOÒЦ„¤$iiq(8Ïóxþ€?Å¥®^€Wãˆï{rªŸ!º²òä{öÙÛìýûŸ¿l‹%¶ü`ÄŠM»œ3Œfrù1Va·ÊN¥ù°cG\‹E3ËΚ3TrÊ‹CçsË…|},Ý¢)ÍyQoŽ`tg|«lÆóÌ-¹‚‘gÙî•Ù©¿;ySÆ‹åb}Òˆoº²P0²kºR®Õr}Î)­ÂÃgÖó…•z­F „g+«Õ|ál±„§=ÙÓNm©r¡Z±ç’‰”L 'OŸGOÇH›ã"G䉢@\&‰%¢H,Wˆq•(b…¸FTñuœjÕÙÈWV6ØP#êÄ*±F\G.œsÁÕsXÝ 0üDƒ  0XOóÆÿ«iv£V/ –AHƒŒ†54ÈgÏ áNa¨Aƒ4†aÖñFZs#('ƒ2”dPÆ‚2Ô)HÑÑ) VÝ"Ü*Ø))V V#b¨¨¢KF^Ë9y‘˜%^"^&戋Ä+Ä%âÕ°œ—¬%Fð_m#|Ä¢Ÿ{bá!«~­†‰$aˆ6"LX„è$ö]D!b?q€Øtg&„ßò5’{–ìfõ`ym!à&«S®nGˆÃÄqŒ%ƉI ؆îÅ>ˆÜøŠ¾O(_‚§”á#Ê—áÇ”_?¡¼U~þd“W^†ŸP^+_O(¿ŸT^…ŸR^ƒ?¥¼Zù*|Jù|Zùuøiåëð3Ê7àg•߀?£ü-ø³Ê߆§•¿Nù»ðç•oÂ{”ß„ïW~ ~@ù{ð^åïÃjÚÏ>åÀ#Ê?„lúý)ÿþ°òáýÊ?(ÿþˆòÏà‡›òQþ9üQå_ÀSþ%üqå_Á*ÿSþ <®ü[ø òïà¶òïqn ïMöâ“ÇÝ»+¯Ýáq—v˜vtàãAñã…«àW9wið®ÌÏØ[òºë‹m÷-lÉ£>ø›Ý¾ŸÜ‘{…—‘wË›ãŸ%ÐõN‹Ža¯c_ãJ’Ý\ yæ3q,¿ÝbˆßÒ…6^¡XޤI¸ ‡Jüh—eA8ÅQ=så·8ªÕY|ÕÆ•MÛòôEÚåÕýî•]Õ&u@«ƒ 0&µªdNv°X+…þ½¾yħ¼{ÉÞ~2â2C½.虄s½úº‡Jvpõ°gòGØÑL¯@÷MÖL®îg<óRºk#‡qÜ>”c„ç†ÉgU_T3¥Ù”ÂWûíFåVF>¤/LWJpvD:çú}8* ù¨ûöP’•8,Ç SŽSŽñgù_?¼©¿=§™Ã é^Uþèu3íR€¼Ü×Ï÷k×`OG7lf]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘))…‘Aa kErjAIf~;;;#ƒ"'F d“Ì@žÍ¤Ù´´·3po„ª`’L ¬PK$HÐÌŸ¹PKù™H'be.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ””eÌegà`g`çÚÄ"˜¸8¸Aƒ"ˆ&F dòÁ,V­í ¼Á @ÒLPi! ‹ H³iiogàƒÉ³‚aPK¼£³t¬ÖPKù™H'bf.class•Q]KBA=«æWVjeÚ'¾™b«>EiA($\ðEz¸^W]¹í…½kàÏê!‚úý¨hî5èÙ…9gfgæ Ã|ÿ|~!Š:΢•óC£Òs¼î/WÂpßw¹TFhe»aÐï¶­f«+––ñ´¸Zâ7RIsËk{cÁyTJè¶kû¾ð’T|¯Œ^2Ô×ÒfÈ÷æö«Í][M¹e´TSúÌ®>Fº¼c› .my íˆéÒø”µTf&Œt"Ã;†Â°cû3¯¯½ú yѪ7[æÕå3Cy¸’ò…³ÐÒ,¹#´ám9‘ÎJšÙd#RMÈ!ÉÚ+Pǘ,`êÎþ/ó4š Ç$p@.Ý Ý€e°ƒDE¥PÂ1Ê„Eqä‚ 6<B*ä<2!ïa;äý¿¸€dÈtSDcÈ‹§«8©ÖÞqúªEq A–ªK8¤™øPK^èÜ_YPKù™H'bg.class•QMO1}tQA?NzCÈZ–“Fã41H‚áb<,K…’µ›´]“ýYŒ‰€?Ê8»üšô½™Î›é´óû÷ýƒ<\œ0ä›ç†NsDoÜÄŠ+a¹1!—Ê ­ü0sFƒÞØëD2¶‘×iÊæTÒÞ2zÑL0””ºúÆÃà®Uát¸ôß}nDkimy@¾ÊÀ·©¤²’ÄV†¼¿:*£Xâ^†ÔAqœ(»V¤}Ò±±b–V¸SV' ç¾oÑHGîÄ»èº^·ã]]¾00Ÿö”!7“AÉí5Z§«²®B_Íùãt)ë`ßÁžƒj™>™•±ƒÍjhQÇ!Îk…ªiô¤‹a[WàdLÃAް@^ƒ¬q©õ…£VûÇYVÅ ËØH£¤®ãÛÀ?PKÑ{ º@äPKú™H'bh.classmP[ka=_.Ýd»jÌÍÚ´šÚª›o7I7^¨TDˆ  Å+¸Ic²¥&²®úâñ-¯š|L¡Ïþuf³Öú0sÎ7sÎÌìÿùþaq?†€ÐÂzaG@Ñ«…Z£³.Õ«›\‰è>Ìéµ=û“]vzå-×éz۞۲߭s+´öín»Lu§Ûöë3®ã=¢ñUSíí¶ˆn,Hžq=m쵚ÞT1% n÷>ºÍÖ†³Ï^d_>±?tz[n¯¸c•*E«²j=X{MM›¢!jtˆ4)v)Øõ–¢-:ç#Ó—Ðç¿gág×ñZ dä4ÄÖ0KRP5\Ƶ¨†4.hÈrZDLÃ5̰DQq7âÈc™Ó §›*¥[ÌnsÒU,¡ÀIrà ’' @ðb‚§û˜ öú8‡Ë>^ÅEé2Â(1:”ò,½–"dä!L)†(ÊÄò%¢ü ðqßÄò<ÉÄéÿò«ΨSˆêgäcuMÀª›GXùüó½Ê‘7‡X­÷Q4PÊ}EÔ«èä÷”Èd÷ia™ƒ`KútK!¸iÑßÒGòœ‘bpzœØ:íÙ*c<–u#)F¸ÓGÉà #Ü%°Æ˜e0F¸çO3Ì1b‰/}D–üêcÞ‡œ8dàø÷K”CHþPKû=áf [PKú™H'bi.class;õo×>f]FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkÍ0F6›Ì¼Ì;Fçü”TF®àüÒ¢äT·Ì G,Ú%±8#? (_7ÌPÏH×ÐÈÀÐÒ"–‘))“‘Aa kErjAIf~;;;#ƒ"'F d“Ì@žÍ¤Ù´´·3po„ª`’L ¬PKæ´âŸ¹PKú™H'bj.class¥TkSÛV=+‘PÀ¡@SBhY¶Ð@x•6q’šÖ< ÁÒ´•lÌ8’G’á·ä?ôC_˜N3Óéçþ¨Nw%hMgê}h÷ìÞÝ+ÿù×o¿#†,j]ˆ©©5U84Ž ½nXU}ËsjVuÑYôqO ¡æ"cRjî²{岋™FÔ•Ëš•Šé“¥ÊöKÝmZºezºëÖõšå™ŽeÔõããc½áØž]¶ëúç5\=ϸ½YÈÙ–e–½šm-þ{~Þ4öMgÃp\*ÇGJªšY/Ëbê²K`."ð?¦fÔˆQ\=ƒDT8Mn(ÂO³,RN:ê]TU?ú^DttÍ0’‡Isn$ßp_Y)¡îEÞ± еT®×¬š·,й*"' åì}S ‡–êz†åz“lAw´/Š+8›^­®ç ÷À3Ju“üñ-»é”ͧµ:eßzþ˜^ÙŽ-NMLg§¦'§æç^­AåFôöÉ( t”I) ,ÿ¿›H$ÌÈWè©ÒGT5=™0o»¡¶a;¤õ¾ykþá NJgˆ¾2ÊÅeôG̃ª7šDÛé˜/í#2»<»Í+ñ„×+2&eÜ•‘‘‘•1!C—ñ‚[Œã=bPA# îaXÊÚ(úLá:¿¸¦à>:9£GÁ( ] >BLA qkit(˜fsŒÍq†QôÆ1ƒ¥nÌâã8Ú2Ã' Ÿ2<Œ<â¸kã˜Ã“8æñ”á3†<à ‡|Ǿ`(°¹Êk ëq,b#ÀehHcä|@šŒ!êcô¥‘Õ*ɱ öºy ¤ ž„/i¾¤yøRõíŠL@"û]²)—×_cf÷_þŒÍ}m”ŠAI ºFrX;Å–6r‚gZæÛÚíµ!é;íœÑ3â ú$ïþ„MMjá+­…Ý‚½Wèe_¬í;Ïís+”Ëmí¼ÂýטßÕ~Á³_ñü_“¶Ý‹>A@z±…oÚú‰¾ýá­ Ä%%ÁKöå8KÌ(n„=Ì’G"©1]o#$k34«tL ßýÙµ¬ÏésÜ 9ÏmæJ_ɯY6 [†¤sºwBº%¢ã6'}:÷ŒÎ8;_ ¥ ±q¥®ÕÌ9S_Èô$<Üü[˜|=´qV¾jí}gÂ}ßiï»…r¸î›íu³ë|ÛÝaæpx¬i ß§Çl¡"}n(éOPà¶ÍßÿPKâäcÉ©PKú™H'bk.class’ÛNQ…צ¥JQ@E<à±ÛÒr>‹E´E«XQ§PJkéh[P¯|ÀðÎ5Ñ%ñÖÄ[_Áð ŒëljÙ/Œ“¬oÖ·;³÷Ìž~ùññ\⮂Ëß‘Tpûãršõ§fòÖ¦.XÅlx¡RʳÃñÝC¹ªÃJ¤ó™åʰÂýÿŸï_—ðŒäŠ¹Ê˜Bc,1*•­P¾l­fBÓ÷øZ1{%£P³‹åŠU¬$­Â]ÅùÓLz·7í^FÁ»`o”–3S¹/nNMZå5{¾d“‘P4‰vE–8‹Å¤ªÒÁº (°%AYPl6OO9Ý2³ÂÈC®2YfÉ1y…†?7€Ã\\qmÅ¥WV¶ÆYF}û5h4kÔ8¤Ñ¢qX£U£MãˆÆQ&ª¡|دÀååÿbÔ‹ ,èDQA· GÐ+èô ƒ‚!ŒÖbcuÁ¸ <JP%p Ü‚jG 5‚ZWP'ðÕÀƒvN¤ì…’eka¯¥ÕȤ˜§3ü*ý¸á×èí†/ÐO~~ÒðôS†'é§ ¿I?cø-ºßðEz‡á·éÃSôNÃïÐÏ¡î·/1ŠßE¨9ò;XÅó·Àη¾’-ÅWü:|LŒI0)&Ë”™gÌsæó’yÍl3ŸåÞÀ6B‹[˜x¹·ìaö Nïb9=Â>éô(ûE§w³O9½‡ý’Ó{Ù/;½=îô~öi§°_qú ûŒÓ‡Øg¥ï¼•|g·óö­Ü |ýÀ;Ìu¶[ܨÆçBßΖÕÿPK}êjóiÖPKú™H'bl.class}’ËnÓ@†ÿ‰“ŽqCÓÊ5\ ´±“æbJ¢VHiKA©…¥ ¨XLÓº¤1rLw¼À6eC%XtÙ@âx Ô3n$s©é|ÇþÎÌÈg<¿¾|ƒ‚2*ÆTäTŒªQ1®â¤ŠÓ Šn´Îè¶ÄލvEo£êD¡ßÛ˜`f]NF_hŸ¬Ä²DýœÄ¼týà’¢Ì¼tkOL!,ª4‘„ü“²R“K¬¸‚óK‹’SÝ2sRÄ¢]‹3òŠòuà õŒt --b˜’rÐ`g`eg`ccd`gà`FFF‹ H210PKÊ"˜…ÀPKú™H'bn.classmËJÃ@†ÿ“K§¦Qk«©·¸I”X“•RqcE¡PÑâ"Mc›RHFŸÇG¨ >€%Nj^zÿÏ|ç6œÏ×wȰ±–#ȦÕ$æYß{ôª/êV< £níÔº!œ›­)™ÿhJ•õ]´ûÏk„ÜA…ü Å€ ÕOZ#~Hüà8b´ê^Ú‹/“Øn:;®í¸»ÎþÞ-&Øçb­s¾uöÙÎÇçë;d°©Â§BS1EPRé*!œ:ëèz¶«÷ZÙŠc½Vá4}C(§j’ÿh­ôt^ï4Nà=0z†sHp™wM‚«tÂ3”*EÖK©ZÅ|°Íc£Ëi¸VÒí¶ya™™jn'ŸÉåwsû{·Ò¹´~/Ådi´¥R:„Àß¾¿Ð÷tÜÈvt˱¯ §-0/°  Ì fýpû†GÃ"–°¢!"wQ)1$Dœ3Â2;W°ª| ²»gk€ÕgÈE˜w—ù<ìÅíx>DÊ ’î'øÞ¹`­/¡k £ ׇPÃÃ>õGOû‡LPKV}/=ãPKú™H'bp.classm‘ÝJQ…×qÔ3Vjeù“e? …ÙAa¢”AR0`”t1šè˜91N=LW=‚Ý$ô=T´ öã¹Xëìo¯ÃÞp>>_ß!!…u2<2)‘,3'-ýAO·õN#­Ù–Ñid“— ¥DeLç?“Jþ@§ÕV½fgÜûFǰœyóºNV,åò´E©°C…VÌ© ŠfÞ[µú¡Ñ¦@°RлMóÌ2Seu+“R3ÛêÞîÓÕ[!w$µª!Ä|GÿBß Ò ®­[v÷ܰ›³s?Ç ‡cÚ §A¸Ì#¦`K BâA qD©Ç°ÀAN/HeªüäŒÜµÑÇò3Äa˜‚{ØÖè+\äGÑG„7£™“^w>Áó†ÐE+=ÖØ1Âa«(`„àe‡¼ƒ=&¿PK@¿¢GìPKú™H'bq.classm‘ëJQ…×v´3Vjeyɲ ha6Aa’DAR %ý'ÑshœzžÁþ$ô=T´Ç»x~¬uö·Î9{Ãùø|}‡„,6døe(2& R:S!DÒg-ýQϵõN#Wvl³ÓÈŸf® ¥tuLò9•ùÎk­ºáä fÇt Þ#ë¶ÎíKEm »ŒÊ'• ”­Û¨›mÎ#Õ¢ÞmZ¶•­¨ÛZVÕvÔý½éOíΕ{£æŠ[Bðoç_è{>nÔutÛé^šNS`N`^ $˜ Ì à Ÿ‚$,bYAÔÝÅ\‰#‰œ–xØù«ÌUˆØ}›}¬<Ã]„iL ãÿ„½°•ÐÂ$½ å}‚ÿ Ñ«>V{.ôŒ`ŒáÚJ#g¸Þ£ÞðéÀ`‚©/PK"EÚ¡?åPKú™H'br.classmŽÝNÂ@…Ï´…­¥* Eü»£*"\a0&Fb4ÑhB‚AâEÁJÆR}¡ÞH¢‰àC§Jâ{qÎî7gvæíýù2rXU1¡B%ÈY³F0²']ëÞÊ÷¬~;_õ=§ß.›—„ÓlcLå?“2 ³f×nùeBt×é;þA9p¯m‚T9â*Õ}‚Vuï¼–}èô˜Š5è¸çž›«¶Š¹Bq»°Sº"ÅMÍ›P<––Ê-!þwØ/ôµÏø–ç.¿#H L Ħ&uD!똢ai sXÔ`„·ÒXÃ&Øçb­}¾uö9ÎÇçë;d°©Â§BS1EPRé*!œ:ëèz¶«÷ZÙŠc½Vá4}C(§j’ÿh©ôt^ï4Nà=0z†sHp™wM‚«tÂ3”*EÖK©ZÅ|°Íc£Ëi¸VÒí¶ya™™jn'ŸÉåwsû{·Ò¹µ~/ÅfiXR†•Cü}÷úžŽ²Ýrì+Ãi Ì ,BsY?Ü~„áѰˆ„†%¬hˆÈ**%†’ˆsFXàbçV•wAvb÷l °ú ¹3ðŽâ2ÿƒ‡½¸χHyAÒýß"׬õ%ta”áú*cc¸Ñ§þèjÿp‚é/PK•.ªÖ<ãPKú™H'bt.classm‘ÝJBA…×ö¨s:Z©•åO–ý€fzUA$Q FIG=b8íuz»I(èz¨h öã\¬5ó­Ù³7ÌÇçë;¤°©Â£BS1EPÉ!˜8oê==ÝÒÛõtѶŒv=w–¼%å É4áVòº¨4kU;GpmÃ>$8ÍûÁ‘?åòÅ#Ö+©ZÑìZÕÚ‰Ñâ4XÎë†yi™©Rf'›Êdw3û{wÒ¹´ò Åf©v¥ô¤<|ûþBßÓq£Ž­[vçÚ°ó ~€Àœ€O`Ö §A¸4,"¦a +Br–A qD9#,p°s«Ê'?;±»¶X}†\„¸GqÿÁÅ~´ÍHyAÜùÏB7¬õ%tŒa˜áú*ca¸Ñ§þèiïp‚é/PK“¹Âž=ãPKú™H'bu.classmÏJÃ@Æ¿i’nM£ÖVSÿ]ÄK¢Äš ¢T<¨‚¢P¨héaC›RHRñq|„z± àøPâ¦öàŸîáûf~³;3ìÇçë;$XXÉ!K ³NÐó.à•Ú•ZùA»zfÞ.ŒÆ„Ê4á–ù]¶ºž›T Ù?ð“CñØÛÝ!ÈÇáGPka?r½S¿'½qÂãNx…VÝÞr,ÛÙ¶÷÷šâ„Lë>•¾÷‘Pø;åúÞE´%ñµŸtff¦4†¼ H*æ «(¢¬¢k˜„° #\)YJI¸²1Äâ3Ò#F@—×Åÿ*ÂË›«N‘¤,ÉOÈ¿¡t3Äò€ã¹Qß©/PKsf[=‘PKú™H'bv.classm’ÙNÛ@†ÿ“…LZ–BèBÊf'˜ÄNh¡¡•PT¤¢"‚XŠ2!#ˆ‘ãrÁkp×›öÒZ©ЇªzÆ ¹Kæâûg¾33:#ÍÏ_ß~ ¯%îIôJ¤$ú%$%úqÝØ éïŽs'wâ4sµÀw›‡%c™îà—„}§CåÕa—ñ‡z¿ܨ%‚,Tªµ½j¥JèZp›nð†({ î+¼`nq¼]Y,³[+Û!‹!g ZÍûè×Kî IïTœÖ‘·ê{æ†5c›–·æçv äbû§ çŒz^ÁR° E¾±»îž9~cÝSâ‚Ð÷oß©›×q#­ÀñƒÖ¦ <x(ðH`Dà±À§î§p2…qh)æ]^õsg2sÂW¨AFÏmù3ÿŠ$çevÄ øЉ/èùŽ©ík̶•Œ]áÅ'¥tV/Cö,çB™ˆd†å|(“‘̲|Ê®HN³,…RDÒd¹Ð¦öm³Cá›Ò¿PKcL°´ÃPKú™H'bw.classm‘}OÓPÆŸ»n)EaÊ/øÚn´£U`sˆ #j²dD‰1]©Ðe¶ÉV_¾ŠþåG˜ÿŒD?€ÊxNA§sMîsoÏ9÷9Müüúi˜x àŒ‚œ‚iS ®+8­à”@Z73úã–ûÎ-·Ýð \;AxP3^äGðm6vô½ÎÿhD•ñzÚlù^\[  ^È<Œö}ÔÖ.Áí0öÛ ¹³á$ºDΓˆªê[ë¶€ZÞv<3hSK~oÃíFÏ:‘Ù°-Ç´E»Zy) \ZMêl¾ayOâ-³¬°TXª,\âq‰ (~¸ßÝ âC©áyÿAÇ_%0Þ꺯}ëÑú+š«»8i—¸*qMâ’ÄE‰ËW$ÎK\(HÌIÌjРh¸UÃ<Æ5œÃ„Š›°UÜ‚£Bç“ÁRd)·U,ðÉd±XʸCýeêXè§ ¾™t’Þ¦i´g‹GXú~'ØM*ÏÒÞ(œœH÷±œùŒ‰oПa¥Ç05€ÁJÓX$XM`fKïöDï$/ÿ'ï¥q^»ð 3—í£öæPøu¯ç˜ïõÌÜXÒ2Ë®¸¹køûÊÉb©`Îeú¸?˜â,i 3¿PKAtÔwÜPKú™H'bx.classm’ÛnÓ@†ÿ‰“îÖ ô ‡†C9ÕNê$6´4¤T*Z",•Š Ç‰R—‹Ä ^‰k®Â •@âÄð4ˆY7’)t¥ùfýÍìÚ#ùÇï/ß ÁšĬĔĤĴÄi‰“§$fšanrÆã}ï­Wîz½NÙúA¯S{h>'l»ÇTþWÇt™©'Íý¶Õc«A/ˆÖé°Õæ××Ýuæf݉¹D[a=è´!³6¼a²ñhõïuCÿeÅŽöTK»Öm‚î†oú~û~Ðå s»uo°6ú¡µm—Ëv*vuå—½.qŒ•(ûŽùè9¯«ÄrŒ¸õˆÕ ©)‹©†H­’²šj˜Ô)›©FH­çD®ÐØwÑx¡ÐxÌ벛飔ž¤¤©ÆHmR¦'µIªÔTQR[¿ûðMTåûˆeêc§Ï˜÷Œ2k¼µ—Ã,› ²m*óžÉ#(ýk?[¸‘,4øV?Ð8¥qîùŠCû'Ôy¬”ì¡ýNê²UÛ~À^mËyld¹I™Ù$FMÒ9–NSN‘Ü1äSN“Ü¥ãp6ùí3ÆÜ~1Oåþó…2/_5—ghyϨ¹fÊY’ÙBýR+N+7Óæ(mߦœ'y`^¶×øjŸüPKÅ„~­PKú™H'bz.class;õo×>f]aFf MO0&£X44£Bl6™y™%v@¾s~J*#WŸ{°[bfNj #/ˆ\ZP_Tâsç—%§ºeÄ¢]‹3òŠòuà õŒt --b˜’ª€JÓSKÂR‹Š3óó83‹]ó“Àf d%–%êç$æ¥ëû'e¥&—°3ð±3pó0°20q1ð32(2i`e` I6 OH3‚Dµ¶3mÉ3r2°ƒ„€4”æa`Ó¼@Ÿ œ@’‰ PK²ÁR2Þ PKõ™H'c.classMÐËNÂ@à3"¡(ÊM¼ûˆ°ÒQ4q¥‘„1Íq:±ÅÒ6ÓBˆæÂð¡ŒÿM&Mÿœït®ýþùü¢õèT¸T»Iâ,ç8Ÿp4WèÝ ªŒ“¹–ê.ŒÐh?8 ’Gô&ƒ³ao0<\^¼`¤T–¹Ç‘Ò¹ †)Ó4 %ça{>ç,¨…® 8~Sž Ó@i/K&ºè£íg¿c“J ØWz~õ)/¸aRÿáuª$¯Îx9‚«.t»L9ΰ®>)™hõ¹škÆÑÿVsÞŒ§‰FU›×ÈY¬*‡J¹"jšh™h›è˜(˜&ÈD±nª+£nIP“ZøàR—6?…Ö 5jÃŽå\±¼ —-wñl[Þƒ–÷áËpgø÷!¼iù®[6ç©Y>†·,Ÿ˜kâj¦.þPK` ˆ²F$PKû™H'c0.classmT[SÛFþd­-Ù£’˜K•IoÆÄ€¡¸$PêrIë”@&fèxh„­§Fb„È@§“étòø43ÉKòÐéÚÒä-ýzî›ÿ€Ó³²%«3<œÝsΞïÛOgwõOóÏ—‘Å]½2e$eô Ó£›Xº8ZП^}¨=Ò&êš±3±¾ýP¯Øs£«s2¬/H9ÛÀÅÄ—’Á¥’mÕŒ7ßA¾E&¥·[ÞHz«½å¾^9°jöÑD‰;ú=ͨš».<_©×Œš½ 2ßvØ’YÕt/™Æ¾­ö¦V? X\^) ˆ­Vô=»FkêÁ`Ѩ˜–EšSTúF?JÕucÇ~0N*‹Æ#­^«ºÙªfkí%"s»+™VE¿U«ÿ—–i줌ƒÝmÝJ™÷S{š¥íê¶níßL­îÑz5•KÝ7-§ÝÐ-«¡ÝB[‹ú¶–µýæ]ËÌnæÆ§²¹©ÉÜÙ¯iÇ-¾,h¢šeiGsïˆâmÂmçÈ©S™$§JFr„š€Ën÷j&õͪч|«ms¥—:­_ª›†ÞÊ*9Ú·õ]â0ÈL2Þ+›ì€ìPÂ5 W$¼'aLBJÂu ãÒ²>ð~øGºøãaw#ˆÆñ6ä8ÞǻǑÁ•8FÑÅnÆÃ\ S˜çÞÇ1|ˆ…fx˜Ç'<,Äð>Òê"–D"ž  „YÜ ?È7§ü T\†€·Èaâ‘ÿÅaD‘ ‘>{ Q¢¨(c²,*ò¹\ÙF™‘…É"d™L¦ð@¡¨Tf­B¥I•|ó!‰27Vx¢D-€Ê*¨ r€Êª P]€J€Hàp€Ã8àp€ãà@êhw1Oóõ0_Ž”ãør\ö¯o¸ì Ð € Ð;½ãÑ7:ônµäoúüMŸ¿àç‚9À¯züªÇŸèð'xu4ئß—¿ÑáotøccÞ1ï¼Xç¸øñ*]A~ÕçW}þD€ßU ˜`^=ë”»üÝÁû£ú÷GõïO"p\þD £Ìk(óúÉ:ítù{‚üŽÏïøü?Ø/Xþ™?z=Þã@?y@W¦WP Já+^½lzM¼è6½=Fó;­eE¥°>öÙ±—ì'tÿ…©roè·^‰ãÊì ’|.œ´WD¾’É^?Åg-ÞKdâÂ4í¡’ßrr!šû†B'èâLÑ!¥ð#"Jáy蹯)ÞÖô}‚Ló‹Ì¯¸ó|"[;Ãçá7¬ñáΰ"»BfʽìÅW™ás™ÒcWyµ8|†Ûbž=Ã=&Ùt>Ìò1/=C2fßçÃÉH2üÃq>òD’’"=}óo2ÂS¢…øjZi>>Þð‚däûã'LHÒ¯ã雞?Ã\ )û«ð®Ï ¸¿¬¡ÿPK·¯XÓPKû™H'c1.class…T[oGþÖk{ãP'H iM `{í\K¸‡ Ô%$—ÐR²¶×މ³k66Q…x¨T©¯ý©Rª6¡*ITá‰Jý#•ú#JÏ™ÝĆÕÖ¹}sæÜffÿüç÷*dÄq߇=>¼ïC‡$xÑÉtß {I¹£ÝÓz š‘ëNÝÑÓ%‚åpdF‚;™e‘ˆ$$ìÿ×32Y&ï¶F+´?ÚO4€ìÜÞÀ™¢óÒñ“%+o便nó„çF#7%($mäPxÎI½¬§ËV¾TéM²¢_ÓŒŒ¹$âùÇ'’·'Æ'h@góF¾4LÍ™]Bó˜i,—4£4£Êdû'VÒz±”'T‚DÓ90Ò¦eQÕ!ŽZÔ+¡‚näJ =ZÆ=­ÏÔ¡Ù>YŒÐŸ4ËVZ¿˜/Pðá–iäBFy)¥[!3*j–¶¤—tkùthb¥HIôL¨?”5­Z²œnè–ÆIpñ±í›×–Ì«–Ÿéïˆ÷ôõŸ:y‹2Îñ²¤IhÒ,K«¤Íb…ìíKõ“’&%ÝÇŒ,Oº`T“”!b™¥9eóµsŸÍ5#åé.‰ñæM¬•çu-ÅÝ©ÑÇš2KÉr±hZÔÄÎ%ìyËÍÞ¬;àÊrI_¢T"Ú ™DE¢»DŸD‰¨L´¢ OÁYaÇ (8£àC)VpNÁ ‚þö⽺¡pÍœÀ ¡“±ƒŒ;Ê,/;ïæ…ÖŽÃÀaxuc‡Xkf…Í–¢ð Bñã<.3›ôcWšH›b6Ý„ ¸ÊìSfר%é'üÆñ›×™Íøq7xïçMÅ,k7ý¸Ä.£˜cöc·üø_ÊF˜½dæcdÖŽCú<\Hàø qƒ„KÜ£G…ì ºÛÉÚGº e²Õ:ûÙ±:û+²{êì²{ëì ¤ÓLˆ·‰*ܤh«iÁËMÜ~ˆüÝ;^·á^Éè&棿!E”Þ‚•ž’N,M@æü,6„‹n[ºmem+ËV4*Ý|Š,‘þ™ídtœT'»NÒE2AÉr/qaÒŽÝ¢ÚÁ ¥}v êÛ ng`v̪ë"Å~"îuŒ(¾ÓY IîÌÝÀB­ñV§–ïèKí&ùÀýÜ?—i>Óê+ÔªûG4?Ãøl«kùªÜó‹Ø;Iä%:It†Þ‘E¢1¢‡Žü‰h†ï˸™^Å>Žÿ;°Ì£ñØ&î<Ùi€g4Ž ªñ¤8®±Ûiawm>ë7¤uí¢ÿ˜s©šÿ $y¾Çþ,⼦I¾”‡Ù&:F%ꡎׂ#kTØ«®5gD§¦×ß™þ¸¸áìÿ5íTx$v¹‹“ö¾Å+ö¡-N©ÕXu>^r·¹ŸûN{ä!¯*wxÚ¼ju‹F¿…%V燼1Æ 4Æh\ ñÊ¡¼žu§òÓ +Ͼ³ònÿGÎeø^­ÛÁã^“Ï­â@EíärŸP»êTÏ«¸¼íå)Ô-“Dç¼½U«8XU\üK³­îM_ðåøƒNæFg7q×yðo ⵿dy—ˆômÀâl}ÛfV˜AÛd} ËöÇ+½Rí™ñwâQ—øf†þPKTBÈó>³ PKû™H'c2.classmQËnÓ@=c›ØHú —‡”68!Yñ¥EX*´"RªXLœ©kHf¢‰ƒZVü X°ì†U$@eÇ‚BÜI*uƒ­9sçœ{Ͻcÿùûý6BÜòà{¸àaŽÁ®®î08Õh5bX¬n¾åïy£ÏeÒèd:•É#—þÃGQd¤•ên4G"ë4;ltL ^rÙSƒiyîa*Óìµi«ž`ÈoÄb˜¥JŽˆ{öüI›¡ÉXi-â,0DðN}!“l¿N5Ö±xšö©úñ+­dÈñ +t ö‚!×| 2¡G÷ƒƒ!Yˆ^Ð ö”>µJ„š›–d·´»ÎGûj[«p§Yo…ÍÖæ½»o§Õe°ºM‚¸E§”aaz½TÑÅtÊûéÞ5sÌŸ~’v_I1cÙÈÅ¢‹’‹y .–],ù8 ×@ÎG^—p-2­Ð{™v Wp Ä(Ó!ÌÓ©„3þZ‘ÙÎ׿Á<ÌXQ•ÉÚ¦|‡öuçgþEhðq«ö­Ú±ós?P~]´&¸ñ«f×?Á'$£¯'‚m„Ð&rk-¼=ÁÍ™û9Z9r/£BŠÓ)L§eâ,£W¬/p©ÑQåèdœó„.þPKÜ8CtÐfPKû™H'c3.class;õo×>f]QvFf Í0F OMOFq Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkOO6›Ì¼Ì; Jçü”T ¶ g#F®àüÒ¢äT·Ì X´KbqF~@Q¾n˜¡ž‘®¡‘¡¥E,#c#S²1‘ÉÈ ¶ 3_?8µ(31'³*1 ¤Ya¯sN~^*H”‡›—‡•…‹ŸA˜A‘AH31210iF ˆdòÄX€,n-!FA†í "@èV §aŠ˜€¨Hši» CÃé5PE`9PK&©,ô$PKû™H'c4.class;õo×>f]QvFf Í0F OMOFq Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkOO6›Ì¼Ì; Jçü”T ¶ gSF®àüÒ¢äT·Ì X´KbqF~@Q¾n˜¡ž‘®¡‘¡¥E,#c#S² ‘ÉÈ ¶ 3_?8µ(31'³*1 ¤Ya¯sN~^*H”‡›—‡•…‹ŸA˜A‘AH31210iF ˆdòÄX€,n-!FfAöÛD62€Ð­@OÃ1!P‘4ÓvA††5Òk Š8À&rPKŸ`Võ$PKû™H'c5.classmS]Sg~6 lØ&P!ˆÔ¥¥m>L ´ˆ(UˇmÚÔ´(M±Ý$K\v3›CÚПA/:Ó/d¦%Lu”+.ú£Ÿ“DÐJ&ç=ßç<ï³»ÿ½ü÷9üHáç N1ÄPà zcñ\iꪂ34ŒÉªaW&W‹͒ǰ?_SˆeãYñwKâ¹Ë'd²'„²2-zB1§Hê웩¼çZv¥>!Þ¦Æ kÔ>@4„Ð+±ÄNIì=q™½Mbý!|Œ¾>‘Ø$·ƈ†|!ÇB.aQ¬%Ö‚†9,‹{SÃU|©a_i˜—ØçÈŠûµ$¾Ñp ¹>Ö}+ÇŠÀÆ9a>\Ç ~}#\~ ™óá'úú[¾"øii0Ïz#ЉAeü·°º ù)rënÙGHY4Ñ­Ä߸}MÔ=åÜ~ÝAvX)IjõvÜ9À¥\§k Ùich–}É'íÆ3Áq™;Z:@-K{{Èc:ÕÝã¥Ô7Ï´•”ŸÐW“‡H'ŸþDø)æÖ}-|÷"éOG¶w0DÍ’nÊ/©Dêb ßïAìs¸Â-Sèyq?é‚ÐÛ,¾&F®õí 2*›´Qîù*ÏǾÇG°û»°çhýn’Q*Êý}¬ •÷åØèîRüúO1»ÞÂ]r6‰¶o1¿>háÞ‹ÄØ³ [’çe’lëÒÖv"Á=üs™Í={øq÷-Òç)çÚ/ÉØ+PKšŽ)ˆŠÉPKû™H'c6.classmRÛNQ]ÓÛL§-J[ÁkA„i+—VAnš(j$$¶b&Dãt:à@™i¦Åà³/>øìˆš€o>øÆÐ?0î3mAIöÚ—µ÷:gŸÌ÷?_÷áE?nI`¢bJjfY{¥ –5kiðQqÙÐkÇËùšcZKTöSy“¼WIÍ ð)©…;u7- ­œš>¥4ÍGãÊIy^÷+ ./MêeÓ2k·&oÊ.ä{ëºQ©™¶U¥$ÿàvö±f•ìUžØkŽnÜ7ËÔ–zêØÖRrvmµh8I{19§9ÚªQ3œêxÒX¯Ð]ŒRÒ²-êõð5 wµêK{αûç³¹þln(;6úL€ Q‡6$ ¨9޶¡Û• *Ét"ô”ùõ²+&”ÈÈK‹¦¥•ÍM c=˜7“×´"¿bÏÑLñÙY»–_«Tl‡nv¸¤€öcmõaöÏûmTkí/¬UEœÑ#⊈.çD\Ñ-")"FíaDàQˆEgä59ˆ^ ÊèÃLQ–G9¹)EiepM†‚ëè¢býKWéo€€N® „ ÂP¥…²×ð›,¶'©^ö³ úØXAõ³÷5À~T‘=/¨[)¨,ÀŠ,B(±a=!”Ùaˆý& ³·„ö‚°…u¶²7„Œ} lc?£L$lgÁÂg tÏøÒ;µ‘ÈûÓ;9¢Cð¸t‚¼‡¼Ìétf7ê=­d>êTÈâ§Š6ÅÎÓ»ÛE¯ºƒ±™ÌÖb)²K§ˆmc¼)Öá6¶¸CuÚ¶d'ü 2FçpRÚEšNšhv\€Ôè`qŸwOn²!6ØnRâ7M|Âðþž4CΛñòä &3Íþøá3%ÝéÜÌ7D3ûïÙ…¢F=;¸ypòÁÚ(ö öPK}p­¸€PKû™H'c7.classmRMOQ=Ó¯™N ehB‚Hlƒ™ ‹ét€Á2ÓL‹6úLÜê¿@LÀX‚;®ÝøLü®Œ÷M[P`’{î}÷Üwî½/óíÏçcx1€i LBD@TI.lh/µLI³Ö2 †^<›ÎUÓZ£´ŸÒ»ä½JrY€OI®ÌÔݼ€”r^hþ‚Ô<¿SÎËó¼_YqyiJ/™–Y˜j¾Y»hlëF¹jÚVE@ðÑÜÈÍ*Ú›Däì-G7š%ªJ>ulk-±¸µY0œ„½šXÒmÓ¨Ne"al—i£˜°l‹j=|‹øÊœVY·—{`9;8<ÊŽ= hT¡ Q/Íq´Ý.ïP²@¦¡ÒÐz©®£ÓB‘ŒÒªii%s—¨»ªigr†còœVà#öž¾À,X´«¹­rÙvh²“tœ)«_fÿ<ßN¥jðÎ/È*"®ˆèqKD·ˆk"nŠˆ‹è‘#†Ž0ZàQˆE—ä99ˆ>ddôcH¦(Ë£a¹GŠRFޤrÞ´—>a*ݬ~–5â9Äý/ç¬b¢PKD-Á§aPKû™H'c8.class•RKOQþn;íÆ"¥0òµ¥Òòä"ÆD‰ ÓöŠCÊL3*aáFþ€K6&¸a++ˆعðø7Ä3Ó[Œ '¹÷Üs¾ï~çqçǯo§¢S2šdÜÑ,£!Odšã‰ú;=]ÐÍõô\vCäœÉ«áÇ6ÌõIïÎ’·¿bâ‰ÕŒkž»±®x…oX¾HÆ,–º(ôÍI—Ð}•0Wvjjüï”n<_}ìZN6“ñ#ž O¦á>¥-qÄ9îqtqÜæ¸Ë‘àÐ8:#ˆAv·ëÜA]½)èÂ$†ÜÇ…~´)×Mc= à €z²$@»J^#YF6ÔwˆÑ¸Cû%\ïù´. ŽC=#àA-ô§»rŒäJŒâá™Çi¡%’ôrD}¡“ɾ?ÂØ.JüDž:FCûX;Âøh¸M ªáhëö§Å6I¢St»ç\/Dž|é…Õpååûˆ%U®†ÖÚ$•/îp¦rþ/Ö¹wþs'$©¡ŽÎµ½óÏåwƒû5ø3 Æ_}ðŒú CX7ª›}C ‹úõL‘Õ«›»¢Eß¡ˆ,ß›^@Gôª‹¾¶Û{Cº[¼a1(;§u«íÙÜé0ÄÊ|ÛnZâÞuëÖ[»EI™.wšZ¹{R³\jmÓ5O,Ïr;¯4ë´MÓX Í᎕gP«Ûf爿wyn¿˜/劥µâúË Ì$Ôu†P}îToQ a MÂÁ¦çñ'¶y¡b¹¶Ù²ÏÌš¸ÍÊÕCl 2÷*Ýv›»t‰á4 iýbö‰@£²3+2nÉx,㡌'2ÉXŽcÑ8T$…7£`y: â ÏÀ–É]¥-gñ”6 ̃‰*:ç‚?F6’顸 ât!ŸVɆÈ*‚Îd¿£ÔÏ™'„)Ó ¨C±„_Mݦ¤ ¡ è=<ÛËž e|¡D ”$!’¾J*”Nã–þñ*ü`B@¼~:û©ìå$.`¤B=<ÿu}¡ ¢ÿPKÝ<Ët%PKú™H'ca.classePÛnÓ@=k'Ý4„^Ò4Ü0¤€“6ISñÐB¥HUU‚ˆ‡Mlµ[¥v° | ßx¡HðÎG!flC µ´sfçœ3;㟿¾~‡‰Ör˜Ë¡(P²kOÔ[Õ*o¯Õíím˜vm7ޝ2v­·ÉЩu²v'ÆEû¬=Òîm&Šå8ë$²ÐŒµºœ¸Ï•çø‡IÃ^‡Sµ§£GôЖï¸ù'ïî(Ò¾’虿£*výq0p·õ÷^ì»–öFãÈ Ü7c¸¡5RŽC£¬Z}ªÆ&ë IFÊ‹´Š\§)Pî=V᾿øÝvs½Ñ^_k?¸ÿZ@(C 9r8¢Ð¿Ãá.‘J¤4‰8 Ÿ¯¦}Z*Ðj¨?¨>ϵpòc¶†¾ç&UJ”%,‰‹W$%.H\’¸&qµ€óÈPB³é<®£Îa%*VÑÆ2]²¸‰[¸ 5Ól¢8C·yBA˜­£ñü1]€ÓeBƒ0Ït}å š‰f–·¸A§™6›!dµaLÒN%äNq&s殂©SaˆO)w™´ 7›rfñ/¹Dýg4O<—޾D-¦ç*‘5'ßP}Y4ŽÑúñÏÕØ“O=Ü/Ãý*“3ªy®cá7PKù…àÞì PKú™H'cb.class¥YÝs×?«ý”ðÇEh½`‚YÂò¶1C­B—Ö²%ŒÀ–dI¦2õGqZÒ>dòòà¼ø¡NÒÆI<4Îä!3}éCg:“—¾¶iúÄ=gwõa‰)ÖÚ3{îùsçÞûÛÝ3žÕ7ßñxè€_óoå–žñ±¿ÿk¿yó[þ›é?ýŸ9ÂñÿùËoÞã?üâÛïyÖxÄÿù¯ÿøNà á€w·ràr·== uÎ…b³ãÓ"3ésåá‰t2›=§sns ¸Û'/Vð¸+ Œ¾"4JTÕ]Y–â-¯ˆŽN^D-%¹Ñ¥íd·žDÏNž™Ý“zL韙‹Æ¢éAdô›Ž0G8¨ŽÇRéP,};4·ˆØ1’™‰$ÒQŒrÀa îθz¡sñÅäLärt'zî$ã±ÙÖ‹óÓ‘dkü^k"” ÍGÒ‘dêlk$“ÀCF­±x,âãÀF»n˜¼JÝßLÆ;nwûz:º{ººÏôÝ¥,­B'Ô‹%“¡¥™xb‰03× ‚™i2è‰3sX£a¼h¼‡g¼…æ¢ Îâu¯(^ðîéZFã‘d”愦émE‰‡©Þxzb1‘ˆ'qã8ØW6Í ³ò;º-4±”JGæqõ‡xÍáE>Öââx%ðZÀ+‰‰ŒTn¯Ç2tÈ0 È çd8&C› gdè—Á-Ãy®Êà“Á#ÃYújÀm5Ð õ5ÐÇjàÁãÐDæP xÉœ ÓE¦›Ìi2P['¡•æí¯vpÒ¼‚õd\TtŸFáG¸AòÞ"3é@ócòî’ù ™Ÿ’™""3MS‚ƒ‚a‚Œ¿óygË7áåfÉÜwÀ-ˆ:à:<à1Ë‘±‘áÉ¸È ‘QÈ3Š{aðC¸ w@ŽNèìúx»̱ÛQ/}Dô¥Ã±‰Õñi}^ àÈFûw–àUÄçK𻈇Jð/_(Á¿D|±?E<\‚ßC|©l½‘²õ.—­w¥ÿ \`‡P‘ŒÜE•èï«ßT‚<ë v8É“˜=”™*J È$æE+³:´ ™]Dã`Ðî¡ µ2š:æ ü~ª—åèÉ3—:ŒËs8ªž0ça770ïaC›ÊÄŠÓ›pM?†£ ǯšîñ>‡¸Á9¨ßiŸ = ÆbÎI¼ëÇ=ŸAbÍ‚_@›ô‹hS~ mÚ/ó~eny[z÷ÂV–5füöU§Úó–Y)‹(åbµyUQíã« §*Œ­mýŽ1ª=ld¤°Ïp˜öåL·®è2týö|!£ÚÙ¡å³Ú͵­MUÖ”ŒÆš—W¦ü²*«‚*fUÁ–S¥¬!.ïsrS„v0£ âòŠ_P%UV2ªlP%UÒT!«!Q̘ˆ‚A”4äiHTEUB–d°D„²–Ue¤ Y#@4Ñ a’Ö“i=}gÈ ¦ êȪ’-§e1%ƒ‰IbJĤ!QЉƒí «Š¸¢œ%L,Ygáæˆ$IÜ‘.ŠU]˜dM&[V†)–¤av‹Ú0‡eqöX§Æº8µÖÄ©³*N½eq˜EqöZÇiMœ};…Éuqùœ¶è‚¢äŠš¨ëÿk‚zäŠr4”×Ë‘ÓrE%ö¬×(*äò"4êŒêDh²$ÂêEh¶$BKÕ"hD8hI„CÕ‹ÐjI„ÃU‹ð†ŽX¡­zŽZáXÕ"ß‘YZ+»¢w•’¦éö9ù5Mj™z¡’ÆÙn°_Û8©mjÛ{§Ç î¨wbç¤:%íÓk°_ß>©yêU -ô„Nµ(WÇ®äòY—«sWruY—«{7rõìJ®^ërÜ•\§¬Ëåß\§w%WŸu¹ÎìJ®³Öå:·#¹¶7ð~ŸS¨¾¬jø A©²Ÿ7XU4ð!Q,‰p±z†-‰p©jF,ˆpÙ’Wªáª%F«áš®[a¬zÞ´$ªE¯Áü ÚÔ$È[PtÈMª"ºIrSª„nŠÜ´*£›Î¦:^øª5 ¼þ™jœï_‡Z\-ÖÌV9®™Ü—k[ßyxZƒ§ê<Õå©"štž0ßÌ›„y lÀb~¡N¨5¿‡e̅澄Ñà x4æ¥O[X›Æ,OcW 1…‹Ð˜Æu¨î×°—àüsøÙWðæÌÊl@†vi&czòÆÄ-â&¼ŸlûÂ6®¼Ñ<ø-ŒÉ8Žü¾d.¼‹¼_Z‡}ª€Uê ¬JܪÀ©MXÛú§‘ó¶äôMRŵ­«âo ºªFy›$°ãØBuÁã'O5Ö÷18XŸ^™e´0=›ÊY±IäÙJ€&JK§%¦`LiR˜Ü ¹`ùÉÓ¤Lü¼€„¬q*k,BšÜZ„"Bw »ŠGØ—‡Ü‹*<‡%&˜‚Ž—N`Ëô¹ðƒžÚŒ°Çå¥<².TY¨(²PQda;LVIVIVIn‡©Š"©Š"©Š"©í0]Q$]Q$]Q$]€Ì•j¼…·± _úÆÜæ±ÓÃíéÝsJôò9ezûœ ½~Nû¶wy¿É~D|êÞÑ>áÓƒçØ*„ž‘ÑÞ ail1kpEžA¿¾­µ­Ïþ ±5µ ðPœOprx÷ ëPïñ¶``•ÿjÕ6¤±¡·þ›§k:[#²65ß\oáh{q¤£‰žç°’OŸ€:3]o¦y§ã3Ù5åI6”׬˜™ô♩±ìçÆœv„åxþsx{l¤;ÜöÓõà„˜¿ŠTV-܉“…¤ËüÚ¯˜í!?ã”~šÁLºÀo¶ìEq¥x›Í¯ûØ_x¸â=ÌÿlÐj¶I—÷kpz_>ƒÚ/ázйçäþXþƒoè?ŠýPKå=“ÖÄPKú™H'cc.class;õo×>f]NF®àüÒ¢äT·ÌœTF±h—ÄâŒü€¢|Ý0C=#]C#CK‹XF¦ädF¬Ä²DýœÄ¼t}ÿ¤¬ÔäFÆ*vfvvV6F6vFÊI&&PKúظöjmPKú™H'cd.class¥T]Se~6›d7KhKBj± [‹4ò"ÐB© -5š¶4A*¦~l’…nMv3K´\:\;ÓK©3zC½ƒ±¨78ã¿Ðk¯üâ9» Z¯¼Øsžóõžç}Ï™ýõ¯Ÿv ¢ËèqFFLÆib<‘ÐOäîkËÚ@U3n•îë寸Qw¡aæâ¸S3'ÀO©TŠç´åqvÄâÇÏ8æ÷a0^œÌ&œ#dÙÕâ +/::xÙ0Æj9eUtʵe½Þ0,sI€@ôgͲeÛÔP5›µ’n«Ö‚Z×l­¦7t{iLÕÔ)¨WTÓ2õ~½YsY«µiVt»ú(©ZuѲƽšº`ÙêëÓiJs+ta?[ô7­†úPo¨F­^ÕkºI'RŽR°švYŸ6ªÄÍWœpºxU[ºgÍØVß\º¨/=4˜¾tñ#"«Q†Ö$P"PÊ((Wè²å*q#aõ5tÞͰ ºmß­Ä=zþyÎ)."Z…f½nÙÄçðiD¤¹Å§ŽÎˆZ}F?%ã ) ¯Jè—”pVB\‚*¡OÂë^‘p!Œ6ÈaœÃÙ0Î#F^ £íaô°¯ a6eœ`ÑÆk®é”µ„Ñë"‰Q@ÁÆCÄe…Äx Ò˜P0„ ö]añ&‹· ãmŽN²˜bq•+®1šV0‚ël¾ÃfVÁ¨›ü.}ƒÔAÄE\Âü˜0@š8;š®âèG+„è†$#dNnὤôLÞDnpòéöå¬OHûHžbp~ 7rÉï1³‡hŠõ6n xŽô&fؾ½‰Û¤r{hc3÷n=G†Ž%#ï9óÎ|jÝi¥©¿áÐ?é¶. @t!D¹Í/h}Šáùˆ°…Âî,·õ¬©Î®m¼ïw07YìüÛ•·1'âŽ8ZCg‡?à/ÑX(óù£ÙÕ°b!¾Â7û¿Ñ{܉Ù¨Œ]ðíþ±à×ÐþOçîÿì¼Üïÿþ'Öp~Lz‚`‡´;&»Ý>pºåÄ<ûð;yÙâøó…çv¦.y³=Išg+F|ëÞHÏ!äOyA¿øL9ˆö–v{Ѩ;èV—DQÀºà&ûxçwÈïí]=x7ãÿôÑ솗Õ{˜ÕN;ÊY²“%ÎlYQq·L¥ Þ²öÔ"©/yà£óq ww7^¸ç¨S§xu^]:õ3Ò_yU~®J¦Ü½Lºüé/ÅËɳäEÏ?ôe‡tçßPK*à±ÂRPKû™H'ce.class}S]Oi~ÞNË;†¯Òª](ή¨C‡òUe±õcÁ­¢°iâ‰ÓvÀQ˜i¦Å.7þ/ŒñJL¼€DY ì•›ø3ü!ëžw:h@cÛ9ç¼ÏyÏ9Ï9gúá¿¿w!!ƒYGd“‘`ô¾C\g>0—Lgqp¦tÏ*×ó‡ábݳżs‹!¬÷Í7eHè_'·ÒßÀ ߀ âò$A9·èÓkùùñý _o34éd‰>¸¾%¢Ïûºé¼íØõ‹Äs­X ÊäòU­Û®Sc(8e×óˆ€æ¬,—,Os´ªé™ËVÝòj9ÍzX%§UÑ×±h ç¹dW´™Ë“³ZÅ^´ju‚•¢»â•­){‰*´)Æ^°­Ê¬ÈDeBbNG毘µ»î¬çfn Œd†G††ÏÝa`&CÔô>®B®Ôa™µ:\£C×ê°\‡¥:Ôëà×a…Wë°X‡ëtXÄ@©œ`P\9·aSpkp~4똿,ìêBÞŒ¬ÙUí›ÌPrÒtS2‰uà´§·Š×2P+箫(Àyëhh¯ ði­²![Dr’jToz®—Ï• ¡ ‹ÖÕ¤@¨Ó'‘áyœ¢Ol\s ”=·R‰K±Îî$Zm·p9g ¬êNfK̨œšvWNÙ4å<ÊÏœjž‡¥t κzN˼.3Ôˆ${æ7a® ÆÂqaž£‰°Wâ">A Xâqо@›5‡ë8vÔEb‘äô >®¢¶[Ìd$T"Ÿçái.‹‡M¶å+8—¯¸1˜¢€™èÃDdk0iÞ`ö0ÈOףݸ&'ºÛ£‘gçY#É5®Ù2;“‘x ·bhyY Š'xSÙáĶ£‘pÅòíÁ.³¢+ÒkâüœŒù-Ámæ¶ÎxÌŒ%+¢f¬#¹%J2$:ÓæŸÍHD¶¤÷œ™Í —*6›=g/áÞHÆy#ëJcÉH<ËÖ§^‡ŠˆÒOeŠêsMUdåÿ-0ŽMñîDȼ6¥c¢Ô*Y·<ص1~c"î[»`^µoAõ¥ ®¼b=–)Ï<†6Ø‚1½8jG¢ýr¸ž…m ÐIŠb,ä„â[г9NŒN #^€N„Í Áîhr ‹JB'ä\ ZkZ“¶p‚5™i¢z†jô ‘†­—T£B£ÃL®4»º‚4±¿~›°YYåX•N¬¡i«œÁ¬é «Ûb6™‰é¶Sô Î:fÎ`,ãɦîÎÎx"i†3 )>KLl—1›![11ˆFÍŽ`ti(„>O#’™N"…g'J–ºæ‰ømˆYÓ'†v3~QüˆÆ]scæmBcˆŽ=fnKÖ÷$M:51ªð~!rmUN"UJÔ bx‰ª!3—ƒTŠÀç ÏuØ€OÀ> ϰC˜1BÔQ>ϰ›¨Oµž§/ø ¿NÔ‹<Ç xŽõ ß$3^"ð-‚o°GìüZñ]ùYð}°‹t3g¿2¯ƒŠ½Â¢_3xîAÅÂ.>}jbúO“…<@œ}b‚}BĉONLŠpñ鱉é1ï@ÖYÜËSÅò3;„ŸåÛ†)Î|~c±[Òìí¸›Ž¸‡l­++‚}ApïU¼ìÃue…Ú­…ztqù½‘¢á‚ß–êËÂ~Õæ·+~G f¹íE0~§zÇý~»O¹©Æm¿óþæ>s;ÜêþñW<>Å72¿SüZ r}nMiîÓ˜[óìË2i}Ú¤<þ«ŸTvŽ¥£À"-¬ÑwìJ:h~Õ­Š ùUŸ[}þ`ƒZ¨™ÞòR»ÛQÓLP¡õÙ0J¥vŒÄ«>žÓH÷·(ýh’ æÀùh¹}úÊôÝãÅ«b"ž5"ž¬ ¥q‰¼€þžÕ×Nf¨0OzË1¡ÿ¡òëŽRÙí°†²Á8ÝÎ"†o‡\Ä:VHõ8¯92;Ë;ò ,í"Ñg3¯ñ<säº[0dß ^—Kôש€Ï3¼oœHÏÆóWØlšÝ?þ¦–щ–,Âr9ÔN Ks:,]2,«&ýÈ =®F3ÚÈÈéu£¯B~£ìäø*Œáòº»;]S¯s©ò²ÚgG¾iñA?Q'—Èx•ÉR€Å›·+:ßS5Ì ²C¼¿•|áªwPKë[y§ ÕPKû™H'cg.class]RËnÓ@=“&™R^¥„¦åU…:”4uØ€²+)RˆH]±˜8&uäz"ÛA%ŸÆ‚à£g&Cdyq}Μ{Ï}(ùó÷×o¬¡Wk^«/ÐðZ§SõCub•L:ŸFÓ0È{ey§Q2éYÏ™@Õk O–À5‚yJïT%=“wìë’-VÚâ¿̬Öð 3ÞÆ*ˬ¼çä, æi”ÿì ¿¨d¬/lEÝžôÍöKb›’ôM®æ -n¼¿ ÂYé$ãc çi~ˆâP`{øNeçúsªÛgþQ·íwý7¯¿ Å1J0a¯ Ö bLa쓘Çw“âœ1¦¼Ä.i®šF*Žjd&íÏc§:Ìg3æáxµžÀíRÙÒ¼YþY8*fðq)±/q áIÜ—hIìJ<—x&ñ´.ÐÁ1*ðѰ[åŨÄ»T9Žj•ø‚JÓevÞs¸›ðßbð!jç!•=Ôm¦é*w>bÞàcH×éZÁùÒ*W]æŠÃŸ¬vØtŽ:÷=tžë….m;w½ Ùš[®ßVib¥Ú¦©%oð[ÁPK˜9TF°PKû™H'ch.class•W‹SwÿÞä&÷&M_)a»”Çu–&)¢Ý–2:вÅbÇæ¸$·m $5RQ&Šøœs¨0i˜¢R][ Êc8Ðétº9ß/p>§Î@<çwoÚ”>?|î9ßóüßùý~'å…ÿž9'êñ†ŠˆŠûT,UñV T„U,QñfoQq·ŠÅ*êUÜ£b‘ŠF 5ÁºÖ-FŸ1?i¤ºç7'l¶I”qÚ5›·˜±Üu{.“Hu“ÚEê>âÎ`]‡9X·q¹„Ú`ËDçåù®.3ÓÄN-ì«[,Ÿ¬Ëg¹óÛ˜ëŒT<½­©î! eÁV#ÕÔjìlâ€9ÁÖXoÓÆ[Guˆ¨X¾©5–’ljEV^BBê'‘mfÐÊŸHÛ{oIõæs´Ó°ÒϺÑaM>7ÞcJpB[YNl ×5©žüC“è'ñäýÎ;ÉY›Äyãrë oŸÌFF*È$'R‰Ü*}¹× :†žmf.Óc¼Ùy‚ÍF*•ÎéÝfÊÌ93¢§E«tVrlÂH&všqrk»fÌÒßÂQnNÇM åÍéT6g¤rF2O²ÞœÎ'ãzéjz®ÇÔ·š;ô^#‘¡HïŠþ˜Ù›KP ‰:^Û’Š¥3^g’âY“fª;×£§»¨–œÙmf(eÆ w3“êf/9™q=2õtFÏmOÏÉû¨è¸¾®}™¾-Ï'óY;YCE+Õ—Õ»8ª'‘¾ÅŠí³VtîÍoNR…´ -•ÊEujÇ*:% Õ“¼`ÿduú­ž äj“6bè¡+ÁI•IX:®>»ÏÔO=ž6³¢÷ù¬Iѫڗ­\ñèÚÑå©¢ k3‰>:žÌÍëÖKð±JlŒ4tJíé|&f®L$éTZTJз…Æmql´¬½tÆ76¦Ý|ÐД)ÛÍŒx%Æfî\å ÷AÂìR mu:מïíMgèê–Rsƒ›•®D[â«i[’I³ÛH.‹ÅÌlö&.ÖƒMˆ+SâRuã5¥#ŸüWƒ¸•¾$}´ó²”¹ÝÊã6ÓÕ\º˜A꣯_ÁJ«d˜ Pð6- â 6(¸_AJABA‚^[¼SAFÁ†‚M º¬W°NÁƒ 6+hUÐ¥ æCS|hCƒ3Y͇U¬[ÁdëÖ šÅ{}hGGÌöáQ¶>?æ0™ëCšýÚq‹·ûЉ™œy&‹3Ø0“óÍb2clúðvLõáÝVª*ö#´wr¬Ÿ« °s”ó-÷á¼î6«¾»|H¢Æ‡K¬ó"‡Ç=ÈãSLžðù4ëždr€Å'Ùð?ËèsL²¬ý8Äè)¶~Þ‹8ìÅN|Á‹÷àHvá(“cL¾Èä8;?ÍèKL¾Ì¤Àä‡=à 9Àâ6P{xÇ,ò&_õâ8éÅ^|Í‹â댾Áä—6Àä›^|ßòbç%Ÿeë û9K“ï2!/>†aF§$&,$9GI}ŸÀ'áÄÉf>ZÁÛlNg+8µYpê¹à »†GˆK˜/²þ‹äw•ÈÿF aºJDç‘f:é$âU¡aŒ„ªªq&$âì r†PKìyÕÆ•N-ñ G†ðíÿ…ôÉÕ'ª.®QMœ×pQäwЉWŒšçØ%hd>Âùs&©…n·]Ëââ rñò­áгxnÏ1¿@ÑÌÏP<óKƒ¸Äü,¥ ŸWçvú6NRç¾[\´ÌbQçq ™J|;çrAùYôwú¥a<žÊ¸,µJmÒj)*KQ—uKQEŠªRÔ#E½R´LŠú¤hy•ú<Þ+E+\‚Uú´Ò•Óø^k}¿72„.`×ê1•K°«»K°R‚Õì)ÁÞ\V‚}%¸¼ž›7‚8hÂ8-^. ÎÝu%ýÌåM„j49ÀÒ¥ü®ÇœÒd­\SGð¢šZ¯yGð#'Bšw?v…»pý%ͨ) ™£¹(Äc…xƇÈG¯¿\à¨5Uóhî¼Dÿ×ÐÜZÙ~"¢—ješo?uà Ñâ.§¦ÆÜÀ”ƒ˜©¹¢MŽº´@TÖ<„Õ¨‡°*ò.çMyµ '£—é…ir}¹x1 º5¹^IÀ2*ͪY«ÈÖzFµUîQµ‹ÖóŠÚ7^)ê#~§V1„W´JâΆv­R¦ÚÃ~Y«ÂϬ—VÀì âÒ¹øÒYÐ}<Š^V€[«:­_†«â”ãçš|^ÞÆ/è×ßÅØ%pýexê-­›µn +Œ «ŒU {{,ìeìµpã2 ûû,\θ\`W£¿€°Vð7\†îl¬) RHçú½5R FHçŽ]}¯_ ø«Ôc×_y¦z€ž_‹c‡cv ¾ïü ¼ŸøaÇñq/»_Œ˜iö¼8 i“<^h§j¨ž‡Âe~Ã{:ýÊ0~y>rN>‚šÈ9ëe“VZç¼j Çàc âiÛæa[ˆt4k(ä(ÊC™„3xìÉEoè)ð»:#ï>„™vuúéZÿеCøõ~#òÐc¸b'. ׄ‰ºGÌ}{áNšÄ<©nã²tùø LhE'üö«´‡œÓï°f¡ƒÿB°µö(®äqpÞÐiü–¦ê€í˜?ìØAÿ¬²jwI§\ÄÞCE|{[éÞýÎ_>„ßZÿ0ˆ«Ìÿ8ˆk¶W[H¢³ˆ‹YÝÞd=ääÿ§|tÉ÷uã5ž¶uÊPðá’­î fØEöP‰ ñõañÈx´žYâl”î¦ä*µ¿QÈ‘€{Q5®ïÞÔ(ïuKw„nÞkTÍȽ®€¼$àb·Ã×ÿ3C> —|Òyrƒó¤XÿAú·[”½m´‡+iU.;JË]»y Dà* §ñÚ©sqn ‰µtÛ%©–!­ø·á“«£­¨³s.¶{s:ﳓL§$iúÄ$¡0­5öc{‡ÝÔf;Ó]akÚ· Qc÷wú+†ñ×ó%ÐÉóVT”Ñcc>•ÛX»÷‹Ôš:l§ž¾ˆ„7r=Äײ¯Ó_9Œ¿QÆÈ0þ~ã_ ¼Ï7Ù)jíkUIGü6*ñõ…üs|È>ú–‰5ÿPKÄâÚ }PKû™H'ci.class•V{|Swÿþòº7·)…ðÚ¥<¢c[HR Õ½R†BÖ$X¬Ýœ·É¥ ¤I½Iº¶n²)Ûp¢ˆ: ó±2ŸT×”îQŠlEÁ÷û=ŸàÛ9ý[=çÞ›6¥a~üãžßy|çwÎùóKÎÿûéq8Q‡ÉX-ã52nq½Œ: 2"2ÖÉh”±QÆkeDe¬‘±^ÆÍ2npWÅæW5ïÑú´5i-Óµ¦)­år fh·uîÑùYêxÞHeºHí&u_£é±MÀ\Õ±‘—KUÁf-ÓØ¬ 6²tM°9ÑÛØ³¼äôDÁHåÖÄ™Ñwh™d¶§ÑÞ•èklNäJRÒh䥚)©¤Y´ü¥²v¨±Lo!OáéšånÅå€m…üLÄ‚à¬*°zapv¾\µŠzÂ/®¤ïàr„*X*`¹XÿxÀjpÇFëF®ªd##…ê ‚wÐRH´ÆÌ;ó¬KeRùõTØ ŒžÐs9ÍdÍÊR¹@O*—#O«©µd@£;ìîÑó©D Á•#}°IËd²ù@—žÑ -¯GJ»YÉÎSZ:5¨' z­ 5ôé_èjÊ&uê¦l&—×2ù6-] ¹®)[H'å§òÝz`¯>èÕRF@Ë“LQçS=:¹qnŠo /D·k†FaëFΖTí¾Mð±\èL§¦¨ÜÚŸÐ{ó):Z@PÔÆ2‰¬ap¤Ò_ËôQÜÉy LC–p¹e*D;pª)Éeèååè\·fèÉ™€P @®rÝYÃJu†s« \À­Ô ó*Ì»¿ÒX/}¥)¥»oÕ)-`˜Šéc”x¶`$ôÍ©4ÝŽƒ{QÇ&-×ÝndëÚêW7ÔÕ7¬­¿ù¦;è.ÌÑ”Ck`’a2HªNb:ë™ÜHR‚˜DŠZ5‘ÎfØk"+àMd{¨úÎ,+z™ä˜ôц$1IÚ>/©ïÖ éü]KZ“O¹Úº]””^R:’¾]ò/v È»S³÷H좯›> Aì¡7³ô˜Ä¶MõÍáß %W~~èí)ãºa¶»ÖÉ¥«¹ìšV–k¨­Ù|¼ÐÛ›5òz²,ù—Á,weÚ2l`ZK§õ.-½!Áˆ5y)-e¹—ÿVÌPY U*BÅv¢ºî¥/MñUý.ë¨îÍèýùy/‡?¾à~ o°MÂ]z$l–°IB·„f ]Þ"!+!&a«„´„½  q o”Ð!¡OBFBRBB »$¼IÂN º„ ) »}c‘wâ&¶@õá6[±™9SGb'“í˜Ïâë|hÃÞöjzÙ³ !6Ìó!Uìà*&KÙË2îÀb& ·’É5L®cëÕÌùy/YwàU¼mdîx½·c“oæƒ &[p­oÇBÚ-1¨ x1€# ‘£,cñcL>Îâ£l8Æä1+x޳õq&Ÿ`Aöá“Ì}JÁ½øtîÃL†¼ '˜{’Ég˜|–ÉçØÕç¼_P°_dî$s'ÙzŒÅGY$r€=¿à ދ/)8ˆ/+xžbn„I‘ÃerJÁû1¦àáXžfë3 ³ƒA&ýœàžUða<Çܸ€`â@=Éýô?éa|…‚ï‹Í|—æJk®t…æJÅ5Wª´¹ÞiâT¼VAþØëË$keò?1Ÿxj¢kI³ˆt‚V%4ŠÓ!×&†Ó[µdcÌRŠŠcœkb‘"Δ!o¤ÏEøA3Ò’ßy´²_7íùJÉeç”y±}lUHŒàlÈ9‚çK -S å6ÈO>^1Iß¹1R[Û1(­)Â~uÍáÐS8?‚ó¼>Oîi9;‰F^Æ_ÀݢŹ~ËY\Ö0 d™Åñµ Üßï¦büñÿ¼ŽPˆìæÂ.ð:A„OÎHþô½µBòE|½k«Yk2;4¸QCëõìËýªŸÁ¾v¿Å7NSôßÍ¢E´Š¨KDÝ"êQIDeõrBE|k÷™Éu68­e| ßv!Ãw¬Tm`K„. è*§Ì­u¬w[f÷´™¡ÏÊQç¬zŠøîô–¨«Œw«n®î¾ç€êV=NÕcùPÝÕ5†ïÓ¿~ÕVÝcø)IóC¨Ä23>¿ƒ ô£SøqT.±?‰z¥çpO»Z¼ÝeÅow[AÆÛ=ª/­Ve¿S­.â§ÿ.Å£sT¯ß¥Î)âg!UV½ÔÁCX¹Ë¬»›ë>‹õ0{s†p8ªœ€GUNG«TÏ$–8oð Á§zúœ;÷ûÄBb©K^V¥i›4m“L›k §ÿsúv3ï6ùð$¼a“‹1¹:âê,¤< Y•‹ø…êeŽ¢þå“UÃÔo«ÅÝbî7ׇð€¹>Œi=.ž˜Ñ—ûÌZbÉ4Æ<$Fi˜è09TÇm}ÎîB‰óŸÁCGYq Ý/âÅÓžñ#¶ÊË*îÒ&Ålݰ¿ªˆ_Ѭ aÎ.è3ns`vÒ„h¥‡b:`Æ×V \MññÜ,6ã+Žj>axVj·c=r5öÈ9ýk2üûfk퇤†{÷½u§ðkz†m ý ÙÀ6’ø¥Ûjeç'™9ƒƒGKü6‡‹øŸzé·GL-‰¿ÁE^?‚K6ª…_¶ ‘R0[Ì׌ÏXE«ƒÖ…„ÿu •êPû(þȳÿ§a3N$| ,ÕC´Á˜Êf3…È¢tÒ¥sp ‡ˆ¹ÈÂ)ü™Ît®B5‹µÔ„BÔ2K]øt‰ÉÅá© ‚¶Ïuö¿¶äÓy‹íd)9qˆ¥³„ÂtÖô£°Ók²=]¶Ÿ !¨”âávÍ(þrºŒetœŠŒ*jg^Q“N'~Øt­Ú®Ã¶ëÔŸ<%r2Ût°Ý?wåߦQüíòŸ%Îs…í¢Ö¾à*öß[(Ä—B´å3·¢¯É,ЭÿPKì”\‰»¼PKû™H'cj.class•V‹[Wÿ »Ë&›lé†<Ö¤±Ëî’ª},M R 1›’"Vv²ìÂìjj*6­ñY‹J|Ôj-©Ï aÁ’1)Ñjµ¾U“ú~~þê93³d Ä~~ûÝóüÝsÏ9÷Üùöù?3ÊðwȸEF©Œ€Œ›eì’±CÆí2ü2vʨQ&£\ÂZiC—گ‰Ž5q5•ª”°n‘õ@[—M/1GÒ†žè ³‹ÌýÄþÒf Nië^ +ü j¢²Aªd£ð7D;LiI=•V˜”í3ôôàÎ Ú!5Kv›¨í&ªµþ•p›ýBOÚYÖ'zúÒ”™¦Z€-×ô¥#Öù—4€ÍEþ¥¥–ÖßÀNøõËÙ[¹e<Ë`¹]ÿxˆÀÞeÀ­{­Ë¸i99)Õ|?!L¡JOèéÝÔÆ=¾„ÕR)Õô%Í>ùô”¯[O¥hߺԚdL“°²&™H¥ÕDºY÷‘žW['Á][wP5Ôn-­)K5ô~5­Ý­ ÒÚ××£¦¦Üu,ªõ¤u #A¢v–Ô'¢IÃàUºâNŠ¢G}Q¾:6PŸèWãzÌW[ç;ª úzTÝðuh ÍPÓ”éÙs \œ^䨔ãHuª†[ì/Íú鈔¯=iøÒT}î™VO¸û©©Äx<%¬Yæíx–{"ÿ× ÓP5i””ê3LõÓÖ[3ëK$é>èªtJsH‹‘G‰$ûŒ¨¶Oó5ð˜·Öª©ÎäA#YÖ\¾£¢¬¼bWùwÜGÏÒœB‰²ÎS+˜$˜ ‘©„¶r&·“%!ÚΤ‹Þt4žLPè‚h²›š¥N²£‡I/“4“Ú#!Æ1b;v+5%¦µ«}ñô!MYùSSlÛª^Ëóbž:I¢£åv=a–Hj­NZ:-Jhmö×X˜!z7|ý6ÜøáÓ«Ï:#šavUmãN^wŸnεPKš’éH_OOÒHk±œDÖ^³ÂåXs°¾kÖúx\ëPã{¢üøn±^œ®²'²úúô"“5yÔº£´â´¨f‰v­HhVÄ(7™{ßOë˜Àn}õíUaU`¯Àë^/p—Àƒ]Ýû $:îx³@TàmMM &h¸[à-5mouc7✎5n²l[ôàÑôâÃ,=¦ÀÀ«aòQ¶($=Æäc¬Ž2„H £ 9Íäãì%Ü>ÁÒ'÷)Çð¸‚A|ZÁeò„‚ûñ&ŸUðv<Éäs yŠÁOñÞ1VGXá# &rœ#8£àxZÁ |^ÁƒøK_dò%NãËL¾¢à]8«`˜ìÅ8{¿ªà!|MÁIŽrŠIÔ‹s Þ –2“<”“ÞC7>€âC(€Ä÷Ån¾<“SoMN69]´Éé®MNs@Ü‹â^mFýéoÊÑÿÉÛLº,Åd“ˆ+ILœ˜ìS³˜5Äã"Ì׳îÖ÷v;„7pÓó‰XϤ L39ŸÝR½°e³½ÅCŸ d0CkvÑé4µ„aìƒpÒè'ìÜz‚tÀA™_œÀEæ—&pÉ:~MÐ:ÿ NàÎÏ£’ÙÌsHKŽÝcØÌꦊyxB›,1ƒoÌ¡/2ìLÃÌÿ¹ QêÁ³f>AZNʪŸÖ‘eú’ÁsÙÄkÉm&.ÕÁ…ÄCœ¯ëq¬œÆ@‹GšÄü,•rYj¥&)ì”Â.O…øæ¾Õ•žoœÆPË$¾ÝTÆåeðiÜßR6‰ÂN¯“Käê3ø®×™Á÷Â2³Ã.ñ,úZ\‚£"Ò¸óN\,¸HÈ÷º"á‚Çá-Èàû¯Œ–#a%èqz• ~†2øáV1 qq!g°j áü3È÷æÏ†…×5 ŽÛä1¸½®"ÙqxX–Šd¯‹ú¯Ð<EøQx0ƒ—/Ëà'^ç<Ìüú´§ÞmÅ xï þ^^ÔþsˆÖÛƒñ$=Œ‡³Då@OÄe»ÙfŽÁ xà4Ž·xò'ñ³Ù_ų̈mlâff7Éæ ¯PÐCÍú9MüGÌ= ïÉ.stóp˜¾sqæTƒ•{>yŽ›Ù7f§ƒž ÃžõföK&d|Iá÷`µ=w…öÜ9J‘„餫—áp…•)üŽÎtTa%«%4j’TÂ"ÍÚ?9¡«L®Œ/$µÕŽYE1¹ð]Ù˜Žj;ÈF ’'m\$¤³®}Æ6ØåÕØ‘n¡ò~?‡‡­9ÙâqOâ³9"¸4n–"ÓGá“ã=9…Ÿ4C¯³CíÐ[hzß; %tï3‡øT‹gå$þHC“øÓâ19eÖéµC”Ø\HÍþs#¥ø—mùëâ-ôî4Tù_PK¼»7üïPKû™H'ck.classUYWSWþn¼\j#FR‡ƒ`¡(VÔ’–Ic¡¶\’ CCbNj:·vÖŽ´¶´]>ÈZÊP]j_p­þ†>ö'ô¹vïÜ›„ ¬úp÷Ù÷‡³Ï>çþùïïw`B9~³ÁeÃ6l³a³ ›l(0¹K¼«Ü%-Cê)µ2¤†+Ûû‡4¼~±ÚÃõIŸN³»¤§Q_(Â·Ž F wo8šˆ“‹¦×3|ãb@{"ž(r?\CIK‚:–²t.£?*Pº„Þ»„ÊËAJ–SÖ%’•Ðèǰº[Æ“™·2Ó¬×a#š? ÆÇ*}Ìh‡Õp 2l8ô4z¹ó:C‰™$gq÷$Wëî`8ß# ¸ÍM‘€&× ÄÕp¼S %H–ŒúµhHÅ¢»³4æ#k¦ SByyšÖ{æpI µ¬ g_RV`"æ2,æk¦Œ[‘áv’J’hÕÒ¡oÛÚ˜/7ÍájͺáS:Âú Úì søÌ æ0§Ï:ÝÇbªµN"·Üa59g«Ã<ñà‡%“~µÞ%Ñ §µÍ‹‡N±ì>ònáhwyŸß-ûÇ® KR1/v™æ;µ"ö†«¨Î*Öi6‘>]‰Fy™,´û”5§oÛnêS–ˆ/É&‡e— ÁÞ`H4ÇÉ]nf­ÃÚ»Ã^{öÒbí#¹—d}÷–‰M¢XGÚk3({¯Ž°7L<øû¡F›2}¾x•ê×çŠ>õTàW™›h¥~¾HO• [ž¹‹fã.NãëåƒO㛩ô¹8 _'ùšiÍÓu}š‚íùŸ›dԕïõ£\¹Jœg\c~ži|; ¥ëúè1øî.½<ßOé7Š&F]pŸúÈ¡!i›ñëgkžZ®m9ü y”}ðӱƮ¡;Æ·LIû„ ™î¥žK—ñ’­òÌ£Àsç2mGwu?Ü]üzòæ3üœÆ3›G›ý‘p•ÖŸ²úès'«÷üPK&Ó…üº PKû™H'cl.class]QÉNÂP=°Oqql5ˆ°Òt‡CBBÔHÂB⢔ %µ”bOsáøQÆÛR•°¸9çžwÏÚ¯ïO„QÀ)CXVª )Y©õ´7­hiv§xß꺫ÎÊu×1íŽê{ YiV&@$¹6V•'†œGj¦:1 }è˜î{±îãQ³ÛâUõì’ܬT•ê/!…{ÄgsrÓÇèÍH7ú®)ì%u1ttãÖ´ †tóZtŃ# ÒY¹P*Ÿ—./ž˜FÑbµJDt"ºE uKØdcm _(:]:Ò_Ô´¢cj–9ÖZÞ„ìÿáWžùN¸õa¿/×hÿ­Åœ)›˜ã³“FÑŒÎ`#ŽŽ}ŽUŽCŽŽÇÇ.ǶÄp !(8‹P+DÂ5R–I‘’^’ô/=Lcnª"CÊ:$ÿeƒrø½x€ Ήºg‘#m3èÇ¢[Až@tª6ƒ¼_³451O±B<„ØPK¥phHvbPKû™H'cm.class•X tTÕ=/÷ý2™›aÉHø¨a"ÿ!¤$€Áb¦¡!¢™$C„L†!Äððµ¶©A ’X ÖŠ?ð·ìꪫKZi-mU—UÒsÞ¼™f—>Š_ϦÌq~Í^ýËWûáâËß±2Ìgl‹;wëþ~Üd¶~ñ7kØ¢½8Û—cílw×…lvߟÞ{•}sô¾"Öu¼³Š¥¾P{Š]h¼ã{vîâȵLÜà’ØgçÞÇξóK6`×ªïØ›Íù>viè l–åî~ží}fpûaûK㘯°à${ÊþÎ6Ö}ñÒclmÃܘOíLvùÎóf/ YN6CMldßæÕÖ³cãÿssòáQö÷ug·²²)ƒvñÌÞlÇ‘?^f|´g™ ©ð°,uhŽÎÔ¡¹ ¼Ë¼#*¼•e#f/ð•TßéΫ”W–Ý£É@LZ89Xawjt€œ«¸rh¨––üÉWñçäNÆQ4•œŠM’là%UïÄV,µŒn)µP÷©J*Ê+Ë«3pÄ£!fùK}Ägù+—T{+«ó½KÛ¦Ô”øªªËÑ+€€1„é¸Îû³ï®<ÿÒ@‰ojyòܳþʲ”Kû)þy)UÞ€w‘¯ÚX2>ÅWS…kô•¦Tú+}È!Ñ} ³½Kæûø‡å>zبÑ#G;—zi/6¼cÈè­b2%dJÉàŒ±Þ@À»¼Ä_µÙØ-`¯TR3 ¡d:) æáŠç•Wz+ÊW,Ã2K9–x–úΖûGäùåÄñÓ‚†ôlxá¯Î[ZUåà:Â{"@ïZp0<ß+\yË—TûHàB,X¨±?–*,‹±°Ð–ãPa)–eXÅRƒ…V¼BE ¬Tàq–+àUàUý% <¦À&jXf‡%ðˆòaºüàµC€`1xÈ̱Ã2 ÉT’©&S÷Ú¡ ‰ò Êá~¢Ì"8ÌLŠ7#6Ã<;©õ 2/ØÐü’Z/’ù™_“y‰L#õî´Á“°‹àËwKü7)Ôè¶Á6ø õ½B¦ÉÛa ¶À« {21dN&“ŒJF!c'“H¦‰L,™^dœdD2qdú’‘ÉØÈ$Ñ`Nü~cŸ…çàyíÍNÛ¥× ºÒ¨qkõwM¯q—±N¢Í×qµÎK‚¥X ðsZ¼x¥ ÿñ*>‰ø1~q­ ÿñj>…¸Î„O#^cÂo!®7áß#~Ü„ßFÜ`Â@¼Ö„ßA¼Î„Ï ^oÂï"Þ`Âï!ÞhÂï#Þ±žRþ±Ï„?D<Ï„Ï".3ásˆç›ðGà„XøLGÏlôT¨ß¨RîèT é)yЧ@¢–Ìíž…Ëž•«ž.s7Z…¯C«ò{ÑÆêmÿmGk—ÐÄ»® IäÜs^kÕg(ό٢"n“ûìusÞik‡f7ÏìTÛa_݃4¢ßŽu Ö·\îNë€×ƒc èúâÈ-ÈÆœ N· $\:Ä­s„ýhZÒE´­éÚ¶t™¥«M0+-yL"tצ+ 1‚¦ˆ«5uåégx0Z³¦jÊÌUÐTλ_wi¢&ÕjbL½&×Ö /rEE.®Ô¸xÒªº äeh2Vµ.äIAžˆ¼˜¢¢tYÃèAã\UGÀE. ëZMF¶dKÈfÈ–4‰'Ö I@¶D<ò‰Ô¨Õ¤˜zW.#]Dº¨‰¼O ÒEâ¡/Z³‚tÉ‚fy²eÍœT(ÖEs’¡ZWÍIN¬Ù<‰6ëºmH» ÝqÈ·ß„n;òã­èŽGb/ëº{!=á&t' Ÿ_O7Ñi†ž›H²UTÝ߬šÖGMçî0dÇ’ì¾WʦUÒ†˜¶¯·!»ÉvDȦeºBtÊ/§!ÚI¢í×MwD³"š½uÑ´w}-‹¦›ÝϺhýÂ&YQMG~‹eÕt0ý-‹Öó+ù&TÓuuYPM³[­o5mÞëª)»R®§ZÂL¬ݤ—Ò0ùŠ4ĬïÁ CkiÕ"RÓ¯>|29ÉäQÙW犯ÚCb_’{-‰”s·]_"mÏí–ók )R-)ÔO}èõ%Rκ­H¤ šfM!Qï´¦²iØ Î™nÍpK»H™?Â’Fºç#¯-‘Șf™.¢‡¹tËÆBHhâ•Bi@ˆL×ü'†T¤Æ][ª¾WwÝP+PºE©tÝî¶(•Rb¬U©´®q7ÞV:ÓñµÒºî±¨UOŽ ÅÒÙN¼±VúÎdXÓJp’U©”%™×’ê.À?­]Eí°ŸZ-¨«Z¨ÙŠÝíÐJÍ6 Ûm¡¿î‹Ã||LÒ_÷ÓÙ„&ˆÇÉöõgžAèOÍ®Æî¹f’Q04m!ns6Óà6ë\±„æÀ·ºñ‚¨2æ(= › ÁÁÜ4z `Xª[02Õ­œê6ŒOñNA"Áæh?OᓃPG;t0£sŸÞù4¾CÀÉÓZ®x‹lÕךg¬uú¬§´Ák]œã>³t¹ zÓDôhòOƒ,4ˆ‚&¡±ûB°ŸF½<ð\»ÿ¡IÍá­| ^ød /|ABå•N8¼z^˜±»ÀÆÇºJ›@á5®R:¶Nu¼”$1^çá*¶å$™Ñ'Y½a«'I¦RWW†’îà=Ywôëq(º#¥Ç¡êŽÔŽiò yܨI;àqiÉtRôÐÚêÁÅ!WWDzx”§_„§%Fi‰ Ò¤5Fi Ò¤-Fi‹ ÒfÂyè脳È7œžÔ·ºcé†:~J9ã˜LIãÈ¢¬qd_‘}ãžÃ+#c½Éõ"ˆ­tè~È+ø¤Út‘gjb)>”1;\kåå^Œ_›F˜¦‰;a‚.m}C§ñ-HF;ÑM~vŽ!¹4ƒ¥‹MàNKFG;Ñ“éâ™»ºÿîÒG»h°«hbHãâðÚ±¦µIîè u/„£;ÁèfŽ)-Fg%L‹ì䙡MóÃ}Fg.> }…\Ç>˜ß&0vŽç6<[ÈÅL°;ðŒñVtÔðQÂNã× ÕHòc ä n Y§-$¹ú*ÁÕžs6~Í€xê _ÏQ†~&I1>rδSàHëÚ ñGaKcê!8q<òæê¿ ýPK²IU 2PKû™H'cn.class­—iXUÕÆ×fŸ yAŽFr g8ˆJÎEáHó0¨±ÌÊÊhm¶²¢‰æÔR+Íf›çy¸ÍsV6ÏqßwŸ r½÷¹Ïýp?ìßo¯ñ¿ö­³Ù<õ÷}ÛŒmòÌ‚€é0{ZÆÎÎ)²LzvNñâèQÑaõÑØÂa3«×V7ß½º¤¹©.¶p¼3¦Ì2žìœÊ¸8C0ûß{ªWæ¨/*ª,,*rFû²y«Äo8ÀŸí4ò.Qwn³7»Ò© L¨®¯‹Õ5O∠îgrCM­e’'7Ä–6GcÍeÑúe,'M]^]ÛØ\ÇZËXœÃž>e$«K–5U×N««gŸœò¦†ØÂ¬Ë–TÕ6e5,ÈjŒ6E—Ô6×6-—U»¼‘i¨­ÉŠ5ÄØ7AëíY9%ºtQ즆¼²CGæ9|ÄØ1s ÊÑ|ÞTñªæŠ«ëãêc¬¨áÅ‚µ€° .­¯[¡âB^‹xÕñZÌ|;©ªkVRÛT§>Ñ*­rÀ® NÖ¤3šK–5664qqi™»u‹ÆîûÊPGðªçµ„—V§­ð›,¿Éó›~3Äo2ü&ì7™~3ÌoFúM®ßät3ýMF73\H5¾n¦·IX }„¾B?ìf {ZÎÉêÒMwN1I³$&š|3IØ7ÉŒ2û%ñn …ÉÂaª0M8@]دÀ¨»"á á`¡8ÉŒ5Ó“Ìh3Ã6ÆXB‚` ŒÁŽ£ø3o&˜‰¦»±ôê­çpÜÇu_×| :C pÊÝò š‰Weyp—rËÙ]ÊÕ,çu)×°„I?N%8Ltî“ð ¹’Én^"Yè®!ð©@ä.33Õ2NŒÅª“ãIŸV1Þpb§'ÄD'D"â„hUìP ìT­)è¡X¨r‚µ‘i Þ?éx âq²'–’½p6¹'.#3p!¹rÉÞx“ÌÄV2„b²V‘{ã)2 }Ⱦ¸‚ì‡r²?&ð9¯ƒð>9=Él,$sPH†Ñ@æbOrÎ$óЋŠOÈaH#‡c93È‘x”ÌÇkä(¼EŽÆUdÞ%÷A9×cñ9?‘ãq.9[ȉFNÂ7ä¾XAÉý±ˆ,Ä1äd¬&§ HNÅrš³_`_ò@\Dáaò î`Æd1ö §£9‡“3Ñ—œ…ÉÙ8<sÉ\NFp(YŠóÉ2Œ$Ë1˜œƒÑ$×HŠgÈJ|F†ȹΙš‡KÉõÇóˆ(2È*NTã.²Æ9‡µ¸\€äB¼H.Âëdæ‘‹qy„szëq¹ed · ØN6b&y$î!›0†\Š—Èf\B.ÃõäQ8ž<›Èå8Š<’+py,>$Õäñh&W*™'à»HEª9S¥“°VZ…FédTH-¨‘NÁ‘Ò©8M:M?ÃTsº~a©æ TJgâyé,ÔJgãSéäIçâ&é<¯x>zK«1_º¥ q»tî.Æ:éÜ+]ŠŸ¥Ë)­Á4érD¥+P']‰QÒZì']…•ÒÕH‘®A©ÔФkqtúK×ãÒ ˜-݈;¥6Œ“nÂ#ÒÍ8Lº¿I·â9é6Ü'ݎǤ;ð¥t'Ië0DZiƒ^=©æ.Ĥ»qŠ´ÙÒ&´H›‘(݃—¥{ñžtž•¶àGi+ö—îÇIÒ6L—À!ÒƒX,=„w¤‡±ôžE½ô’¶ãVéqü.=Ò“ø@z ÇJOëmšjžÑë5Õ<‹û¥ç°^zI/`¹ô"N—^ÂÅÒË8KzI¯¢Zz ŸK¯c‰ô¾ÞÄÓÒ[xUzKï`¼ô.BÒ{+½ï¥ð­ô!6K¡»ô1HŸ`Žô)^>ÃÇÒç¸QúGK_¢Iú ¿J;ð•ô5–Ißà`é[$I;1BúS¤ï1KúwK?â<é'|-ýŒ½¥_°—ô+Þ–~Ãéwœ#ý|éO\-ý…Téoœ,µ#tf­wþH[úƈÿÉ3…üshÑCÛÍì0°5°Ñ”¸Ž¸. c¸\¶6™CÚŒ§|=Ç 09f¿âó¥pÍW@'Ðáÿi¾\Î_S:/gÍÑü”‰¯Î‚ñš$Ú“9É.ð´™qá»MYÐC–=ù‘x ˜Ÿ›ÙYÈšï¶²nÕêH‹ÇjI°Ô©µý1»ÀkøÚL¡]ào3œþü fVЛ¿ŠIZYà׽鷂~·µ¶¿ô}óã=Z|VЇ´ÖöûYÒp~w®ÎQ%õ9AJ~|œ]h3ù¹¡ü 7+QÍÁ€?±K|Ö9ñV‹mªádOvì]ïν[Á-/ ÛM¹=¡Í$+ro;ÒbY½ÝEì´'Æë#™¬O°2ÝùvÚ“âõ¥!ÖÛVH·N½Ý=žM[ùsò­,|öl4s:ÖÁïOwÏW¸{Ûbò+6›Šb…ÞnRsåMæÐÍ>:ŒëVF:*µi¥neiGe©Â¹•e•e*•ó1å9\Fîº97cœÌtw33›u~zê3sχ»ï=ò‚Ö}Ü'Ÿ¥Gó©Ckû—ñ6£xƒÎŒ/èmmßôÞÖ™ø=ÜéçôúH­Å{µñ‡7™J@+¬™Úç ­vC&gx4QÄ95¡ÖöÂ;´ÉVlg3XrŽRÜÌøarŽ‘–Ðq’¾ûøÈ@ÇRBg` Ï€>Z£ZŠç“öjþ¯'">eg’ÝÐW0°>¯kBkg½Qà =¡ùHYÉ•AOM7ÄŒšyAÏÃôÐônλüHw(1¥öf3—½kâ?û”pn&+Zì- üŵíßµ™ž]ÆÛíñ)BkÛwt,t@gŽRi½ã¼\༎æ>üéÄ›SÜf;ÍZç6öeVwkÜ•ü~4†©1L{<‰ÈZ³c¸•±™ŠóæÓ„s\Ç ÿ¾Û⹊[·Qäe<ŽïÍà$o¾ŠYK8›Î3c g’Âæ¦):cÊbŠñí1Üf|ƒ2`<7†9¯g¯xGD>õ´l”Õ»hReæ²ìdùýdâ{Im&Þ |b:;¶_BÁuœò;¥ ü`šúp‡Ó(TªáOé Õ¬aÊ”lõ”±dÖTÌp¥lÎű×ÃYræ“øáhFާD뫬$ú)áçè» ÕããÚn#Ï;e9ö;s&ð#v>7g dxåêmåE®@+/Rñ²¥³ ãr>¿"\¦¦¼zì©L&sZLc²#Õ” 7lMFGì¢#7@âš Ì,.‰^ «íˬ¶ËÎܑԨ½Î qˆ6ð´´YSbÎ…ÆÅñ;• üxš:PîuªãøÉEä9óZ†ñש Ö.µx­Ž‹ šÄO3§àŒ¸R¥V:/ÒpÛ¹ÓÙ"æÉ¯à½Ò«¦n¨bte¯,ØIüŒMIÜÊXöÉ‚5Å3$æfä*Y°$퉓~ÙÛî·ùÚýöªö-¶[²{ñz«ç(E>ð“H'Yéjé¾:[m"†¯½­j$Ù·3ïVùÂJ¥ùúùˆè¯ƒû»¨axØjXƒuDë²e¨Ê718B¥úeg>ÕêÔ¨X§ÚÞâMÖLyZcy*~€}‚,ûRë­ZÆgŽBNâtó¬2³‰Ò«t¢¾Ã·fyƒ¶ùAYò•¯šÿ¯Çe·ÕW.NÓeã'Z¨öŒ‰KzK^_„ù“ò]ùE8urƒc¥?]`[ \ù¶c *—chþµÒœKpñ /·ì¬ßY0_²«iq Åwp¹ÐÚX;¨ÌæJ%vW.¥õKOóbž\Š•Ø¬™Ø”fOlŠ›Ê’¿6tËÍ ˜JfðÈ@›Ì“JTWž™&^+æÅ躴ä0‹ö$K[f•f‰/£KÞP0ŒF¹ D‚¬°È+XŸ]‘án°@rŸWæ¯%©tƒÌå,3ýj°ÆâqüPï6Ÿ@»¸¯s³8w1IÏà\‹w¿rÒ° )±¿Ã]ƯŽážeÕʯל/9zmXm]ËJë+æ"ûß Ãqð:ÎÓ×ì·ü)øÝ¨˜J}/>–äyÚp45»»(Ev°…"Ý›ƒm”ö.3“ø=Å”†Å!Ý+•÷JR)“ÔŒsB÷ÜM%åIÝDY¾.éSÞj9)#'9RÙb'/ÅZ¸0^«¼å–'Åã-›Ä2»}F˜>j™6Y¦S'þ8ƒµ£„ºqÁï,šÀŸ¦ÓHŽE—“«V‘ \Œ¤¹¾ \WZ®ã–ën¾¶æ#7Gò!«÷Y_<š §˜AŸ\'ãÏK|*’f£É7.ÏãÇ_F³ÑÑAºÅ‡º¼0p›Ÿ09A*ð¨a•JÔ´ŽlÞ0ÒÒw8Bý.uOf×îî£û5[›ÔKº]T-‘“ƒ„gÓûö6ÙE­i¢¨êMK}%$ÓšÉoÉ0‹%Í,ZIO¨eó¸i4ÕÎ–³¨Ÿã“jOW“„õú§è1:oN3¦t“Üq+ÙšYµìI­dУw—ÓVN—°,mUüûµ|™ökÒV9ŸoÝÖµœ¨'§•4:ì>•Õ „Aô˜Y˶µYžÑm_X@™RõS2êʤ¸a·A .nK0c•í¬¾ÛÈ“{í`—V·öÛV²¿¥©5ÙÒº©¥mÛ°„•®Ê3x„.L#AÛLW¥ º™#ÍiFZ˜ä˜P`)KœÍ‹š<Ù)Ø £´ÆhÓ2hMÐ'K¤2,lÛÐòÆþòÑ…<¨ Í‘ú¬R¦\(X6Á]蕺ĭr¸ziùÖý³E5§•§5I‹"J­´¨]’UqVЩ`¯‚} ^S°]Áë ö+8¨ £à‚>);Pð²‚^{B؉m!¤±5„n&Q,¡­Bj™l¡£b¨ai ëV1YÏÛe :„v¬ ¡Ÿ·xŽ­Ï0©g²ŽÉj& Lž­ÂaŒ31˜L1€ãLòAÚN²Îdb1ŒBoâDGa³µÄ1”˜”ƒÐتaŠÉÉ FpŠ]N39Ã.oñÙ·yû[ß b¹öð`cðCb€qÂH<Âí<íì»È.¡™dñ7Iè«°ËIÓD»fÈàß:ùwyÀ+º³òxcÀ–27pΑ=$Ÿ¿&%n³søiâq_ìÞ›7·¹šßfYÂ.„HÙÂâGd.ù"Í Ì!ž_¤"ÍÎG|ÒX&Ò½‚Ó…LÀ“fpaZ”3bXD­]c˜Ö«ci©¿ââ´ƒ¤Õ޹…Žx‰o ó¥9êI¯wû¬ˆ¯åýÚÖÌ$ĹË÷ÿWŽWñ 9•ýâWã÷°ì6†ÂÞ[øàNl~'ó.>‹÷&(ø±¾‰)Ù»Åw’5¾Ö{XN,AÒ,>ÊDä+“³ø8åøï"ñ³bŸÜÄÅyùÓ›¸ñO§ütpî2ÈñΟ$6÷¯rÖÛо[ø,6ƒÏÃ~"q"3ø‚+"ðݰé?ätÒOx†iÇØT[†°ùˆo•úbuÕ¡êÒ,¾ì»‚Èa-À‰ÉÄ,¾JÉ9V7ƒ¯#ò4…ñÐ5T#+xrK’ù½:ÉöQj?ñtlNþ>i:»Žóë8{çÂR<9ƒo8ø=¶I)_ÌKû6å‹ÈÞÖ?q8â›ÁwŽüð|0¦¬uÒtÎC\­ šÅ÷¿¸£^Aúg¯Y(~~æºh² f<²xödîlµ°ìf.žM½“½–F‡-(òT‰<Ͳðnp¼Uòå*VÅï"Ÿû‰Gjh ¼…î\[‚‘Ï…‘ÞáŒtk,N#OƒÃ\Ì6 OwXÌvüÁ€Ç+þÏüKn£Ë’®JwÞØ†E8uZ/‰ÏÏ–ÿPK“—•£ã¦ PKû™H'cq.class}Vk|WÿOf63Y6o6e›¶-ÚÍlHh&<Ú$ KC „‚!V™ìN’¥›Ý°»¡ "MQÔªµ‚UT£¶j¢ä!„„Z ZßðUßÚ~ò‹?¿¹žsw6Ù%I¿Ì¹çžsîÿ<ïݼù¿+ÓQ…·5lÕP¯áa iؤ¡FÃCVËH$2ˆjX§a­†m6jج¡AC† •Pì©h>h6V…ŒpתÆ‹ÕKXš!ÝÙqÐôÇç‰[ãÑ`¸‹Ä6¦UöTì• x*Ú$8iYĸõª§Ùß[ÏìĪooðñf¹'y(±Üú½}q:m=ÂzÅÝ;ûâ™K=ó2b±î™Ÿ’o‘Ãé™{…o9Ù—,$ç4ïYPÁךö†d%—-¤#%yÊöE’±JVÈŒ?ß~¦,[Ï2ñ—Š™þ¾h0>°ª•s·Dzê¬SedŽñ>O»ï¬8¬È6ÃÁø& ëp8wwôCw¼Ût7mÙíŽt ¶×ˆ=fÜŒÆ*ÝQr7ÛÆÌxµ„JëdÔd¨  13ÌæÄ2W#SBnc$‹áø^#ÔGû¬¦mmÚ6çËÝe†Í¨FÂî°ibnÃ)¸Ã}=iá.ËÁ;š¶íšVB~ú¶aËnšÜ-ý~³—QI-Ñx”úÂþH4ÊÑT­n² úÝ~®-á­›ÓZ^©&©09‚´âÔ¹Íþ^²4îZº¾ðaÊ:à&·îŒÄFÜ hgÊ€”FÌtǨD$w¥É 06Ãñ”nEš®ÇèŸÓ‡ÌpW¼›,JÒ,æB»[ öÌúS¶Ó°ÐH.ð¦-ô”½ÓtÑíÙ¹Xëí­‘¾¨ßÜ QÃï2ìé ™=½™­»3í1¸›Y<Ð%íMF¬;²+©Ú[S][US»ºæ‘õOÑÛ%î¤D±çѨ1àôоƒÎuÔ0YÇ„|I~zÃü!ª™ú#=äÉÜ!¥¿—É!² C…³Óè Åw›F ™UÁ’í£tÍ”0+eÂCÄãkdBpR§­3YÓ¶‹¾nú‚ô‘Mqê!ôíœDjù¢ï§„{:éÝL)[ͨ(´ÑÁÅÍ¿«•V¦K¨-‘xk_oo$JÅO ¤ø.³$\š4ÍÖ='õ…Bf—zÌï7c±EL’×=(.tšIÁݯy†(9t™¢Xܤԥ§é ÑGü’°ùLÒŸkÎM9¬âI{Uôªð©xZÅNPñŒŠ¸Š÷«ˆªx\Å!ïSñ„Š~]*:Uô¨8¨â½*ÚUDT„Ut«Ø¥"¤"èÀ*,s €Ghf®%ÉÙŸ»™´Âɲ2ühtà)lác8ãÍð2©t`îs`îg;Û•²b)C•0‘Vt ÉŒÜÆ}I”w3)wàpÒ[“j&ºqÜãÀþ¤Ç޼ƒ#ø‚—íx_á³_e»a;>НÙq’MNáëL¾Áä}•É7íø¾eÇiö{ßfíãÚñ |ÇŽ3I—ßer™É“q;žÇs“ôo$&Y¨¡ýýgõ|ŸÃHÜVs{ÄJ}ë>k¥žˆõ€µ§‹•&Ö€8ç‚I«„5ÂË?hKÛÿˈ_%h-IJH&Ñj×'ð=]ÕQ@ 5ÏÚèP„Ír²¹ªëòþ1Láš®KÄMa&ã aò¹>Z³h ^Å‘¶ \oÖ/cæ& ½¼Žãµë8ʇ/cÚN§„Ó¼#S¼¾>†×y½BNx½F¾Óõ7ÆpëãûÞÂzú8àÑgÌ&QH+'a#Ë7R±¶:kT:´³#Ûyä^ű¶"i7g(ë[ì¶@=P …6°ç$»Q/Ò(ƒ²)­%ÉNsfl[ÅVœÇÇ9Lâ£Ñ%®²ÜŸ¢A°Ñz”£«¼ M¯ä¬n"Ç;Œæx[QÖ~Èè7nY™^¹z“W©^«”J‚½¼PÃË–ÂN¥†ãTʇ,¹M •sÔ»)Ý6ÛÀT|ÇŦÊSAñqõÊ3Ê“-Ê#q‰LÏOÞ«üùVùå"udvÀVZè:Š'9 v.œÈñD[‘67g¬²r5§&ñ£Ì>ŸW£Ôr4IuÔh}5+G~ƒÒˆ*ºW”s +¥„àí—Plñ…H\Bvr33=¥Õ)ÌÈ.E‚Iü˜ÁXacFvÙd! u¿.»T l”7 c™+»ŒñÊâ±ç÷ f%e­ì¥Ä¿²¯áh¶¶).[k›Í•ÝZ§ºf+Ò‚wYy‚2ãqܲPÞ¢%ãøÉ9Ó°üt‡"0+[[ªHá ?åËåòÍ+×Ük•k5ɸô+3iò5<7b#Ò&9(Ú¢%­ÍÞT˜³§Ë­Ó… ›fñ‡eZj=4ù|n‘£Iüœ.öÜk£'S—^¡æÓzž¯Â0råÄ`–ä-[s6ñ_½\\8o™hL9wD´¦@ëæYfá®ùZ‡ÓQˆãÇÖæ£To£ ©ÈÀéPúçTÎܳ‰·ù²Š{“+8¾:ÅWqR\_Ì f'm’KqÚÈûtg¶¸ä¼àÌNÍ„ˆBÜ::šÇGçÄÐ)¯ÍF‹œy"@VXìÖ,¬È€Ì“œys(q%ÅeøÓ­,§œjÖy8t§Jü0êšrë2íDè\©­ŸßqWŽ3Ïi? §½ðã\2”xËzÁ®]¥¡Ëqá¢å/Ÿýe^ö“Ô<úý¶z½—vü#·=ùXÙ¤f^és)þ:N5{ÇñË¢سBJÛ_á6¯¿ÃËj¿,7*SóÔŒå³/RòÇÅIö¿†cßUœ¦™ßòsý»Q1j ½éO ò4è›È­Ö£SGžîÜ‚2ʼ͛Iüž|ʆEæwJå=ƒ’TÊ,ÿßÐ&·GgƒòX˜“_”7Z e’%•ÍѽäkîTXé[Hªî-›Ä2«}B˜º-ÓFËôAªÄ[×ñÉÃpQ5δNà3i,û¢ÇYkôǧÄZ‚O§AŸÐZÐ[Лù.¦ž²Êiå¼5 Ebô*åZyM½?9zå8þ<ºÀ”MÀ'­ø«-'›‘+BZ“ü¹ËNa l/aÓ7íUhUj§³¯8[-ý³ð—ùCØŒl©5„ù4ÝAµù›^9¿g9Mß{D·ÿPKª…º» éPKû™H'cr.class¥VÛ[T×_‡33ç0 £+fÔØÂŒ—ˆÑŠÆDñV"ÊxéhµaÀA˜¡Ã`”´6ièý~Mµ¢È¥M[(riTLÛÄ´é[_ûô¹ýúVº~{ï3:̘öû ß^k¯ë^û·×Þg>ü÷; ¤ÓFú‹I!“6š´Á¤°I›Mª6éã&­7é9“>¡‘^]Ó ÑŠêšÆû’½¹ÓN´on:ßkIïZªŽ¤SñDû.sB#«ºæt>«›õ§ë52ªí¾]ðôV7¶¤v®o€°ºZÅ“j†Dwoš£cv—ð~f©CSo:Û£¢:·ØšÆ^^;”ÇÒG%*©ÉãÌYò"Qù_C. À4¯~iõŽ^ V™ÇÂyª|&b¶NÌ>jÀk{eÿ×`)Χ¿OÄÓ/jäÚ—lñY¸ÜëNÇ“‰Ö4$.ÙñÖ`ýæ`sdo°;¿d§cÁ‹±+ÁV;moÒèYÇö#Êþ2Û÷³=x0™ê²Óì¶îinHlnžôêJ¶övöö{â}1Π‹ÖÙ¢Ñ2¦* çÐÈ—%sµKUûšñÞ"ÉÞTKì`¼“7Zu<ïêîŒuÅéXëÒŠ5ZŸm_ZvfcÚ) iùéývÏ…ä‘Trã‰-›j7n©}nKÝŽ3\²8\ÍÖ¨ÐN¥ì+-Én.¹Àîcåy-|gZ:“ .ª°%ÙÕm§bÇ’ìÐ’bc«Fe­±6»·3ݳ[eëiäWº“©x:æ( Z™hœFkÓÈl‹'Ê>ˆí<.ðˆóèÐh¹s¿š2§ÍØ?õZj´òé7’[Ì1Fb©8–´Ïàå{yv—£}bmßÒË•¥’W![u¥'ãµµ‹<:y`Ή4N ½<.ôIƒ^0è„A‡ ª5è¤AÏÔdP³A{ ŠtÄ ÏÔ`Ч zÅ OÔhÐËÅ´–JŠé8m)¦TYLÛ¨3&u »©¦˜öbVÙ~Ì`v³C˜Ŭ³fÇ0Û†¤u ;©b’Z˜•!vQù|ÈçCzjY — Èj$X0&Û©µp‚Û ²ÖÀº³*g@ü(ˆ­/D¨ÄKQê,¤SÔå¥Ó”À, Ò òyHH¤äÈ« —A®€ô¼ò$ý¢—gWA:½ôYúÒ¿ò¬_†]ÎJò¦—ÎQ?t_ù*È×¼dÓ×½tž¾ñ› ßù¶—Zé;Hõ]/ÅàÒFßóR;:EßùÈA~òcdù f?õRœÞÂìg´†i” ¨ƒ.R)i8Z"æ;¯ü œ±÷*¹^Éû•|@É•|HÉG•ܬ䈒)™›ŠùÇxÆ=ÆtKå\ÆÜš£k!}†®Oþ Ð-Êç=2…Ï|H›¡ ¡»tó•€ñ¸5O?g6(5ƒ£ð>cvá£p—>ãð>0^g<áYš O*ÈöeP-S¨ºÙ>å´¿#ÊÜD. Jû$’^ÀóêïÓç´Ià4K¿u? 3Qý1Ä‘¨ nJh”^Ó™µwÓ2•¼T­­û5Ǹ?³òßÕÊ“+aúà’¥q ’ KvG²1É&˜ù̼å 8‚û‰Z£­#8CG0qXŽàƒßhF‚ãø’íÊʦeeÓ²²iYÙ´¬ì1"Ûø~ˆMï‘ Lχý³t÷:™|,3“a¿®¤9šeÉ•‘æ&ï‘õ»çhþ¡Èö,ç´9Ï ˜å×ÀÃ|öÿáOÝ’AÕå#ªK¹ç~·Óå€\‘qœ*“'ÅBXT£íÎjqS@ç&N¥¼¥sQÝïŠ4†'=r^À}ÄŠ¨Û¯C«ÒϤ]«Ò–¤?påÑk‡ÉMæõxÚBáUUsôN(à²Ü–gŽî…†eZ…stŒ û‹û‹´€×*ÚzmñŸ!«ø¾Édœ‰nÏÓƒPH½‡sKÚ‘)i—äÂÏ[ÒMQÒMYRH|Šä§·'7o]&ï&•wmÞ¼"ï€È››åhæû`«»s+ÊÛá¼Rrž )9/‡”œDJÎ;"%<'Î÷f-WE×0Ç­±Â³ôGíü%ÿýC¾˜’·˜ðÂõ¶s@s¦ÞaõÛè-ùA·r1“_q+÷‚ÈO·•{ä÷ÚÊmðƒÓÀòËlå6¨³ãÈx: àé,€§³žÎx: àÌrü _\Ç]€7â™ /¸o©65Ц¡°^«óXÀÛvñÜ…ùý¥ ‚wk•Jx–?Y:ófç“UÚ0Kœr¾R,ÎÑ{SÎ',¸aÁu‹Ê°ºX×ënàugéý)©æZaÖÍÃkÙj]g#´Rlä¬ÜˆÏtvâÍÚ‰³‹°›¹›¹‡¹‡¹ÁÜ`n27™û`ðÁ⃉ÉÂ,=Ê·ó*UA…Úy‘z±çéƒ|OÏ å` ^Æîâöþ3ó³Úyl¶õ?PK~CZ‘þ”PKû™H'cs.class…V{Wןծ´+!b½Æ2àÈmœˆ]aÜ81Ä©[%`”˜È$ii1k„„õÀ†¶n’Ò6é#}?H®[œ6uEkõÒžSçœ|€~„öôôô¿Ò™»w¹…sgî™{gæ7sïê“ÿÜYšá/ „ˆ(ЬÀ!* +pTM&>£ÀS V U#ˆá¦¨»ÂM]1ãPÊH_8Ô3pÑLäÛ·Šcù¬•¾ÐÎöœ@ 7õWÒºQÞß!@M8Úß- Ú"‡»Œ‰všùÂ]‰\;Êi±/lŸce¸ëhz´ÇMc„Y?ºÕ §/·¨ o¿©«€áh4Ñ "ISc<¥"8{bË Ù Á\Q¾5zGÎ@ÜWAÓßaÿ7‘ÁžJ¨ÃS=aޝv €"®{ÖJ[ùçNf’&–ôTì†44šµFÌPΚ0C#VnÄÈ'† p‚«ÆŒ¼3R3d¥™‘Q#o ¤ÌÐe+?„zsÌÊr©ñP.ŸÉšÉШ‘5F̼™ÍáÕxÆYûˆÌqì²uGg/v\™è•£O=ÍÄ;6ÄçÈ7æ„Rc+u^I˜£y+“Î Êû£i ÐJ†pkhsØÃæx(iä e·cCú#g'ŒŠºÍŠ (P³w³&W¨¬´¨uCƒ™,3C¨Y#úb™B6až¶R~ÃËéátærÚ±bqÑ6Äw¸¨´»ûO¹¡ÌÙl¦ù\ËÁÖæ–Ö'[Ž>óžÇZC0ðÙ¬1žÈŒ"š.c…8x ©LýxY‰²æK4H@Iœ$ñâ×&ÍA£Ê÷šFÒî^\Ö—µò¦#ðaPeÐJcŠ´¼€c‡…ã¢;Ûí)C€àC/5âõðûŒMà(cfÖ"—ÆaöØF£Ÿ¤ìÎdò±Âèh&›7“›ÜîÜbfoÞ$Ýd[³õ—‰ìëT.ÏåM QÆ‘ÂAs°hfÁÛ>†wHñ-"ßöA ¾C³ïú`Þ¥½ßóA†d£ð}\¢““ðÒþf?"òc"?!òS"?óA~N³)Øt?¡y(ÀÈ ¾ÈsŽÈ3ÞÉy”ñ7©@lÝÅÖ{q†Dú®j‘ ÈÝÚ2¼·ôç¢rqµ†+RïÓnõAZ Žãýø…&,âÉûξçKû7Û·WÓ4áü"Lã˜Y„YMq6·×í=”„³'ÈC©ÆP~‰ãŽ_9fØ7è€ÌÞE \Èߺ Éø2üº Ù}µ:ñ%˜ÿÉÑm˜áÂG8ƒ‹i.œv„Ó”Ñé™ÝdŠkºŽ’ø$åu š8?§kKð½Èb{‡„^ÀñB\—à·NLLê\-„"WbŸsåmσü¦Ùž‹½Ï®„Wü+\Šd±zOaˆºÈ–+ð!í@q7q1"²¥-žFñâb³È–¶øŠÛ$J ~Gk1(‰LnëQ|K¾ƒqQÅ¥H,înŽÅ=A)Öæº‹¥R†x^ä5êÔ®%øý{àÕ„e(õ€È–>- Ùk7[+Xê\yp5Õw!ÈËð‡5Dïå0§ð`|!8Tc•ŒüüVT(Ö”;%ª±bÞnsK, ;Öæ zºoB]¤ØÇ¶á¼*RÐß.Lí¤‘GñßîõîR¹¢ƒˆüØÖ®ñÊ”0Õ·B*qH»#†gXkб5¼E¤Z>äÚž Z¡¤} vríë 1ü{íñ> ù=±»‰ÚhúczPn¬jÀ…e ˆ±.½(ÛRIÝ$E•ÇVq_¯—|=Á}ÕÿÿMø:óù'bæFþºçóà×']‚ÞpxjýßZã=…®_ìÑFk[ä»5»¢‹x=9šìqZeÍ~ƒš((˰´¶!ž…Añˆ4$R¥Ãµ°~•|:‡++ÊŽ›”Ubgέßqfeþ¶GVÖÂ…jC!ü xù'ôÜÒú¤(DªDXÌFÙW%ƒ]òeß#&e©R«já«GüóP¯Åñ¹’’h VIW6Tªjýïõ®Pé=«w²òr®c/a"l¦À ØÉ´>–³¼>é‚nÕƒaýKSe k†Öì‰Qe،ؓVlŽ›«½­µ0kG@3'‚*o}Ò+ÕkGࣦiÍ^3Õç¼o '5?O‹Yý«íúO«ÕN™gùÔ®EÙq“Õ‚ZÍΤúóÙfƒ­ÕvÑ/~[êù½ÝAa73=Îôìá7¤ 9]+U_‚åyð÷Ý…Kø¹[YÃ6ùÓ‚}÷ñéËnòt 7ôoú»ø'˜}àÔ‡u¥‹~%ýÏènm|«?Å£Kà‹Go^ŸýÀOßyÚCt£#«Ò G¤šU "¶Š+pgÁ~âé{Y‚» ÎûËe¸·°ñî—ô Ã¿1¸ó^ð3hN;?ôàÕWeÇå#Ì¥KGŸ8Vu ¹„ÜÜݺº÷5݃sÍW+ÝÍOsOu<Í*æIo ¶÷x)°¼ÊØ2·ƒ’ʃrbªà—ŠäÑO!ÿ)´† ðò?—o¸„ãV¾öÿPKÞy^n‡\PKû™H'ct.class}VëWT×ÿݹwæ^†AzÑÔÑh sQ&$ŠÚˆhœˆ:D›&æ"£Ã 6µ&¥ï6mú”G«¨-¦M[h#RØ/5kõoèZýÞ®~ìê·N÷>÷ÜpÖÙgŸýü½Ï9wþö¿» P± |NE>ŸWAÔ@½¨:/h4ð‚m¶Øj IZWS°ª®¾ýœ}ÁÞž²Óg·ë>çôäZ–‹ã¹l2}¶Eøt(0ëêÏÓúI~¦U^×n_laË`];…;ÓãÅú:×)™‘ybé¡y;v¿°Þ°ÜàØPn©Åêº'ÁÖ·QîhM¬ˆH ©/bLQŠVbÍSlEž¬×´¨|9zO.*¶¦ˆ†ì¨“åÓ™\¥àxÄN{²R’ñ¬žã‘“ôÞL's{hû3 G¯í‚PÛ¡ãÙä;çvF”/^¶8¡`EAÒa§†È-x`¸ÇÈ%3éA m1K_°SÉD„ì#m‡"®yä¼3IØ9{UÁ3!u·=èD“’oX$ï·‡#Îð@&í¤s‘”“>›ë#‹êE¸¿àºq©Bd,¸K›°g“äÓéÍdÙšp‘NG%Ï e{œƒÉí¬æôùtæÝ´4àÙ©ßΑƒ‹Y}¦ÍìËÏf¶v4nkÚÚØôBãÎWÞ¤p¢wŠ­ ÄÎf푞̕Óg_$a7º=)BG=™þ;ëœÌAOŽ” b/S3N¯=”Êpì„{¼TIYg6™s<¡Ba”^Fo2M¼È˳4úh$iœS°Ò»>±c…†QEžzë¬}ú…£GÀSÆl’SÚÝ\²Íê~ÞÝÑL.>40ÉæœÄ¢´+—™¹Î‹¤‹l+–_±%"÷B, 您œ§‘¢Á<R¨¾Ê .Øa-:¾¨ãUqÍ:ŽëxCÇ›:^ÑqRG§ŽV§t|IÇí:Nè8ªã°Ž/è8ÂT†°5!@sû°#„=h`-wº¤’eD2Ù‹r–­e“5Ì­ a€´ŸGm1¬ ¡ƒÉ¬ ás;ñ‡'ýlwŠÉNlfáP‚ÛÄd#3„N6icr•A¼…\oc¨6.0y—É0“&ÙäËAâÞcò&äÑKìöU&—Ùä}Vƒ‚èe®_ ¢£¬ø:“o‘Ä7™ûVçðmöýN)–õã»A¤9²ï1ù>“™ü€É™|Än?bîÇA à'Ìý‰¾Eß²wÅ üP¸¾Í»åL•§ù}nƒXòµÄQŸˆ>O+žšýÑ;øÙ,øÏÇí‘ê(­X½>ú)®|m–gcóøyT¹M<‘1Ïï`Á¯šð«ˆª·1*§ocâ6&]K†êY†%€2𠿤qÕ3£ÓAaÙìÚ©fçì®;¸ÖN &¡ÒâySA…§Å„Nx ^3 ‚þëñ® ƒ+–E’yÜ XÑ9Ü´fDz‹ï"Aãµ"›Ã¯<œûP!ÕåR­V)3RIV*ÿEm*¡ù¼ 7èÖ¶Dý+Î*3ún†[å» £J^ðê ¬”|%ò7 EÍ}c—V£%ö¨{§±&¬Õ²vÝ{¤¿ôÑÉQ_~T5j'óÿäD dêgF ûU!˜Ç¯95+̨á€*®â +t.Ѧy­†uUÈ]=‰oéÐÓEã]Z8ïò‡µxW ¬Çwac¦Ðäõ²{¯Êî½hUisøxuù73V•¿°ú-­´CÙ=$»ªô;øä!ÕøwK›‘¤8±BA? Y€æÞgôñ>ÄñÝŸÇïwiš» -¾Ëö·ßÂjk¦Sx_j͹ÃãrËó6áuú?Osý»Ç¾£€'F ¦”س—´}qE­åu¡Xñ# ^ù^Ç ¶B*­ÒÀ'R{¸ˆV)h»P%µG¨D\ú}.$C}€¾·\\§‰Ï°ÊO¢.µŠ{Y¥ÅÛ­™€+°€¤~W*CŸ.„Þ$CW?Óžž`y ¨šÐižäk>’Q5?êS¬ÚcùÿF×Ý7ø*ÖŠê¬së2>ŽêhT\Î?Ð唕oÐB…Ñ׬ ã|è›ý¦¿—/5¦±jTË›~mø±Ì Œåÿm²ùøM>_©®*ãf ¾ä´¥þM.~eœðWÐü!?QEñO ü“þI2$D.Ê2³L ZÁ(Cy³ŒPdæ F¢6N¡”f7±R€-a°£ü¨_ k¦Ÿþ'j8ã¯Å6Þµ™½}Å> âkèU›Ë§ÑÊ"³\ b…d§°£¸bI¸ÑrÅ,1§òw=nI>3¤%èÉ5ußU„¢¦Nü4ZLC»†—Ä'A€x.í¢–TÃôy—˜åfðm‘î2­E³t*ÿwNßñ^».s•r®åóñ§^žÐy5â˜{àùzß«¨–G³žf>ʦ5‡Ùi„:ï!MŸ™?>¤VÿiÖ½^tv3‹2¥ÉáT!ÓóòC¹ÖýʘO;Y>þùñLt·#7HtÝô¨ð³Òá>‘ã(‰6ÌáÓYï5ÝÜð% ÚUzéj‰Ú„DÔ&u·g½—V8ÎͺVÞ+[(`€ò%å¡ß,sÇQ&*óš÷m¶(—µ _•=(y,ÊCcÁÒhÖš|šå'Îß´0‡;Q+@|€ùùb÷+"SÕÈm–{©¢Ví<þü¤ËîºFº’Œn »¸È´âÈŠäæ°ZâŸ!>ù3ä.‚{4ß_ê¦ñ¢háËÿPK˜»Êê;GPKû™H'cu.classuTßSUþ6»ÉnB*$4UlC6ü ŠEj-P¨¡¡EÒRS¬tI,„] I…>t|àpð¥ãèL_|360bS_¬3þ7>8¾‰çl6AJšÌ=÷žó{ÎwιɟÿþR†ˆä¼­à¼‚ ‚wt(xKA§1ÔÐꎯjµ¾¬f,÷ÝZ\ͤò#¯šùœn,XwæBÝóõP'ÙçÇÈ¡¸fŒ°§'OFæÇb¬„C§3Åê˜b•§30ߺvòo­g·Ø´ÕAàK®M­1^¬)¤‘_&Ûõ²nèù+¤q3¡Ê&¶R™¼n›ÚcÆC-«§ƒ³‰Ñນ.d ›ÁMýQ¦WÀ¹*¦…|pÉÌY^k™mÛª ©Á´–×_×ò‰ä%ÀKr¦°˜ÕS72Ûÿ¯ŽMÌ„YÈ¥2“z–HµÝ1Ö ók£N8Wsvþš¶¹bÎäÌž¹ÞhÏ@´`øÒ}JfuJÐÈO3¸µ\NÛN™”RX¤•¢á¦²¦A9Ü)s}CËen›äœ*˜¦Cz‹KÔº%Ý ‚‘£°LK§µJÏÉš€nö%29qm‘ù6fœ£W¬M¯>‰¦ÊOš¶7ó™uÊ”¥Å;• =aKFHF¯ŒK2ºd\1,cDF¿ŒË2>’ñ‰Œe yÑŽ/ÂèòâbEª²ˆÀÍê^ú%ù¼Àvö{1ȧ‹hõ¢M| °hcq–E£W1íÆ(n²¸ÅꌇNŸ±˜ö` ³lK°JÀnó鎓˜ãÓ]®ãsbHz0U±Ýc1Ïâ Fïã<¯Âˆ“˜=@{ØÚ}t¢ÊHž³5vgx_î?.Ò†[!YpC8,Ü{†…gxPqâ¨U§€ÃM14Z‹Uê“í2AQ´b4¹T<ü3¼„O彄ôo§Ð¤,ØÆ…ªqA —Q‹vÈhæ%,U3öÁcÃ6,ú…ê]šNŽD_¢S¡áá„À-þŽkBñ˜Rü˜È´ó9Æ“¢šHJ‘ÄÍžb­ ÍT‡ŒÒÿ*WxAõ;JXþ ub¥¨úEÒvqæ“I¿´ýñ]­Ü“÷w’nÔÈM’M䈯#dž¬Å%›Òt¤x·‚R„šžŠO-vïC±c6ÙÝ| ~²¹PjèÇðÚh?ñáʺNðQÄç˜(RW&’¢_¤¶ø‰xmLWj·;íÛ¾×¹ÒOÃnápÒø€où =…{G<ÚqjÇàîÑ?áÎ_z!j“;åC¹IY’-Ó G‡”€âÃ7‡ÜOÑ´#i˲»îÝ£¿2ø=hWð#š1•ô;÷±þbÇu´ãÚ¥€“’ý¸8Ûë\­pQ½3›²¨·ØÔ41žÙõêô»"/᎔¥'ðq5V&g GÄ(= c¯ú2Žq©‚—`§rQ‚)zœ¬ÍN6Lƒã–öðM•ò¨eç~aC¶b¨”ƒVY•h—¢å6ê±Ø[mö 0¬và«ÓîïX ïýPKÎçSˆCPKû™H'cv.class…VÝS×ÿ-»Ò®„䀜µTmDHÂìø‹4ޱqBƒÇrHd%NWÒbÖ’* lŒ§¥ßß_΋“™LýÒ˜‰Á“Ò™N“™¼ô­BÿƒNßJϹ{WHX3…¹çÜs~gïýsî½ðõ?Ù‚ŠAüÉÀ· Z¶*Ö¬]³+UZ"DK\+¼j/(x¢Ù¿¬`o³ç­“ÏÞ= ïïKéƒQêÐøíœ]®9¥bUBŽN‰œ“Ò—Ñ&Æ7í…hÞªYÄbŸÂpÖªº©°¿Ø)!›‘ê\¶=èËsµèt©"ÂhGƒ©Ò\%gŸw Ä»ïâÍbéVÑÃ#þ€jL±ÜÎ}™sVu¦t©Rœ><28<òÜðÉïPƒÄqP,гРV¥b-äJe*¤’¥‘£C+”Š´O@ô¥b_)QpnžÀûYD9$Ê3“Å7‚H!ÀäXäYØ,¦Y\g1Ã!Nf7XÜd‘ â ˜e“зP â*Jl–Y|?ˆ *<«ñ6jA\cóm̱ožÅ-·Y,Û+´šŠwñ=XðCáŒÒ§¤¦Z}Zê3R mÒŒ*Hò[du“VHû⛸³þéàÂI8BÃþ¸ò‹>ÖÀŸOàãñ¸rõ!ê4–b9Wi¶òwÝo˜¤÷MÜ2L[¾Gã4~è…Q§h[!ÝAºú)®¤7±:ÿË_¢;Áz?ú+¦x£±$Kžs‰ŒºtÖ=gŒEé\ôœ‹lÝ%–¬‰íJ"¾'Ö™ (½Iãl›‚mà'ëÓÂÍðV#ÊšédIðÏT-?é÷ÝTHò.Ý û õïH+k±õ™!’Vª0á§ü¹/°V“ª0]wÜY«ƒª0]÷"¹OiaÔÍ_å'ëŸ"“Žè›øåT¯_µ6C Ó-”Åy…Š£‘>ÚRÑmN“sbä~}Aô“©‹ƒkoºa´F˜þÄ;‎7J>J«ª¤‡vWwQVwÑ­®(‹&Ër!éÕá¼h(/Ô%«uø‹D_nƒ* ôöJô%Æ5¼ì’0ÔÏquMg÷ póë_¡ÇOHZø¨3‘jMDMM&Öt×ëg¯½ù]Hîõzc¯gå^½ÿÿ#zÔd“ÿAUò‘þ_ǬªÛ«J¢ïȽíÿÄû?3ø¦ô‰bõ»Çê1æÚº(¢8§qÛ¯¥#Æ&~óÅŽûL«Ç´c—©éÆ6wvYN?Ä‘ö@Ër«šbŠã¼õáö'Þ¬9`½åˆ]išnšÊ?)É=¤¿æ‡ÓÔ¶WU%Ù/Ò45Îs9Ù/®œ©q¢‚w—1C/„ð >Ç:ÍÎnÜ]>z€Þxš-Of§v{2C÷¶ÿÕÛq&¿0½^Y’»tNˆ¶˜ø{êÛ«~¥Çgú‰Ö¿ã¦Î´–Ø—ÞÔ%±%—ØŠð¶'¶ÂÄVÚã×®¸ xæ1è ‚Û«¥Ç0.ƒ 3¨³-Þ3è½8-ÝÉÔêMݻݮ›á¦†›ºÝhYn5¬˜a±&w[ΚÚu»_ê›tñùê¿ë¾\÷òÞ¬C|Ì“_"ÜÒîË7*,Þ¨¤:¢>Âo×Ý÷‹»ä~·î=ndnâ÷ëüùÎÃÖ à§3’DT’¸Œ¸Žç½?t Ú6±¥ß—YìUëHо4¶i´´odkˆ'ü4÷óüíÒ}Jî´_¦Û)vJôq»Âù¹õˆ Ó]`bOs¸KJk%åqj»ïˆxgŸÿPKÜFqBû PKû™H'cw.class}U[SSWþNÎIÎIÁ£F°ÆK-ä T* VZ¼Ô5ÒÛ!  IN¸ØÖÚ6½_fú¨ÓEá¥0£àÔŠ}©ÎøúÔ_Й>vúÖt­“(4S˜½öÚë[{}묽öΓ~ZŒÝøVÃ6ù|^I ;4ìÔ°]Ãn A 5¼ Á 74öIXßÐØÁœ2[fr¬åôÈ…XÄêZkY™xr¬Kì’ 74—Cdî– 6ô›É.öô4ôG¦»†»ûxlø/S_S_ã¿ œoY;ùo,gÙl*ƒÀ›\ vj*+B«¾óE[Ùø¿¯‘ãÑ&{÷x2n’ MEc=½äÛÓ{&;’ˆG^ÍJX÷̪ûØY •EÙÈÒϱ™H,mÅSÉI }ß־䔙ˆGäèé ¤…wàbl65-³™*Pô tÄœŒ&ã—bÍÏì$û„9ˆÍ¤SÉXÒ $bÉ1kœ<6<ã‘ÎÄ'J[ýE žLg­Àh*Ã.ÄI˜'”Êf"±ãñ¥[7˜¼˜LM'mX¤Äî¦E®.φásrá—¿È9ò9Y«ÿ!ÿ3¬«“Ùï”…á>dN\¬È~—, Àb@eEö«²0 >À™0……¿+vú•PØåWCš_[(à&ûdSñÉì5|Ê®\ƒF'øÑ‚ás–VÓÊE««¨¼Á°O]Æ'©œ¹Õu¤8‡Jµ$ýþâˆ}Ò…³åZ¥2Äv6rYîáÓ~Edo„N6-¼^ð¢€uè¤ÿ×E—ž(QtÑñ0EËÚ \—~Q£T•gâÚ5x•v j» ” ?Úèá2¨TB_}ÅèqúN®_g! M~€ña±ÞIzXöñIø”P¿±à*\l «³`µc¾ZŠ¹ÝŽ¹áý鱲ϰ ¡Ð¼‹/à<Ü99ŸsHFýž«ù¿ƒ[~Öø¢Ô‹zl¡J,®:µs"R}!’t"UÓü_㲑¦D¤)Iôhµ6Þî¦=ÜÔí•ze ®\n_7õ9o^¯TfžÚôuWóê^ªä*hÖpµ÷q.ìÓ–ñÙÜ+ŸsJ~Ewá_AÝÅŒY^‹î×]Å !˜os?ÒV7o}j¾Q¹½jÝlÒ«DV Øêö”V…ËUIz•ˆ9—ÿ©¨­âÓ½J”ž%]u\‡7¨«¤Ï£K×”Ø'K‘ÄŽ`0L]­ÍÐ;:íwëUºçAw…Ö‚E¯˜ËÿÎí¯{oÒ;*7m.s•;1ée•Å%*ÜÑkp›–ðùbñ:ïlzwÓŠr® u‡¸Àâ7Émò¾X,^uÚ¸Œ/K^âš—˜]Ä7hs?gsŸ¦;Â}z”÷Äc¬¨×íĽ¢HqÐX1𕶇b8Is¶­,á« á"ÝÅú×å>q³M³ÑþÄ ñûbÔßÃ7kÝü#n»·RsVÏ?ÍJ)ŸUYÞ&ñÊ´ü PKµœÂΕN PKû™H'cx.class}UÛSg?K²—Ĥ,hš¤U4$r rÑI4åÕ²$ Iº$y`úÀSß|ÔªàLg˜ÎäA[…iuÐéLíLßúôÙéK}èc§ôœÝ „€}ØóËïûÎ9¿=ûíoÿþ´¨‡¸GøH€Oh Z§.>fÀà® 3pÄ]™•¤Æ¤”ši웚•£Ùs¥î¬’HÍœS÷ 3`t×M„´%LK˜bÝáqZmîýiçž©@3)aÝ`ÝaŠ þh2‘JdôëJ0ê¾ØÓ{érøÊÕȵë}ý7n  ŒŽKSј<=OÌ~žœK¥3_(óÙÜ—‹w–šš[|­gÚÚ;:½çñ°4/·µb•Ýé˜Ì€µ;šÏJ©ì°”Ì¡mîYŒÊ™l½ 0X'œŠ¦Yp¥rsS²âJO»2’"ÍÉYY™?ë’3”c®fêÂ)t¦¤¤KV”´Rlu%åélz÷Gã’‚‡ë/âšËÍg]S²KB-™Md’2%Á"«v1é\–œ ²He¤sJTîM$ѨJíäÉH±2\HRFï¥jâ¢4O÷+éúáæ†–úæ–¦æÎŽ[ØŸ„Ï¢¦ð&ŠìG“éêeÑEwÐÇ¢ÓøN¦ØZb‰Ì4gälèNV&¢âø$¨H¤SÓKX‚þYNìN@7e¸žÎä2™´‚%ïÎ@ù.¬‡øc@,Å=.mš0Å<Òª ‚4á,„+'a1Ã9¸h?ô˜á<ô’vÉŒâ2iaWÈì¥èU2#fÂ53„Høá:‰>ý$n˜!× ÐE"H"BH±d?Ä@7˜¡ó;Pÿ#eEûd‘CÛ]dËhŸ.²§ÑÆÞQg¨_\k ©(>ƒZ‹÷©q†(ÁÕ&|,hרCå©’Ù€›?ÀÀSÕdˆSRÇÈâÙ„AÿRxC»¨#%”×2\+ŠPï kP»Ú?ƒô0Ä»~t#òB›Žüë`õ<ƒ!»ap…aì¤n=Þ~ç1<‡£…ŒøJõŒÝzÆöàÛ„±ˆw7¿ 2‡6`ü5\ÀZÈšx^ï3Åó¼OöÔÕ…GµìÔuToùÐþüµP©çÿXÜ ð#¥½¬!O ¿ Ö«,Û„O_Q ŸØµ jDu⡱JÃ&Üz…dݨI¼Ž•2Fƒ³‹ðϲ†ç—¸å¯î’Áª›Yc~Ša„¾[Ö¢ì’X^Àr–E¬¾•Cäëe=vp\~!l ?fZ½9.¿§„=9ôƒà¸Òvül—ºÃ:u"u&\ÿp>$Þll·¿zÔÆ|›0ÙÆÛø:OFâÉÆ‹ÁU¨¢´ž1¬hÜ8‰œÙxµÛ~ ¾6´ ëPM› f²±6.–_›À?Þ~[c´±+ìû).ŠÌkà@>Õ×è\1l?ÜîÐr—ðËà] Ȫ2‚ÏÓî*õÐÏÀ©sµ±3WŽ€ÊÌ÷0 W¿„}jëÆ58µ7È/ŠM,8Å.ßà: Ë®AçØ Ôåî>ÍË.Šþ’Ãè;z‡U—hÕB¢YëÞáŒfáôÿÏÂIœ-ü7¶Ëãú¶x~/yÓÚd ’g”£Ô·ß©iõ7SÊO©û€n÷Bô~ o˜æ¢Âú Ô# ^×Q.'s êE¡ã‘š‚fÔ¦¢¡h*¼ûö´R z8¤‡Ëõ°¡’}¢à=X£ß VãKsÄk Bú¼X-ˆ:,‡Åâš0÷à†ý>ÞÓj ‚ˆlù¼ËÜ+ñì\òþzíq.ÙftÚŒ“-^ëdmFR“ñÉÀ:~•t‰á‘¬3ïäìõnÕû90VÉmÂÔ+¯¡á8„RŒ|«ûyÝÏ#!šG ]xÔþ¿Ù1µÏÿPK‚M;K>‹ PKû™H'cy.class]PËNÂP=·<®" âûíVw¾’&FMš°°qq[j-izI)Fý4~€eœ[’.&gæÌœ3“ùùýúF-14tãn ÞD;‘ß~pž›\di+‰ƒÈ':§=†¼nØ&CA7Ÿ ¢n_š*)©ÄœÝ6ÕpéæÝõ†I £–Ç®w„CÓ¾£WùËV¯sÒmuº§ó³g&(Í¡)æ’—ʈrÍý ¢O¡/>šÞȶåŃOá(÷ãÿó¯”ú^&Öx8”qâõg'1Ô3cq-ûZ5âXç¨rlq¬plrlp4‹ {؇†¨æÊô[Ö@*,›'ÜN;Å9f‡˜Êt¶ žé,O;Ò(\Õ<Å:íTØ ÅÄ¡âÚÌqaÎq—¢D¹†¥?PK¬Ø<þPKû™H'cz.class;õo×>f]QvFf Í0F OMOFq Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tkOO6›Ì¼Ì; Jçü”T ¶ gF®àüÒ¢äT·Ì X´KbqF~@Q¾n˜¡ž‘®¡‘¡¥E,#c#Sr‘ÉÈ ¶ 3_?8µ(31'³*1 ¤Ya¯sN~^*H”‡›—‡•…‹ŸA˜A‘AH31210iF ˆdòÄX€,n-!FA†í "@èV §aŠ˜€¨Hši» CÃé5PE`9PKyÌ€€ô$PKõ™H'd.class…S[OQþ¶ív—uÕ¥\,7)^ –RE‹Z.Z„€¶¢„°”£®)»M»Õ¢Q_|ð•ÄGã“Ï&Z€ÿÂ7…uζH ^öaæ;3óÍÌùNöÛÏO_áE–½OË岌6’Œ.GdÈ„Oè±o¸{V@c¸{îžqßÐ3†uGO:9Óº3ê&—´…û³ñÂíÛ,G5>ÊRÑ@x.moêù‚¥[ÌÑóùŒnZËYFÆ=$“s +[pˆÍŒÍQN‰þŸ²Ppör‚áÊ&¦­/Òµ©Þðþ+ücï¦?•S›Îj<ÏÒ…œéléIØuÃÚ°+ƒÄðJœ{‰|"Ñø(æé%aýc¦e:¤Í¤½Á(ÓÅ4Ë:¦må‰}y>užŠ”¤]È¥ÙŒ™¡ ÏJ\@óÊ”‘¿k/æì¾¥hÿ`_tp :2¼JePO#›eÖñÖ·–‡Q“zZ-Ç,'en²y3“1i€@E ;"%~ϮýN´Vìšâh»š-¬ßci‡Öþ³Ä{j“[y‡½õïÒ ¨³XщóÛ‘JY>•”u}†–÷Ñt3Ù±+S¨æ5aÂNJ8.á„„  ÝNK8¥"ˆ*t4©èD‡Šc¨SÑ‹Fž¨Aå¦^Å•~–7UôsE³‚AŒ*ˆa¬g0®` Îá‚÷óþpÿà ã"7—¸‰s3©`SÜLs3£à<.SÛ3Ô ‡âKò â$¾†Ä=}K˜sÛ7‰ZðávŠca­ŠEÂrû›ÄíTe¾½VûŒÆúÈÝ>1-XœèpÛÄ4­¸VÁbL“w°?¶6ùŒáå€ç®u”p=à-!YBª„‘€¬4þíÒ+ÔE"r^{¬å'%,=óíZèuù{$à/áæîF‡«*«*ª»ÊÝÚ/\;aŽþPK÷‹6# -PKü™H'd0.classV wÕþFiÆc%1Êb„ LòHrl§˜DNÒx 8õQšTÆÒH–#Ï8’ì`J[R -´¥;Ýh ­»ÐÔd±r mÒÓ¿ÒsúJïkÇžœƒ}ÞÝ÷wߨÿúï‡+ð"†ÊØ'£Û ¡2ºdì—Ñ.# #"ã12:hj¾¤šVYÕgõ|A/ªeªº9§ZYµ¸*ܦ¡¹Xº•Aýóè†çíÄþ0†/¢Ù&ÜÇÌ{xLðØ”-“mÊŽp×]fCqZX׊XëÔÒhÓÃzws¾pÊN5véÛE4”:ã"ýL®)º¤;¦ël€ýŸ19°ƒÔ›ÚhB‡Ò…¼™/¡IrµW=žè=6xvÄ(•ôœ1Ï¥²jÙÙø±híi/–ôöÉ’ž5Ú÷ží-ätÇRÀî êÍÑÄúu“_cÞ,•u³œ×ËFT1Ï™ÖSí<¡ê…œUÌ—'¦Ô¡vm¶Ósv^­šËÏ&™EïbV.êf)k§ôržžýª¹Øoe [ú­ºý)½0CüŽ~k¦±¿#M&\‘€{×ÄECÏØefô²N”ÁçÓÆ4Ç.Ñdi1‚n[¦$¬™bÚ8–/P/ë®Ô€^š°ž,Z±Sí]±Î®ŽÎƒž°ÝõyRg(¼N„¾ŸÁ£ º`p®QŸž6Ì í¬^,êsikzŽ<ÆI;ÞÉ€}Çm6ÀêÒt˜Ét0¸@WgÌ‘¥“£3A'Os±KÊ[ûF1¯òóü¥Z×*í/X¦Q—6m¬Ÿºuÿ*Ýi;W*S”ï¦M:óthÀrÙZ )ÌKxR ÏHè•0"aXÂY %ôI8.á) _”ð´„~ Cž•ðœ]¸„”„´CBBBR—ÅÑýiÙÀxˆ©ƒ ƒí vpð8vðð,p–©£ìv[˜z8€SL=˜3u„A ³÷2ИÝÊyï àšÈ0{­,S™jcpƒ0'¿Ÿ©= Èâk ¾®`ßPÇË &qQÁ¾©Àd™…WLã[ Î3(âU%¼Ö€2¾Íà; ^ço(ê» ¾Çàû Þäð?`ðC³ù~¤àyü˜µ?Q0‡Ÿ2ø™‚yÖÎã-?gí/ü’µ¿b·_7â¼­àEü†+½$î&õ<ø*^‚ Ló!âk°ñ˜ÃŸ ½€G‰ö@A3Å6’|ž${ ‚šÅe1éO^Å;â ä’Þ ¸Šwß·•ß§ãpa°O«à·uuezb³z€*ò #ZKÓž¦½B¿Y@èt “É §‚ßß\GFÉσ-hÂ9· @Þ舔f’bŸÀn'ö-ú¥‘𕦨Vo #käh f²‚?ÄÅ,– œ¾‚?Æ}5L'ƒ^¯Wð’áŸâ~!.ÕpÞ¶aÉŸãr“tå¤7šHбDÒò%’þ?‘”Bb")‡äD²ÉOd¼Ak 5TñÞél]×FH¾†ËËr\a⯠CŠ×–Vñ—²H½|/ãêr}w|wnƒ}uîG©ùºúA¬ðvm W–åQ-Òó.áj·[d[‘vö É™X+ÝßF9][–‡µ¹\?±=þ_ÇŒÈ>µ^2J•Õ£~nƒf [mÍ ÊÃùN¿±‡kXZtzø’-fu'…àrö’º²Bk6ì=¼€m‘Væ[»=‚M®\úô?‘Õ®è#`ãÓŒièu;Ý}B‘_ŽÜÆ–f“A±‚êMm•ó1©âƒ‘(%›ÕˆŒ‹ÞnßžŠíôuÝÆVBQ¢ªø0£,ŒUQ‹ÓÝß‚ò³` Ë×±´J߸ŽJÈ¿÷“ãÊ%áÍ‹>Áf>½ÌYk˜Oý¬ÐÈo%&dKøˆ+¢a Òç¤HQ¿?õ3K÷¶×é-á\÷cÂèÚ;­¿#j­­#cÑ*>Ž‹!QkYÂ'!ñîÏj5™ÂßO'Ù¥ö~Z[߆OXŒj‚tï\Á»A%[Âß8ômÖ„Do×ÇȾ…F¦>BvQˆû4/Mðïq_]ôBÈ÷þáA /&I·î\9nö$­\=ÿ!’y«õV«¸ýž{›¶•B¿çl¼óŽÅ,xiU'æ.gõÛ»ÑöƆðrïtv󈳛]Z„v—nœ±½¤t㼦A{I#k›©oê¿Wßjý=ü?PKã· ] PKü™H'd1.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ”bÈÈÀ˜ËÎÀÁÎÀδ‰D0q1p2pƒE L Œ @Èä ‚Y ¬ZÛx7‚€¤™ ÒB@fÓÒÞÎÀ“gÃPKöÌM]­ÖPKü™H'd2.class¥VùTWÿ¾ÙÞ0Ú¥c©2™™ -²-!‰ IXIDx™yI&™Ì›Nf„JUêR÷­ÕÖ¥à†Ò¨IKÒT Ú‚â¾ jÝõW?þê9÷Ý7™L&$êg>÷Üsï=÷œïYîysý_/\‚Õø»[ܸß7¸±É7ºñ€¹±Ã­ ìþª&.U‹–Ø&™ÉD’ÄÜIL¿6¬­k‰Þõ{ºûõHzÞv8Š%ziÛIÛÃÛ„ÚvU×N±Ùųêg#| ¹NkgªÒ#™T,}b}˜}¿–ˆƒBÞ#¤ºv61X¾<’U3’U3²¨’ôf¹¤àÖ n) ,ÉÅí¬1%GÝ(¸J¿)3d€›ÉLš‚ªk¦è=ù{2é¹%þùéà`Ü'ù@ý’fU,Yxä¿ÕUZ@¸k§YC–Ó GÐå'A“‘µa2ÙNŽ21Mf17+HvXp{,Kï b­3¢º‚åuFb(­%ÒíZRØgD}-÷©¨ž"qG3‰&.mÅ…^eù­©`•YS¾6ÂÕDÁˆiñ؈Up—<`À±Ù2Z‘ã^Ÿ6¬›ñÑõ„oHgO}¦r_"3ØM¸{õ„žÒÒFJÈ™"ž°‘IEô†Xœ¢¬P¦lÜ#VuíÒ†úŒ½)£º½f]muM톚-›SG-D!OmZ‚É­º‰é®!&BL¤—ZM$n$Hß²ˆ1˜ÔRúƒ’$AîØ¢µL6*¸#ª÷h™xz¿®EM)rrï …H·6ÆÖ£ÀÝKçiIf”>1ý VZ/³iO6qTØ >h«~ËÔX­Ã°žñÖº9@÷ͦµŽ]¤\…3ɤ‘Jëѳ+óÄÌË9»9²+ò+…ü §A@Q(| G+q˜ÆqaûU´ªÐTìVñ& *zU ªèQѤb¯ŠqQoUqXEDÅÝ*ŽzQƒ;¼hÄ6/Ú±Ù‹ƒ¨ó¢‡¹&|Ú†Û™óyÑŒùÆ}^´ðÁ>&í(òBgÒˆ×zÑ…•|äå¾q'sAÖ\ÌKqð:&k™”3©ò¢>½›—¥LJ˜¬c¤yÖ°Ò"FUÌ{Ûy¹Ë‹Œ ßtÁÏÕ^İ‹7›{8½ cò.&ïfò&ïåÓÇoC{hyš¹÷ñÞûùô¼G)|>ÄäÃL>Â"õ`ãåÇ™|‚—O0÷$“O2ù“§<8ާ™<áÁ |š‰û “Ï2ù“g˜œar–Éç=8‰/xð¾ÈÜ—˜|™QcòÞ†¯zp §äy>}–¯òòk¼_gîv ;%Ð lxÞ‰P8û,ÆÙ3EVÌf1Saˆ™jCÌb]J9ÛL«¬¦uWÎú/´~KÎú¯´ÖsÖ#®GêéÍÓÓ—§'–§§Žž ¢TÄ´SK;<+4;Sà”Éã Ûh®äã@pãûžcò|À1 L&¬{YµÐ-V[E÷&0~^ž¦1E_Ø[¨ ·CWYE§4Ý6£c [‚¤`f3ƒTG±2…o^fçYþ¼¸ÃÊM¾’Æ&˜Kä¼`.[Ìb&ñÒE|«ÅÜø¶‚VvðEwoTÛ§ñ²›¡KŽ£¯ ­luÚ7¹Î¡¨ÔYâ •¸jùâ.ý÷?x«:,uNâ•€‹#2vP`´1ÆY´‚³3GXð,ý29AI‰LÞ%½ÖéO¸“æöZ-ìõéµ]ò«y0úà4®Ú„§¡Ši\c?*+qŒæ€°2â"“) óAiþaRÊÁÔoôúœ ×Ë ûil›#;,v£ã¼8´ XY%‹Ãc¦é; æ–Ò1ÑŠd)åI_±¤¹9xæ•¥{4[n–çw“çP¯…ý»vŒÎx^)?A{nšÏæÖõE ˹´Â2/oUùv©j€69øÌq´T5ëî{B‡·T-qÙ¥*iø§U‰YuÀ“ô˯º,—Î’Îïâ7n?#Óî´R)¼iQZó\ý~k(8‰œÃí¦5ˇÆHs%î'Kó«¼RÚ ÓÌåÓX}î@5uY¾?4Ë—[Ï4~D ÓäpãžÆOhÛÁÝLåîãÊv3«¦GdMWHcQYÓ‡rÍ\“NªÙz]šõ«–u[wαî&KlÝtöžlg5ƒÛbû¡ÿÙ¾°êœoÕôÙ´¹ZÚ>ɵÉ&~jÃŽ ÇÚê ¦{aÿƒfô ž]ÎÂX%a<"a$uýgÿ/.ÎË)™ÅU%q¦]þØí›o(ÈHƒ !]B¬Ì¶4«ÃœÁäÞê,Ü[[szk«ì­ü¯¦®ðûÔËÜc]Kï±X/“_Ø[ÚhwN³÷ç7{úàüÜ!@•:Jœæ×Çe~}\…¾>œNjÌ&œŠ›êÌEoÖ<ó>k0d)³Éd™r9î5³a©°î.`ÝÆÆåç¡VüJ›Í¼;•1f^Âɧ-þ N¶P¿ûEñ²Iüò)±KË_MàÏ¿žÀM)ÕP¨~Bæ'ÈFô°JþÇ*!ùßPߦ¶yŠþkýö2ýmûݸtTÅ£9 OÑ…þì_¦Y·[ÉÒÍkpŒsÞàÅE¼J6íÛÏa9/Ëès (eÌò…Ýdrc< * un—íiƒ¥Óþ TRNJlJù|%â}XÿØö!”uÏ!4U¬Úü½üšsßÊܾuŒž&ƒ¹Wª(“Y(¢ˆü¡•ÂôÇ@h šû¬NÑØ)¼¨ÿPKª¹iã·PKü™H'd3.class¥UûW×þVÚ2Ž ¶pT QJ܈•„ƒhIØ­À8Æœ ÁJj/ÒJÄ.–„cÓw뾓¶IúJÒ6¦/úH]5i0­]Òö‡úœþ'=ééŸP:sµŠ±Ø|NwfîÌÜ™¹sïýö_ÿûË&üˆ£¢£GG¯ŽGu$ttÖѧã£:>&ÁçKaÛ)‡Í‹f¾`ά°c‡MûrØÉ†ËsV8c]̧­RW8"Áé‘ F:GÍD¿+Ø5aÅÒK$ ažB.˜vîðD¹˜·sý"À”9Ò™”$æå¤G8ªpébÕ©d¥—‹ùòåÃ,XgL;ã,ös¼€ðJ Žpu¼de×%Zd4ÒîønÒÔ5"öäað:ÃÃÓ« q3îÖ™ö/áÈnR#îáV…)¾#$Œˆ;R…¹½*ŽÎšíëç‹Âv7V+OÞ·(%’‰V"ÝðP¤ÎzhïjiŠŽîŽžŸž·Òe*¢ç.“S¤ZºÔIMHòv¾|”z6à ­Éðɉäñás§¬ËÉ\Ñ¢—.ñK—pÿÐé±®bÉìš/™Y«ëdò\²3­š¯„¶:‡;BIˆ™6ãHÞ.•M»œ7ËV,¼l/ØÎsvxpøLØ,ä:Þ¹Åðȱ. íôï# rñ&œË_´lr‹½[¹hÚ¥¬S\4Ëy¬š»<äd¨˜½CNÕÊ,,Óü¾!g¹8W´ÌŒ¨'c–MZ¾”¶–8HIB³ç­™p–‹iëx¾@‘ZRÇÌÒœódщOuw%â݉GºìY û=_/u–Ä$ÁL0é¡ó0—–,;CêYÒÌv3áYš„tŽšø2ì!o‰rJYl™£‘§1O+’åz,żYȯ0tS·k*8¶UÕ6ÕWFûðF ¾@£@c‘†MáqµG/;µõÒ% £>©aZÃq ç4 jxZóÎjHixFÔ†! Oh˜Ñ0¢á”†I 8O4â$>ÞˆnÜÛˆ$“1ìaé“¶6±ôa&®:?ÀÒƒ¬»ŸIO›8ÞþFC{#>ÅÓat²µƒ£|„¥8“0“G¹¥ûâµ"¥Ñ€ó(1)0‹e&4}ŽÉ%&—™¬`áÓì÷&Ÿ ‹Ï0‡ÏÇØå‹ÌãKL¾À[p…ÉW(à«ìò5&_g—oðÚoîƒo°„çÙå¶~›Éw˜|W~è,|¸€"HÜ€8u…xˆû)øIw>Fv “샎4àÜKšÇHÓüwP¾)ÏøåÉ·ð¢üW˜3þfiâ-¼ôGa”ø`ÜÌ%âŠq/×ÌIOó÷„YæÂö’²Ÿ'ÄÓ4žB3à NN%>`¬ãû­7õ1#æ_Ç޶·^…«´ßÔûd¯²†!9¨Ä‚JÏ$ÿäE *í«[ÿ ÉQÆöøIpã‘N#žäøGÚnêãF4N ~Ø+å6J¯eÊ¡ø{UΡÕxPí™$B9T)¨åÕ­wCÊí$*…N##sšwcÛu‡ê6{nwäå'ÞBÅüh4jü ¯nà•±XeZâ²*h¢_Vðýȉö fÝŽ˜¥1MÖú~S¬Š{OÓÒª¹›–pÂCd~m“vÔd û¢m¥ªrBÊŸñ[n`iÆÕ\Çïî|9º8„šâ@ÇèJVë ›x¸ºå ¼ñ†÷v…W€~‹‚ßÛ¸‚›Zܵ™Ý^òï?ÀKØqÇs"Í8î©ÓœÆ¾:Mr5:Ýÿ2®6ä©mÝöˆs®îà6ÏÌ{Ú §ö¡ºv·ž\û`=9±b’xØÍ8MùˆŸâŒŒqŒmF´­=¤Pâ?ôª hWéY)• J6Íß«¯¡%¤uÂ>½g’)å×¥ TW·þÒv@Ⱥ†?)h{Iô±uKj¡f1Äõj×k;–òcá˜m.huA+aD Ô˜ ô"h`üjè½ aÑ*„½[ûߺ£ÿPKÞé‡õPKü™H'd4.classuS]Se~6»Ù¯,mºÕ­ ±Õšá«m  КJkmLbk—d i!KC¨½b¼àOôªí·2ÃŽLÑ+qƇw^xå(ž³ `-îÎûœç|¾ç=ïîÏ·IÔT¼%BTX*ÞVqF€OdœŠ'fî;œ¾%§ZîËÖk•jyÄwÎ Pâ™ÄŒ“"]Žgò™–)Ÿñ™î³LS9ÃÊë…šÎ; éL&ÏZ8îóƒÕ,Ê»4‹Î½²³bÆ_¯È=k§øŽcì…4¿‰BšÛ º'*¢Å›”=òh¥Z© &½’+ 1é­-•bU¯+zË+ku7V_tcSى؊Ss–ݺ[[¥§o÷ 8[sÒÿŠd¥N?.º+õŠW] Pç2ÕGÎR¥ôjçÄÜjÑ+Ñ!(9zÜ%éYo­Vt¯V–¨g!/ À‡9]˜rV½[5/97Ð;˜ìºCE8—R C à %Š()z4>¶Ssg‰J8¯´F1eÚ¸ìÖo¸««N™6ÿ·3íG¦ÙÅš÷µ³àwø€Ö­eZU—|  ®à}} ú¤$œWÐ¥à‚‚\VÐkà ¨ :CƒÁ2ðÂÌN0´èÆi¶™}õQYÕN„Âìv¼k …³.£ÓÀ:u ã#62:F˜âºŽ+øXÇf˜Ý`vSÇ8>Ññ!n1|ªc·Ù›e˜åbSøLÇ4æ4ª2¯aŸ3äò jàmÈÿ˜t<Â7I‹¤Á®¾Øò4jùìÎ’f”waçDIlàŽ-íb$×À];l¹ëGÈ]6ùGÙoÉa#|²/meWrÑ€$Fú @¤Ô{¶Úõ®tï…ÕÅ”Ö-^ˆ`=¥oÂØÐöM]zœÒM=‚oÖŸìÿ¾‹1®gj 8vÈR­ÐZÆn±{Oj hk-CØÓ4è-CRL6 œ©Q& ½)¸Î&NÌïb<¥¦Jß+/1‘-)›“,%› Zj6'[Á¬­YÚ ¸ß6C%¥©\Ã/øiü?éMÓ¼:hI4Äqr‘ÖäÖÑæO.4¹›ƒ“ZÓ†d)Ý;ðølåùÞà¡7xèõÙÃ<ØDçüQ‹vˆ9ßà«[ô)géÓ¾K·°%Œ ã-yW_¹1âœûPKû²· PKü™H'd5.class•UßWwÿÌÎìÌìd¡dÍÐR²vh%Ãh¶-T*ù¥˜›4• ØÊ°q™I—¥IÓ6©e[µB[«¤Bl ´Êƒ<$žìâ1žj|é9þ>øè£Gß»ÞûÙe%ñ=gæÞïý}¿ß{¿÷ûù¿ÿ2:ð+Y ‡€ lÑJG»[ÇY|”Ë:êèM&äÖƒƒÔÖƒ§R‰>A 8"Aid™FÈš¼ºz1u(›r§%Ç/8ù>¡128Ȇ†X Ö£G|‚tFi5Â+öƼhë©ñ‰>_…Õm“#LïtEj¶Þšüÿ|>—q§úü€#dÊ–z«ï’˜‘ÖQ.ØÕµÈÄ_ê“7“ï—Ð;àZÉÉ£ž›Oe\'gM¤\×Ë[©‰ çbÞrKV:•OYùéœ775M83kÍ8ùi/ÝIçwÔK;t Ç/³vÆsg%HäýÀàÌÅœw‘Ü9nšÒµòž•qÓÎ$u¬¬ãNå§É~_U/ãæœ›ÊZÕL&½œ•¶ Á?—æµ0ï!13ØÇ!w8‰g"¾Í`(‚Sx–Áw 31p£Î໼zŽõžgÁ÷˜3h•âÕ8»š`2Í+‡W“¬7ÄSÎâç0m Éà$2<Í1žÆVþ>ëeÌ0pYÅcÁE&_àUŽy³ òÎcŽ# žež¾ÈàƒËh!““4©TSTð¸J¸7À}¦B< èZíG#Á¯Õ0ÍB ÛnÞ7•-¼dËE\±‡oãå˜ôZ/Ûf¸ˆWlS-âUÛÔŠ¸j›J×nÂ+Õ¦*ûºàÏWw3—œÒ©Ì“S2ŠŒ%È’ôa–-(cE ¤lgDò{¤´BR-½ioáÇœB oýyìÇf?ÙÎmOmn¾÷ÿ#¡ˆob†?(ÏÜåhGAB<‚ft©ù9'O¯üF(ÒÏ3÷µ-¿Ë FÇ5!»ƒ³Ã¤û*'qUÞÂÛ7ïàÜ6G’‰÷ñ’;xïÞ¾C<™‚Ö)ÓUâ‹ð/ÿ¨Â2Wyq»ìXˆrä|,r56Ã5\SQÖÑP³I¡¸ú±¶Ûx4Ûã=Ëì.žPí¶vºc%ü4¡ÅMm¬¿z`zÜTÓ›â| ÙýLîYA”JOåŽÜÍ"P˜ê7_ÑF7é=ΦÞÏF8±iµ÷#qúïQ?ܶ׻JBS6(Éo‰!üknõæ Ïù íñ΀ 7)·±Ô&ð ït›\§ƒjnoáç‚y=¡2ûzB“úcÞû¦ÚÃÌ÷M­§j]Ë\‡ºÆ‚.T© I¦.ܯ•ÿ\Y‰ZQª3éKAY»‚™t ùꛃK¾é.q¤Û»y×° 7'pôêƒðg4,Â|ø‚máþ X‘WEׇӛ•A¢šêŒ^ž+×vwaÇÞóa9ÙÀý6%¯™‘-,+«¼¿ºBD2#¦¾Vþ»@0H¬›z’öMX]+¾Å©Õí”üS°2EULÝߊH¯$Ò«*þÍOð›l ªý&MO¾aWøX²K¸Á{£»å~ ÁÝ·ÄQâ~I.á—4– ²¯œmù¯Tu™elÚÄ]¢iù-Ž1ñ;|(zò£Ð*ÂñM;^Ä*KWÇâ,ªTðꃜöæ¡ *½â%cª1k˜4ßâÌjÞ›[ÁMOT[º“6ÉÄÃíŸ*tÝ6ÐÐn*ô)éÎdA)›Jüãò?ÚãÍI¥ê©j¨‚PQÿÆ+|ã+á@U«‘â±–A ­‰„nU“®ôÓ ê'ð;ÜObäÕ>%ª¸¬Qº¶f“Êg¹îGŒúƒ”y¢ÀS›Ô>©i@_ñu~f«C›]W+t½úüÖûÊuÁx¾WwtŠãëú7PK¥øI‚ZO PKü™H'd6.classUÝsUÿÝì&»Ùl’6¸èbÓ´¶H„  ´@ D¾R©iDÙ&¡Mi“𦥸¨µâ‹ïÛ—íëÈö l}†±å DÖŽb)eïK¤FìD*Å)êc2뜟4o¤!r ç`±T¬ûËù‚ÀÎþòÌD>\*WùòäÔLµ>š>žªgm’/®†ûŽèXïWkúÚ{²P-T¦Ùu·À¶Ç¾ùBŽÊ8nœêR¥<ÙÈ·ë±O¥`çŸL"–Fpl.W˜ªË¥iAwÚ™,ÍÚÅüÓN.”¨*õŒÂCëIÙÒå™J®p¼8AÃ.nÍÆìQ{z¬|¦RŽïÙÝëéíî9°ÿyØäaïcˆ3ìg8@0†‘†<¹å¨ÕÜ»R,™£³ºò—ç¸ü Ã,Ãò¥W÷ï³}™Ö­IZ%ZUZs ^W°_¥`¯‚£ ºô(H(èW°GÁ« v+èUpPÁa¯)8 c+4†ƒ_§¿¸ ,µë؇YzžAgà ̬ژ۬#Ž,mÑq^–| !†M o SÇìb—¨Ž>ìÒp ç5dž¼ÃR†¥a o"«!‰w5œÀ 'Ù/…÷4¼…÷5œÁE gak8Lj†4r–ç,†KœŠ¤AŒ2Œy)¬èÅ)Œ3\f˜`˜DÞ¦“ð‡g¨„/‘ÖN;ýîÀ­¡t×qðÒ]L¸Ø,¾!-Hû¸°Ü+X‰­à—®,×q<²ÔÞv$©†²å‰þŠCËmêX\é”ö¶cõZ\]„>¯¬ª<W µׯÝ\}TÇ@F’%C©aÊòšÓ»„šd§Ô¹,×P±”&Ñ%u5µIĤXƒàH…"iSç‘àTF2=iK3µû˜¶Ü‹ Õ‘Ì„\5TÖq‚³Ô0cyê8™©a¶UËäo³š°¼Ñ„8UòJ¦š^ÄfOKõ¤M¯L¤éu›JZP5/WÓZÕ$®’-¥ñD-Ÿé3Ý|¢+–~SÿÁòßÇô?´¦¶•msßh@;ðâ´Ø.¢"F{¿ƒÎlvÒ’i`IgJÏ5¦äRàGMé÷:Îð5D›¯-XÃÕSuœÍ„ÜDð„>´ä:Î9vV?¢‰n‰™²é¾‡b÷0’—ðÉMøÓ{þ«W»dºïáK†…½îÛÿ»a£¸o׆ZmS¸°)ßÃWòm~hÒ?ߙ֜°–¦žÊœEæ,¾§dÑ–ði\7tå6ºçVón* ý,¿+âÁE¦ßšš\ÂõŸ1ž #hèß®þAá·±ÉôK½Kø,h•p²ÌëFÅê½|’ƾÐÜoð._\³8ÒBKr¬î–Õݲ:Ò%|5U6ªÌ«õÅ]zßSW–q„2=¸È‹QÒŸ|ô/ŠdºþPK(é^:àaPKü™H'd7.classuT]Se~–Ýìn6JRÓv±hª´ á%m—ÚZ¾$m µ© Ī›d á#Á>ÚZ‹Ø?á8cëõ¦#3 adJõ† ÿ@ÿƒ3^y¯ž³ &ó>çë9ç=ï93ûÛ_?oCD3¾!*N©«8MVYo©x[E½1ÒwpX€‰7$¬X—£ÅãìÓ-îµl$&­«uÚÊ·&KÅ\~¼k3Õí¾]cÌ-Ìe]R"SꢡȾZCéI›Bü•;¸ËCýN[ý©îTwCª›ïÞí)àh|âc»¾ ûVgW"mu%²‹Î=>v¦œ–+ÿãN9oÄ °._Ìås¥K¤žBÖPßS˜ŸÎ†ó…R8S˜™/ÙáÞðl1·`‘:eß w÷Ý9H+M¸T«hÍØ%»8ÇÌá=jÖÎÐ%ÌâBwŠ…·Úé=JѶ²ÿ[êÌa¼ä•ƒÄªÞÚSßRÆž-å ù9M¡>ž_°¦sÙC^¶óÔ ’ƒ7AÅ’…ùbÆîÏMÓ„1º‚§w,ÕkÍMn ÍÃí-ÍímíÎß&†E «“!Ff3fÈR0C;à±YEûVœ™A–ÙÙs ó ‹ÄPóߎÈ=EgšÎ <ª!,)¸¤àœ‚ :ô(èV`*hSðŽ‚Ví º¼§ ¦à¼Ž7àc¨fèhA5¿ŽwQÇÚ1Ö^ãÀq60Ô°Y«£!Ö^×qk:ƒÁp‚¡AÇe4éxg™Ò¨ã ÎjèERCnièÇG¬ ³6¢á|¬a£âÓp) ×ñ‰†AÜÖ0ÄpŸj¸Ï˜ü9çZ i.@Ú‡È0d½”f{q wÆ&rhÇMºŸüM¡Ç¾IV€$}cà‰–1¹æ¼ô‚“¨â° ËG¾?SŠîàQã–·Ð7$1І@D±Œ)Ó³…þQQ£bt[*cÚ”+ŽF±Ñu(†Ç70CB!Q÷=ŽW(ueäM•ü*ù¥ç¸6*ž$yÔMLiÕ#[ V•1û¢’Ó$6¹e={ ²@—Èœ£¬âĈ¡ì@5”M|ád‹œ” ‰]ES}ŠjCýÉô>…lx_˜ÚýGfÆ=<@«x†5’;xIþ¡#ÑÌœA­ ê;è¨&¹¸…ëÜ Pã«9RÆÜàGƒrð J¦´…!'Îæ¼éi<ÙL-y6±0Ò¼Ž¯‚Ò¿…ßiYÞ÷`‘‡$W+'yœëxȰÌM/¼“ÂY†´Ž¯¥'xÉËÿ½+µREMš^æ=dX6¼‡T¡Üi!M~Œ£!Íó¸Ò˜ÊÁöý¦¯*¦‹1ÿ*B†/ä7Ô÷~Aò‘_ùCÚÿNéOPkø<¸Ó_]áå*QÃ'vpŽXvÅŠá“\§ä:Y¬„tžÚ¾Œ2e¬làÁ­lK¸O«z†müJòOá”POrÿÊDI¯Bó?PK›Vã^]dPKü™H'd8.classuT]se~¶›ì»ÙlJ ºˆ¤Bš6Љ°”òÕ@ä+HM#Êæƒ6mšÔ4­¥Ê‡Z¥â/à ô¼ƒ¦aŒFgâŒ?Å;/¼ÔzÎ& ÕB§ïsÎyÎÇ{Þsvòû??-AFßÉo¨Ø¢âM²úÈ ¨Øª¢K‚èŽÙx^‚ĺãV$*A ĆcMj8fkš­ÅÆF6âcÖŒµ³`Gv&*å|q$º*25Ð0ô£aºWÌa¶:¶¾rr2ñÌL”x6|U·Jå2•è¾Ù?è¹¼ÝøZ>5èN HØüg+@VÚô²·vGãi+ÏÎÙ—º™LÙý“å 4TNTöå‹ùÊ ŽC¥lNBסÒt!ë/–*þLibrº’óNôON§ ùŒûœfý¹"]J£lïÚ1R±DiºœÉÍèýÒ°„6̆Ôakj´tº\ ïè…ûûÂ{÷\ ‹"¬Ý †= { ÒìH§²–¡Aól¬rî\‰ÈÌ A–󲜒f¸Ì0GÑ#ôÍý¿7¢ÇéèLÐ)ҩЙxW`¯@Tà-#a~}‡úv ìØ%°_à=¦Ž×¡1´3xtìÀK¬yuD°™µWtvÌm`sCC';6éx/³öšŽp±æfXÏð*C·ŽƒèÕ1€íÒ£ã¶k8Š! Çð†A$Yf-¥!†5Ç 'ð‘†8ǽ‡5œÄE g`i8‹´†2ìÈj8‡§]â*# £\Š´÷‘gsQÚ¸ §P`˜`(2”Æyê„ÿø—‡Bè'«“$ýÁ¬bòࢷlD»¥q²Ö‘<&™Îž:ê¡:~é­c©†cI¯ä;ûÐÙY®âS þ†ý=KêhDôÈ»:±|5¢Þ…>/–}ªc6¢úÔN\¿zkùÏ“²Cö‰*ʦËP ×"¦šdܳ䨢bŠ&Ñ+÷6µI„äPƒàLA™$Ô†à:ŽÇ8•” %aj†öÓ¦ó.Ú‡j8žô¶U1ó¤†\¥ŠOM¥†x²ŠÙÖ]ÿ7okÖQ¦K¢R..¥µJÉ\Êë0ÝÁ:” é6܆“¯»lê÷Ðnè÷MÏ=(†ç‰Ùnhu¨ì›û±¦ß…Ÿñ§iìBÒHú¥°¶¿Žƒ¶qÜ^¯¹‚:M¹ÝlLe§O{ŒAÓÝÑåˆç.|†Ûç1TŸg_>Å`bÞ#ù<>íûå?(ý6n¹_EôÖv•yíï O§\­Ÿ;iÈ…¦¼ÉÒqqÅck -Íö:[^gËkk714v*Ì+6õõÚîæp§qOñ+É¿¤­Ò6’«·+!HzBÿPK½Úª¯ÅPKü™H'd9.classuT]Se~–Ýd7›M ©i],ÅÒ_J,I­6BlZkSÁ«n> `Hø²H/ú'¼ÐÖ+îœ2Ã$Œ™ÖÎ8Ã…À{/½÷V=g7@m0™÷9ç<ïù~3ùíADD€‚7x\ kˆ,Ÿ‚·t+x[€èë™8-@öÅzãF0lj³±sª©Å,£“ø‚±j ŒâÜ`¢RÎçÂ/x¦"–¡–é<4g­:\ÅŠ‰gÖÂtÁ†Çךš›;‘7»iåS‘T¤7ᇭt˜šÙËì!çf.nŒ†ãi#ÏnšuœL¦ÌÖšcf:‡Ïº`Ý~9_ÌW®ÆKÙœ€îñRµõKo¦´´\­ä¼SÞåjºÏxsÞHô¶_«WeÞò4ÊÆR®’+¯°ç€ï±k6—¡ìʼnî•KKV¶ Ç.圑ýßT='ù%®¶:¶MLÑsD×3¹åJ¾T\ кcÅU£Ï¶äÍ©3Z9ź[ßr%JÕr&w-_  ³Tww65a¬Ì—n•Kéá‘ÀðÈÐðØ¥»äa‡1Ê$H³™N3dé2C/À[3ʹ;%"3kYöÎŽ1T66É{N@û˽H§@g‰N‘κŒ+2Þ“1&cDFDFHÆŒwd Ê––ñ¾Œ ŒK^‡“áƒ[ÃΰæÒð.ºX;ËÜ9ÖN3´3t0שaÖ^Óp*kƒÎð*C¯†ЯáC\d—> WqQÅ8>Q1Û*¢H°v‡µOU\ôŠĮ˜Âg*®#©"ŽY7bîs7q—ý¾à°/¾âXÒ>†ÁvPXƲ 9†{ sÆ-*Íþó ¹ ß «ƒ$ý™Àæ¯c~×tpPóçÑf^ÿA–ƒä’üxØw€ L$Ý‚$v ¡£ ¢XG>dk š%Ñ/úŸIu,„ìM¢Oì³Y·éöIÈ$º~À¹¦KW…B¼B¼ô±¤¨ÛÄ(ûX I;85ÓÀdÒÝVGñ—fL¿Øo¥µØ*bçù(Fä·¤Kº¼ÒšÊ‹Mlá#ìà'ì’zèH´„IsòW¬É…ï¡áÉ®sE¡ÝÙ~ºŽå› Ä“n<ù×!©æ½(ŠÔQ9dë; z¶}¬Ìöð[ª¡ò\f?öfyn{³{‚7´‡û [Ümuæh ™£tißJñ;ï_üïú•f%r°ß}†-ÝqBZòjPõ¨öG8ãQmš)|éQŸ"r¶51èÚGwz\ºâqÕ°öÑÄC—àqyÔÿù“£SwÚFjXjG%œÅ¯;ÅîÁ[–ØÖ’EJÉbÛ£ñÞjØðëv¾´óÁv ›»ôK]h>Ö<ǯ$ÿº…ž—M€Ÿô6þPK„÷, PKû™H'da.class¥X `×/­´«•¬{m/>9…db`MޤqbŽÆjhÚÈÒb”Ø’+ËÓ#=hš&½¯’”@HZ’B‹¯Ø¤´ôH¯¤wÚôL¯´MïÓù»+¯lC’Ø™ùógæÿ?æíŠ3ÿydœÐÈ^!A›¤$HK°N‚ ¶JðJ ^&Á«$@ƒ-¬—`››%Ø ÁÕl”àZ ^.Áu œñù­ "ñùm7¦v¦v§r] ×t§úúZDË´:oÔÓÅêöb!›ëBµ Õ;[xÄÍœne Äço[m0\EA6›§o¥M¸‘µ;Þºµ•bˆ$pÉKÒ¶Õ­­[iŒsÙzHå·¥r-m»[Ú:—¶"aW‹öééþB¶8°°ýºT.“ïi±¼wO÷Þýb½Å8wk-I[¹”îå³r¼-“jÁ}š¦™7õr‰6—Ð9PYóõqcÙ¼y ­¹Þþ"&PO{˜;Ý`C±Ü"ŸqäVâ3od~ëYôh_5›~]›:Ë̶ÕFM¸ãÈÈ…ÝüŒrÜ–îúxYªí¶ò’HœÃ ,WdìŠã²|­RÖ­2 qÉŒE³xÒð4]+mÏKÊmm©æ£2·™eÈU¦£{e6—-^†¹ZÊÄRX;zôb6KSv0X¾&•Ëå‹12˦º³»õØö|!¶¶}Uìf4Î÷cÅz¬o ¯¨÷ÄzS…úërÖä3:ƒŠ5ù\_1•+nNu÷ãxÑš|w&vŽ ãÜ8QeŸ˜ÊÎ̱Ïôõw–MÖ—MÎvc×`e"£2ÄB›Nóa_í¹Ð…´>¿6Û¥÷±×ç7¦2¸BûÕ«š0ÉíùþBZ¿*ÛwPÝWn[›êÛ‘ßXÈ7nnZ°¸±iñ¢¦˯Ç+À}9RÍD–YA„¼R9"½Dv£Y' K‰,#‡"hËÒ¸ƒt7&—'ïÁ³ë›ò8™&÷t‘hFö™&"¸h(£oOõw¯ÓS–0 ¦n W·”ŽLEÉôcÚœN*'ÙvÌÃölŽ;»ðÙOŸ±|,àkÝPª;D£³â%^ôÙ¡qÒšl× ¼¿R”áÀ´ûdp]ƒyYŸ/¶÷÷öæ X…¶D¦™álZ›mlJÛÚÝ­w¥ºW¥Óz_ßYLìÍ`3 N/3ëij&ñ&|ºñ!ý½9ýf#vš.;§ï*®(êÔËôÐ-ïÂg·w‰ð>"›Dx›ïa{Eèá€á>Þ,ÂM"¼W„¢áƒ"ìá]"¼S„ˆðzv‰°O„;EÈŠp£o¡ ÂúDȉ0 B·¸Ö»Eèáµ"¼_„÷øà*¨ñÁ[a“n#Òk}'Ý>¸Þw¹ƒÈ]Döé¢Ù;ˆÜEd'T“îÕävƒúI×—‰ÑPõÁÍp «(ÎÞcx\áƒ×A%í ™|Ð6jH§Ò^êHz Ð}ðFš¸›ÈíFøåDÉm™î…ËÈn! i¢a™ îV˜GkœGäÒ]I¡æ’'²ŒH ÍžOÒ:ù&2ÙDÛÕIwéæøàcñ2„/zà~ø‘/ËH¾Hä+^xž ÝW‰|È׉|ƒÈ7ÉíI²{ŠÈ·ÈøÛ4ñ"ߥá÷hM„ï{ácð/|ž–áüP†‡áG^ø ï‡gd8 ?&Ÿù© ‡àg$ýœÈ/Èä ŽÃ³Dž&òKZãWD~-ÃüF†acÏ¿%ò™üŽÖý½ £ð3Æà2œ€ç)Þ‰ü‰ÈŸ‰ü…È_‰üM†Gáï22"n‰¦QÄXâbÝ>#ÑÌ.zÎ.Ã\Iðþ=Æù3ðIΟ*Ã7†\[**£^¨ÏÕSàr¬ÄÞþ=·zÎA¯kÓt«ycë±çæSÌÓàbGIxŽï³ä“p¼ ‘7–yõ‘‡É!ÖH¼aˆ-0­Ö%bRÃÑR!/6 y¾Ù Ú/¦añlÑÞ{Ó1£‹°…GlJ¨u¦kp›à2Üèb\mÁiŽQQ4Ò`”-Áu+¡‚†5ÎM{«!qüÀäïiS ˆ4+ml…÷ ŒK Xjë¼Ô T‹¬vf ^êœËÍcFÌhb"Y;Ê–Nu£ ó»ì‚¥¦ñÓøâ¤Q×ëAżŒv„½#ì’ ›H«aŸÒù%ðb™¯,+“QÚziÆÌlE“§ œßkV¬Ï(;;D[j0ý†DiKïOòôbO&ÃìyÝKlMçb'>ã¥ölP!L)" .T¸LÅ \`´…ÿÜÍâè…G8fø­3š¥ VwëØ‡soF•4‰i¦ÉLó2ÍÇ´ ¦ù™à¸SÚ¿æ±É²MöÚdŸM®°É~›L«ªÒ0[¦zTÉ©JÆIU+D¦åNPe>ðޱXû!Ñ‹”!Õ3Æ´’¹›S«üÛC­c-8ëOÖÖaýj¹¬Ä ^Ó)`Ø8‚ ‡&_;îÁÉ›T_0:Æ.u€Q–UŽô&¸/s6+ƒSQÕˆ¢,ÙDR0zƒ¥Á…홢£&Œ7„{”à‘ðh‡SpްË4å<†Í}¹VyÆI©Fð߸0®Ъ,Uÿªjñ18ÙáT•öA­jïp©Õínµ²]Sñ.=ÊVÑ*͸Ê'I %é¼’T]’ü(i¡Á­†&4Lö))ãø}¦zIö²dŸ!W\aÈ~’ý† Ùø€T=${¸ìlŽ †áK&‚øaJäîÉ?cïÔ°3ì V(ñoÂãœ?•JüY¬Ôö<{¾„óÍa zÊÈ©U8ž„*зÝãð™}Ôºu„#lõÅÍålvB%½ñ‡ƒüÂpìßãfŠ[u!L=ËùA|GàÇÐ[{Ìø&4¿©¾"§Í¨!ŠÊ41³+5±¬•ƒ¼âDìe"¥Þ5^%FÏbˆ…0DÏ4¯bš5‰®BšÐ<ªx .TÅqáÔóCø)°âÆ$òÍÓ*&Ÿ;ìIо¯:†-=€?ñÆ„ÃDÿ,&rž€'g|ëàoV3¥‹0¥rÁú¶ÀvJR¶®Ô„—€eÓÓRJ‡`Ç6UHeG7Up‘ÊeKš*¸Iåþ?òè¢<º&47•È…ª0.ò<Š”G ¬ˆ˜GlL‘¯BytOåÑ ÷áÃG8óH| óèÅlž™–G*ÍÕ„:_o®yÈçÍ žL 2-Ä´0اÑs ª÷,èúbÕ’ƒ69d“Ãå8¶ÈÙ\M8Qª FÇ¢†„X†8VÍq¬šãØ œ²Xµ`ª‰V¨}™6Ç>¨1A«š@kV –Ú®ÕrÜÄ×ÿÕ[Ô9ÇY+‘kn2ÍuÁHs=îG©ãúÄÕ“|­R‡û©ŸÜS7©Ôß3ùŒZC~5¦ß\ô‹‘ß\®'¿¨#ùZe.úÅ&÷ÌTbäçE¤%P§w‚Œ[’­÷¾i¶¨¥÷F…ùBñ/ ¯94Þ¼’ý¼êƒüuD?ÕW„Œ÷SP Y¯«–Òë*l¼ÝÂÖÛ¥ÚÙ¬`U+ê<±ºd?VÅÁŽ’ÿKbÁ‡oárE9"Ќ®j(I畤ê’äGI«¤Ö¨œÐªÊÞŽü/íƒ$ÿU †H6þ@%UÃ3Þ‡«pŽ~G?6ñ[ý‰¿›ø°ÙŽ{÷–Ðÿbó›ë9ªàÌLôÿÜtôo+Gÿè £ÿºBÿdXfë§A€_u9ô¿¤²Ç ;a?Ä\s@|´ì[Íì‹Ì,ü³@?à?]ØQÚÚÿ Øÿ°Óû¥Þ wâ¬G8€Ãípt–Ó/1O_cþ £/€ ëð¢7&FØËË?Õ‡ñÉðŸ/Ûÿ PK·ÃÖÓšPKû™H'db.classePÏOA~³?ºµ,´ÅnuÔ¶+B©!*†U“FcˆmH”˜tØ]aµì4Û­QϽú`LcÒKz‘D½ûÏÈIoÖ7Û H˜dÞ÷æ½ï}óÍüüûõ;ˆ0 WâŽÃhFŒçò÷ŸÑt®A½Í¹jà»Þæ1—_ ãcR®’¯s•µÜÉNVrë+ÆL˜U´–cµ}7x5Wå‰óz6Û^®Wø`ì–ë¹Á2B™z Œ¦ã?eþ¶ÑöšÔ¶Qÿ¦ázó}Ç Þ¡º*3Û!¸óÒršË¼é8íx¬½¹e´šÔrŒ€ªEZ’«÷ÊÕâJƒYÏç‹«ÔF‘*kû–s×m âÄúmÚÚb«>›]+^]˜-.Ìo\B€PÝÆ°Qâá–,Ü( Øø•á{]†/õ]Úp_Ó ®7vô[åóœA•´˜Pàœ§È(pF¬º à « Ê³S 8—x¸œ€)ÈA.àA„i˜‹Â0&ñ4ŠHåÂ>ä?_¼­‚¶'ÄoÌ/PpR¸%d¸5P"±Éˆ=œI©@{™ÔÝ‹DµðfN3Ј8®§Ô=ÊèÈú²ÐÓ3‡ìÉPž³“‘C1M>Eͳ‹š#QS®м7ñ‘qD[“ø=j‘_4ü ¦¥…}0hRÖ^Œuľ&Iö¢Ò…´©)¦ž­—j¥õì»þ–Äš©ó-Õ¥ZGº0u3¢kÊ^ÿ·ëû•©ÐG"ò±ƒµâS/½•«”¤ÝȆÈmdõú².×¥.ŒššTv!Öµ#4¸×ÿ…ñýÿ|ÎÙ9& I6>@Ɖ.¤Ljx@‡¡ÂAèX ãñ&Ÿ4<Æ¿ÆÿPKLÏo òPKû™H'dc.class•TéSSWÿ=òÂ+ „E"ÑÚšE‚àR![qiÚÔP X-äÁð’†DÁ¶V–ZÛÚEíf[;u¦3~ñƒÌÈ2Å?éLÿœþÒs^ÞË‚0Ö÷œ{ÏùsÏrÏýçéßaB=nYá¶âe+œVì´b›ÛT8]ùœÜ•Õá†ààˆJúV‹;“‰ˆ:Lb“ÓÕ-ÀìtõN3?3¿‹Øvg âKÛŒ)¡T"’œhèäÒ!«áب-7:#¾Þ€öä¨Oó²Õ™6ŠÄôÛýj<•¤9mS·L%ó›œÏ¦à ¤(Þʵ4dáZCNk–bó:ØîUîõ"±¼j-yºd½®^gßa­hé YØxãÏ& «¾5„2Âl ©ê$M¨;ÍÈq¡³Oã–ƒ5’l%û6YUcIGJ=ŸãŽ³Ê„—ú¢ sD…mQENPÈm±°BNއ”x2SÇt‹×¯†b‰Uá¦F•„#6äˆË yTI*‰±‡2'¥v¨1Uá;üê99 ³Gr"NNMZ“Lm{é‚ÎX*RŽE¢¤¨ê;"‰µ'bõÝÞ¦úƦÝÍN (à'È´é0¸›I#Bp(J‘ taÚ„IZV†äT4Ù¡Èátó¨ºì$=RÅ lªprC¬C•b½@2a˜ÖZåÆCô3åP½îû°eý§KCf(;•D„¯“9ùÙ·ÓÆ)ˆ%;Sñx,AÅ̹¶|,mœ#ÍÁ giEiÑ­çÈ §h‹8.b¿ˆ·E¼#¢^Ähñ–ˆC"öŠð‹xSÄ"މhqXÄnGE´âbxQϤ®ÍxµML|Lö1ñ2¤L\|,ç]ãJ˜lå£Ä¤ŠýU²mÛ–±¿"†ØŠñïZ™¼Îä“C(’p¡"–ˆ(¼b2Ìä “CF$¼‡³|Œ2.ÄÇQ&*cLâÞg\I7>’ðº0ÆŠ$ƒS¼;Ç»óú0.¡Ÿ]1!¡q§™qA‡ø˜wŸ`Ñô@Æ ,¸Z&¹Ä.—Æ÷é¼Yç>×ÑŽŠLt¶ €v@©{ŸºË<æpqÐ,„.ÐpÌ ˆ—çáÜžy|–¿BËL&í£èîÿ ™…øu{í@ë\q÷ÜÇ%óÀ.i»2¬\ä½û>ù¢³w“|˜¢59ÖNÚ)ÒNHZÓACÁè ›ÎØ2¾Ú\Yè©ÝÃò©k]3ÂL¡Pk¿½2a¤èÅ&=ÖRâœbénFg”iŸ^&¥?£_tyŸ»…9\v›8‡jâˆLî÷@Ô+ØI=c÷Ç—ìYÀOÖÏ•Gè rz<$YÄ—ä“•“äŒù4ùc~‰®a>E7yîåU½S‹vsN&¦U™”èa”“†u¢Û³k_å7¯KƒÚu7uÔ:n^¹ý MwÝžZ;—s_Û ¿ ™ Uç Y9£y\Í ÖªáÿGÕð"QÌDU¦GUèžÇ7FHM°êê ºÚdîéJ$=¦ºÒ¼ˆoó«}R®—t'œédxñ¢xõ«ª¹›¹^ÏZ°QÎ"Éž -Ï#ôØ æñ]‹åJO.¡«ÇfZÀ÷ËÕ–'0ÏrUCJ÷š‰f©„ŸÝœ1 vzí­ü›}‡¬ŸÈ›ªj‹}Ï~3ÝT%Ïß”¶ÕFÅ8¬9n™y¥k æð³Óg¯¶<ü“úÑÊún¯ð^~B‹[{Ô×yP´èoT[ñC6ØYí]”R¯zW5½y½×u#ÝÊþºuDŽØW©«ÐK½N·Õ¥ÿd•ôwýxÅTê~šÇŸ–i´žMw’ºr*'–~2hÍÜ´Sÿ j81­7ÏdhÜzè9áÝÈ>ÉjXÂÏ‘eÙÊøƒúRáy ›çáM”,¡½Çf^À/Ë«?a¶«ÑíªÈŽ'FZÂéMÊÍå<ôim¾¶¼Ú‹Ú´ø\tiº0ƒ¶¬æNmÔÑÕúè”Pg~¥nýFü÷üDûiy´RïúPKiïÕΘ PKü™H'dd.classY x×U>³3;3ZÉÒìÈk½¥•e[ûÐêíµ¬wí¸àF±‚í8•M¨ÖÒÆ‘£HB‘RÙ(BnKy´M[>h05 ‰­Ä6µ‰i†ÂûYZ <‹BÛ´‰zÎgw%DzSô}sî¹çœÿœsÿ¹{gvõòŸ–tJhU:-.±F‹$šÅ" ‚æAâðIˆÄ-."ŸÞo÷;z?õ³M4²9¸ß&ØDˆf³—5„ˆ€§†¦‰ C7ˆ5Ò4ƒ¦ !†„Ø"ÛûÒÉé×¹N?O 6IÛˆ$„ ‰ƒ…fТÒky!:‰o±Õм)cQ`¤;D¶î„E ‡m ±dMMm M¦a‰BBØ£ûÒtOYøCl¢Â-H°x¥! ±ÉëÄnÝö±fcY>bÍ͆¼"`cí.þã›wíšNWéªà?=Èzÿétݥ˟M?cÓÇmúyýÚ5‰¥N÷8=ÎÚÕ«z‘T,ZYY±élú¨M㛉îÕhc$:p<õPªi<5q¬iðèñôÈL×õæ3ÓcǺ€9Äw;=ÂÐüÈ@êhב]{£GviTÀ³Ñ®Ôx¦›#c]*Ńé‘Ùé±™MDIïOMŒN>Ð%‰œÈÀñ®ÃkpÕ›ôšÙ;15;à ¤S Ss}ÀàìÌÚˆ’È›W˜åöC7ò0"z;nÈLé:±‡®Kïq&öM7²ËbÈáèa¬H†DW´½YBR]70žÌsÜ1Ûå‰Qrí]¥s6ëGvÕ9¢LÝ#ãcc3½™ÝžâîNMLL΄g'Þ=š ߟ>ÑÈ÷È3®2ùw§SÓÜþîÉÑ´FvON<8“š˜9”Ÿå¹~Ûžö̤§fÆØ§QxÏÜ• OL†SãÇ&y?Ü÷@x*5z =“žæ{vöN<”•:á™S’ 7.p`rvz$ýö±q6ù„©MGnK=xßäÓ“‰C-­‰–Öæ–÷ˆ—i)VRÇX9ÊÊÑVFXiææGÆ''8‹6ʆQÁÑô½©Ùñ™ýéÔ¨ºŸÌ„g»›ûLgŒšÔNsí^æïÞ± nõ¤d’:÷ñ5Æ×qŠ3ûsï`–ÊÖÝÖ•¯¿£ù£˜qHOIÉÔQaaKnKí–훜90;559Í,¯*[|]˜¯²®ŠÕîçkœ/®ªÉ-‘EÏò5gÑã]¶èŠEÏYô)‹~âe‹~߲ۢèŒEÏZôëý¦Eç-zÆ¢KýŠE,úe‹>oÑÅú,}º€žñ¤ˆ³"ΉXñ´ˆË">B' è1ú”ˆ‹àéiz¯ˆOÈô”hKôú hïÄû$)`’BKR褄ü˜Ø. _“é92/ÅYûœˆe:™GÏÓŸ‹ø )â¯Düµˆ¿ñ·"þ.@_ /‰ö÷_ñe±}%@/Ò?ˆãEû'_ï?èwé_ô2ýk€~þMlÿ.Þÿé×DûOѾ"@×ô‡ô_zE¥ÿo±ýO€^¯Šxž¾ ?¦ÿíÿø`çgD «_à“þOèOéÏ(ŸÀL{Þ#„ñXÆ4ü"[ŽuŸVÉs¾°?áOzãYo<çËÞø´7^ÆXMyôäŒ?K”ÿyóø°Ó90¤»Úàßõ ™®>8d¹Æàíú‡S„%Çúˆ‡<‰uçä+Sk²Ü (§ÐµX Ì útm–.d±›Çr#dÈ °ÜY‚ ¥n>Ë2·€e9d,U*Q5:ªA0ZªE›Å\‡<[ÐÜV„lƒ¬W-FÐ\¨ÊÇQ A¹’¢M4¡J32· |+R·ÁÛÔvÕP¡;P³C™vb™Ý@÷ Z×_¦oxlo2ÜB¦<ØOÂy‘pî0çŽ#œ»Aî én18ßÎ7 çn”‚r‰/ª(ÇÝÊK@¹ ²%>„JÌvØ.Û%`»< ¬2Ø/™ªP§A5ÊT Üf”¨CÑ-H¾AÛ¨W%"0EÑ_ ÅÑ}R$`iT¡Mh­Y•hA’V$oCSíhp; %aÙKšíD….îF¦ô׋r}´LßT„5C/®Ë…ë Ð\ š+@sh®ÍÕ ¹4‡Asvv­ÐŒ\ÌófáÙÍe²³ƒí:líZ]²+Aö]‡­]ÊÅRip©R­2Ô sIk¡oFù:Ux À[áÞ†Þ# ET ©âp4`! ånB3Í(Ú‚­HÞ@»¦+Át˜®ÓµØÓêTõ»`êFhºËAwÓý-oo¶·É‘ÂÂtú…òz9R"à= Þc`<Æã`¼Œ'Àu#¶tT7 ÕA‡@v³-œ’˜¹n×’®$S)ê”W®LHX©’TI3¼Á@wt7‚î(èŽc—7€mñÖÃQ™¢¡D%ÐMBÖÊgˆÈ&D6#E R´"²MÕoGíh9‰^v ],;UN¬« ¹»aé¥WåècÜ2½æíoZÆ[„ñVÙämÂx;3S¾”·b«'A|;ˆßâ“ ¾ [½ôïýÛA§Ðïvý.ìñnðÞÞ{°Çw€öÐÞ ¾{…oi‰éîݽ {'ènÝRq³j±A[Pr+Ýw=š‹ @ÞÊÄ‘ºÞ„JшMp7£¯TkEå6XÚ‘:‰u쀽1;Q ½w¡»Äô¢LÛ—éÛÞîî®ûåôãô~›Ý/§· ®ß®wëÝàú6p½ \÷ë=àz7¸~»p Û yhþ>ÙäHÏl?ØÓ&T(q÷‚m‘åÈ]á¾»9ª¨†©ÉÃ(T ðfÀê³­nEcÛ¸ýE`ŠCЏr7À®9š\µÕoÝïÑR¡Õ¶«5$´AÊ´+íIJºëA¡^ØûؾLßñ¿]Í}S4HŽ’;Àõ>p=®ï×·ƒå– ¼$€dCÃŽ>ª÷êƒB5, ¹wa_‚éƒ`Z,e¨Ëç rT Z¥{H7À÷~ð}|ïÇö>¾oßw€ï;À÷v·ÈzlÛûÁölîÛAö 67 6¢Ý&˜š•©ý¶¢“6ôØŽ’Idß –÷eqv©tÕƒ:½ÊÔÇ ,ÓëÛw3ÛA›„îwÊö’í}X(¿[(w ü0(?ÊÛ{Ä߃íýC`þ]Â…Mn‡Aý= þ¨? ê%G©rWÀT \pÕH^#2ÝïÝïÝ«SE· èV€·)S=b#È…;†¬qtÖ€Ð׈|MXt ׊öÚߎøíÈ“DLbvb!]ªùn5ôÝ‹Ü}Üå2½qV^Áù…ü#™×r*'ŸüG…± ´ãcí²ýŒF¹¸³_â6ñ(¿Yb4-?¯ùTÌ£|ÉÏ{/àëÄ{Y y”hŸþ9/ÓcÙŠµ^ÅgÒcOkÄ—ÿ¢fÄ´g4¦ð¯ÒœW¸ ?Õ_¢ç‡¸ö@<‡1Ÿ£—¸Ûxœ-5‹ññ§Ötõ; 寪²ñùùk_«t¬á¤Y§¬•¶ ­,¬R{nxõÔY;-Nšÿo¤?äOZ!“G+i†ü!Ó˜_rGØÆ–%6›!˘[‚Ïï°sÔs†,§`nX…˜9™ó(ŒÉžtcæ0Y™ó#Ž{³"k7³ölü±uâ½)>·^=™wÆWu޾ÁÍṪL{nÑé[»ÊEKIûTž²ÏÑ79¦dþz÷bÖÿ-ößÄÿû‹nâÿ6ûóoâÿû­›ø_—å®ï~ƒï짨™Ó½ ÈfÚ„ ¿á¿9þ[á¿þ[á¿þ[á¿9~&ÿ¼[˜ Sbóœ©Ó¯Y>o¥ûÖ~,¬ìÇÂ_ ¶µåö¸›Ûã9—™s)T§Ëòr ¬ÇÌyr¦ãë~˜Ž¯÷azËCΡ@"ù9x*°ͱçWMœÕ“ÒÜÄÌi«æj€ ÀÙì üÓÞ \Êç ŸÇ‚X¼22.hü™;§¼ƒwÿ!!ÔöÅŸ£«îýçµ¼}g¨ðîKôò;~A \‘SøE~$ðp^Ë—;›Ð/j2‰Ÿ(1ËøXV…‰‹ZÑY< ¨ˆ~ÕAý2_§³ˆ åQ´¦€“YÉé·´’ÓÙ•ÌðJ$jø{Z‰q³•èIã åsIýà)C ‰g?½òõõ—öTviAoiþØy-˜YÐgè„ç.òܺûÀSžóIz÷õÎÕ·ëao‘.á_xdÆ.jîÚÇàùú,ýˆ—ÆñÒúå@¦È·à¾Pµê“DßÊMòqg‹^gQïÕ!Äo Åg¨€i…Ÿä¯ð @è¬j…,ú£U ¿Â€sÙJõÞC…܆—È8ûæû‘©ºüÖÖ€U þ^Þ<žpœ¤å8òF*¿Ýðå÷óÛ(__vî·I¶¼ñ扑/¢@Ä…"ŠŒÁN;®«·#÷†àϽ˜¹7#n©H;阹PÇÊÆöVñÙ2XXò2ÂÚÄB•5ÏsNƒ=Îwra8d²”\bfdÈà3Ç;ïü<ÁÁ(g‘QUåÈ¡;µ4«pÂqî%Ÿ9T37(dÀg…¨âÂ!ƒ›™^P­=ȸ3¾’2;d5&Ne(0šÌ¯|”x~†l§(dšsɼX('Ÿ^À‹ã,,ª§Ž %4oÉhÌùe°æ…E¡ã‘ƒ 4†ùØSÈ’ 2ßCš ÈÏG yñ«¡~†:A¯jak{XÃÖzصeMÁÖŸ–dzØ|…5Ö@­aõzÁP¼Æ–_•g‹…1¨é”¯ÁÚŒµæÔò ’Ca Öô Åk Ž)u^]'¶2à2¶Ö/j›r‡™É_ô¾kd¾™„½/ã/’öQÚp‰^rg.h%Wnôå'³ßhtÎÇgÁ%zuȽ •^Yý*ž!?ñ=D?F?µ*Úºeô®Šög£ºA´§ïñ¢Ë¼ïVøø,ã#µœÇе }…¯Oâ<ü¥ïPK‰W¦˜o"PKü™H'de.class•TÝSWÿ-IØ#`Q‹m´¶.âG•ÆZ¢Ò®ˆR±@­.I„Ű7òÑV¥Ÿj¿^úâK_éôAg :ÅQŸìLÿ¨NϹ» ‰RÛ>Üóuû»çœ{öþù×ïáC~ bG[‚ˆñJ|Jׄf¥KKõ%$l$cVŸ×{³º9Ý{zj6“r^:¶aN'ÄÇcüJ×$q„MO'4=›èš<&a-¹Ó‰ÉcCÂÛ©h©xÂåÈgRÛpʽ£ldÎêfÚšKL0ÕE3^ŠbP›¢Í&&kW^LÏMm¢kB‚¬Tóˆ°5TûVÓÍÄ*ÁJ-¸r %&a ™‹ê (“C|Fpï`rôbr0ImÐMÓr¢³hë¹è•Ly7åíëBþ+‘°nÀ2óŽn:cz¶@~(YJerŽAQ Ñd)G·IGM+z4;mQWfæ¢#º­ÏeœŒM‰Ò‰ ™)˶ ÉÜQ§œ#"¿{«~-&µ v*sÜÈÒV·cÓä žŸ±Fl«g,¾{OO|O_¼ÿàbÔ ¡O“1EÆTœŒ©>äRYË$)M´ì1o†<é2õå²aêY£Âq&š¡eÐ(‰‹2,ºWÛà}}ŠÓé\¹¿¬žÏèy§ÖšŸúm:yØrF ¹œeS_ê`žƒ¹ÜÒZYZ9ZWiÙ´¸m%‡eì‘1 #.£_FŒC2eì–‘±OÆ»2b2ºd¼#ãí0¶"ÆA¼F? ›YPLÅÎ0ºYô±Ø‹×ÃØÏâ‹^×Á¸fYÏn »!¶ÂaÆQÇX¨håV¦u!$qn ŽcŒÅù‰s,> á$ÆCÂ8oL°˜dñ‹ ,>fq‘q—w‰-ÅTRÌ’f7ÃQÆev‰þ¦Y̰086Ëâ ‹,ãæB8Ágòb;1$é±9‹Q|€5ØB©o‡„Wi· ?E"[âf Ýçij™Ðû=}ÀÓÔm¡û…î ‹.ä6ò¶§Dº]}Sm > .Âòtî> >ÜŠÍcø&ÒM¤C¿ªÆ–`»˜×hù y‚–‚ˆGÞBšÑM¾_=&¥vðuÄÁyõ7ž!©%áͻ޼ë]¯èz%×+-Á!Uv½²ëU\¯ÂžªJ‹(Òš_DÁs+´Ê‹(UË¢™òÊúÉ+ëæ2ŽSeš›Ôú˜›Õ'Oq’iDn"8_ λ)Š`±,º™Š ¥úéS¼GǺ ‹`¹,»y‹`¥¬Äî54õ}Ѹ¯qG¨qÒûøÄX'IË·„ÏÎsVÂ!‘£È5Ž„ÓÓîgD[påZ½Êãt‚Ÿô6i8ö§†ï¢åü2´ñˆôן¨=ݾ¸q_Ü£Lw7\—–&F±zŸ;Hó}nr[¶à6iÁmËBµåêªeje\{¡ QXq¥Œkue¨ÿ½ ÿKËx«VÆz¯Œ€º„Ï«YwÓoèn·zÛ¾HÓ=os?šŸß¬otØË0BšðæX÷C|ÑxÁ#â'^ëÑ´y4~ߣ‹kâ§Îãù…X¸ÒŸ¹o E]ÆIÙ/½ùlˆˆálˆùŸýЇ‘ô×<¤¿¡‘Ûvª7/¥î%Üô®¡Lö-ï*¿‹]u°[u°›u°[¯‚&§˜”Ûî¤Üv'åöýZç6xo Š¹s²ë|ˆoWZ×L€ïÉ©>PQ‚òŸ¼1ö ‘Øã;X·ŒãšâöTµ×6ñÑöŒ3ãš–ïŸ4 ÏˆqÛø?Њx,«hù_Ñmuè@ Xý†Š]PKš‡ô«H— PKü™H'df.classÅZßWÙÿ™™; †à QÔ(*!!Aˆ5þª¬ZÚT¶bU¤¶ $B4&4$.Xʲ®mmklïvÛ­Ýíñ¥çtíY…S=¸Oî9}íCßúGôô¹ôû™@‚ñìõ>ì>ÌÜ{¿¿îçóýÞææòÿý}\?»VVètk°Gƒˆ]„5Ø¥Án \ÁÎ 6;“WÍfwÖÌMtŽ]MëÅCÅB&7‘°|ÎK ;Gе!84S‰¤™MtŽœ >˜4Ç#'¬‘7X¥ÜLfvÈéôx©)ÎvQ'}ÖÌ¥ò×X&¯&.Uùm ÚN™¼n 7U*" ´iûl_o0X*V[l >ϰ3YB:¡š¢ ÓYãÔLߦØb#ø|bIÞZKNƒ—:/IÀ‚åÌú¨·–ú¤™KÔÞ\®%K ›„ K¨G,nêáL.S<Šýf.—/J¹× æTàZz6Šeq„"¥?›6 ®?ŸJãRèÏ禋f®xÞÌ–pì993žž*fP*„µäÆó…æ!`f'òXþÉë)³`^OÓ…À ÛmÿšU®t} ù+µì§Ò3Sh–Nzà@#dR.PœÂP.«À®³ý½ˆf(_*Œ§Oe²¨¨£¶Ž¼bNOæ_-ä#ç{¢½‘žÞ½=\&-‚•L옘*³P0gÇóS³(CáXvƱ3ÃŒgó9Œ(¥$hN¥¯˜¥lñlÚLÙõÆ\:² ˆ>]Ö¥® áH[·8B‰v%“C7)N,Mâ•‘ ¥¼´W3*ÿ…O„›_ü0àS]V¥ šÎ£”ìZ[xýDéL¾8TššÊ0¿Ó¶¬3³+¤¶zÅZž.¦qré^Y¼¨O˳!•ðšað*ƒc †œccdpžÁ×|ÁWœf0ÈàƒC Î2`ðEg`ð%û|…Á—½Ð ^Ø1/„õvÒ e}à§[”†›¨×J&>6Ñp ùnöB6z¡Ÿ<“Éq;^ŽPï”=Ô½p’zGévú±¨Á u~Ô`u· e~4…††êœÁô4d³ F •  52D?4Tæ UoDCÕP-Ã#QC!CACF†è‡†òœ¡èMh¨Šex8jhd`hh¨’¡Rc‚ã!^Œy1àÅØÇ‹1΋q?/Æ}¼c¼{y1öðbÜË‹±›c”c„cW-Œ¤Á™ÍG-$ÖPµ‡Ìž£XCÕƒ|¬á ø…yù…xùuòò òÖ ƒã^Œ»y1îâÅØÎ‹q'/Ƽ¼·óbÜÆ‹q+/Æ6^Œ[x1næÅè矉ãF^Œ­¼ ^Œ>‹wB /?/¿f^~:o šx16òblàÅèåÅXÏ‹ÑËÑÍ‹QãÅÈx1ªœ5NˆŒ¡Ê PáÄ'sâsÕÀ'ÇÝÃm(ôûÖ¹ÛnÉùêð‹vnu¬ViÕuZV¥eë´Z•V+kummûàsö-¸ í …»ágÕ»Ëxõ­î4¶`K;&Ú-<5à­ò£¯¼!ht6ŸÏ†ÀÎzÜM9ņÒ_Î>UÅp[š] ¤3Fº&@ _\œ<"œêE8yE85ˆpjáÔ$ÂIáÔ,ÂÉ'©å%9U~¹øŠï‚UñÕCV|9oütȇ!’V‘|l©ñ&N~N›E8máÔ&Âi«§m"œ¶‹p ˆpÚ!Âi§§vN»D8íá´G„S‡§ §NN!NáÏúÙ%’ˆH>¢"ùè©ñ^N="œzE8ÅD8íá´_„S\„SŸ§"œŠp:$Â)!Âé°§#"œŽŠp:ö²ï—ÏCÜÇ¿!~euCÜìlˆ•Ð#øyy|¼ŽºÉQ»|®e?î‹×)+7å͆Vm±ï„»–àÕço£x¶N;¬óIÙ:ÒkŸx†]ä2˜tìêè$×*]F»ré¼t&ü1¤|ò#øå™ûÐxá1\ö)‹ð«§®¸Ü O´CJä4D\~ÅY^‚_G–ãò}èð+†,§bÔD–S±Q{÷NÿÁ;†;w[– Špoå_Cg£º–Sit¶*˜JÍÅ5?ÖzÁ`)t,wc¸®bçô×±K³µ;q­IG­IqÆnѤ4ÓŠ!¿»ò犯"~ã"Ç.¿‚¶“è£k3¸Æânë’l¸)†2iýT0:haÕß[ù'9!2[‚ß>„»v¸·­põCvÙÌ"Ë÷Vþk ½Ê‘úÿçuD럦׭—ãŸòÊÛœRäû¥¥Êg¡t:ÇÉFøüaa-'†áݧ¡Eøý+†ŒeŸ¬€4§VgêpN·ùO@~ð|ʳžæãAëxëóÏRÛüam«h0êr—Æ“Žññð3ÐÂËï€×Å‘û°1¼,¿ axا.Â{Oîè‘6ùxÚšeøÀÑ0Ò„ÚVݫҷWÕº¥ÂZYµv×°¦:޵ßù€¬ë=¬õŸ°}¿šè^{­BõþPKÐèØâ} ç&PKü™H'dg.class•TÛSgÿ-Ùd×!¡Z‚n­­›,#j•ØÚŠ·” ŠjÛM²@0ìÆM¢`ï­EûÐéLg°3}™œÒŸ|èßÓçÚs6›(½efÏ9ßùÎåw._~ÿó×MxÃCý2^—•¡Ê8"#"ã5‡xÔHRÀ^5’ZÐïéƒÝœÏ,ÙrâEõdÙΛs ÇgJ€¨FfÈUV“ÉH*7Oz‰I¾ê`!¥ç)½ˆÌœ°[Mé™Ä̹¤s ¨-—‡ÔT>QKT2²;_^œdÁ˜ÐÍœµ˜à˜A5µ˜nñëV_FǦ=;éÙAT§#Ó$µÄ‘È!Gj„Oéfb僆r a°‹•5Ù$SX¯:ãpß™¼™/¿CÞ#ºiZe¥bÞ·õ¢rÇX Ú\e“Ê;R0t› X9C€ÿÂRÖ(–ó–Y P’CI3kÙ6ÍI«,f [±f• «bæJʬe+#'(ÛFS†]"ïºqÃDÛ61qŠº­/erVŒ¥"]9eˆ&Í{z!ŸSFeåúr‘‰µÙ{œhþI«bg‹ùÝôÌœ×KóÖUÛŠMÅŽÅâÇŽÆOŸºMøumú 2q²$dSÙÙ‚e’¯#EnŽÉfIg’á#H!ëÇr¬3üÅ,Ks|1ïÇåÚ1ïÇ5̼K”Áƒ Lâ:¼¸:€xÜåC.?érêñ}$Q—ˆ¦Óˆ$]Ñu,DƒÁ  TqgâÍUºÑŽNJ Çé Ú§~Ò·WØI{YÛüÁfo9ªUQXÿÞ “\v ¾â&n'Î1Ú[AûÍ Œ¦Cžu|¾õí+P‡ÅGðí·†½d¼ÏsÒ·‚ݱnŸçúCŸÐí‹mþðüŸ¼«ÎNõR=W‰G¨ÂÛyúïÆøÅj£+û^žMø ¾Ün… ®¸ï¢Ã5¾E)xæ©Þ`ð{ìÙÀåtH\ÇW[}ßÁß׉ç?ºJ/+Ã}Oðõ°í¥}†iÉ£}´ñQo8(æy×÷‹´Ü;½Ãú[>NÙ¸ùjý‹«Ú¦¯žÙÇI¢šg@4ï½íbõº±z¨Lqÿ®¥CÒ:¾Ùj±¾æ¬ì«ÿÃzá&ké_­÷6Y{ÖòŽÖ1þ÷ÁÀ_PK‚­æ¸¬ PKü™H'dh.classmQËJA¬I¢“¬1¾bÔ¬õ½ 1FEĨ°àA "ÖìjFÃŽlâƒü’=ôîG‰Ý«âE˜®êé®ê˜Ï—7ÄQ€D—@Ü^8HØSÒvœ…¯¶!0h\¹wn±î—ÅJ3TÁåK¤}ºãDâgt8ïÜTjnÑ ²ö|cï¡êß4•y'¸sëʳîuèY Õò­ ZGåÕ%RVômXõ÷Ul¹Ó]·QÓ‡¡.—–V ¥•åÒúÚ™€p)Î)ª1¯Æ ®²Ñ3•.VüPÑš–{Σþ^_®ëÀÿ®ŠkІDN¢_b@bH¢ObP"›F±42 IÄ: c‚Á20‚IyS‰IŒR9†1Œ$ì&LÑ­Xw,¶1ýL ‚æÊˆ{~8ƒNj0ÿg›ùµõPÔÎ AËvé󸶖d }$¢»EaRlS̼bäÄlcöéyNæ(1OúEóï‘Ëàñ´Î¤½‘_ MêþPKv)ïI€!PKü™H'di.classÍV[oSGþÖ>û`À œ$& $-Çn©¹Ó–m_¡I!ÐÚùvì*­RDQþ¯HTêEòk#‘K j+U© êcUú/*Ü™=ç8NlT‘âÙoæ›{óûóŸ~†ýH¹Wÿ›v}øóvûb7ÓŸ¥òéÂäµ›ÙéÒqw°oB@ ްØ´\rEÛa¤0[.—æ²éO³ÃžÍÉri£G{°ñ”¾X™N2›YˆÑ×'BÓl;^àKaôàÔéy /kôǺv"WÈ•NÑ ‡‹™¬ÀÖábáV)](M¤óeÚgç§³³¥¡b„ê!s5Æ‹å¹éì¹\ž|ڦΤoÍÏÏû'#û÷ooìpJ>’¬e+xa§v½¸I4Žq<;—ãcÒ×ø–{× ;Ì·HKãåÙÙâ\)›©;vÇ&7‹\‡Öù º(ëØ­cŽ7u„u´éêØ§c¯ŽŽ7tôéØïÃ6(>´£Í‡Z}èååuK#C'<>ô°€×‡ìàe 3 Ö<¬‘µËr¦¥ŠA_£^DpŒ—㼜à夜2po³ökï²á4kÃiGY;ÃËYv9Ç-‡ðž!¶F˜Áû¢aíií‡ ‡q:_ÀWœ,IÁ÷" ôZiç'Ý%Ñžº=#½ÒOðíIn'ŒjCûí´k!)Hª¡U|°HÇmPmó>rVø6«3jêd×c#ê_Æh¨k1‡ÒŽ­EüCd䟡pסTo/#¾è¡K·¿g>Õõ7E;jh-^ÂöIlˆ×€ú›¢2^"ô1%Õ*¸#­´5µHÆ2Åý{nGÕi S]`áï1ÕÌü6Ûîñ»ö&nq• ³ãÒÙaÇ-v¼ÆŽ;„Ä]¾”öÜÔÔïªë)(VNT· Ùo*„³¿wqQöÞïYh€üPÇf(±yß(Ñ(Q ä´¼£Öò¿í–ÿñj·|½ª)»vÍÙªÖf¡ÖžÍ­œ¯µr¡¾•<7õ­ÁØ4Dóµ!Z¨"ž›”<Qs™Oå7Õ/_ц·Ãg7ü7jø’«ä7þ‹$»ïCW*ðtk)=ULå±qLusa/TS»±’JR‡6 ÜÎFÐß ì`P„/ºÿíÖ¿­VÜQ½‚ݼL½ÜUöÒ=ݪÏdã[ER‰z*ôsÆ¥÷X+}q[]äí¡“•q Ì2A±YÆè5 ÿ i¡gvPþÊ89vÚOÕö C÷‘“×kMÞ´\rÌÿ‰3f9ºø±™]T=Í.DŸ|hA—^Áå |“0D™ú…^Í+K2†B?oÕ]mˆ=ÍËÿÊRcïœS{_öít¢•^€Ü8½­”ÎUJñc’Ÿ,m¨ô}vJšùPK]o*Ôí PKü™H'dj.classíVÏOG~»ÞõîÚœÄë˜ M“ÆØq€Ðòƒ$ IZƒ 4¤DÓ²`œº» UŠêJ¨·z©”Jý!ùZ¤¤MÔö”Hý/ªœ{ï)î{3Þõl jT©· væÍ7ï½ùæÍ|0<ýåWð@®KŠv¥¯[ŸXÝkéZ÷ØÜõÜ|餞hפJ4EÝ+Qî’/ÖRKËåÒDi%g}|’:žu+—Ü{£ÛWéJ—q%s§ŒèÚÇ€ÙFžã‹i´è̹Û…Aþ’í=•_Ê—N㇊ٜMCÅ¥%k©4iÊ8ö]¸9Ÿ[.å•@Já7Œ5a|}ÅòÊ|îb¾€~á™óÖÅâøJ11Ù{ôX¢÷XOïñ«È3 YøÍá7/:_(.a„”•`W6·`• ¥K9+ËÙJ°»ŽM­äK9”³‹Ôà1Iº ¾_² ùOixM‚=vÙScc ZŸ{Zì{þAáe°''r+yZÆš£]lwˆv1Z,M”——‹+¥\VXvÏ3n8 ƒ>è†Ód!ë,ż¥Þûóݹ/ÿŠ}¤~Û¿úóúðg&¥?GC>t ë<5(òa؃‹>è£ÙeKÀÛ>xÞ!kz±=2$¡4hûÈám{‰*}+nhŽšÑ–aÇÂx-,ó?ÀúD±š8nÂyJØ«±{Úd›”pÚSŸ>„Ž -BÓêþEuv°í¡4–Ø‚áXÛŒØ!aðóÏ c&oëû"£ë[ŽMßt¼M™åHP_µ¨j£AõÚhDD5íQÝF£"tRô¸`'LJ²lA†¼2.®ìs‘u`¿‹­\t¸ÉÅ×›]|¸ÅÅ7»#J6©UaƒyàxØÔºs|*‚ñõ~5†f&¬n¬Q‚Ka5·±zËNJ~Ÿ×i¯d)Cš»ÛÒõ i!CÚÊ`†tE{jjêµ›…3±3{XÚ„©ð4£ë_]Æ‘2Kã ¾Ö€TÈË¡ˆiê CQ Ö#{D¬: b,6#\ÄðÌ&2Ãg˜H O›a"7êîÂåöo@SªàkÇýõBR1•‡þª'é­Âf«jzßï¶ehÛcQ†(ªÐE: ¨A%è€.6PQ€ã¯T‘õŠçïö þ}mÌC÷·ÃÍÜÔÈÏS«ÈREÓÛoמ°ë‚éq%©Wa»y:oñ?DfÐ_—„ð‰'©cEbÝll2ì>Žü>¯©,VÁðÒp1é¯Â×L"tOÇå@ —©&8Èc¯˜wúñî$€°Á4cpÍ ÍuÍ/aSð"S,ˆ‰¼ØÀ[ñ×LÿíZŽû14S²áûðÞ\á`Òè7ZÕû0Õ¸1ö›)ΞGø(ºJqq>ˆIíÔÂlÅOfS(c?òÓ÷àÃt\ÚbÑÃÀŒ72Íþ=83N¸ç+4™ÆÄÔg07õ#øüŠÿÄiÁOÁezÙ? ›çþúÛ®Åu³çl^¯îð¼ óötä_òLrG™ÞÓ/² ŒTê…èž aÆïB¶ ©ЇÉý†]Ød9|ò¾!l­:œ•3 W¤¢=esûùÙ«v¾è> ÖéñhB:×â"öùMW¥ûðÛÃÂBÿPK|/-ÕÖJPKü™H'dk.classµTùsSUþ^³¼RÒ… „Šš…4¤ ”"ÑØ")-]^’×6mšÄôÚºVpWpÇ­n?ÐI;Ö¡ü„3þþæ!ž“÷’¦mtÆÌ¼sÏ=çÜï~÷;7÷÷¿~¹<øÑ„œ&Üoƒ&ØMØ$@çpÎ`d«_@9CÒIÉ—ÞöðQ–…CJ:–ðçw Ð;œ½„±Ò”ÂþÞ}gï>šEýA)îÏMÁ˜_…•#™tL÷†Ø‘K‰hrÄÏ@VGpÈß³h݇º(–ÔÈ©ŒBdI]³qiA{FY\±Æ±üDÎ`†è;Kd(QRÚ;ÔÒÕŽåÚp¼¦Tœ¥wô8{ˆŽ¼X6ö…ƒ¥„¿Dp¢\ЈT°‚ƒŒE]08z¼¹qW,S¥-R"‘Tì™Ä©´”²Ë㤴, Zâ²”&r-ɨ, ¼%™U¤„Ò)Å34×ïo `n‹È)%FIöÖ±é G퉤]Š$©­ƒ#ö””–FdENS‰@”¬ÄI)‹òFve<ÅhÁh”ïO® æP2“ŽÈbqÊ”±5½û¥ÑÁä¡tÒÓéklòøš¶úvî8FpUHä„É ûȉÙFü#ñd‚„(¢dVGå~)WËRTm‰¡Åºˆ©œ–E‡iï-3r¿S,AŒ'ŽCƒôÅTæoZ ½ ƒ€º;^Pkï|7éO•O†ätŒ·“¬@ýÂ¥i‰K££-Ò¨R´Ýæâ4¸-©„2©T2M}(*«\R¦bE‹j>œ>"%¤èãÆ‘0B†¾1OˆxXÄ#"ÚD´‹ðˆx\Ä!{E<$âiDEìñ¤ˆûDD4‰Ø/b«ˆƒ"Z-؈•l‡Ë/6°¡©ÕìyØs[° +xZÅÓJ6ë-Ø­Ö­±à)˜¥†K*ŠJüj6g*8±Ê‚<ÝÃÆ‹r co'›½XiÆaÄÌ!¶2“‰±æDœd:1ÂÙ›$ÇR{–Mš§£ftC1£3zqÒŒ>œâÄ—Œsv‚Mï96Ïó4=Žx:ÁSJHxÑŒ°Êà%6\rÚŒ#ŒeÓ3fÈ8ËÞË:&:i‘Õ¡„+H™3,"uh†ƒ¢›É/Ãä‘êä¯#š@ö>šÕ‚@£Õ5ƒI×BÝ3xå:ÎMƒ\¹Vse e4š©ò¼ËÅ«jÍôñîGr j5ÜU4ru™î' É[ØÓCÞs!½æúç²x† ô]œÅ.á:.²¹'AB#qè2ì®9tÓóA·ºþÍ›kF¹»{í­›è"$·›"³x›Ý×Ñ>š£¶^£6 D붦°‘qª ªµZO4»ë›Ï^ê˜4“eELWoÿÁûsÎS­ÏâR—Õ´Ý8…Zšõ5çsKŒÂ¤^¨6Z­Woÿi5-hR¡ì4LOc”ißBY¼³ …ÐærßD¯MÈâ]>ùY¼×6…º®9ôuÛÊfðþ|‘˼<[²øÀåÊýCÊ^ž¦=×ÒÞM8–wã™"AúèózÕ@#÷ªFåeV!®¨ª”oïž4Ý›€Ö°v‘€¾ÿ_Àÿ‹€\­ hpeñI^¯f˜µt…–ÖÙt×´änpI²øÆ¬Òl£‘_£{Ë,>]|©Oäþí ƪÁèu¿šó›øïÒáËj‡?S—ñóYâ@ŸçÓ^ «´œÚ3QM/ÄS°¢aú§^§?û—Ó*:`¤ˆm˜ì)à7j¯CËþôÓËõ_ÂmoIn_åÅöÒS¨r«$ÁX2Ñ実Å× š©à„ö‚åß;»öÔT¹oÁæ¾qås8ÒmÓÏà›ùR/ߺÂ;©#ÈMmåÊ¥©…ÍÛÅ|5~Ò®VÌr)n׬*p'³ó Iî0LåJñ”¯ìó»³úáTšÅå\¹`½ç²;1;Ÿ¤ž þ‡"=ø4½§ü’ûEº'yÕlŽr³¶O»h–Íê%’˜O‚„U(*ð\¹“/nWM«¼£@¡ô¾d9oU*4k$¹:’*–KÕ[”–¶v+ùâUs‹j”ë | Ù˹[ÖbÅŠ¬FÏLG¢Óg£Îß Œeä6ÙØ”ÈÅ»ÍiZä‰S~Ë*s'޶hÁ›› Ü7ÍrnËüˆ·TÔoë4-:›ŠÉþÜ&8Ý”ŸàF׬jzw{ÛªT‹…†’r"­VÜ}òLikg¼#8-8#ð Ï L Œ„&½èæÅžñŸÃlFÙ¡³¯›·^/NÁéÅÆÙøÑŦ+ºØ´óVã~œÅ\¢¸Äæ%6/³y…͹\“¡ ã‚ó.MPg4Ž#] ëZ`#¶²§)ºÆƒï?þ#Э¹ຠ3ÂNö‘CÓ]ë1¦¬k±»Ÿ=Yò‹.¾’'éG››ð`ãÃÒ.uMÙ5m1èoòAÄàƒ?Àeœ9ÝÞ7{fæÌ÷Í7sÎî¯ß?~Â…ö}Xpi™º@\Ë4ÞëõbO·ºÅæ°oZݪ¤}#àÖ2­vu.`GЖÖлՆYUŒöYß~*690^ëVÇ>­21,‰­ƒ:½\¿¡ýG‘ª[öñkÓRÖ’9ïži™Ã}š¥fw ó°FóÏÛÆ‡¡i[Aô@Ó>ë·—f8ÉÖ }ðÎ~Õ· GåíJ¡\)•wwÞSPôc66]JÑN´iq¢sJ ˆ߉ié=ó3mãò¦M³÷MÎéÇÜfiz—µžm£¬à‰ÎUÜR±¦âžŠ”Še÷Ul¨¸ÂÜ!$±Ä&ÂFnÃl‚!¤9J#À& ~la›£"›RÊAdPáè!GD)¡Lv rȃº³<€(EÔl”vË„ òÁìw<ÎF}ßðäü0)B “VÉ+\*I¹K«¤>ÂÌ_ð6Í÷Wá[ÿWtæZÕL™ÃÒð9XÌù„ÞìÊÌ'N"äàayBÊ¡8 !ñPK05& 02PKü™H'dn.class­T]Se~– ì&„6PK!ºý4dù( ôƒZ(h,¶µ ‘’MX’m“ݸY:¥^8ü/íM/䯋ֱ`m‡zÕ †3^ë/ÏÙì ŒcgœÉžsÞó>çû¼ùíï_6!¢ _Ê8"ãÇd¨2$mbêyÕ¸_2²®± Ú–Ñ-@Lt¤4':&îè÷ôž‚nåz®gîdp¯zÒuL+7èÙL %:fG˜¥ØC±×°#K‹‹†C§znp¬@ÊFvÉ1ÝåžIŒ›ºµ`ÙiƒœIÑÝÆvœ}Õ±Äð“L¼^OjUŠÁ‰×«ü—b”ýàäFJP†žÃp¢šnmbÖÓÕ]0-Ó¢îŽSÛ.U³ºEc(,«C]*ÓLLK͘®Z0¬œ›/«n^wUÝ1ÔâRÁ5K£¬Ú‹ªaæò..4j/"c÷³FÉ5m«,@ ˆ‡RVÖvªOMM«ž/êHU{m©˜1vu¹³©ù¢zCwô¢áNù¼J>'í%'kŒ› Ð7•7v¤EÉ”]θ\Ô òCYZDS°³wÕ²ù€Œjx7Zf¯èå¼}ñ»¦{»ûºzûN÷ž;;Giê„Ð3L˜ä¨?z©dXt 뎣/gíÒ2á’é#!KÌhgIf“‹>, MK/xa›½É˜6m„c²NÏp 'ªe'×lwr©T²zÛí£ÎíUŒc{׆ Û9va'—Ë®Q¤ i,²kWpt¼/á] §%œ—pFÂq ïK8%á‚„N g%$$œ“0 á½(ZQE/ÞŽ¢‡ÉIBcÒÅä$3!H7Â,5òm›)Qtà“æ(á‹·¢HâPq5Œ!L0ù˜É5&י܈ù„!7YºÁ%L²4UQ|Ê]Œa:‚ñ ¹Åä3&3 cºàó>Ä,å=DŽjÂG¨…ÀÙÄ5ŸwùœJóx¯Ç›H¢²‰¶Ó)NöñÆä¾HÆ.=Å\2&?Åí'€gÔŠzuõ ñ„š¯°t…éâ@h mÉŸ0¯„ˆ¦•ÖÞ?;5µVj%_Ýú#ßåü0ÅgçLj×oÙ›GR[G¦‚Ó"«a¯Ö ‚¯éÿ˜-ï‘e–c¿B›xa ,·‰S+‚ॴ¹ºõWRàœ)³˜t“0i:è;0z£=)įÄð+™yŽ¡™ ,LTrjÔ˜¯Ãø—·“ð”é@éGõ”z Ôùt›"1Ÿ£¶hw5cÄkFÌoÆÈ4%à@R댷†”ÚÎø:ð“<‰ƒ~’ 5-D<¬uv=CNÄî_ñ¶(pÚî;NùÛáV{·ýÛƒk$ΫW›\G>ècŪ\7û›)sÝ1¹DëAÄGôˆMÂcÿ²Qÿò E‰{í{ˆZá1 /ä ñâjí<öþ)ÚKo¯ný©Nú¶s¨¦HjüëÄyÔ5mÕ»¿?ú¯å{6ýÙ8óGhxޱ™¦š ˜/Y3W÷à;_'²n×{šƒgõäÿxÁœÆ¼J‚§9Oup''µWµÍ‡=Ñ6Cpô9†iÉÇgšB¸£m®ãn­EaÅ X/“šØÍ¯¸2½‹í19ϲׂᙦ:Æì÷®ýæ~E ¬'îxoDä7!>ƒ]‹[Jí€\éÝ@Xˆ¬—2¢ÈéN%O÷3R‰ôýÍÔJD }xuëw¯øpà(½©„~F©µN‘ø¨”0)•p0Ì£TϪúŠž³õ%Õ,ë½ÄHwB@G¤;yS»­õµr¾o&{“ #oºgmË(çGœ˜9žH÷«gè$µ;Q[^Ö-Š8Ijù‘¤1R‡Tõ\Í2앾Y6ô+ZyÉ,pÒv¸0‘ ?N{<òAÑÈ^ò‰·¸ ŽGö–ô/Ì•·Á)!†NÂÖH“®7²àø|£FÙ°Ç©;“æ’.ÀáNN¯Ø†Y® x0QΙ–E´ÔÄœšÔËy»@…4½ÓµRV·TsY=_Ì›Tw¡¤^Ö,­¤ÛºU=«Òf.RûÏ‘TsZ™ÆY\Q³ºZ«Òl²š5lµèä­ªvA³UÍÒÕR­h•¢^åĺ‘/Ø´þY³fåô‹F‘˜¦ ú®XŠ¨Úœ¶ZÒŠE"D©Ê$S4s·Ôªq—‚Zx-LiÕ‚yÙ2{æz{ûΜ¾Aõj„в,–Xä©?Z¥¢—é«U³,m%gVVÇì 9êd®H J6‡,™dðDzyÙ(kEçÚg2†IaìÓ²\‰æÀ&9É´iÏÖ*Ó¢­ß™à X=8øæÚPao_Ž×°³+U[/Cš¯l›u}Þ‘pRBŸ„3†%—ð‰„$ŒHˆI8%ác §%|*a(€#h  œÀñ¢,â,zë¾Ã,ÒƒV>2ä‡uÁ>8 ?  !?Fq©cø’E’ÅW,¦YÌøI\fÈ×l]òã3\ak¶ H±ES¸êÇ…º˜cqÅ7~Œãj.bÞÏñ-=Š|¼¸€tÔÕqWS-Žîwtˆ,*›äQú:Lñé¶è&¢ÁsOqý àÀ@qA3ðÑÀ¤ ¿ŸâF]¥ë*#{ÖÑý 7É´â‰u -¤R«aµEP<áµí?¢á§Xl&ç›9yéÒÁ&ƒhlZùý{?îÔ×`}~p9æ6ÅdùÖWèG×ÑÎv§˜Z‡ÌÖÚö_QÙ§]˜t“n`Òô‘Ù…É41™&wÕ@KáÖ »5Ì?ÇØü&rÉ:§1ÖXúçvH8ÎtÃéÞê83 g†¿é&Öש!±Ç¯5ã¼ÓŒ ÛŒ#4é@4õ(Þ è?ºO`¿KQ¡–yH·Æâ=ϰ,âõþN:{ó.)£ÿ%åàÎÈæEóF7ot0Ù=îp÷P抃r±q[/ü.b¿›@ ÝÃ~ÜÃSt£HÚiÜx…Çl¼“âØ:öǺx]C)ÚE6×¶ÿŒ5’ ìphR$H³ƒíîñ>Ò<ä–Îæ™â¶â¡ûBîsè÷˜³~„ö瘚µl¢ð’=×}wp}"ûÞåÕ<ù?Þ[c$SéÆËËenÚlìäØÖxžÄ¶CÙ‹kNE¾†7½¥ø–~†éø»áS|äU¼Ã’8,¯ƒ÷TV¤Å¸"‡‡¬ÈC÷î§Veü¾µíß_cp*þPKù«I[» PKü™H'dp.classTÛSgÿ-¹ì²„»‹MÝŠÕ@„TÁK j›Š¢¢Ø©n’¢a7n6ÜjíÞoã«3:¶/¾ÂŒ¬ öÉÎôŸècÿ‹Òs6†Kg:}ØsÎw¾ß¹Ÿoÿøû׸ЂŸ$ I%¨^—Ð( VÍeSƨzñ\ï€ÚØ©^ì9Q'Sé´j˜¶:ªº¥ÙºªfntLOÛzV1-ÕÓÕÑÔ„n¨·õi5›šÑ¸MQ»M}·´ ­5­£­ýñ[zÂîÞª°- ÜíØ pš†z ¬·À¢Ì¢ìOôicÝC=Q l÷½£_e' 9î î r¢5¶»Þ­'72¢[[c®ÁÉM×úÿ¢qzrâG‡zûŠ@ßLwŸ–¤*SN6Þ÷2º&FdÁ‘N™Þ¦/MË<4r)Ùæš+qBKçô~ªN˜¢oFÄ)GDt‹8$☈VoˆŠx[Äq'DôŠxKÄY"ÞqRDˆˆ.G}Ø Ÿaì÷¡‰¥Ã8ÄÛ ómßV±ŽH'JRæÃÔøÐ Å‡Ó| ³í)T0®ž!µ,½Êäýëv±T-ã —"ŠXºÁÒM&šLdXÆ»ˆ³tCÆy$d\@RF?ô2\Ä“Q—0&ã2ß^FŠÉ-¾¸Íà4Kã2`°d²nœDFÆ{¸Ã’%#†Õ¥$\xC¸N\à²âá"§^÷‘´×¡ûèT‡’9¸ˆl°dö<à ›Ö1j³‹090t-`r MÝ%£»‰—o}ŽhlS}¡àSL”¹ÍÆO1ñÕ|œÈcú7œ#g¡9ÇÑkô¹É]}‘õª‰sž`3ùù …;ðÂ0zˆòç8«ñá ¿›cæq7âQ­)É㳑<>gÏt9+ÀïÎã‹®RéʲÔ%‹”ùùäNv<€w¶lÕñ=Án¿¬øü¥Š¯ãþf®«³>5+?¯þòË.¥ì¾tÃ//á+§-.&+ŽR‘ÈuyÈ_îz†¯]¸Æ5º“‘Š'Ø_ȯüåðl¶bU©x¸ú§â­’ÆO2R©T>B]5V•Ê»÷#U¼~D©ºG¹IV¼y|£ˆ°§Ù_ÎÈãÛ'¨¸æ´ÒÍÏCN „K¸Rœ“—ÚW++Nª²8)Wgn}N»‹›±‡æäfP¨¹…Ëà"—ðÝæÉ_sµ²è¯“t¼LM<ǒǨr/Ë1îÎd_hγ~ˆ9ƒf]1j;Ê‹.•]ìçp¿Ã#Ì9Í]–úœN‡ ½^Â÷¡Œ÷3®¥wä".CõKøa~[¦Mh(Bur˜Xè%¤ÐʸçC+îǨ†\á§ØÂnÆœÝüñ]{£ñß®ƒ!w˜_££ñ²fS𘼾Xã¾bgkƒ Ë¿¦z§¶ªjí¹$Z‚À?PKª”‘쌮 PKü™H'dq.classT_pgßóýùN§?–ì|¡G%r¤i‘u²;ÎÑÊ­ÛÚI©ˆÛä:u‚ÏÒ%R*ëTYj“mÕhyÈ#’Iú¢W{†Ø õ¨<% ðÆðÌ0ÃÌÀ;ˆÝOrœ8a†ááöß÷Ûýv÷ÛÛßüû—ma~ªÃ:ìÓá€û%“CY ö$‡fϺ︣e·rfôøòY/_ŸÜmÎÕk¥Ê™Iá3/’Zœî²™.ËËR<#9ë'§³äɇc“=õ{ö¦‡ƒô2!{æöÿÅ"rŸú?³ÙÅi ˜œ½09Mu’!mÖ-`%‘œ–¤£ì¶€–Ü IØt”zÇjrQpíÙR¥TŸ’@¢ÏøO‚ðŒ_Y­»•ú¼[n ~`Æo” Vů[«^ݪ=+;o•*Ö‰c39klÜ:1}tŸâè¹¼W­—ÐÃa.ÙJÞ¯Õ°µV¥±²ìÕ,ÿ´UukîŠW÷j«Ë;WÅC¯`ùÏòkVý]ãº/¬UB¤K1­¼ß¨Ô­•ÆjÝZö¬35ÏÅ#LÆ­XÑ+@^cã胙äüF-ï½T*cö}Ôƒ½‹GÜÕ¢¢æÏŒ{æé71OnHƒ¸µš{>ïWÏãÉ2—ÇPÈc»òeÌeBÞF"{%Nc_O—*n¹tEBóñ”%4çÕJtæ.S2v^x†"¾ê×sjÕ¯aîµO‚Á]°®st÷Ä>`Ê_­{+xû[ø•ñ#™^aÒ9ü.0xŽÁƒIO1x†Á ƒ 3ø:ƒ!Ï3˜fpˆÁƒg¼À Å Ãàé<z’ðÕ¤á)’P!u´•¾‚‰®$ÀáDLG(J4Ažƒp!:$"¤ØÐORØ€#p2Gáu" ¤¾AÒ¢ä¤/Á)’ÞBÞ$é;$}—È—È2ä ø& 8ž³pšÈ"E:-‘äð œ%‚Ò xË€oC™¤ràÉ é#"ÃúA>¯Á䣟ÃÑ…MXµ1×B‰ûä,Z#µºõ_Á70˜Ý½ÖÂOÁp/ãwø^1䔀šÚ€Æösàw¥ t@žÄ €É[úö“-QKU®bC5{¡b×¹Rptû6¼#à´8 "(;¡„Ì Åçš!‰£Ø¾Ñùgj˜›ðn&ŒNø3#2‚®)Û Ê¹ ”òÞ–#òmøž '©j¼®¿…ÏÞs‰Èfd7¬ÙßáýW;Ä'ÊUdôbª•X M33Âcød1©É$ãÑ¿r•G TÝ5ˆ¦Ì0"›p±ÕñÌð-ø¾AÂõk°7®_¼ìô›š|êï¿tyÎÔv^xO÷ͤ¨FÛ¿(é«þŽ- H›pé SÙ€8ªâh\U®ƒ¦9™~˜aRF7Ù8e2êyÙ ˜ E¥0ñ3ÐTÒÚj‘hžuÙ1ZX²Î µh2nLD1§¹®®, ªÈäך†Ä ô½Ñù½©ÐÀlÀ{N es áXãûÃTLC6ö|`Xhú.L…õtbšô¨A¼²mLÙ*ºÉ5$,i3$›!tÿ°‘“¢Ô>*u[ògø;ü^íM"ô18.6 ëÍboåy§±ÞìïCù ¦ä©4æ·à£çû[b[{1£~™!òé»QeËXÉùø¬½¦ÞSDGÈÖ»ù ®¡nˆ|A ±Ÿ®» ª´&ÖÆ–>K\¶e¡Þ‚í¬÷ö²Ä¥J+–¥ìø-øÑúC™&áË=¨‡@ºf·™n·¯€²n·q.â)[¹)ŠíÎONÌÏ¿Àcõ:îÇÿrœ²•Z±Â¢åËsâòÇz5îÃEwS‰-vF\Ô–Àªv–‚Ù¿‡™Èö]L2¢’n'ªŠøk°Ç¯§Û$·à8þlšBË’V¤CëÿšKi® ¾ÄÙRwW\tòÀå9®]–n;ZSë4uüÃ~Þù-WK´CmÝµí­ø¤HêkÿPKJPrsîœ PKü™H'dr.classuRÉNA­†VPAYDÅ•á€' 7\¢F³©CFš ƒQ?̓àG«ÆCóª^Õ{Õ]Ìç×û¡* ZlHªÅfW{ÖÊŽÖ{(_é]Ëðj¢Ø¿·µØ©shp,…8‹(ò¼Úù ,cèÚÞk¹ÅëFë™ì©Æ}¨Ú4Ý÷G(‹ŠhF†ý±IöS/üaþ;¼“ªúèb‘óÃê{6ë 0i±¡kX¶cHwδÁ#»vY©]9¬–*Õ£ÊÉñ¢áÑ tì">ÒpXÇ&’¦‹Oîq{âÉ6ÃǺ¶æØošÎ÷¦=åÊK浆ý>s=Ëœ\‡@Â×6Çý…U [Ö)lSÈSØ ã؇@r ,ÌÄÁP‰YÅǤñóÄ5tŸVvE%êëÍŒ{S“|#’oØÇdATdu\R/I³ýªŒ´¬ÄlLnØYff÷}}¿B…C‚ÛjgâYtc1Ÿv±HÓs‚Újµ~Gó(» Tû%ÑÉD2 eÆ>矬y›<-ByÅìkÜ_Šô1¹Y$þ(8îùAï$8;} à”IÊMf|m*³bÁþÛz=žÉ0Ó±©c[‡eAƒba dÁDÕÂt6\êv°›·F>º˜:x¹›™—U\ žŽ˜å¯þûn½¼%¼7ì¯Ð|-Êï–n‡‘+5~eƒ×S)Û…hK4_Êp­ø„ñPK¸lÐyPKü™H'dt.class}‘ksSU†ßÛ¹æÒ4½ì DizIK«½”BSŠF"Ôl=¨§I()m„´àOñ€ßd†!3ÂŒüàð·øI]ë$‘šŽ&g¿g=ï^ûrÖúíÏŸ^Ã4öU ©8¯âÃþÔØ–@(•ÛÉq pàE#å÷ÝcwúÀ­îMÛz¥º—iOêW=v*¥r)-Y®Òr*m?[ê(%Ó^ví¨^,߬Ð-}|õÁ ÷ñƒÚF½–Þš™šMÏÌ^™YZ¼G'¹”áα̳,²,‘ìî²”(£HUàïsëå»52‹u’Rƒåˆå˜å‰@¬÷>´ö!‡4ª4h•xªàŠ‚÷| `RÁe)˜SVpIÁ¨‚÷L)˜V0®`ÂÄ‚,!…E7‘B‚ÅdŒ˜¸ˆ(G*‹ÆØgb aŽâ,1–s&fpÁÄ,FL|ˆóX×±€›:9ZÂÇ,Ÿè°Ó‘Á§:–qKÇUäu\Çg:Vq›ñŽŽ,68ïskØÔhÖÖ°‚»,_°lÑa7èþù!ø+H‰úè-èobû…— Ñõúáãiá Óûj Ž?àoâKKmaÑi±´–Ø$wÇÒ;0îh¢`cÂ?Ñ6ÌŽ1éŸl᎑ö§ÛF¤cH~ÚV´kéi[±®¢§mõu-…ž¶?cÅñKÕvR· 4l'$MÛQdØvT±XHFI#Ue©&㤺Ôl«_X Ù‚¯¬Ä3 oËįPeâ÷ZXv⢉¯ßÄ}‚o¬çˆÈ­ÁçÉÁ7ÖÐÛ솨˜à/áÃ51$FŨWfI#@µ_ö nt þ;ù}ôþ¥…ëüE"fÄ¢M|{»…U¹Ú®˜8—2p‚ÝíôKÜû^¡ø=ÂÞÅü|±Sý vûêT‰öðJ¤ô°ÚÃZë=lô°ÙÃáŽôp´Û¢ ·Há©Ü"[¤s‹ ¯E¦×¢°×¢ˆ×¢¨×¢mÅdà%öXÈØ JÛÏÙöªà*ŒK•§Už&©HQcÔuFQg4 FƒÑd4MÆ0c˜1ÌaŒ0F£ŒQF’Ê+”_@P¯„…kÿê¶À»ûüPKNÇûÖë PKü™H'du.classuSKkQþîÌLšFM«£ÖI4jÕ8&­y«E|A@Q°¶ ™6CM­“’ŒbA¤HׂK B6n ¶Š] .tçð/¸6ž3IJ„špÏ+ßùÎwÏL¾ýùø*R(¨P€ ¶¨‰£EßÞ‰";=Qœ(úQÐü°—ÃÉsÅâgVâò¬ýÀž³Ý™á«S³Î´7Zܤä·Ýàë^­âÎŒ¶Æù\BÅ­xcƒçm×­zñš3_sêŽëÅ+®çÌ85òñl&>UñêCÔv¾ZvBN;ó^¥êÖÝ!t½z¿6í\ªÌѯbB@™<'°sò‚]¿S½V«¦n¤‡2©tæxúÔÈmBØ„°ó=v­f/LWç¨8EÅ©2™ò}Êf"]ÒêžsÊwéÌÑáØ¥SÕ±SÇ:¢a„ÀƦ7Œ8"aìÅö0öq´ŸM ýŒ …± =aì† á‡pGØ$z(=ÊÆbsŒM’M*„A …pÃÜqœè’çO‚G“ÝJY }>ËŒÆú¼GÚ2ä2+>˜¡z%`€|„¡†¶ 2ØFž%d|®›4°ŠÜ€ü ¹b ÈUœ° myËÐ×µn¾ÃÉ~±¸Š“6ZL›í$½À¬¥¯¹ñN¨fd÷£>4?çTš‘HWª™‘`W0Û±ÊuÒa‘€ó%tÙ€TÏXÑÍ5˜à?k¸E‘$ørúlù„Á›ýÊ{œúÂèä³D§R BÊÇ0IÇÂɈX–5,–±¤Š(Ó,7™oýIÛèHš7èß»·uo±ØÚ·ðLù/˜’»Jòt‹ö†ý@–²¯h`?ÑóUò²Ä·¥('ËtåXT–—›ß»ÔÒƒàKëÁÓ²Sæ>à4¹š«[km?0uƒ°ÔÙáJßSî\^‘c>o9/}­„Å4p,ilŒÊ*Ob¥gãTÉ>‡¦Ž-ÉfK7©ÍòUógŒæïå195¯5Л44u|I†–ü¼Üü½òÄä†BÖÕzF¥=eZ{R^#ÕYÔK^Ô¾ÿ.j¹ù£óô‘U°ã/PKÅxmÓ&PKü™H'dv.classe’ßOÓPÇ¿¥]oÛ CЂèDmlÀP&t€:Á„dCL]|(ÛÄ ¬dŒþE¾£/BXD}‘DŸ}ö?1žÓÍ€Ò›~Ï÷~Ϲ·ù$ýþûø2RÈÉ&ÈuE¡!¢¡K‚‹¯JPcKÏ–Ø6¾ëc—åî¹ã›nu}Ü®×*Õõl³ip³knzbÇš7\Ì ¹B.^ÈIˆÄèxÞÊæ×Ül¾´Ÿ/IrXÈ»§Çš–ÇÕÙJµRŸ— <ôJe ƒ½ÝÍR´êÕ£Eok{·^Žn×*{.ÕòëèÂâʘ„³¡R¹HçüÞ‹š·Í-®ÅâA±¼]¯xÕÚØÞn­X~TÙ¤ë{ îÎKïIÍK­¦Ç&SéɉôÌôs ’+¡ÍbɰL³Ì¬qcm¥DcE2¥]–=–}Š6è=0ú® \è¸!pUà¦Àh°¨,‚EcÑCèE;;#„kè0p †60Ìn“b¸m Ž;,£˜2D†Ý]¤1N‡ø¡??C¦]U‰j qˆéþ€N ¡Íoÿ¤ß%HõkCŽ¬È‡˜±ç¼ÚÀ°sË ŒpHiÖÒ’§èn Ɔ;1û8uŠHq'"ÉšÄss˦âg Ž£yKñGÚäæ~ÎÒÃú'¤Ù ØŽbj¶0UÛQ“¶#R¶£™Âvª© S'åÄ2ý¦q„{oŸ6t"tÑýÏDùiN7½ %I6Ø‚ýE°Tœ.ŸcUþ²γª-ÎD‹ÓrFS2úè7£'í T9£7Á{tmTîјËha'åä sÿ㵸SŒ­261ªŒ+LƒÁ>xÐùàÛj7Ûðà}[iaã ­±%\"߆ž?PK’-£§"PKü™H'dw.classOMKÃ@œM6MãG£©Æ¦ÚÞ4bzÄC­Bn‚PÐà¡Øµªxõ/^”ø^Ô?àÂÌ›Ù÷vØ÷ùõö!šªH)€€±_ÇñÁ@Àb•ô~LùÏN?Ngé㉀<ÍFcÓøeö4¿Ÿ§SºP’ž@5éy¢V;ŒÚ‡Q·sCÝáÑè™NSÂ=aFÈ ØVlèPm¬Â´QaZƒec•ÓÂÜQ•i‹i›ÉcÚA›Tù(´Ék‘;ƒVÔnPóë‰WÔ‚«%|G¼äðWÏQ÷ää"ðdŽÝÀÕrìñHÃQh¤±(B9Rûì“2©v8Ò5þX*>[þPK 1—“PKü™H'dx.classuQßsUþ6»Ù»{³”Ý @4MIK«-í+M) ?ìbk«nv—6%Í2!e >ú¨3>ƒo2Ó!3›òGðŸ8ž³‰m‡Ž»s¾=ßwν÷|wÿþççP‘dž· œ2ðŽ·¨Ùá%z¶´RâDpgCœ•7¼ÞXÃk®¹íV½¹Vè-.V‹¥R¦þ£+Ìd¶ìoˆ29ž=°ÇÍÚFè· ‡ôþÞÃ¥ÿÑãqëÕbµ8\-òù|8·¦™•½ÉB¹æÊÁ£x߸¥Zö¦bfd÷֚ٞʹ~©Þ¬·ghóQ*8=m5‚L3jgŠ ‹™°é“œi¯‡™Ew.s7|8ªàÌ~OÆõ~-s§mò:j’ Û~x¯]š÷(4À©Róר{Í{û“1Z>ì–þ5Ó^n´ÕòëõM˜à±OT¯x÷×£[­(¿4>:‘Ÿ¸0>3½J'yÔáM2L1L3ÌÔj uøt~´yÏk…·#ý-‚ †m†‡  ¾>­½KѠؤhR´)¶.¼/pN`DàI¼ÀÇg>8#0*0&8oá8’ :ƒ´Å›œ X8£L-¦ƒÉÚ1 Ã8ÂT0M3 2œ´0Ž÷,L`ÈÂG’˜Â‚ÄE\•˜ælŸI8ø\¢€’Ä%\“ø_H\FYb×Y»!QÄMn¾ÅÍ_JÌcѤ×Ä,n3|ŰD‡]¡øQ¡° ÂÄŽÑW¡o2×ÁòÓ¸Á¤ñÞ@".ï³èûS+ª¦vðõõýôFÓ•*ŽÖÅ k95÷\ë`ÅIö…u¤'èâOÌVÔónE³“n%iënE·5׊cØbUÇxŒå. •´ÒÁ7/Ò Å6v±ê˜O0`›¿;ò t[¾pR¶ñ ®}û[Šæ\E€5|Š~ —›B#[…ØKªïå$½ÀË..ólÊ`jðhß‘‹¹˜«ªJ³~ïh#'óŠ­íÂ[ÎïàN:ñ µŸq$MåÑöo€ö®@ï;&ÕwÄAbô¬³mÍìÝ`ïºë˜¶¶ƒ5†uÛÜE°¼w“³—— ê¶ÁÔ`JP†ð)™ü¿àW²ж‚w)O ó/PKЇäÙIGPKü™H'dy.classe’ÛOAÅÏtvw¶Û*¥PtÁË*·^¢TØ¢LšTbس6>l/B¥vI)ø|ôÑÄÄg}0FŸJ¬ÖÇ&þQÆ™m v3gΙïÛ™ù%ûçï.(RxDA bXEˆ€FcÛJ4ÿÑé(}Êê8‹ÏX|ζ³:¡s¼ä çeòî¡í{ÿ0@ŽH Zˆ®CïmÓ«@¨çc{ß 8E!»¡½ÀÒðýÝî¶ÛeZ§ {ê1MƤÛ-š´M¥EíÇtÑH>¤m<´Øî‘fËÀ!#ÉjiÉQMaªËްÕgZ‹.ÁzI6…±ûÖvÚXþîëºÑ¦+е6=lŠ@-šB†š7´ùemžÆÈadÍðSºð_#gÁ_¶hšs‰…Àbæ—ÍcÝé³–ºÀº_ù5¬Ufh†?.~%ñÈŽ ¦ÃÕÈ™ê=ÒͰ¡Í®êt>/Ôœˆ¹CàbFn9‘ö4ó¢4dF–ýÃly¦Ó7WÄu™MO髸ן‹Ò4‹zÄuÎÏù¥y¥Úå@vZ{1d.†©Ýõr&&Ú‹ƒ{vá–¨¢!¸% ¦pTÄ™­R?¾îJÙiS¬iÈ;"^Q6x&ô=urLW”Z䚊¸O=°O‰URí'tÙö ®¦b†×)Ÿw7J©éíðÚXB«s»‚Æ¡RägAm/L ý¾}Sø–¹§T_)þoÚõ§ý¼ºüÊq=ýFÿ…öl–¿œÜ~}”-êÓK;ƒúTaãŸÄ‚WŸÏ3 ÒaË’Ì<^[/¯¼¿o%?êq]%%Ñ´-šóèå<Õ jׇ®ðk—ÃÎ ¾gÙ[}H?Ñ‘©˜ºNW1Á¥ãòˆ±›Cæ±Fq‹‰šÂëšÄÒí‘ù/”"á=YÜŸÒƒ?¬îå­Ú!ÐíÆÖø±§.{®ñÉO{O®:ÿ" ú(@ó)VÓrD·%JyGY£¸ÁCw(¼F]hܱa*Ý6þ4Eóe3saøLXwI‘Ñ ˆ7´nvÉQð*i«–5ñ†ðfrŽ";ˆ¾‹ûü–XæÛ™áæJXÂK¡Þßxa¨Í—½ 6KgÙcZ¸(ë4ŸñÏkÛk%4•(mº¾å½í{ÿPKà)5vL PKõ™H'e.classµU]Se~–$¼!¤RÀÆÖšR¨!B¨b µJøÐ”OIE)bÝ$˲°ìÒ͆üh­Ÿ3Î8ã­3ÎxçMg´3 Tô¶3þ¯¼öO8ž³I Û '“sÎsÞç=ïÙç¼›Üÿû§m¸ÐŽÏ¼8éÅÓ^œð"ìÅSê#­# òŠÓeC¥lK3Ô^ ÇÊé%Ùž%45iØŠªX´äŠ´NIpGZgNGFd£·HÍ)™¼¥Ù…XŠeR6²æR/“™µöŸ¬hdO'ãé%c÷&I%™Ü9Øö"¥ü!LîúÈæ£×ý.ÍÌ$¸ÃŽH…IkÍÉ%›LõMäÓº–V ½3 ÚpU‚'RÜXMÞ EJ‘NE˜^QyÂÒVd[áb¥¥J5C³/Ñûͬ"Á7¸šQ–mÍ4r”»L5$œ34UÉÙÜTlb¸?Oèff±3>!g%œ,Õ/*…°– ¦6çÂvaY Óº&Ž=ÂOô  :)eæ­Œ2¤étlß Æ™97oNXfûT¼£«=ÞÕ¿p~V‚DMTÉSBlYr!c.8±FËi Òq6çØP=)C_òî9M×é,U±G•\NV•0³y=O$PêjpuÙ4ÖPÇIGüÝœ´ áèî È$¡i7›ÔuE•õ>KÍ/Ñ®=¤@ååÝ—Jr¶²´ï€+ó–yCN³8õ‡½~4çýN+²®eIÛ=ÇžÙÏ3SùÌ|Ÿ®šç—öÃo¤¦²M/å¿×ª¸«{&ÛòP—º,@ÞÖôX”Æ!Ѱjm3Q°'E™Uç:zÎ D. ôœ¸ pQàn&>~¨ÀY6çZ^xɼ~4£‰£#~<?Àq?¨ñ£‹£fÔ±yœM-›?žåÕNT3|ÌsEÞ16>?ý’¥~ÄPïîÖ`3> áM^Ƭ¯à­Z$q͇Ëx›#™si†‘a“e£°™óaª£¼wŒÍ8›×1_‹7pÆpÉ‹lt6K>Làg¤óŸ•"7E!%û$¡FTÑðE7`FÛ~Äò]Àá‡ð­Gj^ÊýÅœößü G¶04”6p}'Ðü³·ÇÝæ ¹]À&¬³z ƒUA×&r=Ï/˜˜vµÿŠä=Ð-_G>5í.•"ì©y‚îPõ:n=¼kµG„DÈ#­£@ÞME·×± ‰u¼C]~‹ÙÏF§Cžu¼»÷v•áuŽ•áûÇËðæÎ]TÓp?ÇxÕñ_cÒñwrü®8þ>^sü˜"yŽÓ×Kÿ£C4ª1Gîš’ÈuŽü€'ú–¿/éÛŒ`Ißã¤o åþtu»‹’Ý*KÖv”õ¢øö®X,Õ‡•R}ä ÃK#ð‡ÑNQiDñ"? nÄņà'ÝnZÙħÿ«¦ î;¤ª 7q›Teÿ%©ÊþR•ýw¤*ûmR•ýzŠpNÿPKc!{´PKü™H'ea.class;õo×>f]>Ff MO0ÆÈÀf“™—YbÇÈÀ✟’ÊÈÀœ_Z”œê–™äˆE»$gäåë†êéZZÄ220¥&22ð§§–%æ¥äçú•æ&¥12d%–%êç$æ¥ëû'e¥&—°3p²3°ó-fâbàbàaPdàÒ ÀÄÀ’,@ž fÒ¬ZÛx7‚ä98ÀBŒ ¬`ålPKٌ٬ÃPKü™H'eb.classm”_SUÆŸÍîf7›6•­­MµÕM ü'… V›”j”ÒÚ-à6­eIHK“NXfœŽŒ3^–oà·uÆ!LƒèU/o¼òø5¬ï»&³ÏyÞ?çœß9;›?ÿ{±i¸¢ú¡"®â´ÑLÎÌd1ÏC£°Y¸˜3l&ºßº}Ënu±Ïöë•êb¶5.s­@?Zá9³PÌ'ÍÌ­.,xõ¬€”y¤vsþ¡Wò³…RÁbqó8ç»NÈsÉbNÀùã¥ý½‰1舚䊓n&›,ˆ˜-Ë•ðx¥Zñ¯ÐmäkeOÀÅ|mu¹œ¨ÖüDnâv«–(𗼄í•ꞟxä­÷ ¸tØVö‚–Ãrb¡^{̳©O›X+yOüJ­º"@ ½5»¶Z/y×+Ë´Yˆ N¯¹+Kµ[õZzf w0=0Ø?06zŸÚ]êpGX2,£,c„ïÖëîz©ödóÜ4?ÏR¦)%2åïH9|røs,ó, ,‹,-ZCówv‚¢”ßíúûÍhgŸ* eE“{[iBþDÀ™MÚóôƒȼPØßíÉ¿M£CƒçôjêTïEÃû$Þ—xGâ]‰Y‰·$Þ–xCbJb\bNâM‰ ‰÷$$®˜Cʤ÷O71É2†¬ #&9œ†Á¹4‹Ér†}çL\ÆË&òȘ˜Ák&>ÀEsxÝÄ<.pP5PÄÇi\Å'®¡Ær›e… w ,á®ëì»O ÜÄ=%¸Êl.á3·ðy ¬²¬±|ÁâÑŽÑüãÏ… =OÑ]éóAr¼õŸcCŠ@_B".ÿMÖºþ:~ˆúí‰ßð¥ÀÊ×¼¬èãþä!¾Ê&H 4ñµ£’í'9À’§¨J¾£ pÝë£áÈnpÒR3#™ó}4ÝJþ©<ªÎ§¸ée•Ñ%•ŒÞGË1ä¨xŠ¥¹žjé®—´ ×Ó,é:iá˜VúÁÁÚe/ÆQ ÇR™'9décãOêì;ü@ÿejá •2å¸Á³Ïü‰LÑõûÿ™WŽ‘ÕçÈâ˜89¤Tu¡(Œ¨  L˜dB Uב—,y„͵'83f5æ±´_ÐV~¤¦Ÿêl=Õéh²ÍÒ±t%Îá¥ë VéÙÓkÄ\Ƈ”•¢rÿPKÄ™I$E PKü™H'ed.classmS]sÛT=²d]YV‹cšµ\>å$Nš”„DnÓÖS7-8(¦ÅV\'®”qœ–ü †žy¢¯aâ€KûØ¡?ŠaWn†Î$öÜs÷ãh÷ì•îËÿz9<ÔpVè Ð`j.HÐ2»ÁV>$œ±²ÕMï‘7Ýñ‚Ö´Ó붃V^‚lek+[/HP­ÊZ…ýsl§W¢¤ÎÉzaèVÕkæ«^'UH’ÛÊS2òÆ­×jÜYßô½|å„PTiÒ:Þð¸äÂîÆ†ß%á£'Ñk¬€º×«Þ|>[‘°†&«‘¦É¿\*;÷Ë¥2Ùê•vÐî-ÑôŰéÓa•Ê+™°›¡Ë?4üí^; vè9ªcV‚G^§Ý̬g3âùA#lRÏ)";án·áßlw¨ˆ´&!ÆÝÎÖKÞ΃ðn7ÌÕf¦fs3³—fîÃ#†7Ç0ϰÀ°ÈÐd ª·½íä%¼n×Ûk„Û{”Y_g ¨Ô ÅÜæc2ˆó9Ú¢ž'Ÿ–„Ôk‰½žÿø[´:´Ø¦ïC¢Iµ^8|Nà>˜ø@àC÷¦ÆæÞ˜¸,° pÉÀ}„šI†1¤ X1°Èî4tŽ% †SÌ;cà"Þ4EÊÀ Þ1ð)Θûæq^‡ŠŽ<¾Hâ n鸊*Ãm†eNÜѱ„»:®1ï:¾Ôq+: pt™\ÀW:nâëJ¨1¬2|ÃàRÇÏ©ÿøÎЄo‘7B;Ý!ÄÇûXû-"$HèiÄ¢ô?t»NÑþÇøê·'þÄ·–¸ê¦¥>îMà»tŒ Gë÷m…hßÛñ–\Y‘ûðlu€knë¶à:M%5’ë£akfü„üŠ2Ÿà†›–G”SZM[£äʦ긊©9nÜÔW5…c'%Û0“‡ð÷W(º‘…ä˜ ë‰µô±ñœ&û?Ó¿L#œ£¥P¤ øÆ«¥´ÿô¿æå#ÉÊ+ÉÒ‘âøP¥¢I²ÌÕ¡Ä+Œ³B•*Ž-&.˜â­Õ'8iL«¬ÇTG[þ…†~ªí³³ùT£c c‹¡cjr=ÄSÛ'­Ë¨Ñ»;R¯’æ">£øÛäÅùPK'¶7KPKü™H'ee.class…TÝsSUÿÜ›{îWJZzÁ[ŠF@M[ÚÒV#Ü@‘ÒPáC‚`¨(·MZ%©¥P”|sôf˜É‹3Ç!Å úæŒÏ>úâ‹ÏÖÝ›ªt†ÌœßÙ=gw»g÷æ·~| ݸ£#¦ÃU í:tWH|M@Í•.—Ê %ÖxGæ’?ï÷Nù¥ÉÞììL±4™PâgÔxÇè@$žÎøùdÆŸJºOŸKó½d!L–F‡êŠÏøcIÒk=žÉ/ÔwÆ_äz‘~hnb¢0CI8ë™SüöuÎÓuvfÙg1ó× žäôè~4ã'’ip|4HÚˆ×8‚è¥"÷KÅÙAz„ƒå|ÊNŠM”gbTlêÚxaz¶X.]%[Šá¦KóþT1;u°?6Dv…Òx9Ol=äNgÎÌ–çfÆ ‡ŠSKœ1ѦÑaÿêÅòÉ™r÷™¾žþî¾þ]}{vŸ' Ÿ,ü†Ãn†= c y ¤ùÓÓ…i‚ÇØi,øhœæçH#P!€yÒ&‰ý·§ËË´¦h]¡Ec"¨R}¶\7’HJtIì”ð$Þ‘Ø%±W".Ñ!ñ¶Ä›»%Þ’è“Ø'Ñ+ñ®D§Ä~m0m À°ÑÏІ6Íj‹÷XMÀâ³ |û K†&o ÕF¶Û؃m6ñª½¬îc©›lbhfØlâN›Â⌉aœeø!ÇçL¤0jâ>21·‡qÞDšÝŽàcGñ‰ .8ŸaŒaœ!oâ$ûEL˜x“Ná"úH<þ©ôáQµ„[Hk¦>D„;«(> JÔFˆ¯Åô]FiÏw=Â¥ã;ƒžßSkεˆ*¦ºáJKˆÀU ¡ä…ɰìi®ö+¤Rª&äªL‡OºðŒ¶hìŽÔʵ(ŽÔ]Mqô*¦=Sý ÇrŠkf=˵–ñ©gTððl #¹€Q%F7Ì”á:[3?×p8§¨JW=³†t®ŠYÏjk¸ÙVý=Úš±r3a×p„M»Š9/ò"“\åÏ©n$› »MÙœæZYoƒ»¡‘ζ—¤ã«ÅO¦Ž6G7»†â˜Ë˜_z‰/ý=Nc‹8Ž¡ ÇEB¤D '¨+[­ úÓÜhß~„É èü×”{DýD_"ùú=£ì« µ«´E†Nß ¯ß_ù³kéY³£fÿMÍn¢ý—hl°†“¹MU„BOû™§vµ•¨ËøÜ WॴHN{èªõ4LŠÀ™°¾Èp£Þ‚°Žîú©€€Ÿ_Õ‚iOkô^Ëzò¹—+—qólMk9´eÜZZÓvmµí²Ñ`…û«7”!W ¨¹:7×àæÊ¬g®á3×áÓéÁÂy~¤$,%aW°Ã±¢úµ„åXl´èؼÑ;s­·Ö][Ôè½w¬`&·Ð®â?Ñk°‚N%© ¦Õ‰ Eøê 'BwMw#‰°ûÊê3§l=áE:ÝÈcÜáÉü84ÃvÞ{h náK|Mû_4Z!¬â[ñݳÁÒhF¥¡z´vü PKêØ?ì¶®PKü™H'ef.classmS]WUÝ“Ir'“!™¤Më¥Tãw  •¬ÊWK% ±ÚÉH áË'ø.ëƒ,ßp­.B ÖG×ò7øè“?B=g’* Éš}ï>gß{Ï>wæ×?|ýøRC\à *@à š†—4¼¨@‹oU׫µª‚‹‰ÞÌš³í VœêÊ`¶Q/WWR ÔDï‚o¢77¡ œH§Ó§˜Ê8•”ñ'ÒKiVž¸³nžÝªÔ9™›h“`"ãäSÄÜ­ú§Íå×J…F*}NÈ]z=qö„³õOl-/—êä"vžÜ­€NÏeœdª7­À—ȹ›íW¥ ’ÉñrµÜ¸Em˜¬KÔµ©éùør­'?Ó»…ÒF£\«n’–öéê¶S)ãó“Ãñ Ò•ª…Z‘ÎøOnäÿ9/Åè(=[ÛªJ3å £,)ðp—rSÎæjí~½Ö¿040Ü?4|chlô)R8# I†Q†1†fX`XäÄ':¦`ë˜fÝ –tÜFNÇ|ª#:fyEŸñ>×q¸ ‡!ÏP`(R=ÒYüã/‘Lv‹ÐH_&|}M”~p*Ù€‡ÓÊUúf/Ðè?²å“Þ§ K±ü-LÚQ¥‰Ué;B9ê!~‚#¬Y‚´ë–Ö”­zÕ&*VàÔ\oaÚnâ‘la†ƒR˜órUËhá6Gº›¨Y]ÒÃ$Ô!W|«LÃRûB=€×›4[¸cGÕ˜©JM5µ&6¬ˆø wmU²¶WYÛ'õ¬í—]Y[ÈPÖÖd8k›~!2H¨ZQ=Ƈ‹-ÌÚ®?/ûìÏ×¶ÖDýgêÖïøƒþjU=^ŠÌºM‹tšö¬Ó´oÿµ}ïT¼Ï;àët@yÞǦÊ&Åi¢&¶eZÈ|ÃÒ;~ûÙ®ŸízÙ®`»Û ¸vu׮ϵëËZÁk=2xŒÍÅ„\ÏQ?ûS“†šì:@þë75R“aÖ‡XŠ…¤Æú0®>´VÚ´­7Õd„õ&ë͘)¬ðàêÍýˆÒ¦¬™¾JÒôŸè¶3æloÌœ³}±Ðœí“ѧhxðOý‚ë—úì©ßÐëq¢2Ù=Ñèji²Í°#£ª=Æ–ŒÒ}ïð=2ʬ²¬”1×¹U?efqŸîöeb¼ö7PKP?pS8ÑPKü™H'eg.classm“_sÛDÅÏZ²V–Õâ˜&Emó_N⤠$$r›¶¶S0¸i© ©b ȶ’:q¥Œã´ä[0<ðÌ}Mg ¸À#Šá^¹:“سg÷Þ=ÚýÝ•öŸû x¨ÃÒ1ª@:^Ñ!u\Ðs{áv=ÎÙùÚ–ÿÈŸîøáæ´Ûë¶ÃÍ¢€bçWT;_/ hvu½Êñœ´WãIƒ'ë¥a¶k~£HQ¼€IQ«Xó;Å8·_Xãvc+höŠÕSRñJ“öÉ O"—ö66‚.žf¦^óç‹ùª@Ê™FLS…WÚa»·D—£V@TY¾›Ûˆº9deÙ½GcùÛf°ÓkGá.=CkXÕð‘ßi·rdȕȄͨEûM‘ÙöºÍàf»C‹‰uï4V¯ø»¢;ݨ°:35[˜™½<³¸pŸ>9ü9–y––E– ­¡ù;;AHQÊïvýýf´³O3 eE“{[i@þD°Ijc§Ÿ”@æ…‰ýÝ^ðüÛÔ:ÔxL߆ Jõ^4|Nâ‰w%Þ“˜•x[â‰7%¦$Æ%æ$Þ’˜x_bAⲉ1¤Lúu“,cÈš°1bb‘ÃiœK³˜,gØwÎÄxÙD3xÍć¸hb¯›˜ÇEªŠø$+øÔÀUÔXn±¬ðÄmK¸càû®ã37p×@ ®2›KøÜÀM|‘B«,k,÷X<ÚñcÚ|_¨ÒóPO÷Éñ>֟Ɔ¾„D<ý7ݬ3Ôÿ2~ˆú­‰_ñ¥ÀÊW½¬èãþä!¾Ê&H Ôñµ£’í'9À’§¨J¾£ pÍë£áÈ®sÒR3#™ó}4ÝJþ©<ªÎ§¸áe•Ñ%•ŒÞGË1äï¨xŠ¥¹žjé®—´ ×Ó,é:iá˜VúÁÁÚe/ÆQ ÇR™'9décãOªì;ü@ÿe*á5•2å¸À³Ï ü‰ LQÿýÿÌ+ÇÈêsdqLœRªºPFÔ†ˆ&L2¡Æ„ªëȉK–<ÂæÚœ³óXÚÏh+?RÑÏô¶žét 4ØféXºgðÀÒˆu«ôîŽé5b.ã#Ê¿JQ¹ÿPKiÜ‹TG PKý™H'eh.classS]SU~»ÉÙÝ,%ĦíÒ‚±õ#á+$ÂRh5[ì*¸Äj …î"…¶WŽýþÇŽã ·v¦ÓPÓÖ;/¼òÊ_à_ðV|ß Ô8àŒIγïyÎsÞ'ɯýô ú𥆔†S, g4h Ä4¼. ¥¶ý5?¸ï Ogfn{÷¼ìºç¯d­Íª¿2& ¤3sÑtq¡Èä Œ:8:|£qhða)°™ñVÇhÇ›Þôá;‡ ç·——+›T>y”œÒŒÁÿ†šÊ”ò<ÇAwaTœYôŽèƒ:ˆñyiÆËeŠ‘t)¼¥§çYÚgg¯N:óù™u¡êW·&ÔÉ \!“§ 7RËÁfЬ(UêÓŠp‘F5¬üLÎü†ßé=MtÒR‰™ jÛ7h¥a«ãŠ›ˆªŠPhŠÕk=g¸é¾]TmuVX(!9iSØ÷w”Ghý‡iòA=ð!²?u˜¹Ì^…#+<²ÜŸX剣¯&Ž8¶FÉ}Z¥íâöüŽ5¶älÈš+3å3CíØû*§‡µœ3BR½•‹í 3©Çµ¡4 u_çô‡ÆÞØHßîý¡>7\%©_·ÍnË|†µü»n·å*Qn‹`ãÖU<&[ÛÈÌ.|>3d÷7øßcZ´‰“¢ƒøfûÞ ¸oþ PKpçÈÑ¿=PKý™H'ei.classS]SU~6»Ù³Ùl ĦíRh±~4 °6•¶ÐÆb‹]—Xe!!¤Ð ÐöÊñ¢ÀàØqœáÖÎt5Zï¼ðxå¿£ø¾ Œé€ŽIÎsÞó¼Ïy¿vóû«Ÿ^BF›ÞÔ`jèÖЫA“!íACŸ­oË[õê< 'Éé{îCwhÍõªCöf£æUsäDrV™Dñ¨7¿µ¼\iFMç‹,løV7[Gãí;uv–ò‡‡iw%G'> $ŽÞùÄñãäfüþÿ0Eª*YÊs#‡åõúVqzÑ=¦*!ÌþÒ´›Í%‹‚‰’+”ا8–4$!24ssÂÎ Ïä éLš&v¹æÕ6Ç%(õr…žÃdáNßr½AD/<^ª¬oÖêÞÝ¥˜=Eï¡»V+÷í‡èË“´â-ÕËTÀ E ˜”A·ë[¥ÊTmÂIóœûdiÒÝX©Ï4êéÙÌàp:3|136z—.)܆K Y†Q†1†*Ñ]_¯xe’.³ÈúEßbj‰ŒòÃ#‚J¨*e;þA‘s•Ö­û´è]Ó6ëûQ÷Rý ÷F. Œ $2C,KÎ@gˆô^w1„ \Fˆ9ƒ¡ƒ¡“!b`§ "nà]œd8ÅpÂ@oÃÛ,œ3Ã9à#ã¸Åp›a†ácWpGÇUö^ƒ­#OtLàS“˜ÕQà7˜+b޹ÏÂøÃ|S(1|Îp—á d0M¹øCÿC‡N]´K´SM|ùÌ„¨Ú7`·£lq¯$Kø #-Œ;1©‰…ÔÜX€ ÿÐ`C&èÝÁâ–,uþEÿš¬…+ެÈM”-Ñfk-\uš¨X¡®1iªÑÓÑóM,[z yŸ ÒïeU+ÜÂ3q¥‰ˈŠ_0åȦ°ÅÔm'hj¶£šaÛ¦a;š²¨JhEÌÈ.j?εPpüb)À‚©r‘A*°‰{¿ÒˆþÀŸô½N³8KK!¦àO*z0©*M*B{®…NLUdI¦6Voõ÷pÕé]¬YÊ6L?QLpÐ63ýëòSDþaÚ¡"xж¹Êƒó{–¹eqбÂ«Ü±àŽƒ¶¥Q𴦶‹ûsÛèhKlŠçØ?´gfêCc¤ {_eC¾F)guŸT²ámôÆCQí±/‡}Ý×ÙÐ}ïIXŠëßîý¥ü¬;r ÛI°óPKöT|yPKý™H'ek.class]oOÓPÆŸ»þ¹[WPСu¨… l“ †2·b|j²€BR©‹/º­ÉèÈ ßA?‡o11qþyiâ‡2ž3{sŸóœ{žÛþúûÏ×PÃRq%ÙÐÓ•×6›êreÐ$Òkoýwþ\Ë·çÜn§n/ñ¹LS"S­˜ìÎòÕe8·Õ5¿¸”¡a,}fy¢?n†Íî™? Û]»vØl5ìîN`o¬®¸vªda½s¼ß önpœPWÚ€ˆžÕƒýn³z­á¶;õày³EÓ±êSÿ`§½Ñiç6 ù…\aa¾P.½¡¤/ñ‹,%–2I­ÀƒZ¥A±:™Æ{’`—:Þ{´C‰q‰k×%Æ$nIÜHHŒJÜ”Hš0aQXTbì4#ˆš¸aw0là.2ld L°›Ä})–{˜50…»| Ó˜c™GiºÄÁŸ!5©¡*¨jÙ ŸJ ðø¢ƒzÔ‡í)ªÒ£÷1áõðÀ‘}Lz#óP•lr¼‡‡N´§r 5¡õ°èÄäwL{Š¥»žjE]O³b®§[Òu áÄ-ãE*ñ_êcÊ=<úiÅO¶.;‚{…=Z3D1D[¥“©£~Îø‘£T/_œ#¾¼ ŠÂ„ê9á ]t´3¾YÆSO#¼œëèÙ¤¥Ÿ¢´õ ÃÿÀhß úí Êëtª³îHKžÒ*\lþ)p…|WÿPKÃñÈr0PKý™H'el.class­U[WWþ™d&Ã@†@¬£h£ Ášj°¶ÜÔTTd: ¶C2`4$4ÔÞ´­µ÷ëZ}°O퓯Òrq•¥í“ýýµ{O‚µvuu5¬ùöž}ùö圄_ÿé<ˆá+{<  ¢`·‚¸;Ao1–BA'Ëa;ìP°KA»@S¤mð’=oÇsv~*n–ŠÙüT·€'Ò6"à‹¤ÆR¬laec\Êuªìï-¿ÈVY E6&´¥Z«Ù«õÐñ¯{ç&'b÷ßÔ£>NV±ÿ7ËxoÛx¯Àéÿ•pÐNtó¦+[ÛÆJ*58aW_J-ûÝ$Þ¥?RV¹-§£ˆŸ8z¤3nëéðV¤7gœtv2ëd†ì¢==+ Jç²ùlé0U>TQ¤¾Bƈ÷ær™p¾P ÷ ‡|šÌáÒE'|ªg`(Ü“›Jõ‡g˜Ç)9ÅÙ=›ÿÌ(:v&ÜKi»d“K¸švfJÙBžŠ j8’ÊÏÛ¹l&òQz|èxŸÙ9ÒÅ,Cv†|åqU³0WL;G²9š&°at1&PÃûÚ4ÞoÏ^,  ±‘Î=]±Î®½œh¯VYØ”gïcØÏ`8Àp–hÏÌ8yêALe‚C'\Mi:§tašuÎ(6]ȧí9ÈY“¹B 5ZãäH™¢ÓZ_›:­~ç)þ2=œ7MOžŽµT(È8*#%㸌Ã2ž“1(ã Œeœñ‚ŒnId ÈxIÃì×Ђ†& Ïck††^lÒ@ˆmûXëÐ0ÈÚ DÙ¶UCžæà C#‡l×p›5œ‚®¡Oi8†.Ž£Œ“ ýˆú1„WT ãU&lg0¡â,Ò*N#£’×áI†)?Fp‘!ËŽK*,\V1ƹãÈ©8‡iç™ÅB^Åf¹€Ã 󽯹E?ÅM1ß,¿–X›ÃÂa^Ž4Á“º’ve¿+ ^Iüx dou­øS'ÝÇiËæ˜_pM‚Z c)¸LtWÖÜ 4£ÆuC?Ó^’×¢b o­Â´‚5’Gx<+¸z2ÚÞ¬«zmì®-áí;0FWqÖ ’ïõŸŸP= ‰|ÑE¼ýæCR×2Þø¾;Ü”DH"ÛƒïýVQ -DCRl×é¹±‚7¨‘&ú÷ЂQWîÅËÔN=5z–FN`K¥Ù½Ôªds´½#fH÷ðNÒkxïáÝ»ån$îÆ¶þFÿ£ò•)ïD|MC‡HÞZص‚÷’ÞUŒ[‰¦¹™ôyrô!Ñ —¹ Ÿ”Ùô…d7@YÅ9Žê»ô–¼ŸôWÖ¦”×–T‰¡ý!šÛƒ²ËÐØAtëé” ]m…®]oÕ[™N{¢™ºŠ³Co)ת_W+@µbD úÓ{º!=Dƒ!=¸Z2’ÐÝ¢j¥hC…7¦ïÖw3opçÙ`Hž¾‚[ÉF½á>F,á3-ÉPLËkøMËg¨¦%^ÓRŒZÓÒ}†F(u„ŠQOè7„*‡èµ.jFa$¬7 ®]'L6MwÝKYÃßõò9‹ÃtÎt)ETð‡YêØÆçýÁ¨!I]‹øTúÑ(߸U\°‚µ+øÐ¼]¿àÜ">[ÆGËøxŸ¸wVwÂZùÝ”JúÐútÝW%CòOEêÖŠèZ¥Ê© uÕª½ž2®ÓWpM¿±„Ï×ô/–ðål/©_+Z_¾ô¾ô t³U±Ul_wë}gx·ÏþPKºîà6­ PKý™H'em.classuSßSQþ.»Ë.ËVHbÑO²2%ÓD1)ü‘86æô°à¢(î2šþ=÷Xï¯õ‚š3öV3ýQMg—šI!îÜsïùÎ÷q¾{~þúza¼”Ð)ᦄk$ ^ 7$_]ßÒ=ÁîÛ+Õ6| þ@vSÝU#eU_äjÕ’¾ždàüeÞXM1(þl>žÌªûI+ín¦Él~0Ù*~m‘züÿTæó›Z¡–lÛÉãoE†P;¼JÕ‹E­ú¿¯¡'Üjƒg2«©LƲ)DsšÇhI/ÕÆèɓƚF£šJ/úŠF•&$§ß´J­dè;4¢©)âs3Q"äŒzµ M—Ê$ìZRw6Œ…ª^Žö „£ýÑ‘á7 Le°©13Í®V*š¾ffûòq"c»¢Vµ%ƒ@m›ÀM×ÅP—ös þí2mÒJ5ã/_ÜUËum¾H…½"""ü""|"‚"¸/¢[Dœ @VЇ+fêVp ý¶{—‚;¸ª h¦ ÈèGÒ‰(Fe à‰ŒÆÌ0îÄ ‰ÅðÔ,LÈ2 q¤d cÒ‰L‘*AróÙ­)vQÖA'£Sè=Bú‹EpPÛ˰YåO°ÓÞ‡ pŠØJðÓ Çxv„7k :Ásº4ð"!b¼ÉpÛÈ~@ß)†VL›#A˜hnžB“cfBSy„Ùoá„à8—ƒqÜ1æ>¿:'õ Øäºˆ*­Çdï:mž!Ëü¥?æß‘u‘Πåq¶·ù9–àÃ!òö²Ûžàá±zˆÔ#ôç<ñ·{…ï¼ÂÝx—ìr’C½=¾Õ^K´ÎÛ£¿ Ým¸ýPKT2Ø#—GPKý™H'en.class}’_oÛdÆŸ7vü:ŽÛ¦YÛáQX6þ9 i—nÍghÓRC6Æ2ZœÐ7I³°.™’tã pƒ„„¸ç®ÛHÓ21î˜ÄÇ@â+p‰8'l¨–ߟÏñ{ÞÇç<òo=z |¦cZtLéxA`ÊN–>÷oûóû~»9_îw[ífA@±“›ª¬®h¶[q9—Œ¢=lFy³ºâºÎ »TÛ+Pš¬ŒÙ¥z·ÀËIOÛGEøÐ¤Íçy¹f KQµäç IW bá¨Á ­v«¿L ¯vê xqíJb¯ÓM7ííζ@¨¸Aͬ}QkÜê·:힀 ™Ónû¶¿ßªsé-¿ëßlôÝÄ o´k:õ3G§Êƒn­±ÞÚ'qAc„ø«3բ߻޹Üíd6³s ™ì™l~i›*|ªð9Æ#OØÝeÔ©¢FAmPï2 êQÐ+Ѥ6ý‹^ÏoÒ=sèêõn玿;jã­}Z7iñÑžDF"!qJâe‰×%Þ8-1'qRb^â‰×$Þ”ÈJØ&âÐ:Ã0‘„ä(ˆšx“›x 1Æ„‰4Â&R8ab/š˜ÇqgpÜÀÞ5p+Îq´ˆÕ(r(85ƺ%¼g Ž\oá}Ëø %ÆEÆ%ƇÈâ’ä‹Uê“xŒ²IzÒ¯‹pj€Ë?Ž "ÔÙB¼-V)§çÉ!ÎzŠª ðÑ¥!Îy\qÔ!ù]\Ä&b”°šÓR¿B¦Ÿ@Sršp¤ptz1ú WýÆ–à‡béO0C5Cœ÷ºøØ‘‡˜å*mÓýX`“5"Â1Ò$“dŒ@Æ`ã¨Lä9ƒî@&¯â!U™åš(ÏMk<‘cÆôŸáxJ¦ì©V¸ì…-³ìi–,{ÒŠ”=ÝŠ–½˜f©DItƬ±‡Øúakˆ¼'…O~!W—±|‰¯ñ b\L‰)\ Cgh©är~d­ùÔÚ8E&íüù?Ö>s6èwTåhO§ L{>Ñÿ20âÈXÚ¿cé7»ÍþÈ&Ù½„êŠ(iL[ ` (-? ¢mi¡¢l“%MM6!Ù:ã(Œ>:Î0㌃3NËøP}ád€'ôÅWÿ_}v¬ç즑p4³ùÎwÎ=çì½÷|3ûó_w0'Ãó2l–¡[†!Ý“g°1ÝsbÆž³û+¶[Ꙛq Þ ¿xŠ˜ÎSôºÐL10Óù ¤éfeo¾œˆsÒv‹µê`ÏYRúD±1Hµm†å–ÏòÿZûÈV†+v³9ècÈ_¼Ú*ÞñžÁ #ýø¹(3ó„xþ !ÿÈkšŒ{²[ ®brˆ¬„6ÈÜKÌþ×ùÚÍüáýe·ìÄ·ÙEÓÆêéªã• fRûôÛ®[óÌ’ã: ÛsÌzÖ¼˜5Kæ%L5m³n6«v¥â4LoÚvÍ‹8¹áZÑa°{¸6[)škj1½Q®:A­7혥òœãšu»aã[½P=r¹àÔ½rÍmâüŽ:zÄ,¬ÛÃhÖËšÇÌòsl{Ó¬8n <`Žv<ê4^›mœ£å ngÓäa»9]mÔzO ôíìعc`ßÞs ˜Í@± {¾P«Ï£?Å 45@€e¬€ÿ":Å‚S'À3² 8þu÷Š"ý'’Ç+)Ù•C…‚ÓlvN´6Åmz¶ë•mZy$E_¯‹5¡ñù¦çTl~úÄQ¹®s)h_À3(®sÙš÷Ü"ó$Ø!ÁKôJÐ#ÁN ^‘ _‚> ^– #Á€»5à lÔ`„5Ø q ^ƒØ&]ƒ4D5Ø2¹Q…b]Äž%†îv*Û Ê“ˆEbäê´%ÐÉÕ4È‚ªÁ‹°bIr0¤ÂVa/ŽÀ>8¢‚G‰#xƒ OpœàM‚o©0o!%wŒØI‚q^ƒ bïœ"8Mð.Á^‡³*‚IÀÄÐOF‚¸½Z†¶+sÞ»å'¨t*Ñ2û˜ì×Ô–o!ú#ì9“dwàÜf…™%1Kr oÃûaŸÎdx¸Ò¥óº\Éi†vO¶¢½a$…‰Ï’ÌHâ•?0Gæ‘`t«…Z‡EqQá(Ë@9¤2W[PCG#RÇ!©~S.Šä i„à: ]2$aae;—3¸‡f,+Ù6M`ªØæI® ë÷—Áãú2Ìâ¾³´sòä'. <é’øÏR8mÅH ±Vœ+4rå±ñs•¸ðñHÀ5âZÀ£Ä£\â·P›aU ÙË(²Ÿ¢X öûrXðÀ</ü PK5ò·F9 PKý™H'eq.classu•]l“eÇÿOß·}?Ú±çÙxe+ßÝ»¶cƒX …A(8,Ö©Y×¾ŽBi·¶(Wht7Ækc0!$éͼ`‹@•€^ïŒwÞxaŒ11ïL¬çy7‘]Òßÿœç9çù:§Ý7}~ ¢È*@ëŽÕ:Ö0(áþCg¸ÿèÙܹÁR®<3˜,åjµÃêÇFÓÓg|=á¦dÔpÿä))éyÃ)WµðÑB5!—\±^fð»–ëQDûCïF(à ?²ïD½Z,Ï$–w™twÑÇò¥b¹XßÇà[1†“¹r¹RM_(– ¡\h¶Z<ïDBõ3N¨ä”gêgBÅZ¨XÎÍÎV+4—«;1:}²RpÖ&+(é©tŠ0]Ì;³õb¥\c`t/s¢r¡šwÆ‹%J\3y0W;S9Q­D3C±áèÐðö¡=»_eðLNPxŽ>ÓäLS(ËÓ§@N¡JpæÈ{n2ãÔÝç¦gx¢ ¡GR¥’3“+íÏçZíá‘)×ê¹rnF3„ð'KH;Ÿ§ª”7—SòކÂ6hX¯a‹†m¶jè Ýôbm}!‰NhÒ2äÄ* ¿tU9ÁØ o6|2×”2·-€MÐ¥kH´Ë4ÍÀvH씑ˆ›ˆ`—ŸÚt·Ä‰Q‰„‰Æäì^ƒØ'Çž1)ãYií—8 ‘”c¥uCdF¨0äEÈ2ä]\í[Ñ«^²: Z`s”AÌá#wŒ¬âËdU=“õr-“õq&«ñ¶LVç"“å>ÞIÔxQç½Dƒ÷M¾…èçýÄ ¶ñAâ*>Blç "ç{‰‚'‰ü0±“§ˆ«yšhñ âž%vñq-wˆA>C\ÇÏ»ùybŸ#öò·ˆëÞ%éx$$ð>ÉH6 |H²Ià ÉfOH¶4H¶ |J²M`‰$,ðI¿À=[à+’û$¯I¢ß‘Ä~ ø‘d»ÀO$C¿ üN²CàÉN?3Kç;—p¸ƒ-áˆ`,!uî[Ë®Z~~R&‹bßÂsËÓ²~íð¸ÓIªŽ¬Ï.e_Û1Þ;ÒÄó Øv¤‰£*"Móà2| øçÖ«]m}ß«]ƒWYPܻܶ`ÔSréÀòÒìúl#}Ínâ8ÃX·ÀÛWav ×ÑöbÙÏ-¤ïÙ7qâXä&N~‰èñUmEmâ‹HÝÑG½JÜç½cŽjAí6&‚š‹û¢–Ï=© Rè)R^dÕ•¸¡Äͺ,ƒëƒºeÒ³µ.MÅy“YfP¿{µõ³÷[Æe„,C½¤~ŒvËgo)îo mo©@þx ôZõ”EãSñ€ziß,ß"Ž\ƒnù®´Î)q¹k{(ÔØqƼîi l[z™å3ÞÆiÚ§#ÚÄKÌ=+‰ºàëó³ wÍûM6°ù´ûLŠ|¦ÿ6•zå>¶›%°ÝÕqú¢J=‰á§*#Vzb޾¢ô Ž­Æqø:ŽÙJ̽L‚ ïÔ˜²·Înj†ž‘ÙdáÛæ=¬G†¶~uº­t§oÌ3E¹ÞúÖV”´­*é¶Bi´î¹¯ÄÔ©ô?-$z°îoPKÄRCÉ:PKý™H'er.class…TiWg~^2™w2¶`lÇjkkdWSI¬-Ö .%"ê2¢¡!Qk÷Ö®vµ«Øs¤Ÿøªçx”#í'{NÿCÿ@C·{'ÀQ¡ÇdÞ»>÷¾w™ä÷~^‚õøQÓê4l×`hðkxÆh¨ÕP¯ái-TÈžË:²jèB&?ð„# áH÷Yë¼Õ8neG“ù\&;w'”pd°]@†‘n+Jf5œH°G²àJº+%JÊ&VÖæ+9ýìlO$X« »òÊ)%å[JI»ÓVœì¬lß“ñèÐY{8_·è`x­•{¬[ϾÆÔ^±sÿ—†êؼŽ}¹xžRm¸ûR¼{hW|-j ;‹¯ìSÜ Û.è —Döx;’m4ê½™l&¿–°ßIÛ4…ýNa<Ê:ùPζҡü˜"dhÒÊYvÞÎM…Ú;{h×=¡'G+®$@m;y°­¹¿ug ¶óâ°=™Ï8Ù)AWoKdÏ[ã™ôý¹8UÈÎ;i*ŸrÖ·Âi*˜¹EqŽYiº#érÃöÌ8•-ʸ¯ƒÖÔ˜s,çÔŸhnh©onijnÝs’!¬Lv3‰2Ùä• åP­ÉI;K™Ë††˜$†ijÃÎUlwHgošãÓœ.cR b“$FèŒÒ+÷`TÕúoáÏѧ3A‡~6‚æ¥å•8IC+ØG9ñ%‰ƒG%H¼(±G"!Ñ&ñ¼D»DLb§Än‰.‰¸DTâY‰]/HtKì7° •ö¢ÂÀlbu‹Vl6p˜mÏá1¨bÇûPÎR<ÊÒFŽÝÊê㬘Y èdp ª™<ÂdÛ $Ðd  ‡Ñq i?^‚­£#:’e2æÇq¶%‘aÇY½õãÎéèÃ8K:ú‘eÕaiRG ¯è@NÇ)Lé8´Ž3ȳ£À¸óL.0˜$ }ä}Õ‡A\bò“×™¼f Saüáÿ2ѧH«&NÿmðÖñæ-à£Öž@»Å¤m ¾ DµºßYD2U»€·æñvïÄÞݱ€÷H˜Ã嘜š"P6‡÷¯¡a½)Ž x( Ž`…H Ú·YÄ¿ÔT7FõÐu1)b>OT÷Dý[”á7•»B5½w…0Õ»øËTð¡@Ì0½%¡ÜTKBÅ"úRÅSÝ„ê2xèÚb•AM™ÁVúX Zµˆ~†«Šø$VmVšÕs¸²l4 z–”">­àÌrzJ¦êS=%S€â«(~9 ±1åS³2«1kæñYÌgú–¢þY´õÝ7S>0…‡¸Mé©¢TA=èŸÇç7‚¦}_]â0^vù8NŠ+bZL“„é(´ÿ^wéæòÒGPƒx×"Nq§E|qd§SE|Sq†m‚j(⫘—g÷[•nëõÉ”bz“)¯©&Sª©$crÇfSÎãjß,*ܺšÛ‘÷6¾øÜÕ—ßcVoãÏ ”[&½_Gµ &o &¨©7–a:ÂÚôÇ|eî›2‹ ÆoªAÿ¾ùýÉË~ôµŸþý“Âg`˜>O˾ꗵ¿kƒ:¡µ–Û¸¶Ì§—ùuæÊ™+M¯J®×»êõ®z]éú¾[mÐ-ñM¶‡~È'é{SÄÅ>â¥é«äéÅí ´24ÿPKkIƒû ‡PKý™H'es.classmMKOÂ@þ†-”‡ùÞ„åhìnŽ5áŽÚZÈl›AÂ5ö´bJ÷·Â€re_6‡ì•}½ƒ…Loáz"CsÍð¶\!µH¸c.æ[ YKÙgVÙ±à°8¥«$ˆ»mÂÈ3„*º;ŸëÉVº¢¼qµp„Ìw sCßÐÀ¶Ü;ò=HÁek[¡¯O8…èö¾ÎÑöü0zsG{ÐWæ 9òáîØÁßžìî»v /yýÒöeɥ˖,]qÙMxnDn¤ŒÞÌÀ@f÷¶¾þÝXÞŠ [qViî.ÛzP~g%hÌæ¶gÆër™¬Ø¢$hrênÀ(#çVz²8Gyr·P‚UÒv 4ÖLOþƒ„nþ»ñŸÇÿÍ4»;õÚtYØXÜà%˜sá½0·qC9N™ÙJbœ_ÙG¯$¶Ö÷6 õ÷÷  ¨ª¦mžÒM ®ª­ê˜ºk×TmØ«P&vÆ` ùÿþ{ð°·77\X½»#M#± éð1>¤Ãu(è°G‡¿Ôá¯tè×a¿¡Ã>Fuøs>®ÃŸéðQ>⃵°ÀC°Ã·A/AË|p %wRÃZx;Õ!t»HûàJn£â »ú)¹„’wQB·ÂÅT\NÅ+ ÁÛ¨îT·šê® º…>Øó©a15¬¤†¥>¡â'(‚K©nµ. )±x—è¼Â÷À;z'% iŸòr‘¢$NEñ:›&ZFÉ¥Ô`SÒNIÒwÒ;æË¨Ë” Òaš÷” ÀŸR+vÙ ‹Hغ[¶Æ„{áS^¸>MI±> Ç(9nbñ3&ÜCÐ Jþ–’ÏRòw”œ¤ã”|ŽŠŸ§ä ”<ªâIèDB¥ þ&M8§(yŒ|‘>EÅÇ)9mÂAx‚H9C g)y’’/Qò÷”£äË”|…’¯Òˆs=EÉ×(ùº ‡áý%ÿHÉ7)ù'J¾EÉ?Sò4%ߦä;”|—’ïQÂyþ>%ÏPò/”ü€’Rò¯DéhÞg)9iƒðcŽ÷ÁOLƒ#Éq|ÏQòï”ü‡ ÃO úOñ$Ü7 /$ÏŽãüЈê°ÿ ÖÜÏñ,vð|ëHc_€WBýãpÿ¦&i~q+ÎwR¢<zl~‰ð«2OÚ›<{C]i?uHì‹Ç`ÁxèÂÊ$üªå/‰_‚ëš<›R¶—+DÞ<ØïçÌÕ’·L'™H\¶¼G¦ÖÀLT‘*©ò*—Έ2²*áÂêȪȤ(K G¿¦a„á($(³5·"kë1„_%¸\7 ¿)‚7Á;ʶ.Ûf.#Ž™IìÛF¢{™Á¼Lïê² fZ÷ >ÞÈŒô¨)a®•ž’mCÆžúðƘVŽ¿¡”r 4K9›R«è}í¸Jºžg§HÈCNÄјӠášy‡Oî”Wá6š!á„ç‘ÞuBò8ÝNÖ0uˆ3µÔ™ý9Ç^¾y!{Ñ!qE? ªrÂ-< ªçÄ›³$Ôc¥d§…^eÓ™q‚”¯b{‘¥u£f‰™‡J_—7Ù†­3¯úïgʉ”Jv žMi5v !‹7¡Xf¸#;Œ÷ ØuÌ»„SZRöº,ëIJҩ®Òl…)¡½¶ÊÔÈèáHW§fkE˜Q†W1%2b+¡p7SjzŒjCÅ?Zz6\@¶¦j™bÊ¡a Ÿ|©å,}J±eB’-%''%Gçk_î îE Ò›X|BRph7ˆvi}œ»!•iݶî _Ÿdú„¤%c’žD"ÉxbBòr2«âQ’ç@ONH¦ð&-p¬™fCe£hsŒ"ì¨A• >ÖUé<Ñ~‰3êN̉ñ[CŸámCÜ&€/Hÿ›ðÿnü¯Äÿ¥øßŠÿw&°n+ã.`)çÀ°ªª€n£`£¦©\Uq%¶&Ò¢Aùû™AJ¡%A©&l¢ÎR¸Q̲Ðk¼`¡U¼ÀåíåÛ ÷ßÄ>ºkeÄÖ©³ST±H>¼>Æô˜¥5Xè£^$´jÇŠVÁÌ¡ÞR™‰+„»ˆ¥Ê\ ,—vú¤&·IäIRí:Vw決ƒÐl©\y4{Li·4ZëcŠ>N~Ðö‘~o×3«˜èX,mBò“ŸgõÖ~ÛÏüè­ÌŸµýœ¾ÓfªÁârPº>KÃ%N˜ÿ \%ÛED`|ÝY#rz´Qâetíçe» 7s«5ªWY“èÑ$‰ ìò³"œ³5Z˜ØM_Þ‚ú²Æ=iÇw ¦6œª)&1ÿ0¶‹B¹ïâ.±¦Ã¥X'öýÒ|:ÄÒ\„ÒÓ,èivšR5žæk>\zÆjyc­f ¼š¯áâ»ÂA§M‹ô"Ÿ ÙAA½â¬p/Ðô.ÐÂ1eE°§–v$‰µ\}ÿhKi”•;\:_iƒ«e;(ÛŒ5Ù-Ehç-,˜µƒ,È; Du,Èi RTeÒh‹Äk+=m©BT$!dª}_ D"ší혃 îŒT¥RÕœàì@ëîŽpQ:€x›±fnp.Õ`F4îv*gïìˆâà#`£Þ{Â"g¦`tšzÊiÑŸºÞ²Ÿ[”VóBǼàî}(Á>Ñ`0ß±0¸"’ý6בvÖ–k#b,ÂÚP*û2‹£ÒE‚\ŒrñíËgj‘´”‘´Ì„¤Z¸OSÔò¾àâývœ‹‹Å³’Ó,~Þ.Ø‘íxy c,^Y^ y‰ÅùòÅiùâÕ3|¯J¨(A®å‡þØm5`´AŽƒtO%ÝÓ˜Rªçzˆ‘ôxÊ ÇnœMyk½Ðkǽ䌕§•§gØdÞå8êCX§a~7™ÒÒòH×ðVèÙV‹€¦ÌTnˆj{zT•DáÌXéç"vi® •DPd)˜ð±á8SÃ]í¶âš=S»˜"°DÆJ?•±eŸŽâ(rœK¹üÃå¨sÚBTôyfeÇYáì–×#´»\e)‘eç@ ñáôÚ¨Z"ê—+ý.ÂÔ¬­áÖËp'œ”ÐùEœ½s¶,& 3ìÍ´,qfû&Öù0ÿR(à}ÄÙ™ëÈi‡zWÀèY9m¤”À“¶*ÛZ(`ôÓAS`ÄÖhÌFCxÌ`j#”ö2}Ï=6A0YÛË[´4Xмe93öÞ³Q@êA B‡Õ-ËQìrdB Èv]p;`uòÆÑ:‰Õ¡ rkD0ÀGïXéy¦x¸Íaò€€ì«¿}œËCN©þBçÂÚè<ô˜òªc°4r"hí!‘´ö¯ä ¥µ“hB{0ÆÂûÔGNTb•ÊáPEÒ–ày»Á·bÈ'Tä»N¤ý5A°*Ÿà”AJ0?áq®•=h%Mj>µ–@ yBÈ|L‘:¢=­ÝXjòï=€úü| ÐE5Àž•¡¦†Jµ!ª ¬n„—°~¯×yµ¾g%.¨Bá v;Xz™Oåhù ÆL‚Ãû‘k/æ …•®£*]+Ã(ÑUaÚÙ•&O 5”݃*¦(]¡1ˆÆøa¢WŒs•,6¨ñxöDˆzeÅÑ”:ñYÇ@]eú°­â®ÍuÔÑ;jìÞfŒT£q,uеdí Ò}ÁX‹oÍ<æRùB5U"Ÿ€náÙø #.éu'ó ×GNò×RÊ+¥Ì¯¨ÆßHø±‹Ôd׋pÉ¯Ø ÌxÛxu»wk,° QÁÇüúhªÝ0ê/)¬aذÀȉéFôV#ÊL¹ìJL¥ 6Z*¶ 7iޤ¤Š8ÇdM•¬IíY†^¾ž@ìÔ‚Ývnn1ŒPpfrúÌnf~Ö@a›Éš—= 1ƒ¡Ž‰ÞŒùÍ8"<`4ÑBÁ™ÉZÐ%Öñ'm9-–‰îûü1Iw9ñZ^>CJG3’Šy)C µà®Ö‚ï´4ŽÞ‹Drô æÌׂû™‚CkxBµ±‰êÇJߙΠk>kfd©å 'Y*O¢QxU¿‚”Ýóú•®æDšØ];%ͪŒ ¡>Å7ͬú³üH”NÕ‘›©;›òY^:BxQ6–yæËv½[½#¶z.¶z‰Ö‡Ä6EÝ^;î§³§çãž»ÐDG<ÐçLß<:œ+¬;Ñ>æ`¾ƒÛ‡Éí£ŽÛºlÊð @™ßÒ(k°tÊ–AY£å¥¬I¶›ËÒŒÒlÕ—‹*ýå"H3‰)F5¬·üÜ@Z¤“RAwõ[\€¹@úñia‰`Ë„4;fùݪ‚ «¬ÊÐÊ‚²0ãŠ0×bXB؇8/enM£Õ4!ͱš*óøÝD:Áñ”e5ÑšYgS³hµfMጴZ-´ZŒ FP ÄbNáôµã³Qì£ÒÅÒŸ £RRJΰåý‰XÏOpiš1ÿ2- ¿7M)ÎIÒqUŠëJš„«RËË â2¨ÉrIå^òøb.%%.tMJéRÊpÜSÒñNe”Íî] bX.7¡‘·ã–~LzÕÕØ¡IÜ%(Ôðmlp×Ms=CÑ'¤°¥ œ!¦"ýdÕXÃ2èHYåˆ:zÅ\~Ýà¶šŠÝ¨àÁÇAîwã9á¤eXè±-<í†ñ€h™¢G=ØãÜE§RËÀµf vÀB'c¬‚²úš:8Ã2Ñ€u1ƒáÎ`¸3¬GüÆÍÄF/1/fÀ ÙÒkgÐù ÅÒJÖ$?T%؇aüâb£soAës2ýW°>?[ëEèH";(!úÃr“—7…“H‡hªšã"œƒVf#€–N –])¹ï,¹*RhT['H'È È ¨Æa$³F×^;^O*íÙéÙ‰*žõÜê¹u†KgdžÍN¤·ª|O‹Ís,%‘ä–Ü€Ú$^,]¸Ï–ÊÝu5kä½0 }Ûý˜/¤û–i3º¯»±ŽÂõ›„uÕ“½qkq+¸=´ˆË.÷‚+O&p½‰Íéfigßè~Ëóa9²y?æ«ñÐ3ý ´Ò!è x~ Èê¿àGÃÅýW£¿Áp¤Èï…_e†¸×Œ3]Žóã?3&¥¹âzÁht‹[OleªÓ6jHÌ×%OaÞÿÙ•©c¥gùJ&¥VNpwáå€5ýæp°|íø9--ç§ù-¡ÂäEM¢¬ R&8+:gE‹1<’(]ül†y6‰Ñ_·ÒEäèÓE¸;VúV©H¢E ˆ%'¥‹8®hRà s~´8Ód¦$™îŽgÊXé'|,ÃÁ­7šåÓ8¡ˆÞU“§qUèöú‰7áÙ[öÇ„‰ÐtÙÉŸ O]UÝ_{“Ì+'Å:›ÄÄZþH¶½|e¸FR) v6¥O1D®Y߃'퇧-ÙíåÓíÕXGÏŒWÐÜOáñUH½³óÅã )<{÷ÑíË,~\V²x\.‚<ê)…—~,¯¬96ßVF|sûqo[çH‡OðúS0'Æ4¤yth•߯x1ölà|:•ozï@óø/rð3BŒ~”]t¾¢ÞŠ{€¹½üºx+òIG´prC\’æët_kB[ø¢*YµZ÷k lVHH]mE㣒$p–«àœ&ö;Aý»±¯áä`X>Ãü]Õó+US|_9mn’•ôºXBF=øMåR¢Óáv1àEá ž/ÀÓÄ Ã‘M“Ò³±IiѸ³³èðP}G¸%ÿÜ£¿ìÞ£¿\¾!¹rYþ²Ûè\šW7•«\Žî,«Órg¹‰‹ÿ´‹Ÿ™^Ã<ô9ƒƒ åMšcÊfì@–Bé^‘ßšªÇo’_ïr/*×û GÐ/¢ìLÌX}U1«æªb¶¸žÁ³2¿|ˆÕ»6LkÊ Y<ç ¯BÃ#é™|¸KÕÛœ[™Kk¨šãZûSt·Â§)"¯ØÌÜPš<È+Óñ¹_ÀG‘[²Ýñ—Mñ¤i‚qÁes™àËlR=ݳS þäA|%ÄC¬óªy=+%Êß4Pã)©l„g|Z ¯Fà-ðNçœ×¢RJ[âç 9ò 4„€ºp¤+~æh• B$ˆˆþôȤ~c˜²xx9] ŽØÊ¨\õH‘Ã¥Ÿ1åd„Q î°Èï]ϨeþÄ¢©‚9lRñIÃ\¥5 Di“ˆŒîÀÜ.º‰S¢ŽwjSÇÄÄÂ`ŽƒqkE╬­ZÝ šWe9]„!q5¼¥÷~N63P'FõßíZiÔ0˜0Æ@G.ž‰€µå~úþp<Ã`UƒÅ=©he†sUÅTæM#¦ÏÎ,ÿ‘²âeP=HAÞ:\%ï°«xç sƒÜ:;ËôùBعâ~I("—GHˆc&Í$'éî*_Á:ŠZNáÄÊ8™^'™ÍªðTÐð¤dD:;¼ÊY‹d…ªż{Ä}œke‘á4…Œo9LMÓå–ÉwÙ!Ý’JHWÍt>Ò™6‚XlM„eÆÑÒ·ª[d~Y]*ym—£qäˆ<˧8Gå·‚P×ðA±ë´¹Ž\)Ã[±a¤s¨ôâTw¢«íZ ùw•ɿù6Ýuiå  ˆ<Ýý”AoG¤hÐjEÒ‘=3·Ätú”aš8ï.Ó³Ùq]ë=b+bŽ=qõâ×ÍãrY Ž(Ú]Í|%„ùyÁw¶†o þÞà›0iñ›þ&ì¶²%-t,iNõöáûJ¡3žb3mî'[Šó ÊKúeî›ÿd+F‡ [cÚaXÄ4wo/‡Ž5â;ýã3|¨ÅýÉÔoµ²øP‹o¥¯V>Õªã›Æ$üêÍ~¬õ4<3ÍUÜíŽd× \)À[§»Y¡ÈC4ž‹è“9ÌC¡¡ÈQŠNÄ,å”4+a)è‘|Xž‚ܤoO5Û‰“P¤˜!ž¸àIÆÏs§ÿzŠ”è9 É ãb3¤œ•D_‘‰b~£¯8™*ÿ€+NÛÁóqK¥ï’˜VõÑÓ^ˆ9|½×yW¼©Œ¯Kœ áÉ qsÜú§à|ÙZ¹6Ö‡g²¶xjlÄSb‚©Ë7Ò HLM ~‘†$ONÓ±½°Èѱ!”b=æ™j º¯S+§„dtUä|„ЩÛz¸é¢½ao¸iB5 $ ‰Ä³1wÞ"“Ì£—¥íꞣFiÔ‹ês¨ôB’táiK9›ú&Þ)ìCT2} ¥ˆW>Ù®«Ü+tÒ€y–᱓ÕmÄtËò03‡ùD#÷l ãvhf÷tZ9µÍQo ã&Ü‘‘£Gf>—2ów£>»03`ÔóC¥çÊÍv{-q;ó¯3'±àG*q¨Üª¢ô¦t•tÕ J,¨@æ'Cû:4oR†f²Ž»0æw¾64Ä5ˆ*J¾ Ôø·‡A3Ã3þÝ¡øÑé4ö§Gý=û#c¥ÏOA࣑˜Õ ñíOÓµo:Ê_DUþGФ×|§,¾C4:|•È*Gé"óȤ”èÄS\’¶‹öZowÿ=|`ßÿPK•‡|ãrÜ9PKý™H'eu.class}SYOQþn¦”Adßµb;µ”DöͲhµŠC[`HÓ!e0†ŸdxÀD •D}òÁe<çÎ îÙ¿s¾{îÌï?ß¾ÃÒ>4 ¸ƒ¡%¦`(±«Ô£y½°]ÛÜÍe¬±ëá¤U4 Ûc“ðCéi%˜ÈŽq 9øo1Ç«‚‰CÇHO/ñ8ÛH1˜ iU³UNÚ 3f6'P;cö-½`¥ôüùþ¹O™ÜžePT@ÀMZmÞ‚i¸¡çÃ\v€Ió ˜ÉÍyB·¤gõýs½hFR±x$ŒŽ| N:M×fŒŒŒ€7“7 „Y fÉ Ç•; cKÀ·eär·éìÐ1hgr†M抒¾ÉSû.W3Ã]WM+y°·g­\öâ:×Êl°8TЭ ¨à®‚~í (¸¯â¼*p©èaÑŠFmhPÑÁ¢‹E+—tÂ͖¢–…Ÿ±>.ö²«2£âª8VãGƒ5Ðc¯FC,±xÌâ — svØO®,áØ([OYŒùé+gë‹ ®“ˆç,&YL¹.nĨ0…‚¯Åe|3©;Ý%u;±n ï6wÁ[òþ;ò{*ü ò{+ü÷´ï‘"u©'-H{µ3Lä [¨vÒQ*v‘îå´>Áœ.aFàólͲµ yN°X·^ôî'(÷î ð’ös¿ ²*aYà †Þ‹j³ì œ8Gxã /6®1l?¡ öç‰ë¢Àz‘:†µS¬„eßz¹]‡’U­Ãª“øyI×qÇpW¤ÙSªG•6ø*+DÊCzŠ[–i ÉÈ8Ûç ÙÍJXscBSˆH÷Ñ9" â ë?®°‰Èõ^°±wTgßï%-Æ{e™ªÃ&A`ž:YÁ&^Á&^Á&n³é.á•Z÷û™{7| §H–)tÉBN·8i¿ÍõµÀ±SCÿÑÍ5o.kzåM¯Ž¡7,ï½ïÆôB9Ý'ÝFÏÂÿZ^yÊ2×fù·üPKaÂãVôPKý™H'ev.classU×eTUyÆá(%èÝŽ¨Ø5¶Ž9Ö=6"*Š¢ˆØÝÝÝÝÝÝ:¶ŽÝcww¾ïs?Ïøa>œß½s¬ÅZÿkïã?wìq< '‰‡ã™=Gˆ‡ãS2,2¢CDL)Ç«ä¿qËGµ ÷püêFu‰ ¯)_ÄiTÎÃIÖ¨Bhç6Qµ¢£‚B‚óä Ο/¸XÑ&ŽG¨¼ZÈ»Âc=´ ÍÚ¡uÞš-Ú†‡Åx;~ÞN|ÇÇñòw|OÇÃ×ñw0 ýœN°\8ŽÇIÉ7ÊUJ¾W¿ã+/ùN\ÇñÿÌÊ>ôpvù¸=qÕ压n.w<|q¹½pÈåöFJ—Û7]nxa³Ô/¤>È.õÅ©~H㣻ÔU¥˜'M€+Ò„˜-ŽHÑGšE¤‰1Pš¹¤I+M†ºÒä#MÒ”¨.M…–ÒÔ&Mƒ Ò´)M‡oÒôX ý É¥0Cšni&|fÆPil”fEMi6$–fG¨4*Js¢½4FKsÃW„þÒ<è-Í‹üÒ|Ø- ÆXi~”‘À3iA ‘ÂViaô”A|iQ¼–Ãdiqd–@FiI4–þŽvÒRøSZ¤eà’–Å%i9„KËc¢´NK+¢¹´6Hÿ@iet–VAˆ´*öI«!‰´:–Jk`”ôO¼‘ÖÄ i-$’ÖFi—ÖEz© %¤õ°G‚ûÒú8'm€rRùK¥ qAÚù¤±PÚ%¥M±EÚ Y¥Í% Å^i $†áš´%*IÃ!moikÔ—¶A6iÞJÛ"­´fJ#±KÚ“¤P^å%éˆÏÒN”F㨴3>Jc0NÚ¯¤±(%íŠGÒn৺㠴.J{"¯´þ’öF+i¤“öÅe—;ÐéN<æ ÀSÎ@Üâ B?Î`Ôá ÁKÎP|â à Îp¬àŒ@4g$VqF¡g4jpÆ -g,rrÆa g`1ç#fq>¡+ç3ü8_°„ó¿q¾¡ ç;~r~ /ç'ösþ‡Õ®Nà/tv¢ó”è¼%: ˆÎEg•¢“SÑY§èLTtÎ):³ÔŠNE燢sVÑá‘è­ælQsn¨9½ÕœÛjN~5§ššóIÍ9¡æTTsfª9ÁjÎN5'ƒšÓPÍ)«æÌUsî¨9WÕœªjN 5gŽšsMÍ™§æ´Qsr«9ÕœljN35§ŸšSXÍ)¥æ¼Ts¾©9“ÕœTjÎO5ç´š³LÍ)¨æ,Ws«9¯Õœ%jNi5çŠšã¯ætSs2«9kÕœLjN5g¿šÓZÍI®æ|PsZ©9ãÔœGjÎc5Ç[ÍÙ¦æ4Ws*«9ÕœtjN]5çš3AÍY¤æD«9£Ô5'©šÓAÍ¢Ú Rm¾ª6ïU›¾ªÍÕ¦œj“Rµù¨Ú\WmN©6IT›ÑªM-Õ&‘j³Cµ)©ÚŒ(5¹#OMáf£rSH¹ Tnæ+7Ô›1ÊM.åf’r3]¹ÙªÜtRnb”›óÊÍ}åf¯qSܸ¹eÜL1n7»Œ?ãæ…qÓÕ¸ùnÜ1nÚ)7^¦MwÓf¸iÓ´9bÚ\6möýG›^¦M[Óf¤i“Ñ´YhÚèÑ;ÝǰÑÓu¦žÍ³x'Al.6¡†Í=Ã&…a3Ö°©gØÔ6lV6é ›ø†MSÃf°aóÀ°9`ØÔ7l ›ã†Íï†M¤a³É°9lØœ4l:6 ›ñ†Û° 0lôhÛnÖÞP›š¦MÓFÁÜ×°¹kØ$3lŠ6‡ ›(æ„a“а 7l*)6¼É¢6}L› Ó¦§i3À´ùbÚ”1m6›6i9çxÇGt>:Ï ¬†ÎQCg¨¡3ÕÐÉbè¸;ñ¯ó¾ê¬0u¦™:³MŦNKS§½©ÓÃÔ¹`êÀÔé¯êðfœì¼2vª;—Œ5ÆNc禱kì46vò;K4ÆÎ1cÇר‰0vf;3ÆNc§˜±³ÝØybìTWvâ˜:åM•¢N¢õ|â‘çÏ_OAN ^9N¼œ[Ä¿~O–¼ÿPKö6™qå PKõ™H'f.class•TëNQþNiÙ²,B¹‰U¼ƒ½ßA”RjKÑ&Ć˜¸¶Xlw›Ý­‘wò‰¶‰MxÊ8§äÒXÙdçrÎ÷ÍÌÎLö×ïŸGèAoÝrc˜¡ÇçO3Œúü™õ³-«ú^4o›š¾·ØºÜfpúü;I†˜/S4*Q«¦GunG-«Õt››ºZn9)n¦õjÍ&6W+‹‚ïNÉÕìóœniòùÌUÓåRš@λ¹XlS­ðxÂwÜ͈nQkÎÆ ù.7îr/“µÝ]nRGÇ:Á)ŒË·“š-1ô.iºf/“C¯sÕ(qOJ³l×4kŸ—Da òÚ—"¯Úš¡[ JZ×¹¹ZV-‹“+çšYäëZ™€1¾ñ”jí[¦ÞŽGáx"_˜OYTJ©V«\/1¯0búø«L—!üOø†ª—¬}õÏrËR÷x·bÎ/B·b.ìÃÔŸÀ+šM]Úe˜;Í™Ó3«Ã0ôw rx‘RŒwÞ©*˜eŠÕo§¹ܶq ”ðH $LI˜”pOÂC ·$ø$LK¸+á¶\ ¼èbBÁ}¸„ëÁ ’×áTp üÂõbPFó2ý6úÁS1áÆ±(#%3x&Üe³x.¬ÂZ‚¬9$e<Æ*G(@Ý%å"˃>80BÞ ÒÒR`k?°þ â£×Iàh‹Ðß&L“î!í„&b…^fƒ¡:6$ÒÙ^b°{”ØŒ´ÛøŽõ£_[XPÚñ—‰å$hb¦ @ ¼Ê6/„x½lb¶0ÌÈ„ëÈÖ±9ì QG®Ž­NyåvÔ±ögöEÈ:Þ\;plõcœ´Lg<¡r'þPKåv ®¿PKõ™H'g.class}S]oÛd~Þ:‰Çùh©W¼t ”Ä[–¦efKÇ mWX©hÓTó’·i&ÇŽl-·¨âŽ ¸ã²W½…]dÕ@+!ñø ˆr^§c)«Çç=_ÏyÎ9¯üë?†PÂ8¦ãÐâÈ1LŠ7îYŸYeÛrZåîÞã`™A*o2D Åí£ðtJýW]`*ãÉ[×vZËÇ>oô¼vÐ/orß·Z|­Ýâ¾`ÓNÃP­Rá™Àz}{E¼â H!\¬pì "£Xg8GÚÓ$ÇX¹ÚvÚÁ5šyÕmråúýïm×ñ›µÕOÛ]«ùXwC]Ú\»Dˆ­Z…[nÏkðõ¶Mð Á~f{ÍòwÝ=·t³rq±TY\¨\¹ü ³¨ŽåyV¿ávû sw{;;ÜËï¸^žßïZN“7óM+°òëæýŽeÛ4\Ãv*o¸²ßsÊʾo—ÛNÀ=DzCƒš£ašá‚ˆ¨Åoñ`¥pš#IjÝñËiP¡¹'ë¨Û6oYvÍkõ:Ü þ›!ûÿk>á­ñ¤«ï¼C ?ys£++œ{ÆÍ2ÌŸŒ¾ïnõ»5»å’¹Û+ëuiQ\ÆË2^‘ñšŒe¼*£ cNÆ932æUdU‘GLÅKˆ«Ð¡¨8 YÅ,"*ŠHªxª)‘œP1…ÏaFלÇ%`*ôý¼¡à".‹Àá« ±,ÄU x3 ® ñ‘•(Kü$0ÑÉ,Y“t2:£ÆC¼ý]˜ Ó“ÆDþ ¨t~!™QÉŒ?ãŒ1ŒÚ·Í˜%¥û b{Qv~€ZUžb‡X©Æõx6«G††¤EuùBé«ÕÄÔÄãдi±'1E2“˜ÖZòã%]Ñ’KŸõÑ^’iIÊÜ?úKOHz„þÃC¬ú›¤7BM—io´¾Ñ ,‹m øûÞàúOX¬&à½cuÄ2?b)iI-rGð¾q;äÕ¢ûG¿ÏælSÍ…ªŒUSššÛý!^MKfF2³øÒЬë©_pÖÐc¤ºÊøïT'4ôT¨º&…•áÂØúiÀ±l’i-£§‡Z¦9ÀÆ­¤o}…ÛSÒCÔÔ2¹;ff/Ë´¬¦îyzú[ÚÅoøb‰6AŸ=É <ÿ/PKT¬«noPKö™H'h.class•UÝSWÿ-»I–5 (°A£ø#ù¨E¾üÀÒŠØ‚X@ZÖdI‚!±dQ±-ZKÿ§O8δ0íd:CgÊL§Zjß:}î[:}íSÿ‚Òsn6’ðàÃ=÷žs~çëÞsvÿï§5ÈàS Ó‚ MEµŠ ²ïX· _73´]×ïêõ1=®ï½5nͶ´ÚB I°Ñ6|^ÂQ_w>¸ }…¯<ù È øìÑ·8é3'£ñpËí¾áó"{{45;)Ï®DȰ£+OšzÜÐcSÄŸ¼ØÛå %Œ¤7ž0½ý®áÐÍ`„y£ñ1ÆæF fÄÃfÄkêa ΋÷ƒÆ3JŽ$H|Cé¦Ìh¬þÜä¤>}%šä }‰©É q)£@»ú o,jš1ÃÒMRaÉÄT0bñEœïžá z2’¸6™ 4œh 44žl8Ý2B!ë¡„bcw¦Iz‹VÉ%Š"Ñ¢å°aÒ)B+*Afë•Æ%ìéFõݽÙR$”n\dwÜ4ÂÆ¤wîµoõM'Mc"ãokùé6­-BHä_NrJJ2úÀpà„'ð9Pç@Àõ.”ÁáB*]hÆ^0»vÃéB-³™Ç…ã idÒÀÄDzc|:„—°?2Û|r³-ÉN±¿£(vÁϧ}p¹ðv¸àÅ.öìdWN'ÞD§-è,ÆiœarÖIä“óLº˜\`r‘µ—˜\fò“n&o3y‡!W˜ô8ц«ì´×‰V\cٻ̾Ǥµý,»Î쀸ÁìûLeÓýL¼L^1yÄä!“"ºªÓ”1°UTÒ^šìr!¿GüMü}ân⧉¯ÝÄ? þÐ&þcâoâ?¡Ý>%¾q±Ó¥‹ý¸µ7X{£µÓƒŠ½Yð;éDïLt7q ¾B¨ð¯bÈÿ-ƒ«^ÆM¿¼Œ‘%@îC)…føÇç‚þãË2(ÄÄðûDpmcrG ¥äëZvø=«%UˆÖØüú? £52úR]F8kNR(!+Ö­ ›i ÿ ÙCK¡tZ)j«‚?H¦Ðþ›Ü©•âÑÊ”—jO]ͬ,iOúSXÒJ%, Ú–‘º?ëßÐ~©•I 8lÏ*[J·úàÉ&Üm­¬h&&‹û<ƒsgq9&-j<›ATn€·±«K×Ê¥Zž%Ž/½YîHW¨*tËGÓu©6:k¢ ÕNG·HTuÐѦvx-o4z–7qE´{4÷þ™§(ÓÜ^ÚJÈó«™98ä%mUÌClYyɆû¤¼ú9¢spV»æ¡eÑ5º´šò¡õÕ(?ŸÝê¨%:ñó}+·gýkØ´En(ÿ I†”Qê’¦R¬Ïtxžc|•¤»ùmƒl°ŠÛ+ˆÝÐ="±!%Öáq|ƒ/Ð:X&¯bâ«ëB!2º`)VÈ)xéþïŠ6ÚN/Rã™_ÿ;•ݶk‹y}HŸH«e’Ùiÿn£ eIÌ šVŸÃVmzŠ{r»Ôõ¬ ¡„(•ZfjVp§§îW´ÍÁžB¹V÷ íkög³^ólý¯šgV6«´!ÚVðQH=¥ø+¨°ÉV›ðTe[Aò×5Rec4Ó¢JQäR^1ô•·p/57I‰€kð"þB§ARl ’.§»’Ÿ%Ìøˆ¸ÄHw©?GG3XuÑÇgrÁóÀbd yøY´®Š¦5󻀇mÝŽå:œÍ·­,äð5¢d.ø`¶¥¾·fc~sK‰9Ùn4šùÝYgA½Dís5 ‹p-°ö¦ˆXã¸Ké±icóšãà×V1Åän~+Õfÿ0zºKp}Ë\ä¾h@¼ÙyyŠòVåßBŠþQÛÞ™/Û¹­˜?–'øOt$Ç"7lÿl‘äÑæ×ÿÌü骄·šÿPKËK¾dŤ PK÷™H'i.classW |Õÿ^fvg²N0, d%Q’M Q—C%‚F(A0R«K2…Ín²ÙD°jik/OjmkI´j’£Š ¶Z{Ùû¾o¯jïz”þ¿7o7×bÍþæ{×w_ïåùÿ>5DUŠe&­2i£IW˜tIט´Á¤«MÚdÒj“Ö˜Ô`ÒJ“&]jÒz“Öš´Ù¤&“¶˜t¹IQ“ÞcÒµ&½WP(ë&’é`´+‹G7Æ`2Œ&¶“-Áôf'ØìtÅšœŽª`¹ ­¼¢NPQyEý Ï‹G›æ­Þ¸ÅiJ/¿ÝNÅ›°íÁv×"I»N^^±a™;Ô *Æpš .Z äájAÞòúØ"f2£Ü%Š%•ôºD[gÔN´U"̰º3=ãÌò‰&äTZNÄÎE¬|Ž°åØ¯Ë±UÇÈ9Á=§ƒKN‚»nœ.Jwö\8×þ„­e--Nj¼±YôöñÆfN xj®}]î¨47çÁÿu}“™ç:qýY’ód¢«ÕQ.scÈ»a™›È¹DàŒõÊMvrÍ`ÌètKÆHý.è«ORe.+9¢VŒòŒÜÓxv2;Vë¢P޳0ºØNSg*–Þ>¯'Κh¢9éÏ å9â•c«nÃÕ9vßédݘ¬ÈVAõ»’‰´Ó[®\-*™‹›â±D,½û‹Õ¤ôÂॠ®X~-ŒM9éËô?)‘Û  ²ÚÕ+«RѪ-ѧj*ÚIm4ÁMtS~á -o±€X4»Ái®BëRˆMÉV4$'èò²¼eËס\!lrN*švÞ×…Kt¤£ ¤ÐTÇnŠu9  …O‚–NE-ÉTk4CËÏ {jãN4…¦[›lvÔ&]ºuÑx'Ö%µÉÎx³ÔÍ´™µç–$(}Ë·59m̬ŽF©Ï¯K4%S)Ö~+ Œ;‰MéÍ kït:ÒNsÂ岄‚–ŒÐ$:[7:)@[4muÒNª#M$èlk>ÎTõÎô£É„­g×%ºàÒfƒzWErqV¦eXts4UÆš<þØSF﹈ØÕ/EŠâ” 3kT†±/;×Ç º-ÚÑq}2Åñõç*ôÒw*Npw¯¦U ŒSr[ÉG+›²ÖìL59+bqö´+±Ö¶¸Óê$Ø;¬º›äžlé.ŠvlN^žJV®›_U]9¿ú¬ùç{ ìÍÙ¾ó640@3ÒdÓ0ÞmksÍ‚ò£©Tt{S² ¾·±MH¿¦8â®hÊY›Ä>&7;-ÑÎxz ’ÎípÚ[O8™Mâ<,E J½%–õ‚å&|˜ˆáÛ¥3/„ºÕÙ¼E?éÃ:ù›¯ŸÌaƒ“’%ÊO)ÔèˆcjÙ°UÉtCg[[2;ešKnЃ}À }Ä t›A6èCÝEm}’’ÝO­=À žfXt5Zt'ƒ»tQ³EÛyÖΧ]TiÑ.ÚjÑ=ÔbÑõ4Â¥©‚ggXt%,úŸÖÓ|‹î¥ øàB˘AÈ¢[ÈáåÍLÛÊàl^žÅà^–2ò,‹R4Ï¢=¼l§% Îep1ƒ –³13™¢Ú¢OQ¹E7²¦d[´ªØŽ™Œa;$ÓRÖ{;Xø­lÌ Lqƒí®ç1XÄv”Yô>>h§¥ù´—Ž0x†Áƒa=DGyö,ƒ/2øƒ/3xŽOùè3tœ—_aðUÞ{ž÷¾Æàë>ì}ƒ¾Éà[¼ÅzÁGÝôm^~‡Áwù{Œò}^þÀGÐ ¼ü!ƒùèQ¦øýØGÑOå§>zœ~Æàç>z‚OŸ _0ø%ƒ£>ú<ýŠñ~Í(¿aÚßòòw ~Ïà>ÚOôQÓb­ÑŸ|ô$ý™^d”—˜ËË>:L¯0x•Á_X¡×¼î£>ú«úYÚ^ú›ðwFù/ÿÉà_>¤óì?áÐgaýæ_ §èi*&ÁyÂ'œ*rìRkd&ÆBÞˆÕ:ÌóÄXßpXX ÇÂW qfÀ±$Nê§Ø½R‰«ðéPå³øÞŸµg2F¶ÇÌImÓ8vµ}$ƽ¢2D¡q]¡_ÂÓ©ài:Ðè×ĩåGÌzm©^£ïÔDYaóÃêLç3 Ùý¢PÒ›m5žbÏn*)4‹=Í5[³µ“éÄÍÅžï^Þä½X×÷ž ál¨_ø»iÒzÉÍÃÜzhR7M‰xzÈð G¼ö ˜òˆ÷ ÔM¡Þ„BOÑítNjȮP&­A¸DWØCú^¥¨W*jkUý¢xÚ32{cø™¡pŸ(bcŽ3Â#~s@L>˜•äÿèh\Ø÷Í€$ö®?ë1Ðå¥c ‘m tBL‹¼^“sOËßL³Ôñ|pdûÎÀqÉ*°^[ÒM§Ú¥¼.­nØ™'äthÿ‰WUjäó¤T~ Å?`K;môûD`8”YÂ+xý´•a0|UÓˆ®Õxº©®²ØS}œ&ac6(¦7ô0oVŠÒˆ7€œžðòF¿@INËÌgô‰’€·w}7i;=ÔЭŸ¥=MO4ú­1ÙôØ<™Ð/f±&0z9Bž‚ëGÜù¨´¨VY”Ä^>Ææ6 f¯½24}PœŽlƒbNÄ ˜] èœq“ó+ðô®—&ŸÊ‚"^N9ïpÄèȆ€Î‰g@Ä)T_/Æ%øÑ5|üPj\%¼/ qÞyDo8tˆÞ.Ì?Do¢·ü†.gDô€~œEÄÒàÂ3#èUFðô‹¹j>¶¢è\²§Ë<¸…f«<(W†ƒí=NùÚstPôê ëm -o°3ÙÓ.›ñ•²Íë²)ÏàZ¬X9–½¾Q 7¬ªìg'_J§åHOm¤ž¯Žm¥ÖÌéÚ>òú {9*œèƒq¦²ÛŒf;rò¥ ßÛrÓ‰Ìñ²»»Þw«â"n—2—{ýþas²†Žx¸¿!ÁÂ\,…²X¬Ò…÷\©ªÅBF¾âbTŽë§=øðxSj,Eù°yÕ®ç íˆÙËÓ!tHîäÀK´=¹;(ªÜÝÊl,ðT:¯U¼.±ý…ýbÞô D­×Îí1`ì¦éÙª™‚#{¤N@yÖĨáY©d­‚wø&­F£‡Ö5U>eM «:(bF«zÈS9ÑícdÈæ«Ëû³¿^ŒAüÆK¹'Û›æ.-*q½câõ°¿W½ ê³>Ø•¥(QV,¼ÈÖ5О³ö 4-ÜÛÃóÑ¥ÕÇèl{HΆöQ…¶´›¦Úe äFÙ‚½äí&‹¯,á}pyôÇ8äÀÀÖ°Êß<~C+Q)¬8‘Z8nÇÈ7ÔwUஊdóäY:¼'3?J‡ë•j± ïb¹ O,äñì>Q£°Vò#¢(Ü«ä·Ó™*Pê¹R üs >BÓ®vî0rἃ²øÊƒ~Ü—½ñ·©Œ»ŒâPH>)"î“‚SÑ}YÈK¨ÌÇPsœôƒ|²ƒb´Ôw£ÔL×Öî‚ßQ5ðÞklB ƒ…³f,UZ\¥náú1n¬ãƬ<ާP nAŽÀo½¢‘·Ýr嬠²µÙê·‡v««}*_íco`÷p†Òn¹êç…𖚆› CÉ1 óRÞ©¸°X)¿¼Sí‘‹Õv/Ö—FTYœm¬^ÉrFX=;ЦÉþc‡µj ®žÅcŸ=²|Ú©.{·!”Ùx€…-YøÇÚÕ#\¤ìjÆWùUnˆKFÞŽòåZ’/Pâ²#ù˜k5z7ñ«Ç*ÖíÒ³ï]·S°³X/Ûâå‰ 2bö"¥r äɺÛÃÞ©C…ËŠõ1úvÁ2Åo#¸q¥¯s³·dÜÛÛpàe…ææÌS>*‘>*;bò ZÞ‡ZwÞ ™?Þwœ±s•äéªðOE¡-Y Å—†Ââü±$ýøb2ÕãÿPK²j;r ¬PK÷™H'j.classmËJÃPE÷é#ñÑh­}ª bMGŠ3QA ÄbBH$ÒosàøQâNzAÁ\ج{Î>ËýúþøD6ŽMÓºôMë6öÞ½iâ¥át^äQžWæB00-·Îm3ï^FæwíŒk롵+5Sl]­üൈ²tÉ`ž½å~p%`è^zË—ì>Ïì…s<³Ù‰svú(z¦X$!Q± û»çî)ü‚é„J©ŒZéèëéèéØ×8Dy:-Á¹ƒFÅ]Å.Ú hàûXÝ"ÇUf£rö—ì)XQr¨h@WgNTïæŸij›÷:?PK©œ`ÿ³PK÷™H'k.class]OÁJÃ@œ—&ÆT[«WÁC+´1=)Š—ª'Q!Ћxئ‹n Ù¦"~•ž~€%¾D¬…÷ÞÎÎÌÎî×÷Ç'jèc‡àu{—3ñ$üX$÷þõd&£ü˜PëöÆ„ú‰JT~J0Gz* Îùs$Ó\édÎ Ô‹,’*f¦s{&æú&Óýq0öƒáAptxG A°¢X',òÊ ¥ýPfJÄêEL ïÞþ¨^é<\¤©Îr9]ÚÙ¯¹Y}ÚhØX³±nñáºüYÃÅ*ÈÁ¼¢ma-ž6ÑX@…ˆ»É¨Å“xZûï輡X„•%Ý(1×Å73Yun¿–´Åeòa“«Î{öPKõzÒµ PK÷™H'l.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ˜Ĺì ì ì<@‹A'7ˆàaPdÑ ÀÄÀR„,@ž ˜ÅÀÀªµw#XHš *-d1i6-íí |0yV°1lPK7þ¢IªÕPK÷™H'm.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈ Œ0˵"9µ $3?‘1—ƒh5#ˆ`âbàdà<,Š ˜A €È³Xµ¶3ðn+I3A¥…€,& ͦ¥½&Ï 6† PKYxR¶çPK÷™H'n.classuSËnÓP=7¶cÇuKš@ áÙÒ8óB Ð.@H‘ E jŠ…“Z©Kd#ÛAëþìºê6)âQ‰-ŸÃPæ:AÂ\éž™93÷œÙÜ¿>A€%3 R ’ N1E½Í0[ÔWwÌ7fu`:ýj'ðl§'l®3d‹ívd;Sü—Õ_ðü&Ù,D6¢¤£$Úú$"DimfЭ2ÄjÏ8ì2ÄïÚŽ,3ˆ÷Ý-‹Aí¸C¯g=´Td7˜þ¶ûÄsõz¥aÔµúí¥—¤aÒí2LõÜ¡°É™™ó}3ç›Ù9øõµ yc0b0œôü†ÿÊßô·Öƽf£ºµ6Å 9éEÛI—ÃXÙ™ôsœLÏ×)á‰R7{ É þípay£²Ò$‰×aaªå‡!è [©Oõü€¿âëáâõÞÓlèœ}7ª[ÕæMkzán¡±í6¶ý§•ÂÜ­Ç´ˆéÚj…ÜÕ1h^íec¥2SÝ$l°|Çß^¯ÝkÔò‹ÅB)_,M¯_{ÄкRFõl™!²üŒ‚†äÿ½ô@‡u”Y£ó‚N]Ái§p  Ð!HAF5ÐID– úDFÓ0Œ1 gp^D„¹¨b—4Œâ²0W4º:#; €äÄ3E)"²qºYChfé_DtéU¨” <&ÕæmÕŽ½Å휭–~Â$—¥è 2ž@ò\¶£¼+Œ±6²®Æµ} f>!o«‚o#çqM*í*;ïd»¢hMí*P”"ßÉv~ଫf„?÷ùo]ÙCÁÕ¤I½…7\ËÚzŠåx´q×à‰qÕÖ¹ášz*âµðœšÒ¯Êïe»2=´$QUÉsãÌ5sû°æšÜ”r–¿ËK’|ßM¦òh›Ìp…Çxœ›#<Á“¶¾‡ ×âÖ>â E:ôüŽÎl]ŒµÎÕ£¹h}ݹÝ-¥"G¤ì¢w Ôùv‘üPK{r¡[€PK÷™H'q.class;õo×>f]!F MŸ¬Ä²DýœÄ¼týà’¢Ì¼tkFf Í0FQ Íhl²UX„±yFGa%Jk´O¡5ŠåþIY©É%@ËÙl2ó2KìXœóSR¸‚óK‹’SÝ2s€±h—ÄâŒü€¢|Ý0C=#]C#CK‹XFÆD Nâd ÎâBvv^V&.>E~ , Œ a Éä iF ͪµAp#X#'XHšÌc``bÜ•ãk€É1¢Èq—;ˆÇÀPK»•ߟPK÷™H'r.classRYsÓVþn$[Öf'J\Z¶ÒÅNl'1Å€Ãpš…©˜dB†iåÄ€ƒ±ˆ¬t&<ó'Ú‡²¼äÕÌ@Ȱä‘Ìð‹xj{®O›FæAçÞï;Ëwî9úôÇÛ-HÈáf))3ô¥3“Ëî/î`ÝmÜt¿Ö¸7:gC{›ÁNg¢bätYLïuf&WFDb„gö?xú9¡SÞKEDEPÿ|×Le¹ºPK£$¢TnG°ûleed×ÀþO|eŸŠî©¼W)òåñóµF-¸È™ÊûM7_nÕzž¡§C,7Ý»ÕüÄ•Ÿh·£ÞR•ÁõÍÀm³n}•p,ÌaÐ& Ýò©1XQÿˆöãôugÜ­Õ«KTMgõÑ#ÏÖoÕ_¬Ž“—áÀÂ5·yß»é{¹Ùá|!7\>wöCoäÏÇH‘Uº*„yLh‘!Qm,5çjÁ}µÖk¸•P8õw1ß÷|†îOhÕVÙM­5ƒêC½î¹K“µŠïúk¤éÑ·BŸ¯ § £ « ¯ _ÁI_)H+øÎ€…„o4p†0ÝN@昘¾…jàKÄ |!Œ]Ä¥4 ⬆!œÓ0Œ’€#œWQÀ §pQÃ÷¸$Ìea®h8«ÂŒRõ…]àTë0hÈ!’èFÊtÑš#kê¡“ ¶ÿ ®½Âàã!-ÜkPaÐùP*jëpmÍN<ÅÜ€­,¶1ùt®~ÄW[Y"·‘¤C¸71î&Çe;Æã\aŒ®—t®ÄþW(Ûšðoà†Ãu©Ðz¢1ÊÜzþçזּÁÄÌÚm0qô÷ÙêÚÄÄ:âs¬µ‰~CLœ“EÕVåm0UÔ¨Kõ¹@[P,éýâzrvjxŸz‡ÓóGÞ`ºdHEs¿rcÀ6-)Ëc˜)%y’šäºmò¤öjZ²³cž¢GSívFl'#ÅSÛ‚•©ø¼Dž‚Sênƒlzä÷ò¼$ß*Ym–ÇBº—§:J©Ž#%*õÄd¶)r—ë­öŽhkgÂÉд³ ÔÎþ$KîŒíkh{–K•;î#áŠþPK;ô¨ç8&PK÷™H's.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ˜ ÄÅì ìì <@‹A'7ˆàaPdÑ ÀÄÀR„,@ž ˜ÅÀÀªµw#XHš *-d1i6-íí |0yV°1lPKl¥wªÕPK÷™H't.classuSMOQ=¯Ó2tT@P ¢ˆh?,¥SðT(VAÁ* ‹Z«bš6‘bdåF„;]™­&@$!êBÿ zîthʇ“Üóîy÷Ü;÷ÝyóëÏ—uhã‚æÄmS8à$ž¥^¤"ÙTîIdüá³LºÐo'mL*Ôú©žþq›ü;ÅRëànû‰…þÿd$wψÛïìa©]Û<ô-˸ýv5vÈ>Ä@:;—›+\P¨p÷pþQF¡n8Ÿ›/¤r…d*»@®d8‰E–7&ó ÏÓ™ksYÙžQpÍ)4Ï^IÍ?ÍO<χ“Ñn+µz¢çúH4.0&Àé©í!-Ít/{Igó9©ôˆ&ëcÚ…ýÛÏ àÍe^† ™y]üxŽ»µâ%ò9æ(Rµ@{A[ÔÐÑ¥#¨ã Ž6-:Zu„tÑqÊ„LF³‰ýðÕM…&žWÓD»ÐÔš8½&:á6qÊ„.É5j¼¼F½}ºqΠw^¼~  ÊÞ‹— œÆe!a+¢»jàŒ8‹kø(—€&àf?atxå ô¼r®-l¸ ’{äU|šüXŸ!ï¬â³äÇ«ø}¬¼îÔs§‰«<^õ#ÚgŒ–lªd†Ž¤ž«ˆ<ÁÄËá{Üã„_±ª›ë|ð'<ª\ÅØ ºéû(º$Êœ±vŠvž6üŠže\'Þü€YÔfQ²2ËfY#YÌf12Öñ-áb(¼ŒD¸Xn]>«ÓL3WWƒ2w)´Œ%GÓ^ѦB4õ¡Ø ­‚…u¶=¾)åÍq¤–sôÁoèy ¶D'JÇ-ŽEÇ#NŒNÍ’¾Ti§vÇèV1Q¬tâ-‡U=ÇÑ( ´Ù#û³md£´7´ïŸ0ò>mðêdz>mêµKùÄ]ÿ÷w‰áòPo•¶*£>-é(£¶R v€ÂeÜ®ŽnlK¶|Ú¸¶¶$[åäÉêèöä˜Ï;á„c[’cåä©êèÆæô;*Óëâ”ÕRþN¾ÿ"ÓÁ¶O]Ábå2Ö9)Ýœ¨ üX+¯r«ûÚì–šÖpvz g¦WÔVp—w}óž7Ù¿Å¡PKÁbLÖP;PK÷™H'u.class…O]KQ=×]³º®M²ñ+6Zígr“ÍfÓ,UûÐ"„ ¡Š›Ö•àBÔ ý3ú|’(úØB”t溑`½—93÷Ι33n®BƒƒWZ6·¥p[@ÏVø1™]ß÷¿ùnÓ?øênT÷µ£·ü?=࿲͙Ørp­’Âû°Þû_2õY?!47ÃãV­±4™K§v>ø‡{á§VèlyŲã•KÞ›¥]JúdU²YŒ ¾L(í t7­Àoßý*k%î·$6Û1Ù‰I3¦ L˜°ƒ`Ð,Ø%aqDLj…µ€É‘ΑΑ0‘Ƽ‰Y<2ñ £‹ ž0QV^l§. L_ÜN'ŒV3IÞ^ܲžmzfÐÚ™¶ªv×U×WÕÕ×ÖmÚøœ€G N¶§g/Bá=z-ƒ:º'}hÈHõ (ÖÓi},a ‘I/i{ב ‘L$­(‘À¸Ÿ¾Ë »Í)(ÁÒAúL+Ì”3íÌ.«5iét)Â~z°œ\L‹–$mêIsœßCêöbŠ-|F—eLJ‡†¬´mô-ô†jYb–sö/J·YÃŽhå¢È=Ü¿tºïåúB],üþÜo;–± š§ïßú.+>œ¤1³ˆ#£[Æ'e<'C—1 cPF SF‹Œ”Œm2>&Ã’±GƧd±EƧeì–±KE¶ªØ‰fŸ`*ÎT5Ö©hÇ*;°VEŒÙ šT|4gòSdYˆA„Ù€Š6”©ØŽ IfcÐ<É ’ÝʬQÑ¿Š–«ø,‚* ¬Tч*žÅ£åqöXÍTƒŠc“ŠlQÑÉT ©hÅŠ1„/28ÁàK ^ö!W|ÈàË>b¿ÂàU_eí×¼æÃ0¾îÃ^÷áy¼ÁÚoø0Šo2ø–c¬÷|‡e'Ùø»Ëð¾çËø¾‡ñv{“Á)Žâ´4q7÷'MüÎë~ÈàG>|?öá%ü„Ù·8‰I?eð3?—r>¸Ë¿ðáΈO™†Çñ,£ß$Ô}ðoºSkLÝq05ÈÁä«uðNÇ>Èìà¸Ëï£x>L´‡’ ¢˜~•dI¶@tò©—æÄn¯¸ëÎJïàP·7 Ļŀ'~ çļ꼘SyI:uÁñè–ó±J(¾@XÑä9e ‘ë)qëÉ[.wxúòAhÉ™U«ˆc•¤Íà┣ÞÈaHhSæ1<寍"/×'tjq—®a¨3Éâò$ŠöÑ)2ôP¼8m]íº)»./ŸS:µ¨·<‹éèÔB¶a·!àv=àº-¦vÙ)7ó”¹ê:7êS¤ž™§Nux7Obed ókêãÇ<‚CΟ¾ûïHν˜Ï-ü $ȄߊÜÀò«îH3˜}WËsEÌEfñvg”‚viD6ˆÞ Ò$ÚªJ¥úXA(JÔ,®Äƒb”…U³¸ÚP,ºŽ'ƒE,ÈbnÙ<ýÎ4f‚ES{&á=& äM¹eù´«ëÈ3˜×²x7 ˆ0QL ‹kœ ½¦6ñ{nh˜æ‹ž·¢W©¾"Â/ióâ)´F5Áﻈó1ðEª²øeƒo@¦„IóRÞ¿j‚¢·þ^Joã×\ŋݮd¿™Òæ¥7ÙÞ uö"Î- u‡]#AQ$41ƒßÞ?Gãôõb{m¥$óð]hodž&!?“ôh¹&Md‹[KݸÞ\Q‚ßO4W¿q’&=‹çIðÇ ú³ø]{qsåy7½wn¤MîŒT‘ÝŸšÊs¨Må9Ç?Ÿ+,;Xv*ÏÍâ/Û½MkϹaèítôºahÑ:(o™ÒŽxŸY…»G"¢ƒüÊèш”#ýDåÈÕ£G7Ó ½·æŒ“žg7æónÌ~%Ô¯üQ#rŽ ©äÈ0‘~×¢–i×dc>‡ãgÝ$:ñÈÒ’r9HSȹ¿~fac×9aºè.—¾D«dñ×ü²Æð´;›ít ßú-BËL+Áx†ÖñÍiÜd|k·ݾŽUÌÞÎââ5|~·™»3;–¼Oþ—åæÐH³ÏCSÃýìòn'QVU*Ò°ümâÄk»*üÊáæc¢P*ú•Ówÿ¥Ñ_¦m}/?}ûE)UîIˆ['±B«àôDÊí‚F¢›3ø»VA`ÑsÝB ’Sd ™Ý9‰ÇµÈüœBéG¼$¸MÓ>‹p ;N *ï²Æïg>Ðfç?ÆGþPKoh¨ÃRPK÷™H'w.classmTÛoeÿ};—ovºÒ:mÇn‘b™½õb×v EÊE¶ö–›bâ¶®°MíšRÑy©啘ø/KLL ‘²’fc|ÐÄÿÿ 1>ù&žóÍtAlÓsÎ÷ýÎõ7sfùçQ2˜Ðz”žPzNéy½·ÀÆ ³0.àöN.¯s+ÅÕ+¹™ÅåÒÒú öwì‡þ^ž= ¨ÍÂ8[I6DÌ“åÕòú r¦ò^I@ДþŸNãNn¶ç*­-•ΗW(6ÆýÛί]­Ì®U2óýÙLÿ@_ÿÈð;ì-°š`EtEQ ^\[+n,U>Ü û"ÉÉûmª_¹’›+­•‹+åO‹‹\ßy~Œÿ@s×ÖK—ÕÒ'ë…UrZ|š¬¬^¡ªt×I>&Ùè–xEâˆÄË$Ú%Ú$\‰CG%’ $ 'Ð}¬Ìº %ðD‡cÌIÀCk/B&Љ8c+›U {¥ôÅq ý6^Å«AV¯±Š£yö¾nÓiئ½±éØÈâ«“|E?éä#M3d©;YƒN ¥_ [;EÄÈÚþCŒù]pêø/ÆÓD1ßC‡Iö[ÿ;œúF¹q74´› ~@ÉÛ$7üû8›úÇÛxãÎÝ£³ß؉Oic5´¦»É»ÓóUMt§·Ÿüå§£ TcÇžÖòz NÆÕUØøLU®ž¡¸?ýL—nì´º–7jØï鮡"ÏÌV ážN¡}OçX5“×#=êaÑ8÷1&SÇy_i_4Sl~-aŠø•ž1?:ãÉkº+d/êϱ!ù’äoŸ™'ï ®£¾–Ñ’u¼™Ùòù1$•;Ø§ŽÆÕÑ$£ÄY±9F´ÙåCŽõÙ­‹tÕ߀[«zŒ)êÉÛO~SÕR¤Œª¥2¬&ŸV»VK¹FÖé|¦šœ0š@ÔÏܸŸ¾Û¯®ú¥IÇ¢†­êìXÜÑb¨ÙòëŒk°Ó5rÎð›\ÑP=Ò!F鳉ŽÙD:#Äj"N„8OÓ¬]¨™w“ X»–3[b«¹ÑV‹£ôf[ÈvòüŒ#)Þî:.LÑF¥·Q`£¥i'üÔC¼ÕÜýÇϼûC$Ó$_<â­ŸâbdÃMnK»:ýÒ£Üä‘hÞú?Ä¥é)õez˜à†–7kè •6Y†<ƒÔæWóUS0BY¿‹Kèêc Ì0/H-oÕpÐ3]ërÖ“®•Ýœ©Zµ<3ìÈÀTN`…9é ®åmα\ûr΋»vîóÙª-\Û³¢œx`í~@ûÕ¯ÁÁPKŽÈôæŠPK÷™H'x.class;õo×>f]~Ff Í0FQ Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk8›Mf^f‰#‹s~J*#Wp~iQrª[f#í’Xœ‘P”¯f¨g¤khd`hiËÈÀ˜ Äì ìì <@‹A'7ˆàaPdÑ ÀÄÀR„,@ž ˜ÅÀÀªµw#XHš *-d1i6-íí |0yV°1lPK”rϪÕPK÷™H'y.class¥Uë[TeÿváÀz4.¢" ¢dËY )x#Q B´8ì`qÝÝ–]2ʲ‹Ý°‹†`Y‘Ý”‚ÄÌOú<}èyúÚçþŽhæ=g¹¹ö¥ï̼sùͼ3svÿçÎ=X‡_ã±^‚ÅžS)a¥=§ªCëÒ <š·­ º¥CwK—ªë‚··Ô±¤î)±õ‚ž`µç4•KíUZa)«ã…t‚ÅuvÅí3¡+½þPàtíŒð]¿Ô¡:\ì±Ùþh}Qk[Õ1D–Ôh‚V£è+£¨*Ù9'Š3¡GíÞšÇøL®ýÑÚ}Ny¨µU,-=âN0qöª.!ÄÚ›Ê ESy%TfATWæöºƒ»iB>—.Á¶ÿ¬S÷Ý>o§‰\-¢;1ѸZÍëò!¯:_(àÔ¸="Ñ|cxº«šöií¾š€/¯¾(¿8¯¨¸°hÇöSä¡‘‡VHšß¯{]´@@ëvúüÝdm¡ã¤*Ÿ—ñÈžäÒ[µ'X«k.£7’M]CÀÔ#J‰ZiŸZÝ^Íãîákv:n:R"ËSY=÷8 iÝ9 k¿n´õcpsJ­…»=?‚ ~ÇQ_°.ä÷ûAݵ mÊ7#xvoâÒýX¤2M]¾‹}»;ƒúÜÃ:ugˆzØM/ A U:MÇC‡ä¯~6XÞÔi äN=X§ë4‰*ˆú"™¥.rèÒÍÂg|»)È>zB¹ ¥TÐU.࣎ÏéOl×`±A§0¤J¸¦Z&0lOÒHTcÐ!³w—fPCõ\¯rPø01ï§×1¡Pæ}Œ#§8ŒÌ_H¸jî%}ˆ•¬ ãËû8N=ÅÇ|E7 ¥ÃAš)|ÅÕcà’Øg 4àPÃøÚq[TšNÇJõ>G5Ï5¢ÀlÄ&Š»lÍHncÆ7Öë†*ŒÑȃ £ìRßÎÏgiþ ±ä ü‘±ÍJ}¾ÉÝ ¼~~.?Å2ï,hÝÍEˆ;4Œ­ÆðùâÚÆò`j¬#ÕÊ÷)|Ÿ)ô»{3a ÑÃÄô t†˜ÆÖ9¡)'ñ“j eD Ý˜½=e&åSI™éâ$“¸iCŽè&¿ÓNsç6dÌ ±Ñ¨ã¶„)ŒMâçd)Œ_Â7fÃ?ŽfÔN³óù¢ó×Í–?¤½SÅP'Œ¡.BxÌÄÙõƒ¾1gc™¹”9Äy)SaLŽBi˜A-çÔoä>=&"­qrÁ†4QÀÞ¨ø·"øåÿeæXeš[‘Ó×óÊc9÷²Ïê2–˜ž·pp}W‘inÊÒ:kÇ=CA¿4Ñr*æÊé¥|ü›`´+(`««lë/ýd‰µ¹ÿ¸K¬#ˆÅá ÒlúÐìߣØk)3¼w¢ˆ]2J’0ÛË”!5§'IèMŒ?×\&Ìé¬ì?~!f6chöÏùÖ+fëÓ¨&~ûr*þµ†øÝ±Ec "lÓ¿PK¡ªÿ8L PK÷™H'z.class]‘ËNÂ@†ÿÂ^Š‚x/˜´ DXiØá%!1jÒ„M㢔 Cš)ÅÍ…àCO‡ ‹?ß.sæLûýóù…4j¸`Hf‡¡d˜#çÝ©ûN0¨?÷Fžµ–ÓVŠ`ÐRgº šaÚí9hBÖ°Ûsa¨Îc£\.vI9cØ*—¿ÿp½q$d0¡À’ÓÐõ„ï1”í;g2”/¡¬u—ÍZ£yÕ¸¹~e`©GriŒëË€šYŸó4 I‚6Wk Y·¼P8¾˜9½xvõï5·ñ€'YÓñX†‘×_,ÄP\j›.,!ºŠ–g3Ž}Ž#ŽcŽCŽ޽,Ã)ÎÂ9ªtA‡·(˰FYXQ•¼ªèàŠ…¤SGNq“þUÌ"õÇ,!£¸Äå„;È*î&q+ÉœÕ7žÖɧ°ñ PK½f³APKšH' META-INF/þÊPKšH'(õ BB=META-INF/MANIFEST.MFPK ô™H'Ájavax/net/ssl/PKô™H'²U³Ñ íjavax/net/ssl/SSLException.classPKô™H'˜rP+·á)îjavax/net/ssl/SSLHandshakeException.classPKô™H'¿^¹Š¼æ.üjavax/net/ssl/SSLPeerUnverifiedException.classPKô™H'EŸCùµà(javax/net/ssl/SSLProtocolException.classPKô™H'ÞT_±Û#javax/net/ssl/SSLKeyException.classPKô™H'k<ãÛ!javax/net/ssl/SSLSession.classPKô™H'Æ„˜Ô·ä%javax/net/ssl/SSLSessionContext.classPKô™H'ϧrpò$ javax/net/ssl/SSLSocketFactory.classPKô™H'ˆÒîæ¢ +€ javax/net/ssl/DefaultSSLSocketFactory.classPKô™H'®ßCÚo*{ javax/net/ssl/SSLServerSocketFactory.classPKô™H'A‰‡1­javax/net/ssl/DefaultSSLServerSocketFactory.classPKô™H'æãBšÃ-“javax/net/ssl/SSLSessionBindingListener.classPKô™H'ÿÐÃ"7*±javax/net/ssl/SSLSessionBindingEvent.classPKô™H'Oni” ­@javax/net/ssl/SSLSocket.classPKô™H'l• Á—Ý#«javax/net/ssl/SSLServerSocket.classPKô™H'^áFÖ\+“javax/net/ssl/HandshakeCompletedEvent.classPKô™H'ŸŒ‡µó.Âjavax/net/ssl/HandshakeCompletedListener.classPK õ™H'Ócom/sun/net/ssl/PKô™H'Q>®È com/sun/net/ssl/SSLContext.classPKô™H'Ð(Ï;A #ýcom/sun/net/ssl/SSLContextSpi.classPKõ™H'ñgKìL&!com/sun/net/ssl/X509TrustManager.classPKõ™H'#fz~"Ï"com/sun/net/ssl/TrustManager.classPKõ™H'óȵ×-:$™#com/sun/net/ssl/X509KeyManager.classPKõ™H' ×ýCx| %com/sun/net/ssl/KeyManager.classPKõ™H'¢fm:)Þ%com/sun/net/ssl/TrustManagerFactory.classPKõ™H'¢ã‰{,¢)com/sun/net/ssl/TrustManagerFactorySpi.classPKõ™H'íªY=ŽX' +com/sun/net/ssl/KeyManagerFactory.classPKõ™H'Q,T8Ô*ï.com/sun/net/ssl/KeyManagerFactorySpi.classPKõ™H'<HæÎ(0com/sun/net/ssl/HttpsURLConnection.classPKõ™H'Ï_ËXm*ä3com/sun/net/ssl/HttpsURLConnection$1.classPKõ™H'Úí+Ôcom/sun/net/ssl/internal/ssl/Provider.classPKö™H'Ÿ³¤0÷2 ˜com/sun/net/ssl/internal/ssl/CacheEnumerator.classPKö™H'‰––kÄÜ&™šcom/sun/net/ssl/internal/ssl/Ref.classPKö™H'çq×p^=0±œcom/sun/net/ssl/internal/ssl/SSLSocketImpl.classPKö™H'tZ×·7¶com/sun/net/ssl/internal/ssl/CipherBox$CipherNULL.classPKö™H'þÚvzÐ,t¸com/sun/net/ssl/internal/ssl/CipherBox.classPKö™H'ÒýÕªÆ0M¼com/sun/net/ssl/internal/ssl/ExportControl.classPKö™H'eáë¯ø' &U½com/sun/net/ssl/internal/ssl/MAC.classPKö™H'óûJÎ-¡Âcom/sun/net/ssl/internal/ssl/CipherSpec.classPKö™H'ÂýæÚ"43ÊÊcom/sun/net/ssl/internal/ssl/ServerHandshaker.classPKö™H'”RD¦b"-àcom/sun/net/ssl/internal/ssl/Handshaker.classPKö™H',U–ô®‚/ïcom/sun/net/ssl/internal/ssl/CipherRC4_40.classPKö™H'Ê„+ž ,ñcom/sun/net/ssl/internal/ssl/CipherRC4.classPKö™H'ÚÂ/3Ú9 öcom/sun/net/ssl/internal/ssl/CipherBox$CipherDES_40.classPKö™H'wäî@ î4qøcom/sun/net/ssl/internal/ssl/CipherBox$AcmeCBC.classPKö™H'ÌÇ{ ó»;sücom/sun/net/ssl/internal/ssl/CipherBox$BlockCipherBox.classPKö™H'7R_öÓ6Ïþcom/sun/net/ssl/internal/ssl/CipherBox$CipherDES.classPKö™H'âêðüÛ7)com/sun/net/ssl/internal/ssl/CipherBox$Cipher3DES.classPKö™H'zs.[5Šcom/sun/net/ssl/internal/ssl/HandshakeOutStream.classPKö™H'}R«É_4com/sun/net/ssl/internal/ssl/HandshakeInStream.classPKö™H'òìÕógÝ1Fcom/sun/net/ssl/internal/ssl/SSLInputStream.classPKö™H'{»a¶k C. com/sun/net/ssl/internal/ssl/InputRecord.classPKö™H':ŽqÂf°1Ócom/sun/net/ssl/internal/ssl/AppInputStream.classPKö™H'ày›ìe73˜com/sun/net/ssl/internal/ssl/ClientHandshaker.classPKö™H'«æÍ'å¼ 6^/com/sun/net/ssl/internal/ssl/SSLServerSocketImpl.classPKö™H'Fû«|0 (§4com/sun/net/ssl/internal/ssl/Debug.classPKö™H'À[‰ 0y9com/sun/net/ssl/internal/ssl/DHKeyExchange.classPKö™H'ƒ:–u¿ ?+`@com/sun/net/ssl/internal/ssl/X500Name.classPKö™H'}Íð‘Á j1xKcom/sun/net/ssl/internal/ssl/DerInputStream.classPKö™H'ýÑ;ô1˜Vcom/sun/net/ssl/internal/ssl/DerInputBuffer.classPKö™H' Ôå ˜+2[com/sun/net/ssl/internal/ssl/DerValue.classPKö™H'WLýÊ&‘hcom/sun/net/ssl/internal/ssl/RDN.classPK÷™H'9}u{&¯lcom/sun/net/ssl/internal/ssl/AVA.classPK÷™H'çy2•«O 3~ucom/sun/net/ssl/internal/ssl/ObjectIdentifier.classPK÷™H'$#CÀ›2Š|com/sun/net/ssl/internal/ssl/DerOutputStream.classPK÷™H'l€Æé-ùƒcom/sun/net/ssl/internal/ssl/DerEncoder.classPK÷™H'µ¸5&)…com/sun/net/ssl/internal/ssl/BigInt.classPK÷™H'"Ö…†² +Œ‰com/sun/net/ssl/internal/ssl/BitArray.classPK÷™H'\%2™ ñ1kcom/sun/net/ssl/internal/ssl/CbcBlockCipher.classPK÷™H'($b.Ô‘com/sun/net/ssl/internal/ssl/BlockCipher.classPK÷™H'Q½Cž)7“com/sun/net/ssl/internal/ssl/Cipher.classPK÷™H'!d»ûi1,•com/sun/net/ssl/internal/ssl/HexDumpEncoder.classPK÷™H'ÿ_‰,Ì3†˜com/sun/net/ssl/internal/ssl/CharacterEncoder.classPK÷™H'2ô¯„m G,³œcom/sun/net/ssl/internal/ssl/DesCipher.classPK÷™H'‰ÏÞÑ-zªcom/sun/net/ssl/internal/ssl/Des3Cipher.classPK÷™H'çj5Ü ¤)å¬com/sun/net/ssl/internal/ssl/RawDSA.classPK÷™H'ÕϱFÿƒ-ºcom/sun/net/ssl/internal/ssl/CacheEntry.classPK÷™H'²_8vT !1r»com/sun/net/ssl/internal/ssl/SSLSessionImpl.classPK÷™H'vÑfnóP,%Æcom/sun/net/ssl/internal/ssl/SecureKey.classPK÷™H'QŠåö»FrÈcom/sun/net/ssl/internal/ssl/SSLSocketImpl$NotifyHandshakeThread.classPK÷™H'ë5&ŒÛ2ÜÊcom/sun/net/ssl/internal/ssl/AppOutputStream.classPK÷™H'©V/7‡4<Ícom/sun/net/ssl/internal/ssl/ByteArrayLexOrder.classPK÷™H'çÇŸ [4ÕÎcom/sun/net/ssl/internal/ssl/ByteArrayTagOrder.classPKø™H'ÒUÐO7T 2DÐcom/sun/net/ssl/internal/ssl/PreMasterSecret.classPKø™H'ÐȘ·d®,ÛÕcom/sun/net/ssl/internal/ssl/RSACipher.classPKø™H'A´– Ù<™Úcom/sun/net/ssl/internal/ssl/ClientDiffieHellmanPublic.classPKø™H'®V×5|7#Þcom/sun/net/ssl/internal/ssl/JS_ConvertBigInteger.classPKø™H',õ£>.»/½ßcom/sun/net/ssl/internal/ssl/JS_PublicKey.classPKø™H',€9%0À0Hãcom/sun/net/ssl/internal/ssl/JS_PrivateKey.classPKø™H'(¶Šï´d/Öæcom/sun/net/ssl/internal/ssl/JS_Signature.classPKø™H'¤šŒB0çîcom/sun/net/ssl/internal/ssl/JS_KeyFactory.classPKø™H'Ÿ£¹sæ^ 6^òcom/sun/net/ssl/internal/ssl/JS_KeyPairGenerator.classPKù™H'ƒ-StXö6¨÷com/sun/net/ssl/internal/ssl/RSAGenParameterSpec.classPKù™H';V“úÈ6dùcom/sun/net/ssl/internal/ssl/JSA_MD2RSASignature.classPKù™H'è‘\ÛQ[.Âûcom/sun/net/ssl/internal/ssl/ContentInfo.classPKù™H'=’ûÈ6ocom/sun/net/ssl/internal/ssl/JSA_MD5RSASignature.classPKù™H'bnÅüÌ7Îcom/sun/net/ssl/internal/ssl/JSA_SHA1RSASignature.classPKù™H'*Øæ¡Ì;4/com/sun/net/ssl/internal/ssl/JSA_RSAPrivateKey.classPKù™H'#÷³:p23] com/sun/net/ssl/internal/ssl/JSA_RSAPublicKey.classPKù™H'ª¯#õÐz4.com/sun/net/ssl/internal/ssl/JSA_RSAKeyFactory.classPKù™H'„<öº¾ú:`com/sun/net/ssl/internal/ssl/JSA_RSAKeyPairGenerator.classPKù™H'²œÜƒât7†com/sun/net/ssl/internal/ssl/X509TrustManagerImpl.classPKù™H'YOYOB]5Í!com/sun/net/ssl/internal/ssl/X509KeyManagerImpl.classPKù™H'±°ˆÊ98r(com/sun/net/ssl/internal/ssl/KeyManagerFactoryImpl.classPKù™H'åW=ödÐ:¢*com/sun/net/ssl/internal/ssl/TrustManagerFactoryImpl.classPKù™H'ØÑ-,Ú+1n.com/sun/net/ssl/internal/ssl/PKCS12KeyStore.classPKù™H'¢›×£°®7§Ccom/sun/net/ssl/internal/ssl/PKCS12KeyStore$KeyId.classPKù™H'p›¶Ü3¼Ecom/sun/net/ssl/internal/ssl/ParsingException.classPK ú™H'ùFcom/sun/net/ssl/internal/www/PKù™H'ªÖÆX 04Gcom/sun/net/ssl/internal/www/NetworkClient.classPKù™H'e¨á~02Jcom/sun/net/ssl/internal/www/ProgressEntry.classPKù™H'!»„>¥/©Mcom/sun/net/ssl/internal/www/ProgressData.classPKù™H'^®ˆWl: 0Qcom/sun/net/ssl/internal/www/MessageHeader.classPKù™H'qÒ±er/ãWcom/sun/net/ssl/internal/www/HeaderParser.classPKù™H'ÀA¬ÿ0¥[com/sun/net/ssl/internal/www/MeteredStream.classPKù™H'Öûs§z 0_com/sun/net/ssl/internal/www/URLConnection.classPK ú™H'#dcom/sun/net/ssl/internal/www/https/PKù™H'ÛÕ9LJ Ý4\dcom/sun/net/ssl/internal/www/https/HttpsClient.classPKù™H'›5 (3Eqcom/sun/net/ssl/internal/www/https/HttpClient.classPKù™H'â Á(0& 3Ûƒcom/sun/net/ssl/internal/www/https/RegexpPool.classPKú™H'Éå]¹5lŠcom/sun/net/ssl/internal/www/https/HttpClient$3.classPKú™H'ÿ¾„Š«Ê5ˆŒcom/sun/net/ssl/internal/www/https/RegexpTarget.classPKú™H'§ÞÑ»5–com/sun/net/ssl/internal/www/https/HttpClient$1.classPKú™H'Ó¾ï±#5Êcom/sun/net/ssl/internal/www/https/HttpClient$4.classPKú™H'uï Ö77Þ‘com/sun/net/ssl/internal/www/https/KeepAliveCache.classPKú™H'9]6#à½5–com/sun/net/ssl/internal/www/https/KeepAliveKey.classPKú™H'Í 4óä5\™com/sun/net/ssl/internal/www/https/ClientVector.classPKú™H'ÿ ´Fæ9²com/sun/net/ssl/internal/www/https/KeepAliveCache$1.classPKú™H'ÞõÍOÏ5_ com/sun/net/ssl/internal/www/https/HttpClient$2.classPKú™H' ìó¥ ;¢com/sun/net/ssl/internal/www/https/ChunkedInputStream.classPKú™H's§eÛIâ8m©com/sun/net/ssl/internal/www/https/KeepAliveStream.classPKú™H'ùïC’/­com/sun/net/ssl/internal/www/https/Regexp.classPK ú™H'&¼±com/sun/net/ssl/internal/www/protocol/PK ú™H',²com/sun/net/ssl/internal/www/protocol/https/PKú™H'¥° £žÖ9J²com/sun/net/ssl/internal/www/protocol/https/Handler.classPKú™H'u”ÊÆì,DO´com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection.classPKú™H'9 ¶èlF‡Ècom/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection$1.classPKú™H'ÞzÛÏEãÊcom/sun/net/ssl/internal/www/protocol/https/BasicAuthentication.classPKú™H'.[Ý/C1Ïcom/sun/net/ssl/internal/www/protocol/https/HttpAuthenticator.classPKú™H' QóÓj¶ FÐcom/sun/net/ssl/internal/www/protocol/https/DigestAuthentication.classPKú™H' %Äè1B]×com/sun/net/ssl/internal/www/protocol/https/EmptyInputStream.classPKú™H'™ë PûFµØcom/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection$2.classPKø™H'zZh“$Ûa0.classPKø™H'Û÷›mÜa1.classPKø™H'f|¸ˆ¢ ¹àa2.classPKù™H'‘ÃØ*wæa3.classPKù™H'ó  Ù×éa4.classPKù™H'ÌI N…xæëa5.classPKù™H'MŒ¦˜ â¡îa6.classPKù™H'&ËÀèøa7.classPKù™H'“O»ª… "ÿa8.classPKù™H'-†Pß·éÝa9.classPK÷™H'ã`• ŠÊaa.classPK÷™H'ÛJKRr…•ab.classPKø™H'‘ËŠÀ ö=ac.classPKø™H'D.¦•’3ad.classPKø™H')`fÞ‚‡ae.classPKø™H'6É—3­Þ!Òaf.classPKø™H'æöÛ¹Æþµ,ag.classPKø™H'Õ÷,$O6±-ah.classPKø™H'(3O±qÂ6/ai.classPKø™H'Å¿%O÷¸ Ý3aj.classPKø™H'ÂÔ ÊBf 9ak.classPKø™H'Æê* jn‚;al.classPKø™H'†‚éH¢"<am.classPKø™H' ß³ „Øc1.classPKû™H'Ü8CtÐføÝc2.classPKû™H'&©,ô$þßc3.classPKû™H'Ÿ`Võ$(ác4.classPKû™H'šŽ)ˆŠÉSâc5.classPKû™H'}p­¸€æc6.classPKû™H'D-Á§aéc7.classPKû™H'L…»ÂÉÞëc8.classPKû™H'Ý<Ët%Öîc9.classPKú™H'ù…àÞì 1ñca.classPKú™H'å=“ÖÄSócb.classPKú™H'úظöjmMücc.classPKú™H'*à±ÂRíücd.classPKû™H'H[4ì]håce.classPKû™H'ë[y§ Õxcf.classPKû™H'˜9TF°Ucg.classPKû™H'ÄâÚ };ch.classPKû™H'ì”\‰»¼Kci.classPKû™H'¼»7üï<%cj.classPKû™H'&Ó…üº n-ck.classPKû™H'¥phHvb 3cl.classPKû™H'²IU 2L5cm.classPKû™H' qh û×?cn.classPKû™H'È*h¸® ºuIco.classPKû™H'“—•£ã¦ YScp.classPKû™H'ª…º» érYcq.classPKû™H'~CZ‘þ”cccr.classPKû™H'Þy^n‡\—lcs.classPKû™H'˜»Êê;GTuct.classPKû™H'ÎçSˆCÅ}cu.classPKû™H'ÜFqBû ƒ‚cv.classPKû™H'µœÂΕN Ô‰cw.classPKû™H'‚M;K>‹ Ÿcx.classPKû™H'¬Ø<þ—cy.classPKû™H'yÌ€€ô$…˜cz.classPKõ™H'÷‹6# -¯™d.classPKü™H'ã· ] ðœd0.classPKü™H'öÌM]­Ö?¤d1.classPKü™H'ª¹iã·"¥d2.classPKü™H'Þé‡õ;®d3.classPKü™H'û²· ޵d4.classPKü™H'¥øI‚ZO ̹d5.classPKü™H'(é^:àa\Ád6.classPKü™H'›Vã^]drÆd7.classPKü™H'½Úª¯ÅËd8.classPKü™H'„÷, Ðd9.classPKû™H'·ÃÖÓšbÔda.classPKû™H'LÏo òkãdb.classPKû™H'iïÕΘ Aædc.classPKü™H'‰W¦˜o"~ìdd.classPKü™H'š‡ô«H— #üde.classPKü™H'ÐèØâ} ç&¡df.classPKü™H'‚­æ¸¬ T dg.classPKü™H'v)ïI€!›dh.classPKü™H']o*Ôí Qdi.classPKü™H'|/-ÕÖJ£dj.classPKü™H'ˆì+¯æN ¯dk.classPKü™H'°»ÅË#dl.classPKü™H'05& 02(dm.classPKü™H'y묾7ô |*dn.classPKü™H'ù«I[» é/do.classPKü™H'ª”‘쌮 >5dp.classPKü™H'JPrsîœ ;dq.classPKü™H'ò-ص‹Ã$Bdr.classPKü™H'¸lÐyåCds.classPKü™H'NÇûÖë +Edt.classPKü™H'ÅxmÓ&LIdu.classPKü™H'’-£§"¨Ldv.classPKü™H' 1—“…Odw.classPKü™H'ЇäÙIGÊPdx.classPKü™H'©8WŽÕITdy.classPKü™H'à)5vL  Wdz.classPKõ™H'c!{´\e.classPKü™H'ٌ٬Ã?aea.classPKü™H'¶Y©º!beb.classPKü™H'Ä™I$E fec.classPKü™H''¶7K{ied.classPKü™H'êØ?ì¶®ülee.classPKü™H'P?pS8Ñèqef.classPKü™H'iÜ‹TG Vveg.classPKý™H'pçÈÑ¿=Óyeh.classPKý™H'f]v>v~.FVÁÆÃÀÉÀ"8˜54ÃD5|²ËõsóÒõƒKŠ2óÒ­Aâl6™y™%vŒ RΩE%.‰%‰I‰Å©®É©%™ùyz MŒ ,Îù)©Œ ü>™y©~¥¹I©E!‰I9@®àüÒ¢äT·LGaÜFÕü¢týÜüªÌœœDý¬âb}¬1(20] è| É äÉi8«Övæ@#d j€•r@•*µ2ä´´·3° ÔrEµX4"¼`+¸PK„+-ú,ïP8org/mozilla/jss/crypto/AlreadyInitializedException.class}AK1…_ºÝݺV+ˆGA=µ[4àUD„â¥â=Ý Ë”4)éVlÿ•§‚€?Jœ,boæð&óåMóõýñ‰ç8H±Ÿ¢—A ’t±ƒ4HG ê^Žú£©zUÒ([ÉqíÉVW'×d©¾8¹5^«rõÈ-)Ck]Þ¿z^“³aT }çJ-БÕOËÙDûg51L²±[úB?Ph·9\:_É™[“1JN YøÕ¼vòŸTœ¢ÅË„*oĺËÝ1×Àã|ƒè/]Ö¤ƒÆÚùµžñh+¼åà Ú[oÖÐ!bäLöšˆìPK‰+-Q‡º¶ì…*org/mozilla/jss/crypto/TokenSupplier.classPËNÃ0œ-¡åQÚŠ_€ EÇJ PU$qw’UHpìÈIàÓ8ð|‰r ‡JõaG³;;;òÏï×7öpÙ'#LóÅʺTö3ÓZ‰¼ªDì>ÊÚŠe¡}csK¸Ú.|”RrÜ8~V&±…_Îw1]¼‚¥M˜0]e†×M± U¤}çHÚÆÅ|—µä´[MYêŒÝM®Þá,åúÁÔìŒÒÿl c?è­ï OÃWÇ*éç³v_heRñåׄó-q7îz«jÃjH€Ð¾ ð‘ý×Âã1‚Ç=Ÿbß+¾pøPK‡+-ˆ÷L,org/mozilla/jss/crypto/X509Certificate.classmQMO1²*~ ¢b¼8h½x0Þ@LˆMÖOÝ2®…Ý.i»Füiüþ(ãì"ø{èËë›×yÓ¾¼¾Aaσv=¨3(6š]µF³7O‚GB‡ÜwFéðŒA}v ÷È[*ìj‡!’ög’E™å&üšLREô¿š‘’—8!µÔhÞ·ÚÉ,wž%ŽJ´e°ÞSûi ¹A”É~’‰*#µ»“ãÓ6§”²&T¢ëhI× Tˆt­MÑœ÷§¬¯äH‹˜ü+ÄæI¨QÑ´å´ÀOƒ!J—¹³‹oÑX Ç úýBWyþ{HIÉøxy&zÊù„ ò8yQQ$øÐZ.Ídìþg°2ý 0È–W¢ °D¬B¬DX “*xDlÀBŽ›°˜ã”s¬}éÛäò¬Ò^€µOPK¤+-ÉáÒXù‹8org/mozilla/jss/CryptoManager$InitializationValues.classÕV]pWþ®X²¢&¶ÜÄqÛ€œØ®½Žã$M¡àþ ÈŽíD–e’6$ëÕ•¼ñzWÝ]9qHÓü@ ô‡) $Mà ƒH§i_x†×¾2ÃÀ3 ç¬e'Z­/­¾sï9ç~{ï¹ç\ßþû÷P>ܪÐÎãHj3ahaœ c. #Œù0¾—Bør_áÕ¾Â7CøVW"ˆâ‘šZðH#6aã Ÿ`ø$Ãc ŸjD>Í£†Çž`x’á)†Ï0$ö3$#¸C<:À0A #<e8Èpˆ!Å0Æfb“Q<\DzøB:ƒÉP`xù(¶º EžžƒÅó çYwá"Ã%†Ë _ÁD_åÑ /"ÅK¼âež¾Âðf£ø6ë^g¸Šœ@}wϨÀýÝ=©“ê‚Úo¨f¾?ãÚº™ðŒ‡6wWÛX(@ÿ¿i˜­áqÝÔÝ'Ö%­¬¸/i™Ž«šîaÕ(Ò<–´ ®5¦šj^Ú»˜C ePæÔ¢áÆ5v¶‹škÙ‘¡Óš,¸:é¶È’‹2ÑÊŒa¹ƒÒÑlÝs³}Ìûd «Çg”ö¦«†~Fe¥·%âŽŽš¦´“†ê8µHÆ*Úš< óýE§Æ ¥WlÓéäH"=<4H9y”|5úÀ„-súi2Räôü NéÎég)£ãyéÞ#ÿ·”]ª dX>Üë;ݼd­ð{à.¿*’ï2V/ÝLÖ”>c«öb…¾™ô”·Åœª¹E[Ú£™˜¾œÀò eÿ¸i,zJzJ ã`&3a[ zVR˜Úõ{n{µOõöZõÕŽµU_õLMwjs|æ¤ÔÜ ÕR¹ÒµÎÉÅå+n0¤™wgé4F@,6ÎûÑ^®Ñ]T¯«RÄ´ÜI©j³2KõjiN!9+µ9úôÉoiÛX;)‚eRÔ8§Óº6gªó”]M¶éɽ¶k¾.{ÿû×G`àÿx²öÝkõ­Í¦¼à®üqPJ¾s zémº«Vþ˲ é )R…*UØ–jv)=›m9o-ÈLѼ“GjóV6í:îÜ»ŒÕÊØ©­ŒÝÊØY«Œ5ËØY¥ŒcuKQêÿÚ¨£¦Ÿ£YÉfî”Væu4×}ölÅ\pEcÁ-•'/—åÕ²¤®È“Ôhy’$oí ž½Ž{*O^*Ë ey±,Ï—å±²|ºÌû’Ç#¸õòäËeù|YÿzYžód ÖqsHóäÌS,H{M¹û•¦öRš%<èð°M%|œác 3ìUÞEË‘ÛØRB¿ò3l+!®Ô—°[‰m(AQbëJèQbëKèRb %t(±P J,RÂ%.a«k,¡•ídÂ] } ­Ûκ= í±ú·ÑûSoó’ðì"ÌÑ ˆP¸›p[páÚñ=táûèŰ?¡‹} ‘ÀÛØ÷1Œ?aÆA’cøÒø'&HfÄFL‰M8LòˆPpTôâ’ÇÅ0NˆÌ”BR›Ã,É9q†¸“ä³âMØâ\’§ÄqVÜÆñ.‹_âEñ¼*> KÏã»´gAAÏÜôºmЕ^ú°?èW>bA‚~Å úT9è—(èëé$?þð]ÙÉîã·‘yïKø…ô|´.á]ÂuÜÄ´³øí_`Ÿ]ºlóM`½òs´¾µrÔVŠWOºnõ»Oºîð»r.ºvø]ÛϺvú]%üb k—Ïÿ"<èÚãwý€ð¹@WÅïúkÂïÐëRç¹xW@kï/ÐÝ”¸‰ xóûœd­w’*Féq â:šÅ lWq”ôë¼7A—WåV?åsDyŽ(Ïå™ Êk5RîðSž J•(5¢JüøQüž¿TP¾Y#¥â§ü=Qþ(þH”¿»‹²–ת|'<ß:j·6â8µ[M4zmÿPK£+-«®ŒH0#org/mozilla/jss/CryptoManager.class¼: x×Ñ3Ú+ËkcË€1—e0Æ'Æ€Ã}ø`°…caˆ!)Ò/È’£pz¤G®¶IÚ\m ÷Uš6I ؉“@š”¤iÚ¦GŽ6iš£Iï¿iÚ¿M$Y­¤•´6¦ý¿¾÷Þ¼yóæÍõf×z惇êðÏ6¬·á"6Úp© Wڰņ­6ì°¡Û†›mØiC ϱa ϳá!Þ`Ãmø  Ù𸠵ác~M»%üº„ßð ï•ð> ¿)á ï—ð¨„Hø„„OJøm OIø”„OKø Ÿ‘ð»>+á÷$ü¾„?ð9 (á$ü±„?‘ðy _ðE _’ð§þL—%|EŸKøª„¿ð5 _·ÃT¸Ó³ÌaPÁ –Á| ,f°„Á*kÌ€»ì0““A%ƒf¸+ªà«9Äå0ƒ¯ñðn;¬…¯3øïqïqo­¸Á7í0ŽØa!ÜŸ p”I`’wÌ%pœ‡C †<Äàa^;‚?ÂÃGíб'œdð8O|‹{O0x’Á·œbðÏ>Í[~ÇÓàfð];¬„gí0¾— eð}&ùƒçüÁü˜7ÿ‰fÁóÜ{ú"ƒ—üÔ«ág ^æÙW˜ýÏyÙ«<û ¯1û×Y%o0É› ~Éà-ž}›{osïW|À_óÚß0î·Üûã~Ï›ÿqÿÃà<ñƒ?Ùa9¼k‡&ø3ÿÂàe¬C` ˸ÛdìÆe2ne°‡çb)ƒ2?‚dü(ΔыëdÜÅÀ—QÁI2öb±Œ»á2ö¡SF'˸%û±ZÆæÊx>æÉÁi2F™s ­2îãÐ"ãðžŒcðIÂû2~Š{ŸfðŸepƒ‹yÙ%ÜûæÈøø—ŒW2îKðW¯B”ñZœ+ã—±BÆëq†Œ7a‘Œ7c¾Œ·àoÅBoãÞí¸QÆ;p“Œw2ø*¯=Ì`ˆ8Ìzyˆ5ô0à¿Éx‚'N2îq¦ûƒ7°]Æ7q½Œ¿D›Œo¡CÆ·™äWÌà×|Þßð²ß2îw¼â÷8KÆ?0ø#–ÈøŠ2þ 'Êø.V"•Um“*«Ú÷x÷yëÞàîúÍ»ö(¾èŠL´'Vƒ»³Ð[úŠ×Oè’:Uõ®`¬_ {£j(Hse4 ï®ï] Þú=‘H}Kxp ê𽻕0ÑÌ5¡ñF‚ õMîžò-Jÿ@ÀUˆ®Â„ΧñÒYn íUxÓêÑ 7z<Å +]Þ ?ÔOÄU&ÄÚA:½‘ÈþPØßâ vy}{WhJÛªÁíbeÕŽf„jFÛìœÆËZ”pTíU}ñ#L©lËV,ó¬¨Ì¶ƒ©i&›nOb.5Ás«4™²šùÅRSÂq™jå™,ÍÖçd³å¤UføñÛ -&ëÿ3Ìöÿ+Fÿ¯mg%›(a{;Õ³™±ã¼œÜ¡®æ–3tF5:XßíSý”Ú8/%ìªâVrÇPX³ë’ÊÓìÒT£ª7 ^ % ­Þ@L‰h+×g¯Œç»!™cv4–‰ˆJcF>W>§8–Vd“éîÖØ¢3÷õ¯=oÎÏjÒã¼QéŒqÆ ¨•R£ñĪWsǨ´™¡2j¬v†Õ}D°I¤ÓxÆÏï ’i߸¹žAŽi F•pÐHߪ={«½¾HCC}禆¦=#É«³Ù™_9l ±r{¢ÙÎ7ˆIó|m¥™÷Ž*Âj"ÿ¯Ro±9’dªéLO­5Ú¾ý öÝÈ,L°Í½ÅµÞÕu&‡ˆY<¥ÕsïŒRØ|ZqF*¯«·‹hĶÒP)Ÿ­F˜°Rïä$e ˆ6¬pªg0uz›Z<Î9 N_j–¼§%ä§&¯%ŒD½Á¨–¨iœÏ–A(lmîØ¹ÕÕåiÛìv®rºë›HQ.wSs»«•*:WW׿®åÎî wW@qFCÎ@ÈëwÒaœuWØD°»ø”Ne„Üum—Fí§Ì¾^“2Ê9Ç©$È«Q³ìMåm[0¨„[<,m î#¿³ÙÕåT‚¾Ÿ|Èêuêö§Ñ)Ú•àîhŸ+µÉÄM]; §Ó1b<ž¦€1nOgW‘ÛHTh`’PÚdÂñhÑÎ…´º] *îXÿ.%¼…ÕBv0+«&n‡ ÞH_”iW$‰w#U<ÿÁÅXΖé Ç õ¥§-ÓËÇWÑÍw5=»#‰:#JÔòEº”È@(H{µ[õí zûI3³ŠgÅÒ°³»yg—«ÝÕäqí\Ì îNS´[S4ÍììÚÒAï' nÎ~Þp—B‘¬ ÆÃFo@õE ÞRìE“jSü†ÁÓM&·{B±°OY§²m[z:];[ºÚÝMÜÍév·lhr¯çÀ™Š•ƒ0pú•^o,uèÅBãèaå …¡ Âž®F#´v@!u}*EIw$®9“s %+i'GO8J”Þ]¡Xt”¸õúý®€Ò¯‰pò®˜ðrLKŸW%vÓMñnò«}¤;§Î°Ò« ãûHuw«J'+óÑëbTéŒ(1(þöõJëžÑäQ1¦Í㯖”öüŠ/ž·ü!%’¬|HÅJ\J:¹]Ñ4Æ®L ´| pçü˜7@ÓåÀ@ˆÔBRE¶„89.!gïUƒÚ šÛ"‘˜n ú=J˜ ‰ê¯ÓP$ŽëHÑ¥|vj62A_”˜Š”˜`+ yŽ«)*¥š[4gáÔ¶^u Ò¡©@Ø­©L°)Т“µEÖ&m+ÊÌ<QÁ£)²F®ñê'Aî$k–öñ…(x¡h«ñ…UÝ»¦è$Y̽M»m|Jœ,Y[¥¥ÃÄÛL3%ÓyÌ}rT&Y;L7Lf/L³íñ8IóÖ(GÆz½¾h,¬„ÛZãJ&Ä™ Üš•‹¨—™ãêTÂý›Ð»Ðã“ú÷ ÷úødâe!ŸGZ¤èjÐÜ%/ÒvÌI ˆñŒdŸK} ºdŒEÓz]1±ÏK.V\É+Rûµ Ò§“ÄÖèrt,'º‰É~ÒouŒqEq.A]š¡(%uÇd¢´:-ã¥K´8>Ãõ@K“VEœ>o,¢øî'æëk‹*ý›ƒš ²fôeÁÄÕáÓó*Ú£Sk¹]M^!TᤔñÑýåH¡7ÒÕ¾9d•#Z.ß MQN»8¨’èL^65dEªY„«£ÅM®aýmåb‰\\˜FhI ŸÅ¡ ó»Q*^ʤ£#dƒ4T"ÛÏJ¡ºƒÒM¤WUüT+íu…Ã|=T¤2ˆ_>6tJ:a‚‚ªüô 6U½á&séÕ¤Õ¼Ó¬HQN6}—'£˜Tq‰ój8²®ñ²çË™ëe!çó€jxê.¢°Û« &.Ø\žiO\ßE<Š;U§•Sú3Pí:k¹_ËQ‰ísƒÊhòö·C”›¹PŠ¿èÆÝz€«?üÞ»N jh§7.Åëëc®E\̵ô)¾½¬ÈDÙ_2F‰W6×ÍédvV1ÚÕÞ¦…Aás³ˆˆm«—ì 3sÌÊ–L<η>„…g^c#¬ø/ sJi§[mþ¦³dìecT½§Y9ZM|šǨO§g®LKo噳”ƒLŒœEOø™©~êhh0q“äW½nŠR„Jóqл¨a—,?I~»ãL7h®À,ŸÏ~½Bh…h¬ëmþ(kâ › º. úÇ ,ã‡Â±tnöA‘®×ñ%£±ô4ÚèMb ŠxÙeÓ〨ăRWúš,Ý;3®òÛ%©¢UÝ­D¢žµÜ³¡©ÁÄŵÄߤ¿’M3mUvÅèî¬3ÔÝ.Ç£ d•˜ETM Eý›ƒ0ã’‚ ^«¶WiãUH^Xá[%YÎN+ý!®ÂòãT ÆžX0…³“nè–‰W£%EOÉ®‚‹"fµq~$£Â-ˆèElÊ»¬Ñ°W«}öÑëYoüe(´?Q+NJa¹pŽ£¡*`* ,ƒ|°ð^¨½7iíZkç¿Þjã7°]oÅeZÛ­µ%¸×bÓ€Dã5†ñ7Æv¯6Œ-4n2ŒsˆïøCÛïM\OíB°a-Q, Ñ2’–ÿâp‘ðt‹Àj/¿˜ÄEp Xiõ)ÅE`ƒl]´Pä¿ÂëlÖ‚ 1šZ=-Õ#0»gZÁuÕÃp+¡fr»Dk#L´Ü E–û Ør–áDj'N'a™k3qµP;­æqXqòFÀÙãÀ!èQà(&ýÀ²×¦¼×îLŸxözŠÄ7Hgo‚S|+ãLÚ'ýLeüÝ' Çlª>±ö˜C¹Ü‡I–‡àJ„“°ò8 v†¼ºZ qz¨ó1„C¾S£w^$k4%VE%X–Õ²ò,« À²fZÖ€Ó²ª©]D¸•–r­ý(}&ŹġC‘Z â,Ãò yÊjõñj7í~)iŠšËAN‰Xgñ•„ŒO”ˆiB.™„ÜLBvA¾e Zºa–e+”Y¶AåXhée–°†phþlËN¨ÂÃ?u›-Ô,F¾p.¢ˆZ’tý ¥öȧèË£0Áòíq2iýZ:ò'à}ýȱZtX«„‹3Bß%Ò MI/É$ýH/N*Ò©“ÚˆôŠ´“kÔ–=D})|hÂøšLÒ¿¥.Ó,…øùñ&+ÍâåIÉ›t/¡ ®†óŽƒzÛÉámdéP{M†W[{ Ïzä[·ƒÃºŠ­ç‘¼W ]×þEº×®¤Å{È*ÞÐ让{ö±ŸúÂĺ#ÛEÓ9‡AH¸Ä‹#°€n;Ab: Œþ/Õwž¹tÜ<’½l–BpXôA©eùŘm)†JÂÕÐübË´¤=l_Ä)úQƒº /×dKETiRÆåb‰H~¹Ó!§Ž3鯯¦‡Òl°‘DsH¢r ¥yJ•0ÝR–j¨¥q£¥Ž(¯ÆÙº^î§YÍÕ5( Cð JÀ…”@D†·†YÛmèІ·9 ´!ÁÛ(I³sèÖN…:­géâtÁ$á¯ôü r„÷À.ü& ÿ€áŸà v2ÍMþ%Âû0KøJrJjË ?ìU)R]& 0_aµ‹Ä ÉÄTª™á,×RAªeyìÕ5µGaË|f]v>v~.FVÁÆÃÀÉÀ"8˜54ÃD5|²ËõsóÒõƒKŠ2óÒ­Aâl6™y™%vŒ ,Îù)©Œ ’Þ©•.‰%‰I‰Å©®É©%™ùyz ­Œ ü>™y©~¥¹I©E!‰I9@Õ\Áù¥EÉ©n™ Ž0¸NF•ü¢týÜüªÌœœDý¬âb}l0(20Ý  èx ÉäÉi8«Övæ@#d j€•r@•*µ2ä´´·3° ÔrEµX4"¼`+¸PK‚+-…0wæ­ýEorg/mozilla/jss/ssl/SSLCertificateApprovalCallback$ValidityItem.class•R]OA=C»»l]¡"â–1¦l”M}…HÌ“ JxŸnÇ:eºÛì,$òsH5¡Ñø`«?Êxg!&6áåÜ;gϽs&gýþñ%<Ã#sæ,TÀ0î騸ᡊ ÷qÇÃLyXÄC©¾1,Õ—›iÖ úé¾TŠ=­ƒÁN¬àÝF£Š,_-´Û Oêѵ‘Úk2‘ù †r˜v£‹¼(ID*®µÐ “M™ˆ7»ý¶È¶x[‘hñ >–Z­¦iå{ó\¼ ²t«+ÕæñÎJïq†J+ÝÍbñZšµÞ6W²#óQ.úä(¦q«#ù§+ò°`Æ©{uFºÔn ®Ó„¡jVŠ'Ýàm»'bR>õ©µ .7ư~ý¡Çÿ:·³Â…W¢ŒA8f‚¤n̤ZTŠ˜j™¾W1Ix‹NkÄ—©NûßPög‡pü§CX~mû+ñ Ó„3°HyŸ0#ܦ3Ã,nžoªQ57[þ ¬/Gí‚<%|ï©}<"ýNX»PêŒJ?“ù»ÅÓfÈ`~oóð{pÿPK+-¸³¢qx Gorg/mozilla/jss/ssl/SSLCertificateApprovalCallback$ValidityStatus.class¥•írÛD†H'®“&ÍGë¤)M‚Úº)´…¦´(ò:‘%W’Ý8„â¨A‰,[´|”?™ir0Í áøÅ%p%”sd)Ý8 3 ãñ+=ïžÝ=»{$ýþׯ¿A\„Oº^¼øó;’oI¾!yLò5É#’¯H¾$ù‚äs’‡$H>#ù”d—¤E4IvH‘L“L‘œ#™$9Kr†d”d„d€¤Ÿ$Er”$IÒ‹òG*Û ðPK€Ÿ€z¦árfH20OwWHÞèƒYx3oÃ5’ë)Ø„·RàÂÕìÀŠé̬²eïÚÙVàzYæ·jNÃܺ¿ @Wf¶,ÀLFVêÍl­þÐõ<;»Õlfw¶«Íùùlqe~^rÁ‚L£™öHžíofµõ-§,ßsÓõÝà–ÇÅœ%1Ý´rZA”U䬰ŠýtgÈKªh–t†±’ؕղ¨È9N†Ha¢$1ðMMYÃaÆÂ&U£hK Ì2Š¢Äâ>†‰ƒ–Áô2Ó-¦ëš.@·Tßpp^©î7Ûʶ×Bf«EYgí<弌Sà8ã±+F Ç8Ð(ȌȪ˜cwJh´Ó6+EvÐÆeZ%C\B;-Ê2åBˆ¾ï4$Ïn6&.]q}GmÕÖ†i¯{˜ÔqîˆÊ¸­õžÎ˜&Åp?–M³héÌ(jªA“† ùm$g·ã ¢’×ô.EǼ˜a pâPCÜe0l¡}eª¸¨0<…tdY9–KŠEçnéPئ)¹C³FsY*c9ƒŽ9>x&£¡gê•ØWpãôxÒ’*–ÌeM—×øìÇÿ©-ž}(j\Qµ»jx0œ:àűQ‘¼¯£¹}žEÑ\¶†c¡kêXÄ\…묬­tÖ΄Á¤ö-IW¬Ž:=ØÕÙ!Žó†¡Ð#çÞw«vàˆ;;ú®íI¶ç­ÛÕíKT($z«Quò.UÏ@¼˜vñrå¦^2Ì(u<ø—Æ~'|@Ü 7x`vÐÂ2MÚÌsjŽЇ ;v³î Ðë´]ŠÙt‚¶0Øùvˆ-®®¸Òù®i6½ì¿/Z€Ûÿ½ÓT¼9pjˆÿc„xGöRá¾t§ðŸ °ˆô úixŸãIä%ŽG‘ó op| ù]Ž#¯s|Ùáø4òmއ‘ßáøò=ŽÇ8>ƒ|“ãW‘sO /s|¹Êñò‡#ÀqÇ'‘oq<ˆ¼Æñ1d…ãd•ã~d“ãr‰ã£ÈÇIä2Ç}ÈŽ{‘W9N 9îA¾Ãñdãnä»w!8¦Ð9Æ7Üàx ÿø•Æû.ôðŽ*"]`pnææžÃLe^ÿ²?¡'À{¨˜{7<Æ][E÷c¸õ¾†yÁëØsÈT&.œÞƒ 7ºç~†lºû\ìã îâS¬ÌïÑÝ‚«Ñ“x¥ z©ß3¸ôã~¯žÐÿ3·Ã5|2^“èÎÂkpúþPK+-\¼Òˆ8org/mozilla/jss/ssl/SSLCertificateApprovalCallback.class¥PMKA }iW—Öµ­ý zЃŽ¤) B¡èaEÄ[v;–Yg?˜™-ÔŸæÁà§Ai y ¼ä%y{yEdžè…臄Ø#”‡ÓÊÌEQ=+­YäÖŠÌ,kW‰ûóÓ‹X§UÆNŽ~ñ¬Õ"I¦ß8ãº6Õ‚uÌZ§œ=ܱV3å–‰cרÑÑ!ˆ«™$D“²”&Öl­´„þT•òº)Rin9Õž°ÿ÷蓜Lè&Uc2y¥V-Ñ—ÜÄÉ‚Ðû©Ny=Ä3«n¡¹œ‹›4—™#œýÿ<Âå?ù\r¼ñW· -VFa[>k¡»Ž„‡> ¼G¾n{ÜAçPK+-KEó¾?org/mozilla/jss/ssl/SSLClientCertificateSelectionCallback.class±nÂ@ †mˆ’Òô)P©7W#1Et8Ôý’º‘SçNº»0ðh <…¸´C×z°¬OöÿÉ×ÛùsØÀS,V/uoŽF‘E}P/׿HŒí”ŽžmW"d•û$„eÍ–öãÐ?˜FyÕº®„ÉÆŠ|ä/nM$M’²ØÙʈ4¦ýÞN‘Ú¾¥O—Ïš÷¦OûoÎwjp'1ªA… ê_„<ü°aSa–Œéß4A‘ú ò;PK+-#[ŠnâØ)#org/mozilla/jss/ssl/SSLSocket.classÍZy|Çu~³ ZQ¢DÊ‚Hê>HPÅC´N'¼$Ò¢HZ .*6 ‚K"À8$ÑI›£vçpëmí8‰Ëv.+ŽÊVâ3‰c·‰›4vçjš;m“æNÚˆýÞîb1»hëŸ:?ÿüv¾7ïš7oßÌŠxæÒÃP m‰"LJ˜¸˜”2)cRÎÄˤ–I“•Lš˜lcÒ̤…I+“6&Û™´3¹’É&;™ìb2Æ$Ädœ‰ÆdäÒ%&s sМ„£šã¨æ8 9·‡¾î¡oxè±È-ÚÜb»[´»Å•n±Ã-vºÅ.·ØíW¹Å+Üâ•nÑánÑåÝnÑã¥J{i3“&&íLÚè4“3LÎziÍx©…I+“+éF~5뾆É_0ùËr¿– ¼Žg_Ï£70ù+/5ÒMLnöÒvúký [~#Ͼ‘G·ð轉GoâÑ›yô6úÖÔL·òèo™üÏÞÆ>ÞÆ"ogò&ï䉿gòLþ‘y·3¹ƒÉ»˜w'“w3|ÞËVîb£w3ï}Ì{?>Àäƒ ?Ää^à½Ì»O¥è“Ï0ù,“§˜|É—U±˜RÅzÉ&ŸVÅRú¡*ª &ªé“ªXFϪb9“Zz@uôˆ*VÒ‡U±Š>¦ŠÕôqU¬c²žy™laÒ$*T±žQE3ý@{ö²•>zXxÔÏä }Iƒìmˆá!:¯ŠazZ‡éQU§/ªâe˜Ìª"ȳãL&ØÇIú‘*Âô¯ª8E_SÅ]dò)UDèyULÓWUå cô¬ ’ú†>AWÔ7ôŸ ž6…cM}Ñx:H%´àônAË¥™ÁtJžªÊNE‚Ñ“M`‡£'e¨–‚1-Õ1>žÐ’IL5`*–8Ù4»1‰›N%“MÉd¤)èh¡t"œš ¤‚©4Ë"°#:äªo8Ñ)¨º¾Oö88vJ ¥ Zcç‘t¦'&´ÄnVîcK¥õ}Ùç?7×盚ÇJu!ñ#EøùæübkïÒ©ðD8Liñx"v:é F"cÁÐTqHX‹¦$Í€p,j©ê9»÷å#W XhJKíί=TÛŽd'Šïˆ¿¸x~åUÆö-+À×ËdK¡‰ÂÖuù;/Cþÿ»ÞŠúybo.69Î]—©ó2¬ùîË qäeˆñ"1þYÓ;ë_Â+ý2ÄÕXŸg ”˜‰§bMǶoÛ)©ëÒ­ùÒ¦»Þ`t<9œÒºbÓñˆ–ÒÆ{Nÿ®Õ~ZýádJ‹¢Y±bSQE#…ë»ÂñI-1‹„C3ºÆÚÑÐ…ÖÒ%†±³†-Wýˆqø˜‡àˆ‰Otò³ O}Â̓>¾˜#ð<úHgf‡Gø˜?ÑY¤w.؉…‚‘x,‘Ú Û›³ƒ=áh8u• U^*bëŠk‚vÅ¢ÉT0š:Œ¤½ÝZ<¡ñvôœ iqÞñ¤ HÔ¾(2Û &“X‹úÃQm ==¦%†ƒc¨/+v,1&Ò©p¤éª(ƇÉêy²ØLjY󢉴›Ó2ÚÝmÞÙ2ÚÓÝÓ:ÚÕÙ5z´o¸wô`÷vdÍhosL­Õ§uµŒ6·ìÐçzŽ nÛ& ùò„rs+͹6}®€rµM Çß~ëè>ˆ÷ŒŒtŒv “‡ýz;­*"9p¸¿ßX[D"ëUZ§  t˜QfEZtOˆYkU©6Kb¥%¡Oµr^‘ô\¼>»Ï[sËìsú¬KÙÈç›Ó VXoæV®0¥Å8Dùí5²£kïë  º._ȸ7K'BÚ¾0—ù¦áþÀhwoÏhw `æ©y[K[µóIòB¶·‚«eA}¶ƒ Ú¬·yDZ`Á©Í±%˲`岸›ˆÍ‰)2Ú1080¿‡ˆÍÊ*S¤øz J´Q|9%l6Ö±D®Þ‹ìãÚbRòÖf… Ç’?m DàF\‹JCÙöD´i~(K€âgÚ{0×¢èÕ®14Lœ-¡HŒŸåša¡6¼Z”»3÷!A•9ЭMÓ›@«,Ðj x&ÂÑ`$|# WLÄðX!Aù¤Õçá sf 8 7Æ=Ñô4Ž&ŒzcÉ”Á¯’‡,ÃúÈÅ1ÆM‹wD§¡°°ŸÏ6KCÍr†pÈòg²áÛ˜«ÂèÒ`Éøˆ è˨;€ÄÉ<3Ùv’3«êh8<­ÅÒ)ceÆg2MŒ‡CñX· Î)°NjÆíé ~ÈVNfÓÕ‘4ø8'óvßÔùÌìVÃí‚°œµÊp·¸ð¸~1K&qH Zjýs ut£çþšËŠëÓ‰Øã ¯*t„#ÉŽÛ'ŽUGrYgMŽNEcg¢¼ýÒübçmkÆpSœéˆD¬â’ÖÌm½¼Ë#¾².ûÞˆw½ˆŽ­Fײ×aݼwI|N¿ôÛ)ÞùoKhv/rWBãúKáBt(·… m<&½ÊÀÓ±ÓšÕ|Vx¾\U&´ÒZ2e”uG:5‰8óx±ž³ñpb¦kR M™Já„&+-ÏãYݧˆ’‹³ÊΦŒ>¦=cÕNVriŽŸÐð*hÑ/Ÿ¹ÖG©máph*ª705ikO•€š6nKAÏ‘OÒÚ“ªdÁÅ1¢Ì, š/;Ëë[I[ßJÚú–CS¦3^£­u%åÖ•Ìk] ““éÔ8^`½ø±YœM¥Å0 µ•Ôƒ*Oæœ.Jê5Øq:Ž=Ækp:Ã|t-4¾D¢è²Q¤©œì!½dàh"ÌSžTÌèh¦x04ÉuZTz†åi µÑf"ò“ÂÿŒ‘"Zèûúsý›þW†úwyXƇ™ Mû‘†þÍu³Í…}/Ñ ÔèW°{Ï¡žž§-ôU,ÿy”Æs´üÝ~}“†ðº°´cXè(}N¡Õ¦`ËžÀÏ› ¾ Ëåí쿼oñ¹7g(ž·b†‚¹ut¢ M6ÿ‹uü 븄uÌQ3ÞãVŒÛÁÛ‰¹=h4ûÑ @WŠ[TÒ?adÔ°¢—Z9üŽ ƒ]Žï x;Tª¬~±óÜ/ôäg¨×©q3¹ÅM6wËèYë•ɹÛ_“¡«ÊŸ„»,å-T.®°”×ê‡ÿÙ~Åštj>L¥â!ISðŸd‹¸=àT~n·¹õå»urû4Ü~^Òt‰V¦|º,þÏ)•1C¹ÃRð !j  l‘¯¦›û³ÚžìkÎÙ-á`b }Ät¸Ælåå©å8*ñ•Nñõ¹}ãµô ‡ãuÅœ–*!½ž>\XúðGÒË!½>šf+‡Ùá4Þh s#Ü@_lÒÝYá‚SŸÇi°s æG)äQg§l–Ñæì¶7ç¥k«ÎaÛu¦íRØ>æ4ü{(·:6Y{t+O"Ü_·]¤mœWô—콇|üJÖf¨ï1jØÒøWè&EÔ2;CSwÏ}/WV¹ÛŠ»QÅhDâƒT!î¥e6ćh…¸Ö€×$Þ ™ýhqF:6¡a±×EèùufJféGðJÊö*÷ZÅm½þ’ ½ÊñZ(·R©òV[özñBÙ³wµÕ…6šï§×ìB×u¾fwbYw@ç@Ñwú:g~ò( 6‡éK¦òFd¼Ät¸¿I¾Þéð98ü²M{ÀÒÞ­ßr‰®X\Vs;-ª½Ü®{ÈSz¹J.ÐIDZ)¾ƒÍþ.-Ås™ø¦Íä •Í f6Ëý\@³4æŒg{{IJ¨Â¿±%´\\Cÿœ×£34pBÎÜœ#·r¿dÍË?+±•{¹Ð,kñoM ¥Û4î4» )¯µ­ð0=ZDYs*/r¥­dŽä•ÌQpJ^Úö·À\³¤l\R„8VÔĨÓDLìsš@\#Ž\yù8¶H™3k.Üoº©XQcŠ£H _-TÆl«•Ë×Ò¿8òqd ¿ag…P@’pF鋿û·5¢¿Ñ¼†`ƒ&r*ôr߃†±W¿Ýåú¼­Ó9ÙΠè¡÷g¿Àùsȇ t\:O9å÷C~Ÿt(üó&É7w%­€-O[°uP²EbÒv^°õSô5[Úþ­”CfwF{Qú˜¹ú[ÌÕ¼H ¸ïíèo\²1CûŽ6âUÊP>8¤–lÈNÉP7ðú,6ð&g(™; ýX )£2/â*ø)Z®|šÖ(P½ò(5+ÑåqêPž ^åI„+Ú.Sμ&‡l;—”K åÅž×òoAÊ1(µ× ¸NÊÏ™„ÓÄYªPÎH9UpåŠßãîÍ27ô6ÜËËÿPK  +-X†©å=+ ¶org/mozilla/jss/CertDatabaseException.classPK „+-ú,ïP8 ¶.org/mozilla/jss/crypto/AlreadyInitializedException.classPK ‰+-Q‡º¶ì…* ¶sorg/mozilla/jss/crypto/TokenSupplier.classPK ‡+-ˆ÷L, ¶§org/mozilla/jss/crypto/X509Certificate.classPK ¤+-ÉáÒXù‹8 ¶=org/mozilla/jss/CryptoManager$InitializationValues.classPK £+-«®ŒH0# ¶Œ org/mozilla/jss/CryptoManager.classPK ¤+-#ûä;* ¶Y!org/mozilla/jss/KeyDatabaseException.classPK ‚+-…0wæ­ýE ¶…"org/mozilla/jss/ssl/SSLCertificateApprovalCallback$ValidityItem.classPK +-¸³¢qx G ¶•$org/mozilla/jss/ssl/SSLCertificateApprovalCallback$ValidityStatus.classPK +-\¼Òˆ8 ¶k)org/mozilla/jss/ssl/SSLCertificateApprovalCallback.classPK +-KEó¾? ¶Ä*org/mozilla/jss/ssl/SSLClientCertificateSelectionCallback.classPK +-#[ŠnâØ)# ¶ß+org/mozilla/jss/ssl/SSLSocket.classPK Œ;ldapjdk-4.18/mozilla/directory/java-sdk/ldapjdk/lib/jnet.jar0000664001003300100330000000570307105072032023420 0ustar viveklviveklPK0–H' META-INF/þÊPKPK0–H'META-INF/MANIFEST.MFóMÌËLK-.Ñ K-*ÎÌϳR0Ô3àår.JM,IMÑuª é)h—æ)øf&åW—¤æ+xæ%ëiòrñrPKª£ÝlDDPKГH'*javax/net/DefaultServerSocketFactory.class}‘_KÂ`ÆŸw:—Ó²´?æ4ûw¡I×F•0º0‚.ç|ƒ•m1§Ø'貫îúu5(èô¡¢ó.IÚÏ9¼çùsà|~½} ‚ Š 4yk*¢ˆ«  II&±ˆY!)! B2 ‘Rù‚!WÒËk£oTmîU›Üís·é˜7Ü«1D©H­¤ÿc’E•\{G&ä°Ývy·[›ÎjÓêÛ·lË; =Žœ6gPO&¿ó,Çî2¤–ÍO{·-îž­•³ãÍë†é9îý®hNdÓé¹&¯[—6]nx|ÜÍ ¶°œª~ö;…aiââ Ûâ}Žù•Ñëxf3F¶ u¬Óù¢ŸPºh"eŠŒ¢¼ãC~¥„a…4<>æ0GwÖ j!QŒ¿CºÔ|Ä^BöG,ýYðç0?7é-BQ À¼%L>…ÈôÜ‚ì›ø!+>fÂèót•r ÙoPKÿíÅpe°PKÔ“H'$javax/net/DefaultSocketFactory.class•RIOÂ@þjqßAÄ%¨ÁƳKb\"‰Ñjâ±”‘TpjÊàò¯Ô ‰FOžô?ߣRÁ„¾y}ï[¦é{ûx|AÌiHj˜ÖÒ0£aVGºuQUУ Ázô+T0¬`”!˜^8a˜OW¦Q6EÑÈI×ÅÕìB½'¸4rŽUâr•a¸)‘Ö› ~ ²›…‚Ë+•æÆ™vô”·˜nÃ|¼%™œ6[ ÛXi׃rÃk¶°åChË)p}çÆâ—ÒvD…!¶o ~P½Ès÷ÈÌ—iÜ_Û5-鸷ËÊ—49§êZ|×VŒˆårSò:aÀ‹¶#{øíLƾË3Ä¿;Ç¢$œk±çTä/EBÍo<Â6?3«eÙp†‘BÃI„h#Õ£Vô+¨ŠÓÉTw±†ð= “„a¯ù@8…>Z[EM‘ENý ӥɴ;¿† ¯Ð[ÐÓ|i稫‚£umf(TC§_þúG>Ô*ºË¯}ö´!ïk”räŸ`Ý/~o'¨ þ PK«>$ØÛPKГH'#javax/net/ServerSocketFactory.class…TkOQ=J·]W å!‚*E·EZ@|11<’ÆZLJLø¸l/e±ìšÛ[„_ÄW„Dˆ$’H¢‰?Ê8w[h…Š»ÉÜ;3gg6³¿~ý†vLb.„§¦4Lk˜ÑðXì†'žix®#ˆ¨ŽèÑFo˜DŸN¡ý:4ÜQê€8†”5ˆ Œ”›nÜ5ðzÍdnËÚ±2eË-e R8niž!^7ïf\.3.v¸(xö.—-[zb0ífò=à™­g¸Š$È™½Á;MÞ†3Kâu±(x¥2ÿï˜qóz»Í ÊÅ3ôµÂQ»Á—ŽëÈW ¯Èô¥]›”ŽçVºrŽËóÕíu.V­õ2¹#-Rüw2-ÌiDõ ^UØ|ÙQÙÃ…=WnréØÔ˜­Ò'Æj¿F‚j$Z$cˆÚ‚[’7û´ Oä­mE«Äå"ß°ªeYSÞÒX­yz|BŽ—É®\R'æWh2Œ^±ä=¹ìUÝbSÐp’÷|•¬„ðCw°²¾ÅmyQÞ7­n ïSmÌ1ŸmšØ¦[²M4&^gÕ»ñÃÐ hØu%§ hƒ®6n!µ `HB=AÔþ~Ÿ´ŒÎŽÔ1ôÏt¡ž|2ÎQ(-¥RÐÚÂ6:£©täNѱ6ñÝÇ0Îj)è üŸ®• 0<Â=²Œ)…Î6ß»fn¶4ëmIWgù‰ÉCtþ@˜ä>Œ(;Áíµ#t¾I}?Ehí·ŽIï#˜:?#üEäÄ»~êX¤.—È“#ߦð޼¦?¸‡PK¹(¤±i¯PKÔ“H'javax/net/SocketFactory.class•T]OA=SJ—®«@ù±´h)Ò*â' !(­å¡@ƒËv( eÇl§¿ˆW„Dˆ$’H¢‰?Êxg·ÒR‹ »ÉÌÜsÏ=÷ÎÝÜýõûë74a“-x®aTÃ# ckx¢á©†g^h×B‡Ž°ZšÑ©CGW˜–n¢{th¸®Ì^wpS-1÷5Hùž´:=Ä H0t&†2ëæ'3]4B:']Û)Œ3ôUàí´Ãe:'¬ .gMK w‡¼M‰¡%†ÁÄ¿‘µb3E³T"vW#Åßm€ÏUªYI`²±Ê›£e:Ÿw9ekŸL\‚<}ù¡ Û±åK†àŒÈsýõ¶Å?J[8%†ÖŒíðlys…» æJ‘Üí šÖûŸöGÎ)E¤9Qv->k+ÅpnÇ‘k\Úc)É8CÔ?xºqÒŸ“a0,—›’û(ƒ¶*ܬ¹©Ê/pùНšå¢ô÷ts³@ž¯p[¤çæÏ®H7¬»C’rV”|MP¬JÉ D)}’ë —¡­J˜_Yç–ü›ÞƒÖ\±å·3zöA Gl9oDIÖdêñ:"Bª®±jÏ+÷­#ô\ðQ¨-ÔQ @; ZÔìaêÑT£Ivœ¬(íŒöæä!®|¦M­!|K¡4»$¥¨£4àÚ#É#´íeŽÑ¼<ü퇸zâKÐ<?å§ 2¤p‹AÏ ·ÅÃú`L)<äv-B?žè«Ÿ'[åÛGä'FöÑúaZwaDØ®- õ]òû1¡0¨òÓ]„’§'ÄߣȵgäìÎÝT?°HÕ,‘çù–(—IÞ¤×Ρ?PKk꽃#PK0–H' META-INF/þÊPK0–H'ª£ÝlDD=META-INF/MANIFEST.MFPKГH'ÿíÅpe°*Ãjavax/net/DefaultServerSocketFactory.classPKÔ“H'«>$ØÛ$€javax/net/DefaultSocketFactory.classPKГH'¹(¤±i¯#bjavax/net/ServerSocketFactory.classPKÔ“H'k꽃#javax/net/SocketFactory.classPKÃê ldapjdk-4.18/mozilla/directory/java-sdk/relnotes.htm0000664001003300100330000004361407105072030022151 0ustar viveklvivekl Directory SDK 4.1 for Java Source Code Release Notes

Directory SDK 4.1 for Java Source Code Release Notes

Last Updated May 06, 2000

These release notes contain information about:

For the latest documentation, see the Netscape Directory SDK 4.0 for Java Programmer's Guide, which is available on the iPlanet Developer Documentation site.

Reference materials for the Directory SDK 4.x for Java are produced using the Javadoc utility. They are available in the /dist/doc/ directory where you installed the SDK or online at:
http://developer.iplanet.com/docs/manuals/dirsdk/jsdk40/Reference/index.html.

If you only want the Directory SDK 4.x for Java (not the source code), you can download it from the iPlanet Developer Downloads site.



What's New in Version 4.1

The Directory SDK 4.1 for Java is a bug fix relase. Please check the list of Bugs Fixed Since Version 4.0. The following new features have been added in this release:

  • A new class, netscape.ldap.factory.JSSESocketFactory. It implements the LDAPSocketFactory interface using the Java Secure Socket Extension (JSSE)  intefaces as the SSL provider. A JSSE implementation is not packaged with the Directory SDK classes; you will need to have one in your CLASSPATH to be able to use JSSESocketFactory.  A reference implementation of JSSE interfaces is available at http://java.sun.com/products/jsse/.
  • A new interface,  netscape.ldap.LDAPTraceWriter, enables logging of LDAP trace messages in environments where an OutputStream cannot be used. The interface is meant primarily for integrating LDAP tracing with the servlet log facility.
  • A new method setConnectTimeout() has been added to LDAPConnection. This method allows you to limit  the amount of time that application code waits for LDAPConnection.connnect() to establish a connection. By setting the connect timeout, an application can avoid blocking for a long period of time when a Directory Server host is down or unreachable.
  • All base classes in the netscape.ldap and netscape.ldap.util package are now serializable.


Bugs Fixed Since Version 4.0

The following bugs have been fixed since the release of the Directory SDK 4.0 for Java. iPlanet bug numbers are shown in parentheses.

  • Bugzilla 28001: Parsing in LDAPUrl(String url) ignores attributes if DN is empty.
  • Bugzilla 28005: Exceptions thrown in connect() and disconnect().
  • Bugzilla 13546: JDAPFilterOpers throws StringIndexOutOfBoundsException.
  • Bugzilla 16514: LDAPAttributeSet.removeElementAt() doesn't remove the attribute completely.
  • Bugzilla 34326: LDAPDN.unEscapeRDN() removes all /'s - not just the escape characters.
  • Bugzilla 29262: LDAPSearch doesn't apply base64-encoding to to nonprintable DNs.
  • Wrong user DN supplied for referral on bind operation. (364869)
  • 4.0 LDAPMatchingRuleSchema not binary compatible with 3.x.  (365423)
  • LDAP JDK does not properly abandon operation. (341439)
  • RDN.equals() assumes case-insensitivity, ignores multiple values. (365574)
  • authenticate() with bad password does not throw exception. (366578)
  • Should provide DSML option for LDAPSearch. (368416)
  • Incorrect signature for LDAPResponseListener.merge(). (364775)
  • MS JVM throws LDAPSortControl runtime exception. (365574)
  • Need new method LDAPDN.equals( String dn1, String dn2). (365575)
  • Some 3.x LDAPSchema public methods are protected in 4.x. (381574)
  • Server using VLV for non-search operations - 'Critical extension unavailable' error in log. (382605)
  • LDAPSearchResults.getCount() returns wrong count. (355336)
  • LDAPCache.cleanup() throws NullPointerException. (388736)
  • LDAPConnection.read() doesn't return subentries (387722)
  • LDAP SDK 4.0 causes NAS crash. (390128)
  • NullPointerException in deleteThreadConnEntry(). (389228)
  • LDAPSchema.getSyntaxes() missing (I-D conformance). (388463)
  • SASL bugs found at CMU. (391585)
  • LDAPCompareAttrNames not consistently case-sensitive. (390382)
  • LDAPEntry throws a null exception when reading non existing attribute (388577)
  • NullPointerException with Malformed Filter. (390249)
  • LDAP objects not really serializable. (356821)
  • LDAPSearch -l option does not work correctly (393676)
  • NullPointerException in LDAPSearch (387453)
  • java-object-schema.conf is not packaged with SDK. (390154)
  • JNDI SP: LdapContextImpl.reconnect(null) throw null pointer exceptions (383788)

What's New in Version 4.0

The Directory SDK 4.0 for Java provides programmers with the tools to develop directory-enabled software.  This release includes:

  • Application Program Interface (API) updates to match the newest LDAP (Lightweight Directory Access Protocol) internet drafts
  • an asynchronous interface to LDAP
  • a new SASL (Simple Authentication and Security Layer) API
  • the Netscape LDAP Service Provider for LDAP.
Additional improvements and changes to the Directory SDK are listed under Bugs Fixed Since Version 3.05.

API updates

The Directory SDK 4.0 for Java supports these changes to the LDAP API:

  • Sophisticated client-side management of referral authentication using the LDAPBind interface.
  • Dynamic registration and instantiation of server response controls using the register and newInstance methods of LDAPControl.
  • The separation of the constraint class into LDAPConstraints and its subclass LDAPSearchConstraints. LDAPConstraints contains only those methods implemented in the interface that apply to all operations. LDAPSearchConstraints is unchanged. All LDAPConnection methods that used to take LDAPSearchConstraints as an argument (except for read and search methods) now pass LDAPConstraints instead.
  • When using LDAPConnection for searching, retrieval of server response controls is now handled by LDAPSearchResults. Although the SDK is backward compatible, you should call LDAPSearchResults.getResponseControls() instead of LDAPConnection.getResponseControls()when writing new code.
  • LDAPConnection.getServerControls() now automatically parses controls. As a result, calling parseResponse() is no longer necessary.
  • Support for transparent failover connection policies. The available policies are: (1) serial, (2) parallel with no delay, and (3) parallel with delay. For more information, see LDAPConnection.setConnSetupDelay() in the javadocs.
  • LDAPConnection has a new method called reconnect(). This method first disconnects and then connects and binds again using the same parameters and mechanisms as the original connection..
  • Support for connection pools. For more information see netscape.ldap.util.ConnectionPool in the javadocs.
  • The addition of LDAPInterruptedException, which is thrown if an LDAP operation is interrupted.
  • The addition of LDAPProxiedAuthControl, which can execute operations, using different credentials, without rebinding.
  • LDAPConnection now runs as a daemon thread. You no longer need to call System.exit when terminating your program.
Asynchronous API

The Directory SDK 4.0 for Java provides an interface called LDAPAsynchronousConnection. This interface contains methods for performing LDAP operations asynchronously. Instead of blocking while waiting for a response, methods in LDAPAsynchronousConnection return control to an application before they complete. For more information on the asynchronous interface, see "Using the Asynchronous Interface" in the Netscape Directory SDK 4.0 for Java Programmer's Guide.

SASL API

SASL allows clients and servers to communicate securely. The API accomplishes this by finding a common authentication scheme and facilitating a series of challenge and response interchanges between the client and server. If these interchanges complete successfully, the client is authenticated. For more information on SASL see "Using SASL Authentication" in the Netscape Directory SDK 4.0 for Java Programmer's Guide.

JNDI Service Provider for LDAP

JNDI is a Java API that provides a common way for programmers to access a variety of naming and directory services. This is accomplished via a layer of software called a Service Provider. The Directory SDK includes a Service Provider for LDAP.

The following JNDI features are not implemented in this release of the Netscape LDAP Service Provider:

  • Support for federated names
  • Support for the "code base" attribute for objects stored in an LDAP directory. The class name specified by the javaClassName attribute must exist in the local CLASSPATH
  • The search() method for schema directory contexts. To perform searches in a schema directory context use a Context.lookup() request instead of DirContext.search().
For more information see "Using the JNDI Service Provider" in the Netscape Directory SDK 4.0 for Java Programmer's Guide.


Bugs Fixed Since Version 3.05

The following bugs have been fixed since the release of the Directory SDK 3.05 for Java. Bug numbers are shown in parentheses.

  • LDAPSearchResults.getCount() returns 0 for synchronous searches. (355365)
  • Applets in Communicator can't fetch an error string. (351004)
  • DN.contains() is implemented and documented incorrectly. (354615)
  • Search timeout is not handled correctly. (350998)
  • LDAPSchemaElement needs a modify() method. (350997)
  • LDAPBasePropertySupport should enable referrals. (350996, 350995)
  • Cannot set the cache once LDAPConnection has connected. (355904)
  • LDAPCache changes the contents of returned attributes. (355942)
  • The SDK calls Thread.stop(), suspend(), and resume(). (354503)
  • VLV controls don't support the optional context field. (355215)
  • The SDK doesn't support all the schema options described in RFC 2252. (354347)
  • LDAP Beans don't handle referrals. (353306)
  • LDAPIsMember doesn't handle dynamic groups. (353305)
  • The netscape.ldap.util.DN class does not consider "" to be a valid DN. (352804)
  • LDAPCompareAttrNames should allow for the specification of a locale. (351022)
  • LDAPSearch aborts on a size limit exception. (350624)
  • LDAPModificationSet is missing a toString method. (353308, 351719)
  • LDAPGetEntries should allow a choice of which attributes to return. (353307)
  • The SDK should support the latest LDIF specification. (356470, 352056)
  • The SDK should treat a "null" filter as meaning "objectclass=*". (354682)
  • LDAPSchema contains unnecessary public "add" methods. (354997)


Downloading and Building the Source

The Directory SDK source code is available on the Mozilla website. You can download it at http://www.mozilla.org/directory/javasdk.html.

Follow the instructions at http://www.mozilla.org/directory/buildjsdk-4.0.txt to build the Netscape Directory SDK.


Updating Java Classes in Netscape Communicator

The LDAP Java classes contained in Netscape Communicator 4.7 and earlier are outdated. You can upgrade these class files to the latest versions using Communicator's SmartUpdate feature.

The SmartUpdate page for the LDAP Java classes is at: http://developer.netscape.com/software/ldap/ldap.html

Note: This page uses Communicator's SmartUpdate feature to update the classes. Before visiting this page, you must enable SmartUpdate, Java, JavaScript, and cookies in Communicator.

To enable SmartUpdate, Java, JavaScript, and cookies:

  • Go to the Edit menu and choose Preferences.
  • Select Advanced and make sure that Accept all cookies is active (it's radio button is filled).
  • Make sure that Enable Java and Enable JavaScript are checked.
  • Choose Advanced | SmartUpdate from the left-hand panel.
  • Make sure that Enable SmartUpdate is checked.
  • Click OK.

Reporting Problems

Please submit your problem via the the Bugzilla bugsystem . Use the "LDAP Java SDK" component.


Accessing the Directory Developers Newsgroup

If you have additional questions or need more information about the Netscape Directory SDK 4.x for Java, please visit the Mozilla Directory newsgroup and the DevEdge Directory Server newsgroups.


Contains OROMatcher® regular expression software from ORO Java Software. © Copyright 1997 by ORO Java Software.
Redistribution separate from Netscape Directory SDK for Java or direct use of OROMatcher interfaces
requires a license from ORO Java Software. http://www.oroinc.com. OROMatcher® is a trademark of Original Reusable Objects, Inc.

For more Internet development resources, try Netscape TechSearch.


ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/0000775001003300100330000000000010667357332021101 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/java-object-schema.conf0000664001003300100330000000233606767750517025407 0ustar viveklvivekl# # -- Attribute types -- # attribute javaClassName 1.3.6.1.4.1.42.2.27.4.1.6 ces single attribute javaCodebase 1.3.6.1.4.1.42.2.27.4.1.7 ces attribute javaSerializedData 1.3.6.1.4.1.42.2.27.4.1.8 bin single attribute javaFactory 1.3.6.1.4.1.42.2.27.4.1.10 ces single attribute javaReferenceAddress 1.3.6.1.4.1.42.2.27.4.1.11 ces attribute javaDoc 1.3.6.1.4.1.42.2.27.4.1.12 ces attribute javaClassNames 1.3.6.1.4.1.42.2.27.4.1.13 ces # # -- Object classes -- # objectclass javaContainer oid 1.3.6.1.4.1.42.2.27.4.2.1 superior top requires cn objectclass javaObject oid 1.3.6.1.4.1.42.2.27.4.2.4 superior top requires javaClassName allows javaClassNames, javaCodebase, javaDoc, description objectclass javaSerializedObject oid 1.3.6.1.4.1.42.2.27.4.2.5 superior javaObject requires javaSerializedData objectclass javaNamingReference oid 1.3.6.1.4.1.42.2.27.4.2.7 superior javaObject allows javaReferenceAddress, javaFactory objectclass javaMarshalledObject oid 1.3.6.1.4.1.42.2.27.4.2.8 superior javaObject requires javaSerializedData ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/0000775001003300100330000000000010667357330021655 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/0000775001003300100330000000000010667357330023457 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/0000775001003300100330000000000010667357330024403 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/0000775001003300100330000000000010667357332025325 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/ProviderUtils.java0000664001003300100330000002442210602743273030777 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import java.util.*; /** * Common utility methods * */ class ProviderUtils { public static final String DEFAULT_FILTER = "(objectclass=*)"; static int jndiSearchScopeToLdap(int jndiScope) throws NamingException { int scope = -1; if (jndiScope == SearchControls.SUBTREE_SCOPE) { scope = LDAPConnection.SCOPE_SUB; } else if (jndiScope == SearchControls.ONELEVEL_SCOPE) { scope = LDAPConnection.SCOPE_ONE; } else if (jndiScope == SearchControls.OBJECT_SCOPE) { scope = LDAPConnection.SCOPE_BASE; } else { throw new InvalidSearchControlsException("Illegal value for the search scope"); } return scope; } /** * Convert Attribute List to a LDAP filter * * @return LDAP Filter * @throw NamingException * @param attrs An Attribute List */ static String attributesToFilter(Attributes attrs) throws NamingException{ if (attrs == null || attrs.size() == 0) { return DEFAULT_FILTER; } String filter = ""; for (NamingEnumeration attrEnum = attrs.getAll(); attrEnum.hasMore();) { Attribute attrib = (Attribute) attrEnum.next(); //Has attributes any values if ( attrib.size() == 0) { // test only for presence of the attribute filter += "(" + attrib.getID() + "=*)"; continue; } // Add attribute values to the filter, ecsaping if necessary String attrValues = ""; for (NamingEnumeration valEnum = attrib.getAll(); valEnum.hasMore();) { Object val = valEnum.next(); if (val instanceof String) { attrValues += "(" + attrib.getID() + "=" + escapeString((String)val) +")"; } else if (val instanceof byte[]) { attrValues += "(" + attrib.getID() + "=" + escapeBytes((byte[])val) +")"; } else if (val == null) { //null is allowed value in Attribute.add(Object), accept it just in case attrValues += "(" + attrib.getID() + "=*)"; } else { throw new NamingException( "Wrong Attribute value, expecting String or byte[]"); } } filter += (attrib.size() > 1) ? ("(|" + attrValues + ")") : attrValues; } return (attrs.size() > 1) ? ("(&" + filter + ")") : filter; } /** * Expand filterExpr. Each occurrence of a variable "{n}", where n is a non-negative * integer, is replaced with a variable from the filterArgs array indexed by the 'n'. * FilterArgs can be Strings or byte[] and they are escaped according to the RFC2254 */ static String expandFilterExpr(String filterExpr, Object[] filterArgs) throws InvalidSearchFilterException{ StringTokenizer tok = new StringTokenizer(filterExpr, "{}", /*returnTokens=*/true); if (tok.countTokens() == 1) { return filterExpr; // No escape characters } StringBuffer out= new StringBuffer(); boolean expectVarIdx = false, expectVarOff = false; Object arg= null; while (tok.hasMoreTokens()) { String s = tok.nextToken(); if (expectVarIdx) { expectVarIdx = false; try { int idx = Integer.parseInt(s); arg = filterArgs[idx]; expectVarOff = true; } catch (IndexOutOfBoundsException e) { throw new InvalidSearchFilterException("Filter expression variable index out of bounds"); } catch (Exception e) { throw new InvalidSearchFilterException("Invalid filter expression"); } } else if (expectVarOff) { expectVarOff = false; if (!s.equals("}")) { throw new InvalidSearchFilterException("Invalid filter expression"); } if (arg instanceof String) { out.append(escapeString((String)arg)); } else if (arg instanceof byte[]) { out.append(escapeBytes((byte[])arg)); } else { throw new InvalidSearchFilterException("Invalid filter argument type"); } arg = null; } else if (s.equals("{")) { expectVarIdx = true; } else { out.append(s); } } if (expectVarIdx || expectVarOff) { throw new InvalidSearchFilterException("Invalid filter expression"); } return out.toString(); } /** * Escape a string according to the RFC 2254 */ static String escapeString(String str) { String charToEscape = "\\*()\000"; StringTokenizer tok = new StringTokenizer(str, charToEscape, /*returnTokens=*/true); if (tok.countTokens() == 1) { return str; // No escape characters } StringBuffer out= new StringBuffer(); while (tok.hasMoreTokens()) { String s = tok.nextToken(); if (s.equals("*")) { out.append("\\2a"); } else if (s.equals("(")) { out.append("\\28"); } else if (s.equals(")")) { out.append("\\29"); } else if (s.equals("\\")) { out.append("\\5c"); } else if (s.equals("\000")) { out.append("\\00"); } else { out.append(s); } } return out.toString(); } /** * Escape a byte array according to the RFC 2254 */ static final String hexDigits="0123456789abcdef"; static String escapeBytes(byte[] bytes) { StringBuffer out = new StringBuffer(""); for (int i=0; i < bytes.length; i++) { int low = bytes[i] & 0x0f; int high = (bytes[i] & 0xf0) >> 4; out.append("\\"); out.append(hexDigits.charAt(high)); out.append(hexDigits.charAt(low)); } return out.toString(); } /** * A method used only for testing */ private static void testAttributesToFilter() { try { System.out.println(attributesToFilter(null)); BasicAttributes attrs = new BasicAttributes(true); System.out.println(attrs + " = " + attributesToFilter(attrs)); attrs.put (new BasicAttribute("attr1", "val1")); attrs.put (new BasicAttribute("attr2", "(val2)\\*x")); attrs.put (new BasicAttribute("attr3")); BasicAttribute attr4 = new BasicAttribute("attr4", "val41"); attr4.add("val42"); attrs.put(attr4); attrs.put("attr5", new byte[] { (byte)0x23, (byte)0x3, (byte)0x0, (byte)0xab, (byte)0xff}); System.out.println(attrs + " = " +attributesToFilter(attrs)); } catch (Exception e) { System.err.println(e); } } /** * A method used only for testing */ private static void testFilterExpr() { try { String filterExpr = "(&(attr0={0})(attr1={1}))"; Object [] args = new Object[] { "val*0", new byte[] { (byte)0xf0, (byte) 0x3a}}; String filter = null; filter = expandFilterExpr(filterExpr, args); System.out.println(filterExpr + " -> " + filter); } catch (Exception e) { System.err.println(e); } } /** * Test */ public static void main(String[] args) { /*testAttributesToFilter(); String x = "012\0003"; byte[] b = x.getBytes(); for (int i=0; i < b.length; i++) { System.out.println(i+"="+b[i]); }*/ testFilterExpr(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/LdapReferralException.java0000664001003300100330000000672310602743273032412 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import java.util.*; /** * A wrapper for the ldapjdk LDAPReferralException * */ class LdapReferralException extends javax.naming.ldap.LdapReferralException { LDAPReferralException m_ldapEx; LdapContextImpl m_srcCtx; int m_referralIdx = 0; public LdapReferralException(LdapContextImpl srcCtx, LDAPReferralException ldapEx) { m_srcCtx = srcCtx; m_ldapEx = ldapEx; } public Object getReferralInfo() { return m_ldapEx.getURLs()[m_referralIdx].toString(); } public Context getReferralContext() throws NamingException{ Hashtable env = m_srcCtx.getEnv().getAllProperties(); env.put(ContextEnv.P_PROVIDER_URL, m_ldapEx.getURLs()[m_referralIdx].toString()); return new LdapContextImpl(env); } public Context getReferralContext(Hashtable env) throws NamingException{ return getReferralContext(env, null); } public Context getReferralContext(Hashtable env, Control[] reqCtls) throws NamingException{ env.put(ContextEnv.P_PROVIDER_URL, m_ldapEx.getURLs()[m_referralIdx].toString()); if (reqCtls != null) { env.put(ContextEnv.P_CONNECT_CTRLS, reqCtls); } return new LdapContextImpl(env); } /** * Skip the referral to be processed */ public boolean skipReferral() { int maxIdx = m_ldapEx.getURLs().length - 1; if (m_referralIdx < maxIdx) { m_referralIdx++; return true; } return false; } public void retryReferral() { } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/LdapService.java0000664001003300100330000004710110602743273030364 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import java.util.*; import java.io.*; import com.netscape.jndi.ldap.common.*; import com.netscape.jndi.ldap.schema.SchemaRoot; /** * Ldap Service encapsulates a Ldap connection and Ldap operations over the * connection. The connection is established in a lazy manner, first time a * Ldap operation is initiated. A Ldap Service object is shared by multiple * contexts. The object maintains a reference counter which is incremented * when a context is cloned, and decremeneted when a context is closed. The * associated Ldap Connection is relased when the reference counter reaches * zero. * * LDAPsearchConstraints are always read from a context, because ldap service * is a shared object and each context may request different search constraints. * */ class LdapService { public static final String DEFAULT_FILTER = "(objectclass=*)"; public static final int DEFAULT_SCOPE = LDAPv3.SCOPE_SUB; public static final String DEFAULT_HOST = "localhost"; public static final int DEFAULT_PORT = LDAPv2.DEFAULT_PORT; public static final int DEFAULT_SSL_PORT = 636; private LDAPConnection m_ld; private EventService m_eventSvc; /** * The number of contexts that are currently sharing this LdapService. * Essentially, a reference counter. Incremented in the LdapContextImpl * copy constructor. Decremented in the LdapService.disconnect(). * When the count reaches zero, the LDAPConnection is released. */ private int m_clientCount; public LdapService() { m_ld = new LDAPConnection(); m_clientCount = 1; } LDAPConnection getConnection() { return m_ld; } /** * Connect to the server and send bind request to authenticate the user */ void connect(LdapContextImpl ctx) throws NamingException{ if (m_ld.isConnected()) { return; //already connected } LDAPUrl url = ctx.m_ctxEnv.getDirectoryServerURL(); String host = (url != null) ? url.getHost() : DEFAULT_HOST; int port = (url != null) ? url.getPort() : DEFAULT_PORT; String user = ctx.m_ctxEnv.getUserDN(); String passwd = ctx.m_ctxEnv.getUserPassword(); String socketFactory = ctx.m_ctxEnv.getSocketFactory(); Object cipherSuite = ctx.m_ctxEnv.getCipherSuite(); int ldapVersion = ctx.m_ctxEnv.getLdapVersion(); boolean isSSLEnabled = ctx.m_ctxEnv.isSSLEnabled(); String[] saslMechanisms = ctx.m_ctxEnv.getSaslMechanisms(); LDAPControl[] ldCtrls= ctx.m_ctxEnv.getConnectControls(); Object traceOut = ctx.m_ctxEnv.getProperty(ContextEnv.P_TRACE); // Set default ssl port if DS not specifed if (isSSLEnabled && url == null) { port = DEFAULT_SSL_PORT; } // SSL is enabled but no Socket factory specified. Use the // ldapjdk default one if (isSSLEnabled && socketFactory == null) { m_ld = new LDAPConnection(new LDAPSSLSocketFactory()); } // Set the socket factory and cipher suite if cpecified if (socketFactory != null) { try { LDAPSSLSocketFactory sf = null; if (cipherSuite != null) { Debug.println(1, "CIPHERS=" + cipherSuite); sf = new LDAPSSLSocketFactory(socketFactory, cipherSuite); } else { sf = new LDAPSSLSocketFactory(socketFactory); } m_ld = new LDAPConnection(sf); Debug.println(1, "SSL CONNECTION"); } catch (Exception e) { throw new IllegalArgumentException( "Illegal value for java.naming.ldap.factory.socket: " + e); } } // Enable tracing if (traceOut != null) { setTraceOutput(traceOut); } try { if (ldCtrls != null) { m_ld.setOption(LDAPv3.SERVERCONTROLS, ldCtrls); } if (saslMechanisms != null) { // sasl Auth m_ld.authenticate(ctx.m_ctxEnv.getSaslAuthId(), saslMechanisms, ctx.m_ctxEnv.getSaslProps(), ctx.m_ctxEnv.getSaslCallback()); } else { // simple auth m_ld.connect(ldapVersion, host, port, user, passwd); } } catch (LDAPException e) { // If ldapVersion is not specified in ctx env // fallback to ldap v2 if v3 is bot supported if (e.getLDAPResultCode() == e.PROTOCOL_ERROR && ldapVersion == 3 && saslMechanisms == null && ctx.m_ctxEnv.getProperty( ctx.m_ctxEnv.P_LDAP_VERSION) == null) { try { m_ld.connect(2, host, port, user, passwd); } catch (LDAPException e2) { throw ExceptionMapper.getNamingException(e2); } } else { throw ExceptionMapper.getNamingException(e); } } } protected void finalize() { try { m_ld.disconnect(); } catch (Exception e) {} } boolean isConnected() { return (m_ld.isConnected()); } /** * Physically disconect only if the client count is zero */ synchronized void disconnect() { try { if (m_clientCount > 0) { m_clientCount--; } if (m_clientCount == 0 && isConnected()) { m_ld.disconnect(); } } catch (Exception e) {} } /** * Increment client count */ synchronized void incrementClientCount() { m_clientCount++; } /** * LDAP search operation */ NamingEnumeration search (LdapContextImpl ctx, String name, String filter, String[] attrs, SearchControls jndiCtrls) throws NamingException{ Debug.println(1, "SEARCH"); String base = ctx.getDN(); int scope = LDAPConnection.SCOPE_SUB; LDAPSearchConstraints cons=ctx.getSearchConstraints(); boolean returnObjs = false; connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() > 0) { if (base.length() > 0) { base = name + "," + base; } else { base = name; } } // Map JNDI SearchControls to ldapjdk LDAPSearchConstraints if (jndiCtrls != null) { int maxResults = (int)jndiCtrls.getCountLimit(); int timeLimitInMsec = jndiCtrls.getTimeLimit(); // Convert timeLimit in msec to sec int timeLimit = timeLimitInMsec/1000; if (timeLimitInMsec > 0 && timeLimitInMsec < 1000) { timeLimit = 1; //sec } // Clone cons if maxResults or timeLimit is different from the default one if (cons.getServerTimeLimit() != timeLimit || cons.getMaxResults() != maxResults) { cons = (LDAPSearchConstraints)cons.clone(); cons.setMaxResults(maxResults); cons.setServerTimeLimit(timeLimit); } // TODO The concept of links is not well described in JNDI docs. // We can only specify dereferencing of Aliases, but Links and // Aliases are not the same; IGNORE jndiCtrls.getDerefLinkFlag() // Attributes to return attrs = jndiCtrls.getReturningAttributes(); if (attrs != null && attrs.length==0) { //return no attributes attrs = new String[] { "1.1" }; // TODO check whether ldap compare operation should be performed // That's the case if: (1) scope is OBJECT_SCOPE, (2) no attrs // are requested to return (3) filter has the form (name==value) // where no wildcards ()&|!=~><* are used. } // Search scope scope = ProviderUtils.jndiSearchScopeToLdap(jndiCtrls.getSearchScope()); // return obj flag returnObjs = jndiCtrls.getReturningObjFlag(); } try { // Perform Search boolean attrsOnly = ctx.m_ctxEnv.getAttrsOnlyFlag(); LDAPSearchResults res = m_ld.search( base, scope, filter, attrs, attrsOnly, cons ); return new SearchResultEnum(res, returnObjs, ctx); } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * List child entries using LDAP lookup operation */ NamingEnumeration listEntries(LdapContextImpl ctx, String name, boolean returnBindings) throws NamingException{ Debug.println(1, "LIST " + (returnBindings ? "BINDINGS" : "")); String base = ctx.getDN(); connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() > 0) { if (base.length() > 0) { base = name + "," + base; } else { base = name; } } try { // Perform One Level Search String[] attrs = null; // return all attributes if Bindings are requested if (!returnBindings) { // for ClassNamePairs attrs = new String[]{"javaclassname"}; //attr names must be in lowercase } LDAPSearchConstraints cons=ctx.getSearchConstraints(); LDAPSearchResults res = m_ld.search( base, LDAPConnection.SCOPE_ONE, DEFAULT_FILTER, attrs, /*attrsOnly=*/false, cons); if (returnBindings) { return new BindingEnum(res, ctx); } else { return new NameClassPairEnum(res, ctx); } } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Lookup an entry using LDAP search operation */ Object lookup(LdapContextImpl ctx, String name) throws NamingException{ Debug.println(1, "LOOKUP"); String base = ctx.getDN(); connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() > 0) { if (base.length() > 0) { base = name + "," + base; } else { base = name; } } try { // Perform Base Search String[] attrs = null; // return all attrs LDAPSearchConstraints cons=ctx.getSearchConstraints(); LDAPSearchResults res = m_ld.search( base, LDAPConnection.SCOPE_BASE, DEFAULT_FILTER, attrs, /*attrsOnly=*/false, cons); if (res.hasMoreElements()) { LDAPEntry entry = res.next(); return ObjectMapper.entryToObject(entry, ctx); } return null; // should never get here } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Read LDAP entry attributes */ Attributes readAttrs (LdapContextImpl ctx, String name, String[] attrs) throws NamingException{ Debug.println(1, "READ ATTRS"); String base = ctx.getDN(); int scope = LDAPConnection.SCOPE_BASE; connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() > 0) { if (base.length() > 0) { base = name + "," + base; } else { base = name; } } try { // Perform Search LDAPSearchConstraints cons=ctx.getSearchConstraints(); LDAPSearchResults res = m_ld.search(base, scope, DEFAULT_FILTER, attrs, /*attrsOnly=*/false, cons); while (res.hasMoreElements()) { LDAPEntry entry = res.next(); return new AttributesImpl(entry.getAttributeSet(), ctx.m_ctxEnv.getUserDefBinaryAttrs()); } return null; } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Modify LDAP entry attributes */ void modifyEntry(LdapContextImpl ctx, String name, LDAPModificationSet mods) throws NamingException{ Debug.println(1, "MODIFY"); String base = ctx.getDN(); if (mods.size() == 0) { return; } connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() > 0) { if (base.length() > 0) { base = name + "," + base; } else { base = name; } } try { // Perform Modify m_ld.modify(base, mods); } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Create a new LDAP entry */ LdapContextImpl addEntry(LdapContextImpl ctx, String name, LDAPAttributeSet attrs) throws NamingException{ Debug.println(1, "ADD"); String dn = ctx.getDN(); connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() == 0) { throw new IllegalArgumentException("Name can not be empty"); } if (dn.length() > 0) { dn = name + "," + dn; } else { dn = name; } try { // Add a new entry m_ld.add(new LDAPEntry(dn, attrs)); return new LdapContextImpl(dn, ctx); } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Delete a LDAP entry */ void delEntry(LdapContextImpl ctx, String name) throws NamingException{ Debug.println(1, "DELETE"); String dn = ctx.getDN(); connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() == 0) { throw new IllegalArgumentException("Name can not be empty"); } if (dn.length() > 0) { dn = name + "," + dn; } else { dn = name; } try { // Perform Delete m_ld.delete(dn); } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Chanage RDN for a LDAP entry */ void changeRDN(LdapContextImpl ctx, String name, String newRDN) throws NamingException{ Debug.println(1, "RENAME"); String dn = ctx.getDN(); connect(ctx); // Lazy Connect // Create DN by appending the name to the current context if (name.length() == 0 || newRDN.length() == 0) { throw new IllegalArgumentException("Name can not be empty"); } if (dn.length() > 0) { dn = name + "," + dn; } else { dn = name; } try { // Rename m_ld.rename(dn, newRDN, ctx.m_ctxEnv.getDeleteOldRDNFlag()); } catch (LDAPReferralException e) { throw new LdapReferralException(ctx, e); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } /** * Schema Operations */ DirContext getSchema(LdapContextImpl ctx, String name) throws NamingException { connect(ctx); // Lazy Connect return new SchemaRoot(m_ld); } /** * Return the event service */ EventService getEventService(LdapContextImpl ctx) throws NamingException { connect(ctx); // Lazy Connect if (m_eventSvc == null) { m_eventSvc = new EventService(this); } return m_eventSvc; } /** * Enable/Disable ldap message trace. * @param out Trace output or null (disable trace). Output can * be specified as a file name or a java OutputStream. If an * empty string is specified, the output is sent to System.err. * A file name prefixed with a '+' will open the file in append mode. */ void setTraceOutput(Object out) throws NamingException { try { m_ld.setProperty(m_ld.TRACE_PROPERTY, out); } catch (Exception e) { throw new IllegalArgumentException("Can not open trace output " + e); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/common/0000775001003300100330000000000010667357331026614 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/common/DirContextAdapter.java0000664001003300100330000002315310602743273033040 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.common; import javax.naming.*; import javax.naming.directory.*; import java.util.Hashtable; public class DirContextAdapter implements DirContext { /* Context Methods */ public Object addToEnvironment(String propName, Object propValue) throws NamingException { throw new OperationNotSupportedException(); } public void bind(String name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } public void bind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } public void close() throws NamingException { throw new OperationNotSupportedException(); } public String composeName(String name, String prefix) throws NamingException { throw new OperationNotSupportedException(); } public Name composeName(Name name, Name prefix) throws NamingException { throw new OperationNotSupportedException(); } public Context createSubcontext(String name) throws NamingException { throw new OperationNotSupportedException(); } public Context createSubcontext(Name name) throws NamingException { throw new OperationNotSupportedException(); } public void destroySubcontext(String name) throws NamingException { throw new OperationNotSupportedException(); } public void destroySubcontext(Name name) throws NamingException { throw new OperationNotSupportedException(); } public Hashtable getEnvironment() throws NamingException { throw new OperationNotSupportedException(); } public String getNameInNamespace() throws NamingException { throw new OperationNotSupportedException(); } public NameParser getNameParser(String name) throws NamingException { throw new OperationNotSupportedException(); } public NameParser getNameParser(Name name) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration list(String name) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration list(Name name) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration listBindings(String name) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration listBindings(Name name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookup(String name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookup(Name name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookupLink(String name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookupLink(Name name) throws NamingException { throw new OperationNotSupportedException(); } public void rebind(String name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } public void rebind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } public Object removeFromEnvironment(String propName) throws NamingException { throw new OperationNotSupportedException(); } public void rename(String oldName, String newName) throws NamingException { throw new OperationNotSupportedException(); } public void rename(Name oldName, Name newName) throws NamingException { throw new OperationNotSupportedException(); } public void unbind(String name) throws NamingException { throw new OperationNotSupportedException(); } public void unbind(Name name) throws NamingException { throw new OperationNotSupportedException(); } /* DirContext Methods */ public void bind(String name, Object obj, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public void bind(Name name, Object obj, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public DirContext createSubcontext(Name name, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public Attributes getAttributes(String name) throws NamingException { throw new OperationNotSupportedException(); } public Attributes getAttributes(String name, String[] attrIds) throws NamingException { throw new OperationNotSupportedException(); } public Attributes getAttributes(Name name) throws NamingException { throw new OperationNotSupportedException(); } public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { throw new OperationNotSupportedException(); } public DirContext getSchema(String name) throws NamingException { throw new OperationNotSupportedException(); } public DirContext getSchema(Name name) throws NamingException { throw new OperationNotSupportedException(); } public DirContext getSchemaClassDefinition(String name) throws NamingException { throw new OperationNotSupportedException(); } public DirContext getSchemaClassDefinition(Name name) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException { throw new OperationNotSupportedException(); } public void rebind(String name, Object obj, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public void rebind(Name name, Object obj, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(String name, String filter, SearchControls cons) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(String name, Attributes matchingAttributes) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(Name name, String filter, SearchControls cons) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(Name name, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public NamingEnumeration search(Name name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException { throw new OperationNotSupportedException(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/common/Debug.java0000664001003300100330000000550510602743273030503 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.common; /** * Class used to selectivly enable debug statements */ public class Debug { // lower number is a higher priority message. Level 0 is the // highest priority to be used ONLY for errors private static int m_level = 0; static { try { String level = System.getProperty("jndi.netscape.debug"); if (level != null) { m_level = Integer.parseInt(level); } } catch (Exception e) {} } /** * Set the debug level. To disable debugging set the level to -1 */ public static void setDebugLevel(int level) { m_level = level; } /** * Get the debug level. If -1 is returned, then debugging is disabled */ public static int getDebugLevel() { return m_level; } /** * Print the message if its debug level is enabled */ public static void println(int level, String msg) { if (m_level >= 0 && level <= m_level) { System.err.println(msg); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/common/LdapContextAdapter.java0000664001003300100330000001042610602743273033201 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.common; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import javax.naming.event.*; import java.util.Hashtable; public class LdapContextAdapter extends DirContextAdapter implements EventDirContext, LdapContext { /* LdapContext methods */ public ExtendedResponse extendedOperation(ExtendedRequest req)throws NamingException { throw new OperationNotSupportedException(); } public Control[] getRequestControls() throws NamingException { throw new OperationNotSupportedException(); } public Control[] getResponseControls() throws NamingException { throw new OperationNotSupportedException(); } public Control[] getConnectControls() throws NamingException { throw new OperationNotSupportedException(); } public LdapContext newInstance(Control[] reqCtls) throws NamingException { throw new OperationNotSupportedException(); } public void reconnect(Control[] reqCtls) throws NamingException { throw new OperationNotSupportedException(); } public void setRequestControls(Control[] reqCtls) throws NamingException { throw new OperationNotSupportedException(); } /** * Naming Event methods */ public void addNamingListener(String target, int scope, NamingListener l) throws NamingException { throw new OperationNotSupportedException(); } public void addNamingListener(Name target, int scope, NamingListener l) throws NamingException { throw new OperationNotSupportedException(); } public void addNamingListener(String target, String filter, SearchControls ctls, NamingListener l)throws NamingException { throw new OperationNotSupportedException(); } public void addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l)throws NamingException { throw new OperationNotSupportedException(); } public void addNamingListener(String target, String filter, Object[] filtrArgs, SearchControls ctls, NamingListener l)throws NamingException { throw new OperationNotSupportedException(); } public void addNamingListener(Name target, String filter, Object[] filtrArgs, SearchControls ctls, NamingListener l)throws NamingException { throw new OperationNotSupportedException(); } public void removeNamingListener(NamingListener l) throws NamingException { throw new OperationNotSupportedException(); } public boolean targetMustExist() { return true; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/common/ShareableEnv.java0000664001003300100330000003633510602743273032021 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.common; import java.util.*; /** * ShareableEnv manages a set of environment properties. The class enables a memory * efficient sharing of the environment between multiple contexts, while preserving * the semantics that each context has its own environment. If the environment for a * context is changed, the change is not visible to other contexts. * * The efficiency is achieved by implementing inheritance and override of environment * properties ("subclass-on-write"). A read-only table of properties * is shared among multiple contexts (_sharedEnv. If a context wants to * modified a shared property, it will create a separate table (_privateEnv) * to make the modifications. This table overrides the values in the shared table. * * Note1: The class is not thread safe, it requires external synchronization * Note2: The class does not provide enumaration. Call getAllProperties() and then * use the standard Hashtable enumaration techniques. */ public class ShareableEnv implements Cloneable{ /** * A special value that denotes a removed propety. Because shared property tables * are read-only, a shared property is deleted in the curent context by assigning * the REMOVED_PROPERTY value in the _modEnv table. */ private static final Object REMOVED_PROPERTY = new Object(); /** * A table of most recent environment modifications. These modifications are not * shared until the current context is cloned, which moves _privateEnv to * _sharedEnv */ protected Hashtable m_privateEnv; /** * A set of environment propeties that have been changed in this Context and are * shared with one or more child contexts. Read-only access. */ protected Vector m_sharedEnv; // A vector of Hashtables /** * Shared environment inherited from the parent context */ protected ShareableEnv m_parentEnv; /** * Index into parent _sharedEnv list. Designates all environment chnages * in the parent context that are visible to this child context */ protected int m_parentSharedEnvIdx = -1; /** * No-arg constructor is private */ private ShareableEnv() {} /** * Constructor for non root Contexts * * @param parent A reference to the parent context environment * @param parentSharedEnvIdx index into parent's shared environemnt list */ public ShareableEnv(ShareableEnv parent, int parentSharedEnvIdx) { m_parentEnv = parent; m_parentSharedEnvIdx = parentSharedEnvIdx; } /** * Constructor for the root context * * @param initialEnv a hashtable with environemnt properties */ public ShareableEnv(Hashtable initialEnv) { m_privateEnv = initialEnv; } /** * Set the property value. * * @return the previous value of the specified property, * or null if it did not exist before. * @param prop property name * @param val property value */ public Object setProperty(String prop, Object val) { // Need the current value to be returned Object oldVal = getProperty(prop); // Lazy create _privateEnv table if (m_privateEnv == null) { m_privateEnv = new Hashtable(5); } // Add/Modify property m_privateEnv.put(prop, val); return oldVal; } /** * Get the property value. * * @return the object associated with the property name * or null if property is not found * @param prop property name */ public Object getProperty(String prop) { // First check most recent modifications if (m_privateEnv != null) { Object val = m_privateEnv.get(prop); if (val != null) { return (val == REMOVED_PROPERTY) ? null : val; } } // Then try shared properties if (m_sharedEnv != null) { return getSharedProperty(m_sharedEnv.size()-1, prop); } else { return getSharedProperty(-1, prop); } } /** * Get the property value for the specified _sharedEnv index * * @return the object associated with the property name * @param envIdx start index in the shared environment list * @param prop property name */ private Object getSharedProperty(int envIdx, String prop) { // Check first the frozen updtates list if (envIdx >= 0) { for (int i= envIdx; i >= 0; i--) { Hashtable tab = (Hashtable) m_sharedEnv.elementAt(i); Object val = tab.get(prop); if (val != null) { return (val == REMOVED_PROPERTY) ? null : val; } } } // Check the parent env context if (m_parentSharedEnvIdx >= 0) { return m_parentEnv.getSharedProperty(m_parentSharedEnvIdx, prop); } return null; } /** * Remove property * * @return the previous value of the specified property, * or null if it did not exist before. * @param prop property name */ public Object removeProperty(String prop) { Object val = null; // Is this a shared property ? if (m_sharedEnv != null) { val = getSharedProperty(m_sharedEnv.size()-1, prop); } else { val = getSharedProperty(-1, prop); } if (val == null) { // Not a shared property, remove if physically if (m_privateEnv != null) { return m_privateEnv.remove(prop); } } else { //A shared property, hide it setProperty(prop, REMOVED_PROPERTY); } return val; } /** * Create a table of all properties. First read all properties from the parent env, * then merge the local updates. Notice that the data is processed in reverse order * than in the getProperty method. * * @return a hashtable containing all properties visible in this context */ public Hashtable getAllProperties() { Hashtable res = null; // First copy shared properties if (m_sharedEnv != null) { res = getAllSharedProperties(m_sharedEnv.size()-1); } else { res = getAllSharedProperties(-1); } if (res == null) { res = new Hashtable(51); } // Then apply private env if (m_privateEnv != null) { Hashtable tab = m_privateEnv; for (Enumeration e = tab.keys(); e.hasMoreElements();) { Object key = e.nextElement(); Object val = tab.get(key); if (val != REMOVED_PROPERTY) { res.put(key, val); } else { res.remove(key); } } } return res; } /** * Create a table of all shared properties for the given envIdx. First read all * properties from the parent env, then merge the local environment. * * @return a hashtable containing all properties visible for the shared environment index * @param envIdx start index in the shared environment list */ private Hashtable getAllSharedProperties(int envIdx) { Hashtable res = null; // First copy parent env if (m_parentEnv != null) { res = m_parentEnv.getAllSharedProperties(m_parentSharedEnvIdx); } if (res == null) { res = new Hashtable(51); } // Then copy _sharedEnv (older entries are processed before newer ones) if (envIdx >= 0) { for (int i= 0; i <= envIdx; i++) { Hashtable tab = (Hashtable) m_sharedEnv.elementAt(i); for (Enumeration e = tab.keys(); e.hasMoreElements();) { Object key = e.nextElement(); Object val = tab.get(key); if (val != REMOVED_PROPERTY) { res.put(key, val); } else { res.remove(key); } } } } return res; } /** * Freeze all environment changes changes in the current context. The "Freeze" is * done by moving the _privateEnv table to _sharedEnv vector. */ protected void freezeUpdates() { if (m_privateEnv != null) { // Lazy create _sharedEnv vector if (m_sharedEnv == null) { m_sharedEnv = new Vector(); } m_sharedEnv.addElement(m_privateEnv); m_privateEnv = null; } } /** * Clone ShareableEnv * * @return A "clone" of the current context environment */ public Object clone() { // First freeze updates for this context freezeUpdates(); // If the context has been modified, then it is the parent of the clone if (m_sharedEnv != null) { return new ShareableEnv(this, m_sharedEnv.size()-1); } // No changes has been done to the inherited parent context. Pass the parent // context to the clone else { return new ShareableEnv(m_parentEnv, m_parentSharedEnvIdx); } } /** * Return string representation of the object * * @return a string representation of the object */ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("ShareableEnv private="); if (m_privateEnv != null) { buf.append("("); buf.append(m_privateEnv.size()); buf.append(")"); } buf.append(" shared="); if (m_sharedEnv != null) { for (int i=0; i < m_sharedEnv.size(); i++) { Hashtable tab = (Hashtable) m_sharedEnv.elementAt(i); buf.append("("); buf.append(tab.size()); buf.append(")"); } } buf.append(" parentIdx="); buf.append(m_parentSharedEnvIdx); return buf.toString(); } /** * Test program */ public static void main(String[] args) { ShareableEnv c0 = new ShareableEnv(null, -1); // c=context 0=level 0=index System.err.println("c0.getProperty(p1)=" + c0.getProperty("p1")); System.err.println("c0.getAllProperties()=" + c0.getAllProperties()); System.err.println("c0.setProperty(p1,vxxx)=" + c0.setProperty("p1", "vxxx")); System.err.println("c0.setProperty(p2,v2)=" + c0.setProperty("p2", "v2")); System.err.println("c0.setProperty(p3,v3)=" + c0.setProperty("p3", "v3")); System.err.println("c0.setProperty(p1,v1)=" + c0.setProperty("p1", "v1")); System.err.println("c0.getAllProperties()=" + c0.getAllProperties()); System.err.println("---"); ShareableEnv c01 = (ShareableEnv)c0.clone(); System.err.println("c01.getProperty(p1)=" + c01.getProperty("p1")); System.err.println("c01.getAllProperties()=" + c01.getAllProperties()); System.err.println("c01.setProperty(p1,v1a)=" + c01.setProperty("p1", "v1a")); System.err.println("c01.getProperty(p1)=" + c01.getProperty("p1")); System.err.println("c01.removeProperty(p2)=" + c01.removeProperty("p2")); System.err.println("c01.getProperty(p2)=" + c01.getProperty("p2")); System.err.println("c01.setProperty(p11,v11a)=" + c01.setProperty("p11", "v11a")); System.err.println("c01.getAllProperties()=" + c01.getAllProperties()); System.err.println("---"); ShareableEnv c02 = (ShareableEnv)c0.clone(); System.err.println("c02.getProperty(p1)=" + c02.getProperty("p1")); System.err.println("c02.getAllProperties()=" + c02.getAllProperties()); System.err.println("---"); ShareableEnv c011 = (ShareableEnv)c01.clone(); System.err.println("c011.getProperty(p1)=" + c011.getProperty("p1")); System.err.println("c011.getAllProperties()=" + c011.getAllProperties()); System.err.println("c011.setProperty(p1,v11b)=" + c011.setProperty("p1", "v11b")); System.err.println("c011.getProperty(p1)=" + c011.getProperty("p1")); System.err.println("c011.getAllProperties()=" + c011.getAllProperties()); System.err.println("---"); System.err.println("c01.getAllProperties()=" + c01.getAllProperties()); System.err.println("c01.removeProperty(p11)=" + c01.removeProperty("p11")); System.err.println("c01.getAllProperties()=" + c01.getAllProperties()); System.err.println("c011.getAllProperties()=" + c011.getAllProperties()); System.err.println("---"); ShareableEnv c012 = (ShareableEnv)c01.clone(); System.err.println("c012.getAllProperties()=" + c012.getAllProperties()); System.err.println("c012.getProperty(p1)=" + c012.getProperty("p1")); System.err.println("---"); System.err.println("c0="+c0); System.err.println("c01="+c01); System.err.println("c02="+c02); System.err.println("c011="+c011); System.err.println("c012="+c012); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/common/ExceptionMapper.java0000664001003300100330000002655010602743273032563 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.common; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import java.util.Hashtable; /** * Class used to map ldapjdk exceptions to JNDI NamingException */ public class ExceptionMapper { public static NamingException getNamingException(Exception origException) { if (origException instanceof NamingException) { return (NamingException)origException; } /** * LdapJDK exceptions */ else if (origException instanceof LDAPReferralException) { // Should never get here. The ldapjdk referral exceptions // should be explicitly captured by the ecode and converted // into jndi LdapReferralException instances. return new NamingException("Provider internal error, LDAPReferralException not captured"); } else if (origException instanceof LDAPException) { LDAPException ldapException = (LDAPException) origException; int resCode = ldapException.getLDAPResultCode(); if (resCode == LDAPException.OPERATION_ERROR) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } else if (resCode == LDAPException.PROTOCOL_ERROR) { return new CommunicationException(ldapException.toString()); } else if (resCode == LDAPException.TIME_LIMIT_EXCEEDED) { return new TimeLimitExceededException(ldapException.toString()); } else if (resCode == LDAPException.SIZE_LIMIT_EXCEEDED) { return new SizeLimitExceededException(ldapException.toString()); } // COMPARE_FALSE should never happen, but is included here for completeness else if (resCode == LDAPException.COMPARE_FALSE) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } // COMPARE_TRUE should never happen, but is included here for completeness else if (resCode == LDAPException.COMPARE_TRUE) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } else if (resCode == LDAPException.AUTH_METHOD_NOT_SUPPORTED) { return new AuthenticationNotSupportedException(ldapException.toString()); } else if (resCode == LDAPException.STRONG_AUTH_REQUIRED) { return new AuthenticationNotSupportedException(ldapException.toString()); } else if (resCode == LDAPException.LDAP_PARTIAL_RESULTS) { return new PartialResultException(ldapException.toString()); } // REFERRAL code should be in LDAPReferralException else if (resCode == LDAPException.REFERRAL) { LDAPReferralException referralEx = (LDAPReferralException)ldapException; // TODO create jndi LdapReferralException } else if (resCode == LDAPException.ADMIN_LIMIT_EXCEEDED) { return new LimitExceededException(ldapException.toString()); } else if(resCode == LDAPException.UNAVAILABLE_CRITICAL_EXTENSION) { return new OperationNotSupportedException(ldapException.toString()); } else if (resCode == LDAPException.CONFIDENTIALITY_REQUIRED) { return new AuthenticationNotSupportedException( "A secure connection is required for this operation"); } // This shoud never propagate to the caller else if (resCode == LDAPException.SASL_BIND_IN_PROGRESS) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } else if (resCode == LDAPException.NO_SUCH_ATTRIBUTE) { return new NoSuchAttributeException(ldapException.toString()); } else if (resCode == LDAPException.UNDEFINED_ATTRIBUTE_TYPE) { return new InvalidAttributeIdentifierException(ldapException.toString()); } else if (resCode == LDAPException.INAPPROPRIATE_MATCHING) { return new InvalidSearchFilterException(ldapException.toString()); } else if (resCode == LDAPException.CONSTRAINT_VIOLATION) { return new InvalidSearchControlsException(ldapException.toString()); } else if (resCode == LDAPException.ATTRIBUTE_OR_VALUE_EXISTS) { return new AttributeInUseException(ldapException.toString()); } else if (resCode == LDAPException.INVALID_ATTRIBUTE_SYNTAX) { return new InvalidAttributeValueException(ldapException.toString()); } else if (resCode == LDAPException.NO_SUCH_OBJECT) { return new NameNotFoundException(ldapException.toString()); } else if (resCode == LDAPException.ALIAS_PROBLEM) { return new NamingException(ldapException.toString()); } else if (resCode == LDAPException.INVALID_DN_SYNTAX) { return new InvalidNameException(ldapException.toString()); } else if (resCode == LDAPException.IS_LEAF) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } else if (resCode == LDAPException.ALIAS_DEREFERENCING_PROBLEM) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } else if (resCode == LDAPException.INAPPROPRIATE_AUTHENTICATION) { //return new AuthenticationNotSupportedException(ldapException.toString()); return new AuthenticationException(ldapException.toString()); } else if (resCode == LDAPException.INVALID_CREDENTIALS) { return new AuthenticationException(ldapException.toString()); } else if (resCode == LDAPException.INSUFFICIENT_ACCESS_RIGHTS) { return new NoPermissionException(ldapException.toString()); } else if (resCode == LDAPException.BUSY) { return new ServiceUnavailableException(ldapException.toString()); } else if (resCode == LDAPException.UNAVAILABLE) { return new ServiceUnavailableException(ldapException.toString()); } else if (resCode == LDAPException.UNWILLING_TO_PERFORM) { return new OperationNotSupportedException(ldapException.toString()); } else if (resCode == LDAPException.LOOP_DETECT) { NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } else if (resCode == LDAPException.NAMING_VIOLATION) { return new InvalidNameException(ldapException.toString()); } else if (resCode == LDAPException.OBJECT_CLASS_VIOLATION) { return new SchemaViolationException(ldapException.toString()); } else if (resCode == LDAPException.NOT_ALLOWED_ON_NONLEAF) { return new ContextNotEmptyException(ldapException.toString()); } else if (resCode == LDAPException.NOT_ALLOWED_ON_RDN) { return new SchemaViolationException(ldapException.toString()); } else if (resCode == LDAPException.ENTRY_ALREADY_EXISTS) { return new NameAlreadyBoundException(ldapException.toString()); } else if (resCode == LDAPException.OBJECT_CLASS_MODS_PROHIBITED) { return new SchemaViolationException(ldapException.toString()); } else if (resCode == LDAPException.SERVER_DOWN) { return new CommunicationException(ldapException.toString()); } else if (resCode == LDAPException.CONNECT_ERROR) { return new CommunicationException(ldapException.toString()); } else { // All other result codes // 71 AFFECTS_MULTIPLE_DSAS // 80 OTHER // 89 PARAM_ERROR // 92 LDAP_NOT_SUPPORTED // 93 CONTROL_NOT_FOUND // 94 NO_RESULTS_RETURNED // 95 MORE_RESULTS_TO_RETURN // 96 CLIENT_LOOP referral // 97 REFERRAL_LIMIT_EXCEEDED referral NamingException nameEx = new NamingException(ldapException.toString()); nameEx.setRootCause(ldapException); return nameEx; } } /** * All other Exceptions */ NamingException nameEx = new NamingException(origException.toString()); nameEx.setRootCause(origException); return nameEx; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/LdapNameParser.java0000664001003300100330000001507610602743273031027 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import java.util.Hashtable; import java.util.Properties; import javax.naming.*; class LdapNameParser implements NameParser { private static LdapNameParser m_parser; // A table with compound name syntax properties static Properties nameSyntax; static { nameSyntax = new Properties(); nameSyntax.put("jndi.syntax.direction", "right_to_left"); nameSyntax.put("jndi.syntax.separator", ","); nameSyntax.put("jndi.syntax.ignorecase", "true"); nameSyntax.put("jndi.syntax.escape", "\\"); nameSyntax.put("jndi.syntax.beginquote", "\""); nameSyntax.put("jndi.syntax.trimblanks", "true"); nameSyntax.put("jndi.syntax.separator.ava", "+"); nameSyntax.put("jndi.syntax.separator.typeval", "="); } // Can not be constructed private LdapNameParser() {} // Shared instance must be used public static LdapNameParser getParser() { if (m_parser == null) { m_parser = new LdapNameParser(); } return m_parser; } // implements parse public Name parse(String name) throws NamingException { return new CompoundName(name, nameSyntax); } /** * A convenience method for extracting RDN * @return RDN for the DN * @param dn Ldap Distinguished name * @throw NamingException Name parsing failed */ static String getRDN(String dn) throws NamingException { Name parsedName = getParser().parse(dn); if (parsedName.size() > 0) { return parsedName.get(parsedName.size()-1); } return ""; } /** * A convenience method for extracting attribute name from name=val * @return attribute name or null if "=" not found * @param nameEqVal name=value */ static String getAttrName(String nameEqVal) throws NamingException { int eq = nameEqVal.indexOf("="); return (eq >= 0) ? nameEqVal.substring(0,eq).trim() : null; } /** * A convenience method for extracting attribute value from name=val * @return attribute value or null if "=" not found * @param nameEqVal name=value */ static String getAttrValue(String nameEqVal) throws NamingException { int eq = nameEqVal.indexOf("="); return (eq >= 0) ? nameEqVal.substring(eq+1).trim() : null; } /** * A convenience method for extracting relative name from the ancestor context * @return name relative to an ancestor context * @param ctx ancestor context distinguished name * @param entry distinguished name */ static String getRelativeName(String ctx, String entry) throws NamingException{ if (entry==null) { entry = ""; } Name contextName = getParser().parse(ctx); Name entryName = getParser().parse(entry); if (!entryName.startsWith(contextName)) { throw new NamingException("Name not in context"); } return entryName.getSuffix(contextName.size()).toString(); } /** * A convenience method for extracting relative name from the ancestor context * @return name relative to an ancestor context * @param ctx ancestor context distinguished name * @param entry distinguished name */ static String getRelativeName(Name contextName, String entry) throws NamingException{ if (entry==null) { entry = ""; } Name entryName = getParser().parse(entry); if (!entryName.startsWith(contextName)) { throw new NamingException("Name not in context"); } return entryName.getSuffix(contextName.size()).toString(); } /** * Unit test */ public static void main0(String[] args) { if (args.length != 1) { System.out.println("Usage LdapNameParser "); System.exit(1); } try { Name name = getParser().parse(args[0]); System.out.println(name); System.out.println("rdn: " + getParser().getRDN(args[0])); name.add("attr=val"); System.out.println(name); System.out.println(name.get(0)); System.out.println("in name=val name:<" + getAttrName("name=val ") + "> val:<" + getAttrValue("name=val ") + ">"); } catch (Exception e) { System.err.println(e); } } // Relative name test public static void main(String[] args) { if (args.length != 2) { System.out.println("Usage LdapNameParser "); System.exit(1); } try { System.out.println("relativeName: " + getParser().getRelativeName(args[0], args[1])); } catch (Exception e) { System.err.println(e); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/0000775001003300100330000000000010667357332026565 5ustar viveklvivekl././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaElementNameEnum.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaElementNameEnum.j0000664001003300100330000000545710602743273033103 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import java.util.*; class SchemaElementNameEnum implements NamingEnumeration { /** * Enumeration of schema object names packaged into NameClassPair. * The class in NameClassPair is DirContext */ Enumeration m_nameEnum; static final String _className = "javax.naming.directory.DirContext"; // for class name is bindings"; public SchemaElementNameEnum(Enumeration nameEnum) { m_nameEnum = nameEnum; } public Object next() throws NamingException{ return nextElement(); } public Object nextElement() { String name = (String) m_nameEnum.nextElement(); return new NameClassPair(name, _className, /*isRelative=*/true); } public boolean hasMore() throws NamingException{ return m_nameEnum.hasMoreElements(); } public boolean hasMoreElements() { return m_nameEnum.hasMoreElements(); } public void close() {} } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaAttribute.java0000664001003300100330000003020210602743273032501 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public class SchemaAttribute extends SchemaElement { LDAPAttributeSchema m_ldapAttribute; // Attribute IDs that are exposed through Netscape LdapJDK private static String[] m_allAttrIds = {NUMERICOID, NAME, DESC, OBSOLETE, SUP, EQUALITY, ORDERING, SUBSTRING, SYNTAX, SINGLEVALUE, COLLECTIVE, NOUSERMOD, USAGE }; public SchemaAttribute(LDAPAttributeSchema ldapAttribute, SchemaManager schemaManager) { super(schemaManager); m_ldapAttribute = ldapAttribute; m_path = ATTRDEF + "/" + m_ldapAttribute.getName(); } public SchemaAttribute(Attributes attrs, SchemaManager schemaManager) throws NamingException { super(schemaManager); m_ldapAttribute = parseDefAttributes(attrs); m_path = ATTRDEF + "/" + m_ldapAttribute.getName(); } /** * Parse Definition Attributes for a LDAP attribute */ static LDAPAttributeSchema parseDefAttributes(Attributes attrs) throws NamingException { String name=null, oid=null, desc=null, syntax=null, usage=null, sup=null; String equality=null, ordering=null, substring=null; boolean singleValued=false, collective=false, obsolete=false, noUserMod=false; for (Enumeration attrEnum = attrs.getAll(); attrEnum.hasMoreElements(); ) { Attribute attr = (Attribute) attrEnum.nextElement(); String attrName = attr.getID(); if (attrName.equals(NAME)) { name = getSchemaAttrValue(attr); } else if (attrName.equals(NUMERICOID)) { oid = getSchemaAttrValue(attr); } else if (attrName.equals(SYNTAX)) { syntax = getSchemaAttrValue(attr); } else if (attrName.equals(DESC)) { desc = getSchemaAttrValue(attr); } else if (attrName.equals(SINGLEVALUE)) { singleValued = parseTrueFalseValue(attr); } else if (attrName.equals(SUP)) { sup = getSchemaAttrValue(attr); } else if (attrName.equals(USAGE)) { usage = getSchemaAttrValue(attr); } else if (attrName.equals(OBSOLETE)) { obsolete = parseTrueFalseValue(attr); } else if (attrName.equals(COLLECTIVE)) { collective = parseTrueFalseValue(attr); } else if (attrName.equals(NOUSERMOD)) { noUserMod = parseTrueFalseValue(attr); } else if (attrName.equals(EQUALITY)) { equality = getSchemaAttrValue(attr); } else if (attrName.equals(ORDERING)) { ordering = getSchemaAttrValue(attr); } else if (attrName.equals(SUBSTRING)) { substring = getSchemaAttrValue(attr); } else { throw new NamingException("Invalid schema attribute type for attribute definition " + attrName); } } LDAPAttributeSchema attrSchema = new LDAPAttributeSchema(name, oid, desc, syntax, singleValued, sup, null); if (obsolete) { attrSchema.setQualifier(OBSOLETE, ""); } if (collective) { attrSchema.setQualifier(COLLECTIVE, ""); } if (noUserMod) { attrSchema.setQualifier(NOUSERMOD, ""); } if (equality != null) { attrSchema.setQualifier(EQUALITY, equality); } if (ordering != null) { attrSchema.setQualifier(ORDERING, ordering); } if (substring != null) { attrSchema.setQualifier(SUBSTRING, substring); } if (usage != null) { attrSchema.setQualifier(USAGE, usage); } return attrSchema; } /** * Exctract specified attributes from the ldapObjectClass */ Attributes extractAttributeIds(String[] attrIds) throws NamingException{ Attributes attrs = new BasicAttributes(); String val = null, multiVal[]=null; for (int i = 0; i < attrIds.length; i++) { if (attrIds[i].equals(NUMERICOID)) { val = m_ldapAttribute.getID(); if (val != null) { attrs.put(new BasicAttribute(NUMERICOID, val)); } } else if (attrIds[i].equals(NAME)) { val = m_ldapAttribute.getName(); if (val != null) { attrs.put(new BasicAttribute(NAME, val)); } } else if (attrIds[i].equals(DESC)) { val = m_ldapAttribute.getDescription(); if (val != null) { attrs.put(new BasicAttribute(DESC, val)); } } else if (attrIds[i].equals(SYNTAX)) { val = m_ldapAttribute.getSyntaxString(); if (val != null) { attrs.put(new BasicAttribute(SYNTAX, val)); } } else if (attrIds[i].equals(SINGLEVALUE)) { if (m_ldapAttribute.isSingleValued()) { attrs.put(new BasicAttribute(SINGLEVALUE, "true")); } } else if (attrIds[i].equals(SUP)) { val = m_ldapAttribute.getSuperior(); if (val != null) { attrs.put(new BasicAttribute(SUP, val)); } } else if (attrIds[i].equals(USAGE)) { multiVal = m_ldapAttribute.getQualifier(USAGE); if (multiVal != null) { attrs.put(new BasicAttribute(USAGE, multiVal)); } } else if (attrIds[i].equals(OBSOLETE)) { if (m_ldapAttribute.getQualifier(OBSOLETE) != null) { attrs.put(new BasicAttribute(OBSOLETE, "true")); } } else if (attrIds[i].equals(COLLECTIVE)) { if (m_ldapAttribute.getQualifier(COLLECTIVE) != null) { attrs.put(new BasicAttribute(COLLECTIVE, "true")); } } else if (attrIds[i].equals(NOUSERMOD)) { if (m_ldapAttribute.getQualifier(NOUSERMOD) != null) { attrs.put(new BasicAttribute(NOUSERMOD, "true")); } } else if (attrIds[i].equals(EQUALITY)) { multiVal = m_ldapAttribute.getQualifier(EQUALITY); if (multiVal != null) { attrs.put(new BasicAttribute(EQUALITY, multiVal)); } } else if (attrIds[i].equals(ORDERING)) { multiVal = m_ldapAttribute.getQualifier(ORDERING); if (multiVal != null) { attrs.put(new BasicAttribute(ORDERING, multiVal)); } } else if (attrIds[i].equals(SUBSTRING)) { multiVal = m_ldapAttribute.getQualifier(SUBSTRING); if (multiVal != null) { attrs.put(new BasicAttribute(SUBSTRING, multiVal)); } } else { throw new NamingException("Invalid schema attribute type for attribute definition " + attrIds[i]); } } return attrs; } /** * DirContext Attribute Operations */ public Attributes getAttributes(String name) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } return extractAttributeIds(m_allAttrIds); } public Attributes getAttributes(String name, String[] attrIds) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } return extractAttributeIds(attrIds); } public Attributes getAttributes(Name name) throws NamingException { return getAttributes(name.toString()); } public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { return getAttributes(name.toString(), attrIds); } public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } Attributes modAttrs = extractAttributeIds(m_allAttrIds); modifySchemaElementAttrs(modAttrs, mod_op, attrs); LDAPAttributeSchema modLdapAttribute = parseDefAttributes(modAttrs); m_schemaMgr.modifyAttribute(m_ldapAttribute, modLdapAttribute); m_ldapAttribute = modLdapAttribute; } public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } Attributes modAttrs = extractAttributeIds(m_allAttrIds); modifySchemaElementAttrs(modAttrs, mods); LDAPAttributeSchema modLdapAttribute = parseDefAttributes(modAttrs); m_schemaMgr.modifyAttribute(m_ldapAttribute, modLdapAttribute); m_ldapAttribute = modLdapAttribute; } public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException { modifyAttributes(name.toString(), mod_op, attrs); } public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException { modifyAttributes(name.toString(), mods); } /** * Search operations are not implemented because of complexity. Ir will require * to implement the full LDAP search filter sematics in the client. (The search * filter sematics is implemented by the Directory server). */ } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaElementContainer.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaElementContainer.0000664001003300100330000002045210602743273033136 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public abstract class SchemaElementContainer extends SchemaDirContext { SchemaManager m_schemaMgr; public SchemaElementContainer(SchemaManager schemaMgr, String path) throws NamingException{ m_schemaMgr = schemaMgr; m_path = path; } /** * Create a new SchemaElement. Called by craeteSubcontext */ abstract DirContext createSchemaElement(String name, Attributes attrs) throws NamingException; /** * Delete a new SchemaElement. Called by destroySubcontext */ abstract void removeSchemaElement(String name) throws NamingException; /** * Return a list of names for subordinate SchemaElement. Called by list() */ abstract NamingEnumeration getNameList(String name) throws NamingException; /** * Return a list of bindings for subordinate SchemaElement. Called by * listBindings() */ abstract NamingEnumeration getBindingsList(String name) throws NamingException; /** * Get a SchemaElement by name */ abstract Object lookupSchemaElement(String name) throws NamingException; /** * Attribute Operations */ public Attributes getAttributes(String name) throws NamingException { SchemaDirContext schemaElement = (SchemaDirContext)lookup(name); if (schemaElement == this) { throw new OperationNotSupportedException("No Attributes for " + m_path); } else { return schemaElement.getAttributes(""); } } public Attributes getAttributes(String name, String[] attrIds) throws NamingException { SchemaDirContext schemaElement = (SchemaDirContext)lookup(name); if (schemaElement == this) { throw new OperationNotSupportedException("No Attributes for " + m_path); } else { return schemaElement.getAttributes("", attrIds); } } public Attributes getAttributes(Name name) throws NamingException { return getAttributes(name.toString()); } public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { return getAttributes(name.toString(), attrIds); } public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { SchemaDirContext schemaElement = (SchemaDirContext)lookup(name); if (schemaElement == this) { throw new OperationNotSupportedException("No Attributes for " + m_path); } else { schemaElement.modifyAttributes("", mod_op, attrs); } } public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { SchemaDirContext schemaElement = (SchemaDirContext)lookup(name); if (schemaElement == this) { throw new OperationNotSupportedException("No Attributes for " + m_path); } else { schemaElement.modifyAttributes("", mods); } } public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException { modifyAttributes(name.toString(), mod_op, attrs); } public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException { modifyAttributes(name.toString(), mods); } /** * Ldap entry operations */ public Context createSubcontext(String name) throws NamingException { // Directory entry must have attributes throw new OperationNotSupportedException(); } public Context createSubcontext(Name name) throws NamingException { // Directory entry must have attributes throw new OperationNotSupportedException(); } public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { return createSchemaElement(name, attrs); } public DirContext createSubcontext(Name name, Attributes attrs) throws NamingException { return createSubcontext(name.toString(), attrs); } public void destroySubcontext(String name) throws NamingException { removeSchemaElement(name); } public void destroySubcontext(Name name) throws NamingException { destroySubcontext(name.toString()); } /** * Naming Bind operations */ public void bind(String name, Object obj) throws NamingException { if (obj instanceof DirContext) { createSubcontext(name, ((DirContext)obj).getAttributes("")); } else { throw new IllegalArgumentException("Can not bind this type of object"); } } public void bind(Name name, Object obj) throws NamingException { bind(name.toString(), obj); } public void rebind(String name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } public void rebind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } public void rename(String oldName, String newName) throws NamingException { throw new OperationNotSupportedException(); } public void rename(Name oldName, Name newName) throws NamingException { throw new OperationNotSupportedException(); } public void unbind(String name) throws NamingException { destroySubcontext(name); } public void unbind(Name name) throws NamingException { destroySubcontext(name); } /** * List Operations */ public NamingEnumeration list(String name) throws NamingException { return getNameList(name); } public NamingEnumeration list(Name name) throws NamingException { return list(name.toString()); } public NamingEnumeration listBindings(String name) throws NamingException { return getBindingsList(name); } public NamingEnumeration listBindings(Name name) throws NamingException { return listBindings(name.toString()); } /** * Lookup Operations */ public Object lookup(String name) throws NamingException { return lookupSchemaElement(name); } public Object lookup(Name name) throws NamingException { return lookup(name.toString()); } public Object lookupLink(String name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookupLink(Name name) throws NamingException { throw new OperationNotSupportedException(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaElement.java0000664001003300100330000002351610602743273032141 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public class SchemaElement extends SchemaDirContext { SchemaManager m_schemaMgr; // Attributes used to define schema elements static final String NUMERICOID = "NUMERICOID"; static final String NAME = "NAME"; static final String DESC = "DESC"; static final String SYNTAX = "SYNTAX"; static final String SUP = "SUP"; static final String MUST = "MUST"; static final String MAY = "MAY"; static final String SINGLEVALUE = "SINGLE-VALUE"; // These attribute definition properties are not supported by LdapJDK and DS // Accept them for the appropriate schema element, but ignore them static final String OBSOLETE = "OBSOLETE"; static final String EQUALITY = "EQUALITY"; static final String ORDERING = "ORDERING"; static final String SUBSTRING = "SUBSTRING"; static final String COLLECTIVE = "COLLECTIVE"; static final String NOUSERMOD = "NO-USER-MODIFICATION"; static final String USAGE = "USAGE"; static final String ABSTRACT = "ABSTRACT"; static final String STRUCTURAL = "STRUCTURAL"; static final String AUXILIARY = "AUXILIARY"; // Syntax string recognized by Netscape LdapJDK static final String cisString = "1.3.6.1.4.1.1466.115.121.1.15"; static final String binaryString = "1.3.6.1.4.1.1466.115.121.1.5"; static final String telephoneString = "1.3.6.1.4.1.1466.115.121.1.50"; static final String cesString = "1.3.6.1.4.1.1466.115.121.1.26"; static final String intString = "1.3.6.1.4.1.1466.115.121.1.27"; static final String dnString = "1.3.6.1.4.1.1466.115.121.1.12"; SchemaElement(SchemaManager schemaMgr) { m_schemaMgr = schemaMgr; } /** * Map a syntax oid string to a constant recognized by LdapJDK */ static int syntaxStringToInt(String syntax) throws NamingException{ if (syntax.equals(cisString)) { return LDAPSchemaElement.cis; } else if (syntax.equals(cesString)) { return LDAPSchemaElement.ces; } else if (syntax.equals(telephoneString)) { return LDAPSchemaElement.telephone; } else if (syntax.equals(intString)) { return LDAPSchemaElement.integer; } else if (syntax.equals(dnString)) { return LDAPSchemaElement.dn; } else if (syntax.equals(binaryString)) { return LDAPSchemaElement.binary; } else { throw new InvalidAttributeValueException(syntax); } } /** * Map a syntax identifier to a oid string */ static String syntaxIntToString(int syntax) throws NamingException{ if (syntax == LDAPSchemaElement.cis) { return cisString; } else if (syntax == LDAPSchemaElement.ces) { return cesString; } else if (syntax == LDAPSchemaElement.telephone) { return telephoneString; } else if (syntax == LDAPSchemaElement.integer) { return intString; } else if (syntax == LDAPSchemaElement.dn) { return dnString; } else if (syntax == LDAPSchemaElement.binary) { return binaryString; } else { throw new InvalidAttributeValueException("Interanal error, unexpected syntax value " + syntax); } } /** * Convert string vector to an array */ static String[] vectorToStringAry(Vector v) { String[] ary = new String[v.size()]; for(int i=0; i 0) { BasicAttribute applies = new BasicAttribute(APPLIES); for (int a=0; a < appliesToAttrs.length; a++) { applies.add(appliesToAttrs[a]); } attrs.put(applies); } } else if (attrIds[i].equals(OBSOLETE)) { if (m_ldapMatchingRule.getQualifier(OBSOLETE)!= null) { attrs.put(new BasicAttribute(OBSOLETE, "true")); } } else { throw new NamingException("Invalid schema attribute type for matching rule definition " + attrIds[i]); } } return attrs; } /** * DirContext Attribute Operations */ public Attributes getAttributes(String name) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } return extractAttributeIds(m_allAttrIds); } public Attributes getAttributes(String name, String[] attrIds) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } return extractAttributeIds(attrIds); } public Attributes getAttributes(Name name) throws NamingException { return getAttributes(name.toString()); } public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { return getAttributes(name.toString(), attrIds); } public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } Attributes modAttrs = extractAttributeIds(m_allAttrIds); modifySchemaElementAttrs(modAttrs, mod_op, attrs); LDAPMatchingRuleSchema modLdapMatchingRule = parseDefAttributes(modAttrs); m_schemaMgr.modifyMatchingRule(m_ldapMatchingRule, modLdapMatchingRule); m_ldapMatchingRule = modLdapMatchingRule; } public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { if (name.length() != 0) { // no subcontexts throw new NameNotFoundException(name); // no such object } Attributes modAttrs = extractAttributeIds(m_allAttrIds); modifySchemaElementAttrs(modAttrs, mods); LDAPMatchingRuleSchema modLdapMatchingRule = parseDefAttributes(modAttrs); m_schemaMgr.modifyMatchingRule(m_ldapMatchingRule, modLdapMatchingRule); m_ldapMatchingRule = modLdapMatchingRule; } public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException { modifyAttributes(name.toString(), mod_op, attrs); } public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException { modifyAttributes(name.toString(), mods); } /** * Search operations are not implemented because of complexity. Ir will require * to implement the full LDAP search filter sematics in the client. (The search * filter sematics is implemented by the Directory server). */ } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaMatchingRuleContainer.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaMatchingRuleConta0000664001003300100330000001007610602743273033174 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public class SchemaMatchingRuleContainer extends SchemaElementContainer { public SchemaMatchingRuleContainer(SchemaManager schemaMgr) throws NamingException{ super(schemaMgr, MRULEDEF); } /** * Ldap entry operations */ public DirContext createSchemaElement(String name, Attributes attrs) throws NamingException { if (name.length() == 0) { throw new NamingException("Empty name for schema objectclass"); } LDAPMatchingRuleSchema mrule = SchemaMatchingRule.parseDefAttributes(attrs); m_schemaMgr.createMatchingRule(mrule); return new SchemaMatchingRule(mrule, m_schemaMgr); } public void removeSchemaElement(String name) throws NamingException { if (name.length() == 0) { throw new NamingException("Can not delete schema object container"); } m_schemaMgr.removeMatchingRule(name); } /** * List Operations */ public NamingEnumeration getNameList(String name) throws NamingException { SchemaDirContext schemaObj = (SchemaDirContext)lookup(name); if (schemaObj == this) { return new SchemaElementNameEnum(m_schemaMgr.getMatchingRuleNames()); } else { throw new NotContextException(name); } } public NamingEnumeration getBindingsList(String name) throws NamingException { SchemaDirContext schemaObj = (SchemaDirContext)lookup(name); if (schemaObj == this) { return new SchemaElementBindingEnum(m_schemaMgr.getMatchingRules(), m_schemaMgr); } else { throw new NotContextException(name); } } /** * Lookup Operations */ public Object lookupSchemaElement(String name) throws NamingException { if (name.length() == 0) { return this; } // No caching; Always create a new object LDAPMatchingRuleSchema mrule = m_schemaMgr.getMatchingRule(name); if (mrule == null) { throw new NameNotFoundException(name); } return new SchemaMatchingRule(mrule, m_schemaMgr); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaManager.java0000664001003300100330000002050410602743273032114 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import java.util.*; import com.netscape.jndi.ldap.common.*; /** * A wrapper calss for LDAPSchema. It main purpose is to manage loading of schema * on demand. The schema is loaded when accessed for the first time, or after changes * to the schema have been made. */ class SchemaManager { /** * LdapJDK main schema object */ private LDAPSchema m_schema; /** * LDAP Connection object */ private LDAPConnection m_ld; /** * Flag whether schema needs to be loaded by calling fetchSchema() */ private boolean m_isLoaded; /** * Flag whether schema objects have been modified in the Directory (add, remove) * but the change has not been propagated to the cached m_schema object */ private boolean m_isObjectClassDirty, m_isAttributeDirty, m_isMatchingRuleDirty; /** * Must constract with LDAP Connection */ private SchemaManager() {} /** * Connstructor */ public SchemaManager(LDAPConnection ld) { m_ld = ld; m_isLoaded = false; m_isObjectClassDirty = m_isAttributeDirty = m_isMatchingRuleDirty = false; } /** * Load the schema */ void load() throws NamingException { try { m_schema = new LDAPSchema(); m_schema.fetchSchema(m_ld); m_isLoaded = true; m_isObjectClassDirty = m_isAttributeDirty = m_isMatchingRuleDirty = false; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } LDAPObjectClassSchema getObjectClass(String name) throws NamingException { if (!m_isLoaded || m_isObjectClassDirty) { load(); } return m_schema.getObjectClass(name); } LDAPAttributeSchema getAttribute(String name) throws NamingException { if (!m_isLoaded || m_isAttributeDirty) { load(); } return m_schema.getAttribute(name); } LDAPMatchingRuleSchema getMatchingRule(String name) throws NamingException { if (!m_isLoaded || m_isMatchingRuleDirty) { load(); } return m_schema.getMatchingRule(name); } Enumeration getObjectClassNames() throws NamingException { if (!m_isLoaded || m_isObjectClassDirty) { load(); } return m_schema.getObjectClassNames(); } Enumeration getAttributeNames() throws NamingException { if (!m_isLoaded || m_isAttributeDirty) { load(); } return m_schema.getAttributeNames(); } Enumeration getMatchingRuleNames() throws NamingException { if (!m_isLoaded || m_isMatchingRuleDirty) { load(); } return m_schema.getMatchingRuleNames(); } Enumeration getObjectClasses() throws NamingException { if (!m_isLoaded || m_isObjectClassDirty) { load(); } return m_schema.getObjectClasses(); } Enumeration getAttributes() throws NamingException { if (!m_isLoaded || m_isAttributeDirty) { load(); } return m_schema.getAttributes(); } Enumeration getMatchingRules() throws NamingException { if (!m_isLoaded || m_isMatchingRuleDirty) { load(); } return m_schema.getMatchingRules(); } void createObjectClass(LDAPObjectClassSchema objclass) throws NamingException { try { objclass.add(m_ld); m_isObjectClassDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void createAttribute(LDAPAttributeSchema attr) throws NamingException { try { attr.add(m_ld); m_isAttributeDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void createMatchingRule(LDAPMatchingRuleSchema mrule) throws NamingException { try { mrule.add(m_ld); m_isMatchingRuleDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void removeObjectClass(String name) throws NamingException { LDAPObjectClassSchema objclass = getObjectClass(name); if (objclass == null) { throw new NameNotFoundException(name); } try { objclass.remove(m_ld); m_isObjectClassDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void removeAttribute(String name) throws NamingException { LDAPAttributeSchema attr = getAttribute(name); if (attr == null) { throw new NameNotFoundException(name); } try { attr.remove(m_ld); m_isAttributeDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void removeMatchingRule(String name) throws NamingException { LDAPMatchingRuleSchema mrule = getMatchingRule(name); if (mrule == null) { throw new NameNotFoundException(name); } try { mrule.remove(m_ld); m_isMatchingRuleDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void modifyObjectClass(LDAPObjectClassSchema objclass, LDAPObjectClassSchema modObjClass) throws NamingException { try { objclass.modify(m_ld, modObjClass); m_isObjectClassDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void modifyAttribute(LDAPAttributeSchema attr, LDAPAttributeSchema modAttr) throws NamingException { try { attr.modify(m_ld, modAttr); m_isAttributeDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } void modifyMatchingRule(LDAPMatchingRuleSchema mrule, LDAPMatchingRuleSchema modMRule) throws NamingException { try { mrule.modify(m_ld, modMRule); m_isMatchingRuleDirty = true; } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaAttributeContainer.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaAttributeContaine0000664001003300100330000001001710602743273033244 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public class SchemaAttributeContainer extends SchemaElementContainer { public SchemaAttributeContainer(SchemaManager schemaMgr) throws NamingException{ super(schemaMgr, ATTRDEF); } /** * Ldap entry operations */ public DirContext createSchemaElement(String name, Attributes attrs) throws NamingException { if (name.length() == 0) { throw new NamingException("Empty name for schema objectclass"); } LDAPAttributeSchema attr = SchemaAttribute.parseDefAttributes(attrs); m_schemaMgr.createAttribute(attr); return new SchemaAttribute(attr, m_schemaMgr); } public void removeSchemaElement(String name) throws NamingException { if (name.length() == 0) { throw new NamingException("Can not delete schema object container"); } m_schemaMgr.removeAttribute(name); } /** * List Operations */ public NamingEnumeration getNameList(String name) throws NamingException { SchemaDirContext schemaObj = (SchemaDirContext)lookup(name); if (schemaObj == this) { return new SchemaElementNameEnum(m_schemaMgr.getAttributeNames()); } else { throw new NotContextException(name); } } public NamingEnumeration getBindingsList(String name) throws NamingException { SchemaDirContext schemaObj = (SchemaDirContext)lookup(name); if (schemaObj == this) { return new SchemaElementBindingEnum(m_schemaMgr.getAttributes(), m_schemaMgr); } else { throw new NotContextException(name); } } /** * Lookup Operations */ public Object lookupSchemaElement(String name) throws NamingException { if (name.length() == 0) { return this; } // No caching; Always create a new object LDAPAttributeSchema attr = m_schemaMgr.getAttribute(name); if (attr == null) { throw new NameNotFoundException(name); } return new SchemaAttribute(attr, m_schemaMgr); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaRoot.java0000664001003300100330000003000610602743273031463 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public class SchemaRoot extends SchemaDirContext { static final String m_className = "javax.naming.directory.DirContext"; // for class name is bindings SchemaDirContext m_classContainer, m_attrContainer, m_matchRuleContainer; SchemaManager m_schemaMgr; public SchemaRoot(LDAPConnection ld) throws NamingException{ m_path = ""; m_schemaMgr = new SchemaManager(ld); m_classContainer = new SchemaObjectClassContainer(m_schemaMgr); m_attrContainer = new SchemaAttributeContainer(m_schemaMgr); m_matchRuleContainer = new SchemaMatchingRuleContainer(m_schemaMgr); } SchemaObjectSubordinateNamePair resolveSchemaObject(String name) throws NamingException{ SchemaDirContext obj = null; if (name.length() == 0) { obj = this; } else if (name.startsWith(CLASSDEF) || name.startsWith(CLASSDEF.toLowerCase())) { name = name.substring(CLASSDEF.length()); obj = m_classContainer; } else if (name.startsWith(ATTRDEF) || name.startsWith(ATTRDEF.toLowerCase())) { name = name.substring(ATTRDEF.length()); obj = m_attrContainer; } else if (name.startsWith(MRULEDEF) || name.startsWith(MRULEDEF.toLowerCase())) { name = name.substring(MRULEDEF.length()); obj = m_matchRuleContainer; } else { throw new NameNotFoundException(name); } if (name.length() > 1 && name.startsWith("/")) { name = name.substring(1); } return new SchemaObjectSubordinateNamePair(obj, name); } /** * Attribute Operations */ public Attributes getAttributes(String name) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { throw new OperationNotSupportedException(); } else { return objNamePair.schemaObj.getAttributes(objNamePair.subordinateName); } } public Attributes getAttributes(String name, String[] attrIds) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { throw new OperationNotSupportedException(); } else { return objNamePair.schemaObj.getAttributes(objNamePair.subordinateName, attrIds); } } public Attributes getAttributes(Name name) throws NamingException { return getAttributes(name.toString()); } public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { return getAttributes(name.toString(), attrIds); } public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException { throw new OperationNotSupportedException(); } /** * Ldap entry operations */ public Context createSubcontext(String name) throws NamingException { // Directory entry must have attributes throw new OperationNotSupportedException(); } public Context createSubcontext(Name name) throws NamingException { // Directory entry must have attributes throw new OperationNotSupportedException(); } public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { throw new OperationNotSupportedException(); } else { return objNamePair.schemaObj.createSubcontext(objNamePair.subordinateName, attrs); } } public DirContext createSubcontext(Name name, Attributes attrs) throws NamingException { return createSubcontext(name.toString(), attrs); } public void destroySubcontext(String name) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { throw new OperationNotSupportedException(); } else { objNamePair.schemaObj.destroySubcontext(objNamePair.subordinateName); } } public void destroySubcontext(Name name) throws NamingException { destroySubcontext(name.toString()); } /** * Naming Bind operations */ public void bind(String name, Object obj) throws NamingException { if (obj instanceof DirContext) { createSubcontext(name, ((DirContext)obj).getAttributes("")); } else { throw new IllegalArgumentException("Can not bind this type of object"); } } public void bind(Name name, Object obj) throws NamingException { bind(name.toString(), obj); } public void rebind(String name, Object obj) throws NamingException { unbind(name); bind(name, obj); } public void rebind(Name name, Object obj) throws NamingException { rebind(name.toString(), obj); } public void rename(String oldName, String newName) throws NamingException { throw new OperationNotSupportedException(); } public void rename(Name oldName, Name newName) throws NamingException { rename(oldName.toString(), newName.toString()); } public void unbind(String name) throws NamingException { // In ldap every entry is naming context destroySubcontext(name); } public void unbind(Name name) throws NamingException { // In ldap every entry is naming context destroySubcontext(name); } /** * List Operations */ public NamingEnumeration list(String name) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { return new SchemaRootNameClassPairEnum(); } else { return objNamePair.schemaObj.list(objNamePair.subordinateName); } } public NamingEnumeration list(Name name) throws NamingException { return list(name.toString()); } public NamingEnumeration listBindings(String name) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { return new SchemaRootBindingEnum(); } else { return objNamePair.schemaObj.listBindings(objNamePair.subordinateName); } } public NamingEnumeration listBindings(Name name) throws NamingException { return listBindings(name.toString()); } /** * Lookup Operations */ public Object lookup(String name) throws NamingException { SchemaObjectSubordinateNamePair objNamePair = resolveSchemaObject(name); if (objNamePair.schemaObj == this) { return this; } else { return objNamePair.schemaObj.lookup(objNamePair.subordinateName); } } public Object lookup(Name name) throws NamingException { return lookup(name.toString()); } public Object lookupLink(String name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookupLink(Name name) throws NamingException { throw new OperationNotSupportedException(); } /** * Test program */ public static void main(String args[]) { try { String name = args[0]; System.out.println((new SchemaRoot(null)).resolveSchemaObject(name)); } catch (Exception e) { System.err.println(e); } } /** * NamigEnumeration of NameClassPairs */ class SchemaRootNameClassPairEnum implements NamingEnumeration { private int m_idx = -1; public Object next() { return nextElement(); } public Object nextElement() { m_idx++; if (m_idx == 0 ) { return new NameClassPair(CLASSDEF, m_className); } else if (m_idx == 1) { return new NameClassPair(ATTRDEF, m_className); } else if (m_idx == 2) { return new NameClassPair(MRULEDEF, m_className); } else { throw new NoSuchElementException("SchemaRootEnumerator"); } } public boolean hasMore() { return hasMoreElements(); } public boolean hasMoreElements() { return m_idx < 2; } public void close() {} } /** * NamingEnumeration of Bindings */ class SchemaRootBindingEnum implements NamingEnumeration { private int m_idx = -1; public Object next() { return nextElement(); } public Object nextElement() { m_idx++; if (m_idx == 0 ) { return new Binding(CLASSDEF, m_className, m_classContainer); } else if (m_idx == 1) { return new Binding(ATTRDEF, m_className, m_attrContainer); } else if (m_idx == 2) { return new Binding(MRULEDEF, m_className, m_matchRuleContainer); } else { throw new NoSuchElementException("SchemaRootEnumerator"); } } public boolean hasMore() { return hasMoreElements(); } public boolean hasMoreElements() { return m_idx < 2; } public void close() {} } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaNameParser.java0000664001003300100330000000527510602743273032607 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import java.util.Hashtable; import java.util.Properties; import javax.naming.*; class SchemaNameParser implements NameParser { private static SchemaNameParser m_parser; // A table with compound name syntax properties static Properties nameSyntax; static { nameSyntax = new Properties(); nameSyntax.put("jndi.syntax.direction", "left_to_right"); nameSyntax.put("jndi.syntax.separator", "/"); nameSyntax.put("jndi.syntax.ignorecase", "true"); } // Can not be constructed private SchemaNameParser() {} // Shared instance must be used public static SchemaNameParser getParser() { if (m_parser == null) { m_parser = new SchemaNameParser(); } return m_parser; } // implements parse public Name parse(String name) throws NamingException { return new CompoundName(name, nameSyntax); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaObjectClassContainer.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/schema/SchemaObjectClassContai0000664001003300100330000001010510602743273033150 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.schema; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; public class SchemaObjectClassContainer extends SchemaElementContainer { public SchemaObjectClassContainer(SchemaManager schemaMgr) throws NamingException{ super(schemaMgr, CLASSDEF); } /** * Ldap entry operations */ public DirContext createSchemaElement(String name, Attributes attrs) throws NamingException { if (name.length() == 0) { throw new NamingException("Empty name for schema objectclass"); } LDAPObjectClassSchema objclass = SchemaObjectClass.parseDefAttributes(attrs); m_schemaMgr.createObjectClass(objclass); return new SchemaObjectClass(objclass, m_schemaMgr); } public void removeSchemaElement(String name) throws NamingException { if (name.length() == 0) { throw new NamingException("Can not delete schema object container"); } m_schemaMgr.removeObjectClass(name); } /** * List Operations */ public NamingEnumeration getNameList(String name) throws NamingException { SchemaDirContext schemaObj = (SchemaDirContext)lookup(name); if (schemaObj == this) { return new SchemaElementNameEnum(m_schemaMgr.getObjectClassNames()); } else { throw new NotContextException(name); } } public NamingEnumeration getBindingsList(String name) throws NamingException { SchemaDirContext schemaObj = (SchemaDirContext)lookup(name); if (schemaObj == this) { return new SchemaElementBindingEnum(m_schemaMgr.getObjectClasses(), m_schemaMgr); } else { throw new NotContextException(name); } } /** * Lookup Operations */ public Object lookupSchemaElement(String name) throws NamingException { if (name.length() == 0) { return this; } // No caching; Always create a new object LDAPObjectClassSchema objclass = m_schemaMgr.getObjectClass(name); if (objclass == null) { throw new NameNotFoundException(name); } return new SchemaObjectClass(objclass, m_schemaMgr); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/LdapContextImpl.java0000664001003300100330000005527210602743273031242 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import javax.naming.event.*; import netscape.ldap.*; import netscape.ldap.controls.*; import com.netscape.jndi.ldap.controls.NetscapeControlFactory; import com.netscape.jndi.ldap.common.Debug; import java.util.*; /** * Implementation for the DirContext. The context also supports controls * through the implementation of LdapContext interface and events through * the implementaion of EventDirContext. * Semantically, the LdapContextImpl corresponds to a directory entry. * Thus a context is associated with a DN (m_ctxDN). Multiple contexts share * the same LDAPConnection which is wrapped into a LdapService object * (m_ldapSvc). Each context also maintains a set of environment properties * (m_ctxEnv). A context environment is shared among mutiple contexts using a * variation of copy-on-write algorithm (see common.ShareableEnv class). * * Each context also maintains a set of LDAPSearchConstraints, as search * constrainsts like e.g. server controls, or max number of returned search * search results, are context specific. The LdapService reads the * LDAPSearchConstraints from a context that makes a service request. */ public class LdapContextImpl implements EventDirContext, LdapContext { /** * Context environment setting */ protected ContextEnv m_ctxEnv; /** * DN associated with this context * The default value is the root DSE ("") */ protected String m_ctxDN; /** * Ldap Connection/Service */ protected LdapService m_ldapSvc; /** * Ldap Connection Search Constraints */ protected LDAPSearchConstraints m_searchCons; // TODO Should have a constructor that accepts attributes /** * Constructor */ public LdapContextImpl(Hashtable env) throws NamingException{ m_ctxEnv = new ContextEnv(env); // no need to clone (Hashtable)env.clone()); m_ldapSvc = new LdapService(); m_ldapSvc.connect(this); // BLITS but to be removed, hurts lazy resource usage getDN(); getSearchConstraints(); } /** * Copy Constructor */ public LdapContextImpl(String ctxDN, LdapContextImpl cloneCtx) throws NamingException{ m_ctxEnv = (ContextEnv)cloneCtx.m_ctxEnv.clone(); // An instance of ldapService is shared among multiple contexts. // Increment the client reference count m_ldapSvc = cloneCtx.m_ldapSvc; cloneCtx.m_ldapSvc.incrementClientCount(); if (cloneCtx.getSearchConstraints().getServerControls() == null) { m_searchCons = cloneCtx.getSearchConstraints(); } else { // In LdapContext Context Controls are not inherited by derived contexts m_searchCons = (LDAPSearchConstraints) cloneCtx.getSearchConstraints().clone(); m_searchCons.setServerControls((LDAPControl[])null); } m_ctxDN = ctxDN; } /** * Close the context when finalized */ protected void finalize() { Debug.println(1, "finalize ctx"); try { close(); } catch (Exception e) {} } /** * Disconnect the Ldap Connection if close is requested * LDAP operations can not be performed any more ones * the context is closed */ public void close() throws NamingException { m_ldapSvc.disconnect(); m_ldapSvc = null; } /** * Return LdapJdk search constraints for this context */ LDAPSearchConstraints getSearchConstraints() throws NamingException{ if (m_searchCons == null) { LDAPSearchConstraints cons = new LDAPSearchConstraints(); m_ctxEnv.updateSearchCons(cons); m_searchCons = cons; } return m_searchCons; } /** * Return DN for this context */ String getDN() throws NamingException{ if (m_ctxDN == null) { LDAPUrl url = m_ctxEnv.getDirectoryServerURL(); if (url != null && url.getDN() != null) { m_ctxDN = url.getDN(); } else { m_ctxDN = ""; } } return m_ctxDN; } /** * Return reference to the context environment */ ContextEnv getEnv() { return m_ctxEnv; } /** * Conver object to String */ public String toString() { return this.getClass().getName() + ": " + m_ctxDN; } /** * Check if LdapURL is passed as the name paremetr to a method * If that's the case, craete environment for the ldap url */ String checkLdapUrlAsName(String name) throws NamingException{ if (name.startsWith("ldap://")) { m_ctxEnv.setProperty(ContextEnv.P_PROVIDER_URL, name); close(); // Force reconnect m_ldapSvc = new LdapService(); // Return New name relative to the context return ""; } return name; } /** * Environment operatins (javax.naming.Context interface) */ public Hashtable getEnvironment() throws NamingException { return m_ctxEnv.getAllProperties(); } public Object addToEnvironment(String propName, Object propValue) throws NamingException { if (propName.equalsIgnoreCase(m_ctxEnv.P_TRACE)) { m_ldapSvc.setTraceOutput(propValue); } return m_ctxEnv.updateProperty(propName, propValue, getSearchConstraints()); } public Object removeFromEnvironment(String propName) throws NamingException { if (propName.equalsIgnoreCase(m_ctxEnv.P_TRACE)) { m_ldapSvc.setTraceOutput(null); } return m_ctxEnv.removeProperty(propName); } /** * Name operations (javax.naming.Context interface) */ public String composeName(String name, String prefix) throws NamingException { return name + "," + prefix; } public Name composeName(Name name, Name prefix) throws NamingException { String compoundName = composeName(name.toString(), prefix.toString()); return LdapNameParser.getParser().parse(compoundName); } public String getNameInNamespace() throws NamingException { return new String(m_ctxDN); } public NameParser getNameParser(String name) throws NamingException { return LdapNameParser.getParser(); } public NameParser getNameParser(Name name) throws NamingException { return LdapNameParser.getParser(); } /** * Search operations (javax.naming.DirContext interface) */ public NamingEnumeration search(String name, String filter, SearchControls cons) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.search(this, name, filter, /*attrs=*/null, cons); } public NamingEnumeration search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException { name = checkLdapUrlAsName(name); String filter = ProviderUtils.expandFilterExpr(filterExpr, filterArgs); return m_ldapSvc.search(this, name, filter, /*attrs=*/null, cons); } public NamingEnumeration search(String name, Attributes matchingAttributes) throws NamingException { name = checkLdapUrlAsName(name); String filter = ProviderUtils.attributesToFilter(matchingAttributes); return m_ldapSvc.search(this, name, filter, /*attrs=*/null, /*jndiCons=*/null); } public NamingEnumeration search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException { name = checkLdapUrlAsName(name); String filter = ProviderUtils.attributesToFilter(matchingAttributes); return m_ldapSvc.search(this, name, filter, attributesToReturn, /*jndiCons=*/null); } public NamingEnumeration search(Name name, String filter, SearchControls cons) throws NamingException { return m_ldapSvc.search(this, name.toString(), filter, /*attrs=*/null, cons); } public NamingEnumeration search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException { String filter = ProviderUtils.expandFilterExpr(filterExpr, filterArgs); return m_ldapSvc.search(this, name.toString(), filter, /*attrs=*/null, cons); } public NamingEnumeration search(Name name, Attributes attrs) throws NamingException { String filter = ProviderUtils.attributesToFilter(attrs); return m_ldapSvc.search(this, name.toString(), filter, /*attr=*/null, /*jndiCons=*/null); } public NamingEnumeration search(Name name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException { String filter = ProviderUtils.attributesToFilter(matchingAttributes); return m_ldapSvc.search(this, name.toString(), filter, attributesToReturn, /*jndiCons=*/null); } /** * Attribute Operations (javax.naming.DirContext interface) */ public Attributes getAttributes(String name) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.readAttrs(this, name, null); } public Attributes getAttributes(String name, String[] attrIds) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.readAttrs(this, name, attrIds); } public Attributes getAttributes(Name name) throws NamingException { return m_ldapSvc.readAttrs(this, name.toString(), null); } public Attributes getAttributes(Name name, String[] attrIds) throws NamingException { return m_ldapSvc.readAttrs(this, name.toString(), attrIds); } public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException { name = checkLdapUrlAsName(name); m_ldapSvc.modifyEntry(this, name, AttributesImpl.jndiAttrsToLdapModSet(mod_op, attrs)); } public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException { name = checkLdapUrlAsName(name); m_ldapSvc.modifyEntry(this, name, AttributesImpl.jndiModsToLdapModSet(mods)); } public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException { m_ldapSvc.modifyEntry(this, name.toString(), AttributesImpl.jndiAttrsToLdapModSet(mod_op, attrs)); } public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException { m_ldapSvc.modifyEntry(this, name.toString(), AttributesImpl.jndiModsToLdapModSet(mods)); } /** * Ldap entry operations (javax.naming.DirContext interface) */ public Context createSubcontext(String name) throws NamingException { // Directory entry must have attributes throw new OperationNotSupportedException(); } public Context createSubcontext(Name name) throws NamingException { // Directory entry must have attributes throw new OperationNotSupportedException(); } public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.addEntry(this, name, AttributesImpl.jndiAttrsToLdapAttrSet(attrs)); } public DirContext createSubcontext(Name name, Attributes attrs) throws NamingException { return m_ldapSvc.addEntry(this, name.toString(), AttributesImpl.jndiAttrsToLdapAttrSet(attrs)); } public void destroySubcontext(String name) throws NamingException { name = checkLdapUrlAsName(name); m_ldapSvc.delEntry(this, name); } public void destroySubcontext(Name name) throws NamingException { m_ldapSvc.delEntry(this, name.toString()); } /** * Naming Bind/Rename operations * (javax.naming.Context, javax.naming.DirContext interface) */ public void bind(String name, Object obj) throws NamingException { name = checkLdapUrlAsName(name); m_ldapSvc.addEntry(this, name.toString(), ObjectMapper.objectToAttrSet(obj, name, this, /*attrs=*/null)); } public void bind(Name name, Object obj) throws NamingException { bind(name.toString(), obj); } public void bind(String name, Object obj, Attributes attrs) throws NamingException { name = checkLdapUrlAsName(name); m_ldapSvc.addEntry(this, name.toString(), ObjectMapper.objectToAttrSet(obj, name, this, attrs)); } public void bind(Name name, Object obj, Attributes attrs) throws NamingException { bind(name.toString(), obj, attrs); } public void rebind(String name, Object obj) throws NamingException { rebind(name, obj, /*attrs=*/null); } public void rebind(Name name, Object obj) throws NamingException { rebind(name.toString(), obj, null); } public void rebind(String name, Object obj, Attributes attrs) throws NamingException { name = checkLdapUrlAsName(name); try { bind(name, obj, attrs); } catch (NameAlreadyBoundException ex) { unbind(name); bind(name, obj, attrs); } } public void rebind(Name name, Object obj, Attributes attrs) throws NamingException { rebind(name.toString(), obj, attrs); } public void rename(String oldName, String newName) throws NamingException { oldName = checkLdapUrlAsName(oldName); LdapNameParser parser = LdapNameParser.getParser(); Name oldNameObj = parser.parse(oldName); Name newNameObj = parser.parse(newName); rename(oldNameObj, newNameObj); } public void rename(Name oldName, Name newName) throws NamingException { // Can rename only RDN if (newName.size() != oldName.size()) { throw new InvalidNameException("Invalid name " + newName); } Name oldPrefix = oldName.getPrefix(oldName.size() -1); Name newPrefix = newName.getPrefix(oldName.size() -1); if (!newPrefix.equals(oldPrefix)) { throw new InvalidNameException("Invalid name " + newName); } m_ldapSvc.changeRDN(this, oldName.toString(), newName.get(newName.size()-1)); } public void unbind(String name) throws NamingException { name = checkLdapUrlAsName(name); // In ldap every entry is naming context destroySubcontext(name); } public void unbind(Name name) throws NamingException { // In ldap every entry is naming context destroySubcontext(name); } /** * List Operations (javax.naming.Context interface) */ public NamingEnumeration list(String name) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.listEntries(this, name, /*returnBindings=*/false); } public NamingEnumeration list(Name name) throws NamingException { return m_ldapSvc.listEntries(this, name.toString(), /*returnBindings=*/false); } public NamingEnumeration listBindings(String name) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.listEntries(this, name, /*returnBindings=*/true); } public NamingEnumeration listBindings(Name name) throws NamingException { return m_ldapSvc.listEntries(this, name.toString(), /*returnBindings=*/true); } /** * Lookup Operations (javax.naming.Context interface) */ public Object lookup(String name) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.lookup(this, name); } public Object lookup(Name name) throws NamingException { return m_ldapSvc.lookup(this, name.toString()); } public Object lookupLink(String name) throws NamingException { throw new OperationNotSupportedException(); } public Object lookupLink(Name name) throws NamingException { throw new OperationNotSupportedException(); } /** * Schema Operations (javax.naming.DirContext interface) */ public DirContext getSchema(String name) throws NamingException { name = checkLdapUrlAsName(name); return m_ldapSvc.getSchema(this, name); } public DirContext getSchema(Name name) throws NamingException { return m_ldapSvc.getSchema(this, name.toString()); } public DirContext getSchemaClassDefinition(String name) throws NamingException { name = checkLdapUrlAsName(name); throw new OperationNotSupportedException(); } public DirContext getSchemaClassDefinition(Name name) throws NamingException { return getSchemaClassDefinition(name.toString()); } /** * Naming Event methods javax.naming.event.EventDirContext interface) */ public void addNamingListener(String target, int scope, NamingListener l) throws NamingException { EventService eventSvc = m_ldapSvc.getEventService(this); String filter = LdapService.DEFAULT_FILTER; SearchControls ctls = new SearchControls(); ctls.setSearchScope(scope); eventSvc.addListener(this, target, filter, ctls, l); } public void addNamingListener(Name target, int scope, NamingListener l) throws NamingException { addNamingListener(target.toString(), scope, l); } public void addNamingListener(String target, String filter, SearchControls ctls, NamingListener l)throws NamingException { EventService eventSvc = m_ldapSvc.getEventService(this); eventSvc.addListener(this, target, filter, ctls, l); } public void addNamingListener(Name target, String filter, SearchControls ctls, NamingListener l)throws NamingException { addNamingListener(target.toString(), filter, ctls, l); } public void addNamingListener(String target, String filterExpr, Object[] filterArgs, SearchControls ctls, NamingListener l)throws NamingException { EventService eventSvc = m_ldapSvc.getEventService(this); String filter = ProviderUtils.expandFilterExpr(filterExpr, filterArgs); eventSvc.addListener(this, target, filter, ctls, l); } public void addNamingListener(Name target, String filterExpr, Object[] filterArgs, SearchControls ctls, NamingListener l)throws NamingException { addNamingListener(target.toString(), filterExpr, filterArgs, ctls, l); } public void removeNamingListener(NamingListener l) throws NamingException { EventService eventSvc = m_ldapSvc.getEventService(this); eventSvc.removeListener(l); } public boolean targetMustExist() { return true; } /** * LdapContext methods (javax.naming.ldap.LdapContext interface) */ public ExtendedResponse extendedOperation(ExtendedRequest req)throws NamingException { throw new OperationNotSupportedException(); } public Control[] getRequestControls() throws NamingException { LDAPControl[] ldapCtls = m_searchCons.getServerControls(); if (ldapCtls == null) { return null; } Control[] ctls = new Control[ldapCtls.length]; for (int i=0; i < ldapCtls.length; i++) { ctls[i] = (Control) ldapCtls[i]; } return ctls; } public void setRequestControls(Control[] reqCtls) throws NamingException { LDAPControl[] ldapCtls = new LDAPControl[reqCtls.length]; for (int i=0; i < reqCtls.length; i++) { try { ldapCtls[i] = (LDAPControl) reqCtls[i]; } catch (ClassCastException ex) { throw new NamingException( "Unsupported control type " + reqCtls[i].getClass().getName()); } } getSearchConstraints().setServerControls(ldapCtls); } public Control[] getResponseControls() throws NamingException { LDAPControl[] ldapCtls = m_ldapSvc.getConnection().getResponseControls(); if (ldapCtls == null) { return null; } // Parse raw controls Control[] ctls = new Control[ldapCtls.length]; for (int i=0; i < ldapCtls.length; i++) { ctls[i] = NetscapeControlFactory.getControlInstance(ldapCtls[i]); if (ctls[i] == null) { throw new NamingException("Unsupported control " + ldapCtls[i].getID()); } } return ctls; } public LdapContext newInstance(Control[] reqCtls) throws NamingException { LdapContextImpl clone = new LdapContextImpl(m_ctxDN, this); // This controls are to be set on the the LDAPConnection clone.m_ctxEnv.setProperty(ContextEnv.P_CONNECT_CTRLS, reqCtls); return clone; } public void reconnect(Control[] reqCtls) throws NamingException { close(); m_ldapSvc = new LdapService(); // This controls are to be set on the the LDAPConnection if (reqCtls != null) { m_ctxEnv.setProperty(ContextEnv.P_CONNECT_CTRLS, reqCtls); } m_ldapSvc.connect(this); } public Control[] getConnectControls() { return (Control[])m_ctxEnv.getProperty(ContextEnv.P_CONNECT_CTRLS); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/ObjectMapper.java0000664001003300100330000004551010602743273030540 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.spi.*; import netscape.ldap.*; import netscape.ldap.util.*; import java.io.*; import java.util.*; import com.netscape.jndi.ldap.common.Debug; /** * Class used to map Java objects to ldap entries back and forth */ public class ObjectMapper { /** * Schema object classes for mapping java objects to ldap entries */ static final String OC_JAVAOBJECT = "javaObject"; // abstract oc static final String OC_SERIALOBJ = "javaSerializedObject";//aux oc static final String OC_MARSHALOBJ = "javaMarshalledObject";//aux oc static final String OC_REFERENCE = "javaNamingReference"; //aux oc //static final String OC_REMOTEOBJ = "javaRemoteObject"; //aux oc, deprecated static final String OC_CONTAINER = "javaContainer"; //structural oc /** * Schema attributes for mapping java objects to ldap entries */ static final String AT_CLASSNAME = "javaClassName"; //required static final String AT_CLASSNAMES = "javaClassNames"; //optional static final String AT_DESCRIPTION = "description"; //optional static final String AT_JAVADOC = "javaDoc"; //optional static final String AT_CODEBASE = "javaCodeBase"; //optional static final String AT_SERIALDATA = "javaSerializedData"; //required static final String AT_REFADDR = "javaReferenceAddress"; //optional static final String AT_OBJFACTORY = "javaFactory"; //optional //static final String AT_REMOTELOC = "javaRemoteLocation"; //required, deprecated //Default Object class for NameClassPair static final String DEFAULT_OBJCLASS = "javax.naming.directory.DirContext"; static Object entryToObject(LDAPEntry entry, LdapContextImpl ctx) throws NamingException { Object obj = entryToObject(entry); if (obj == null) { obj = new LdapContextImpl(entry.getDN(), ctx); } // SP is required to contact the DirectoryManager first to obtain an object try { String relName = LdapNameParser.getRelativeName(ctx.m_ctxDN, entry.getDN()); Name nameObj = LdapNameParser.getParser().parse(relName); Attributes attrs = new AttributesImpl(entry.getAttributeSet(), ctx.m_ctxEnv.getUserDefBinaryAttrs()); obj = DirectoryManager.getObjectInstance(obj, nameObj, ctx, ctx.getEnvironment(), attrs); } catch (Exception ex) { if (ex instanceof NamingException) { throw (NamingException)ex; } NamingException nameEx = new NamingException("NamingManager.getObjectInstance failed"); nameEx.setRootCause(ex); throw nameEx; } return obj; } /** * Convert a Ldap entry into a java object */ static Object entryToObject(LDAPEntry entry) throws NamingException { try { LDAPAttributeSet attrs = entry.getAttributeSet(); // TODO javaCodeBase to be processed LDAPAttribute attr = null; if ((attr = attrs.getAttribute(AT_SERIALDATA)) != null) { byte[] serdata = (byte[])attr.getByteValues().nextElement(); return deserializeObject(serdata); } // Reference else if ((attr = attrs.getAttribute(AT_REFADDR)) != null) { return decodeRefObj(attrs); } return null; } catch (Exception ex) { if (ex instanceof NamingException) { throw (NamingException)ex; } NamingException nameEx = new NamingException("NamingManager.getStateToStore failed"); nameEx.setRootCause(ex); throw nameEx; } } /** * Get the className for NameClassPair from an entry */ static String getClassName(LDAPEntry entry) { LDAPAttributeSet attrs = entry.getAttributeSet(); LDAPAttribute attrClass = attrs.getAttribute(AT_CLASSNAME); if (attrClass != null) { String className = (String)attrClass.getStringValues().nextElement(); return className; } return DEFAULT_OBJCLASS; } /** * Convert a java object with an optional set of attributes into a LDAP entry */ static LDAPAttributeSet objectToAttrSet(Object obj, String name, LdapContextImpl ctx, Attributes attrs) throws NamingException { // SP is required to contact the DirectoryManager first to obtain a state object try { Name nameObj = LdapNameParser.getParser().parse(name); DirStateFactory.Result stb = DirectoryManager.getStateToBind(obj, nameObj, ctx, ctx.getEnvironment(), attrs); obj = stb.getObject(); attrs = stb.getAttributes(); } catch (Exception ex) { if (ex instanceof NamingException) { throw (NamingException)ex; } NamingException nameEx = new NamingException("NamingManager.getStateToStore failed"); nameEx.setRootCause(ex); throw nameEx; } if (obj == null) { return AttributesImpl.jndiAttrsToLdapAttrSet(attrs); } else if (attrs == null) { attrs = new BasicAttributes(/*ignoreCase=*/true); } Attribute objectclass = attrs.get("objectClass"); if (objectclass == null) { objectclass = attrs.get("objectclass"); // try lower case } if (objectclass == null) { objectclass = new BasicAttribute("objectClass", "top"); objectclass.add(OC_CONTAINER); attrs.put(objectclass); } // Root object class objectclass.add(OC_JAVAOBJECT); if (obj instanceof Reference) { objectclass.add(OC_REFERENCE); char delimChar = ctx.m_ctxEnv.getRefSeparator(); attrs = encodeRefObj(delimChar, (Reference)obj, attrs); } else if (obj instanceof Referenceable) { objectclass.add(OC_REFERENCE); char delimChar = ctx.m_ctxEnv.getRefSeparator(); attrs = encodeRefObj(delimChar, ((Referenceable)obj).getReference(), attrs); } else if (obj instanceof Serializable) { if (objectclass.contains(OC_MARSHALOBJ)) { ; // do nothing } else if (objectclass.contains(OC_MARSHALOBJ.toLowerCase())) { ; // do nothing } else { objectclass.add(OC_SERIALOBJ); } attrs = encodeSerialObj((Serializable)obj , attrs); } else if (obj instanceof DirContext) { attrs = encodeDirCtxObj((DirContext)obj , attrs); } else { throw new NamingException("Can not bind object of type " + obj.getClass().getName()); } return AttributesImpl.jndiAttrsToLdapAttrSet(attrs); } /** * Deserialized object, create object from a stream of bytes */ private static Object deserializeObject(byte[] byteBuf) throws NamingException { ByteArrayInputStream bis = null; ObjectInputStream objis = null; try { bis = new ByteArrayInputStream(byteBuf); objis = new ObjectInputStream(bis); return objis.readObject(); } catch(Exception ex) { NamingException nameEx = new NamingException("Failed to deserialize object"); nameEx.setRootCause(ex); throw nameEx; } finally { try { if (objis != null) { objis.close(); } if (bis != null) { bis.close(); } } catch (Exception ex) {} } } /** * Serialize object, convert object to a stream of bytes */ private static byte[] serializeObject(Object obj) throws NamingException { ByteArrayOutputStream bos = null; ObjectOutputStream objos = null; try { bos = new ByteArrayOutputStream(); objos = new ObjectOutputStream(bos); objos.writeObject(obj); objos.flush(); return bos.toByteArray(); } catch(Exception ex) { NamingException nameEx = new NamingException("Failed to serialize object"); nameEx.setRootCause(ex); throw nameEx; } finally { try { if (objos != null) { objos.close(); } if (bos != null) { bos.close(); } } catch (Exception ex) {} } } /** * Decode Jndi Reference Object */ private static Reference decodeRefObj(LDAPAttributeSet attrs) throws NamingException { try { LDAPAttribute attr = null; String className=null, factory = null, factoryLoc = null; if ((attr = attrs.getAttribute(AT_CLASSNAME)) == null ) { throw new NamingException("Bad Reference encoding, no attribute " + AT_CLASSNAME); } className = (String)attr.getStringValues().nextElement(); if ((attr = attrs.getAttribute(AT_OBJFACTORY)) != null ) { factory = (String)attr.getStringValues().nextElement(); } if ((attr = attrs.getAttribute(AT_CODEBASE)) != null ) { factoryLoc = (String)attr.getStringValues().nextElement(); } Reference ref = new Reference(className, factory, factoryLoc); if ((attr = attrs.getAttribute(AT_REFADDR)) == null ) { return ref; // no refAddr } for (Enumeration e = attr.getStringValues(); e.hasMoreElements();) { decodeRefAddr((String)e.nextElement(), ref); } return ref; } catch (Exception ex) { if (ex instanceof NamingException) { throw (NamingException)ex; } NamingException nameEx = new NamingException("NamingManager.getStateToStore failed"); nameEx.setRootCause(ex); throw nameEx; } } /** * Decode RefAddr according to the * StringRefAddr are encoded as #posNo#refType#refValue where posNo is the * refAddr position (index) inside a rerference. BynaryRefAddr is encoded * as #posNo#refType##data where data is the base64 encoding of the serialized * form of the entire BinaryRefAddr instance. */ private static void decodeRefAddr(String enc, Reference ref) throws NamingException{ if (enc.length() == 0) { throw new NamingException("Bad Reference encoding, empty refAddr"); } String delimChar = enc.substring(0,1); StringTokenizer tok = new StringTokenizer(enc, delimChar); int tokCount = tok.countTokens(); if (tokCount != 3 && tokCount != 4) { Debug.println(3, "enc=" + enc + " delimChar="+delimChar + " tokCount="+tokCount); throw new NamingException("Bad Reference encoding"); } String type = null; int posn = -1; for (int i = 0; i < tokCount; i++) { String s = tok.nextToken(); if (i == 0) { // position try { posn = Integer.parseInt(s); } catch (Exception e) { throw new NamingException("Bad Reference encoding, refAddr position not an initger"); } } else if (i == 1) { // type if (s.length() == 0) { throw new NamingException("Bad Reference encoding, empty refAddr type"); } type = s; } else if (i == 2) { // value for StringRefAddr, empty for BinaryRefAddr if (s.length() == 0 && tokCount != 4) { // should be empty for binary refs throw new NamingException("Bad Reference encoding, empty refAddr string value"); } ref.add(posn, new StringRefAddr(type, s)); } else { // base64 encoding of the serialized BinaryRefAddr if (s.length() == 0) { throw new NamingException("Bad Reference encoding, empty refAddr binary value"); } MimeBase64Decoder base64Dec = new MimeBase64Decoder(); ByteBuf in = new ByteBuf(s), out = new ByteBuf(); base64Dec.translate(in, out); base64Dec.eof(out); ref.add(posn, (RefAddr) deserializeObject(out.toBytes())); } } } /** * Encode Jndi Reference Object */ private static Attributes encodeRefObj(char delimChar, Reference ref, Attributes attrs) throws NamingException { if (ref.getClassName() != null) { attrs.put(new BasicAttribute(AT_CLASSNAME, ref.getClassName())); } if (ref.getFactoryClassName() != null) { attrs.put(new BasicAttribute(AT_OBJFACTORY, ref.getFactoryClassName())); } if (ref.getFactoryClassLocation() != null) { attrs.put(new BasicAttribute(AT_CODEBASE, ref.getFactoryClassLocation())); } if(ref.size() > 0) { BasicAttribute refAttr = new BasicAttribute(AT_REFADDR); for(int i = 0; i < ref.size(); i++) { refAttr.add(encodeRefAddr(delimChar, i, ref.get(i))); } attrs.put(refAttr); } return attrs; } /** * Encode RefAddr according to the * StringRefAddr are encoded as #posNo#refType#refValue where posNo is the * refAddr position (index) inside a rerference. BynaryRefAddr is encoded * as #posNo#refType##data where data is the base64 encoding of the serialized * form of the entire BinaryRefAddr instance. */ private static String encodeRefAddr(char delimChar, int idx, RefAddr refAddr) throws NamingException{ if(refAddr instanceof StringRefAddr) { String content = (String) refAddr.getContent(); if (content != null && content.length() > 0 && content.charAt(0) == delimChar) { throw new NamingException( "Can not encode StringRefAddr, value starts with the delimiter character " + delimChar); } return delimChar + idx + delimChar + refAddr.getType() + delimChar + content; } else { // BinaryRefAdd byte[] serialRefAddr = serializeObject(refAddr); MimeBase64Encoder base64 = new MimeBase64Encoder(); ByteBuf in = new ByteBuf(), out = new ByteBuf(); in.append(serialRefAddr); base64.translate(in, out); base64.eof(out); return delimChar + idx + delimChar + refAddr.getType() + delimChar + delimChar + out.toString(); } } /** * Encode Serializable object */ static Attributes encodeSerialObj(Serializable obj, Attributes attrs) throws NamingException{ if (attrs.get(AT_CLASSNAME) == null) { attrs.put(new BasicAttribute(AT_CLASSNAME, obj.getClass().getName())); } attrs.put(new BasicAttribute(AT_SERIALDATA, serializeObject(obj))); return attrs; } /** * Encode DirContext object (merege attributes) */ static Attributes encodeDirCtxObj(DirContext obj, Attributes attrs) throws NamingException{ Attributes ctxAttrs = obj.getAttributes(""); for (NamingEnumeration itr = ctxAttrs.getAll(); itr.hasMore();) { attrs.put((Attribute)itr.next()); } return attrs; } public static void main(String[] args) { byte[] serialRefAddr = { (byte)'a', (byte)'0', (byte)'A', (byte)0x10, (byte)0x7f, (byte)0xaa }; MimeBase64Encoder base64 = new MimeBase64Encoder(); MimeBase64Decoder base64Dec = new MimeBase64Decoder(); ByteBuf in = new ByteBuf(), out = new ByteBuf(); in.append(serialRefAddr); base64.translate(in, out); base64.eof(out); System.err.println("in="+in); System.err.println("out="+out); in = new ByteBuf(out.toString()); out = new ByteBuf(); base64Dec.translate(in, out); base64Dec.eof(out); System.err.println("in="+in); System.err.println("out="+out); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/AttributesImpl.java0000664001003300100330000002722010602743273031133 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Luke (lukemz@onemodel.org) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import netscape.ldap.*; import java.util.*; /** * Wrapper for LDAPAttributeSet which implements JNDI Attribute interface */ class AttributesImpl implements Attributes { // TODO Create JndiAttribute class so that getAttributeDefinition and // getAttributeSyntaxDefinition can be implemented LDAPAttributeSet m_attrSet; /** * A list of predefined binary attribute name */ static String[] m_binaryAttrs = { "photo", "userpassword", "jpegphoto", "audio", "thumbnailphoto", "thumbnaillogo", "usercertificate", "cacertificate", "certificaterevocationlist", "authorityrevocationlist", "crosscertificatepair", "personalsignature", "x500uniqueidentifier", "javaserializeddata"}; /** * A list of user defined binary attributes specified with the environment * property java.naming.ldap.attributes.binary */ static String[] m_userBinaryAttrs = null; public AttributesImpl(LDAPAttributeSet attrSet, String[] userBinaryAttrs) { m_attrSet = attrSet; m_userBinaryAttrs = userBinaryAttrs; } public Object clone() { return new AttributesImpl((LDAPAttributeSet)m_attrSet.clone(), m_userBinaryAttrs); } public Attribute get(String attrID) { LDAPAttribute attr = m_attrSet.getAttribute(attrID); return (attr == null) ? null : ldapAttrToJndiAttr(attr); } public NamingEnumeration getAll() { return new AttributeEnum(m_attrSet.getAttributes()); } public NamingEnumeration getIDs() { return new AttributeIDEnum(m_attrSet.getAttributes()); } public boolean isCaseIgnored() { return false; } public Attribute put(String attrID, Object val) { LDAPAttribute attr = m_attrSet.getAttribute(attrID); if (val == null) { // no Value m_attrSet.add(new LDAPAttribute(attrID)); } else if (val instanceof byte[]) { m_attrSet.add(new LDAPAttribute(attrID, (byte[])val)); } else { m_attrSet.add(new LDAPAttribute(attrID, val.toString())); } return (attr == null) ? null : ldapAttrToJndiAttr(attr); } public Attribute put(Attribute jndiAttr) { try { LDAPAttribute oldAttr = m_attrSet.getAttribute(jndiAttr.getID()); m_attrSet.add(jndiAttrToLdapAttr(jndiAttr)); return (oldAttr == null) ? null : ldapAttrToJndiAttr(oldAttr); } catch (NamingException e) { System.err.println( "Error in AttributesImpl.put(): " + e.toString() ); e.printStackTrace(System.err); } return null; } public Attribute remove(String attrID) { Attribute attr = get(attrID); m_attrSet.remove(attrID); return attr; } public int size() { return m_attrSet.size(); } /** * Check if an attribute is a binary one */ static boolean isBinaryAttribute(String attrID) { // attr name contains ";binary" if (attrID.indexOf(";binary") >=0) { return true; } attrID = attrID.toLowerCase(); // check the predefined binary attr table for (int i=0; i < m_binaryAttrs.length; i++) { if (m_binaryAttrs[i].equals(attrID)) { return true; } } // check user specified binary attrs with for (int i=0; m_userBinaryAttrs != null && i < m_userBinaryAttrs.length; i++) { if (m_userBinaryAttrs[i].equals(attrID)) { return true; } } return false; } /** * Convert a JNDI Attributes object into a LDAPAttributeSet */ static LDAPAttributeSet jndiAttrsToLdapAttrSet(Attributes jndiAttrs) throws NamingException{ LDAPAttributeSet attrs = new LDAPAttributeSet(); for (Enumeration itr = jndiAttrs.getAll(); itr.hasMoreElements();) { attrs.add(jndiAttrToLdapAttr((Attribute) itr.nextElement())); } return attrs; } /** * Convert a JNDI Attribute to a LDAPAttribute */ static LDAPAttribute jndiAttrToLdapAttr(Attribute jndiAttr) throws NamingException{ LDAPAttribute attr = new LDAPAttribute(jndiAttr.getID()); for (NamingEnumeration vals = jndiAttr.getAll(); vals.hasMoreElements();) { Object val = vals.nextElement(); if (val == null) { ; // no value } else if (val instanceof byte[]) { attr.addValue((byte[])val); } else { attr.addValue(val.toString()); } } return attr; } /** * Convert a LDAPAttribute to a JNDI Attribute */ static Attribute ldapAttrToJndiAttr(LDAPAttribute attr) { BasicAttribute jndiAttr = new BasicAttribute(attr.getName()); Enumeration itrVals = null; if (isBinaryAttribute(attr.getName())) { itrVals = attr.getByteValues(); } else { itrVals = attr.getStringValues(); } /* Performance enhancement for an attribute with many values. * If number of value over threshold, use TreeSet to quickly * eliminate value duplication. Locally extends JNDI attribute * to pass TreeSet directly to Vector of JNDI attribute. */ if (attr.size() < 50 ) { if (itrVals != null) { while ( itrVals.hasMoreElements() ) { jndiAttr.add(itrVals.nextElement()); } } } else { /* A local class to allow constructing a JNDI attribute * from a TreeSet. */ class BigAttribute extends BasicAttribute { public BigAttribute (String id, TreeSet val) { super(id); values = new Vector (val); } } TreeSet valSet = new TreeSet(); if (itrVals != null) { while ( itrVals.hasMoreElements() ) { valSet.add(itrVals.nextElement()); } } jndiAttr = new BigAttribute(attr.getName(), valSet); } return jndiAttr; } /** * Convert and array of JNDI ModificationItem to a LDAPModificationSet */ static LDAPModificationSet jndiModsToLdapModSet(ModificationItem[] jndiMods) throws NamingException{ LDAPModificationSet mods = new LDAPModificationSet(); for (int i=0; i < jndiMods.length; i++) { int modop = jndiMods[i].getModificationOp(); LDAPAttribute attr = jndiAttrToLdapAttr(jndiMods[i].getAttribute()); if (modop == DirContext.ADD_ATTRIBUTE) { mods.add(LDAPModification.ADD, attr); } else if (modop == DirContext.REPLACE_ATTRIBUTE) { mods.add(LDAPModification.REPLACE, attr); } else if (modop == DirContext.REMOVE_ATTRIBUTE) { mods.add(LDAPModification.DELETE, attr); } else { // Should never come here. ModificationItem can not // be constructed with a wrong value } } return mods; } /** * Create a LDAPModificationSet from a JNDI mod operation and JNDI Attributes */ static LDAPModificationSet jndiAttrsToLdapModSet(int modop, Attributes jndiAttrs) throws NamingException{ LDAPModificationSet mods = new LDAPModificationSet(); for (NamingEnumeration attrEnum = jndiAttrs.getAll(); attrEnum.hasMore();) { LDAPAttribute attr = jndiAttrToLdapAttr((Attribute)attrEnum.next()); if (modop == DirContext.ADD_ATTRIBUTE) { mods.add(LDAPModification.ADD, attr); } else if (modop == DirContext.REPLACE_ATTRIBUTE) { mods.add(LDAPModification.REPLACE, attr); } else if (modop == DirContext.REMOVE_ATTRIBUTE) { mods.add(LDAPModification.DELETE, attr); } else { throw new IllegalArgumentException("Illegal Attribute Modification Operation"); } } return mods; } } /** * Wrapper for enumeration of LDAPAttrubute-s. Convert each LDAPAttribute * into a JNDI Attribute accessed through the NamingEnumeration */ class AttributeEnum implements NamingEnumeration { Enumeration _attrEnum; public AttributeEnum(Enumeration attrEnum) { _attrEnum = attrEnum; } public Object next() throws NamingException{ LDAPAttribute attr = (LDAPAttribute) _attrEnum.nextElement(); return AttributesImpl.ldapAttrToJndiAttr(attr); } public Object nextElement() { LDAPAttribute attr = (LDAPAttribute) _attrEnum.nextElement(); return AttributesImpl.ldapAttrToJndiAttr(attr); } public boolean hasMore() throws NamingException{ return _attrEnum.hasMoreElements(); } public boolean hasMoreElements() { return _attrEnum.hasMoreElements(); } public void close() { } } /** * Wrapper for enumeration of LDAPAttrubute-s. Return the name for each * LDAPAttribute accessed through the NamingEnumeration */ class AttributeIDEnum implements NamingEnumeration { Enumeration _attrEnum; public AttributeIDEnum(Enumeration attrEnum) { _attrEnum = attrEnum; } public Object next() throws NamingException{ LDAPAttribute attr = (LDAPAttribute) _attrEnum.nextElement(); return attr.getName(); } public Object nextElement() { LDAPAttribute attr = (LDAPAttribute) _attrEnum.nextElement(); return attr.getName(); } public boolean hasMore() throws NamingException{ return _attrEnum.hasMoreElements(); } public boolean hasMoreElements() { return _attrEnum.hasMoreElements(); } public void close() { } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/BindingEnum.java0000664001003300100330000000521010602743273030355 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import com.netscape.jndi.ldap.common.ExceptionMapper; import netscape.ldap.*; import java.util.*; /** * Wrapper for the LDAPSearchResult. Convert each LDAPEntry entry into * a JNDI Binding. Bindings are accessed through the NamingEnumeration * interface */ class BindingEnum extends BaseSearchEnum { public BindingEnum(LDAPSearchResults res, LdapContextImpl ctx) throws NamingException { super(res, ctx); } public Object next() throws NamingException{ LDAPEntry entry = nextLDAPEntry(); String name = LdapNameParser.getRelativeName(m_ctxName, entry.getDN()); Object obj = ObjectMapper.entryToObject(entry, m_ctx); String className = obj.getClass().getName(); return new Binding(name, className, obj, /*isRelative=*/true); } }ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/BaseSearchEnum.java0000664001003300100330000001314410602743273031010 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import com.netscape.jndi.ldap.common.ExceptionMapper; import netscape.ldap.*; import java.util.*; /** * Wrapper for the LDAPSearchResult that implements all NamingEnumeration methods * except next() (left to be implemented by subclasses). Because LDAPJDK does * not provide for capability to ignoral referrals, the class is using hasMore() * method to read ahead search results and "ignore" referrals if required. * Base class for BindingEnum, NameClassPairEnum and SearchResultEnum */ abstract class BaseSearchEnum implements NamingEnumeration { LDAPSearchResults m_res; LdapContextImpl m_ctx; Name m_ctxName; private LDAPEntry nextEntry; private LDAPException nextException; public BaseSearchEnum(LDAPSearchResults res, LdapContextImpl ctx) throws NamingException{ m_res = res; m_ctx = ctx; try { m_ctxName = LdapNameParser.getParser().parse(m_ctx.m_ctxDN); } catch ( NamingException e ) { throw ExceptionMapper.getNamingException(e); } } LDAPEntry nextLDAPEntry() throws NamingException{ if (nextException == null && nextEntry == null) { hasMore(); } try { if (nextException != null) { if (nextException instanceof LDAPReferralException) { throw new LdapReferralException(m_ctx, (LDAPReferralException)nextException); } else { throw ExceptionMapper.getNamingException(nextException); } } return nextEntry; } finally { nextException = null; nextEntry = null; } } public Object nextElement() { try { return next(); } catch ( Exception e ) { System.err.println( "Error in BaseSearchEnum.nextElement(): " + e.toString() ); e.printStackTrace(System.err); return null; } } public boolean hasMore() throws NamingException{ if (nextEntry != null || nextException != null) { return true; } if (m_res.hasMoreElements()) { try { nextEntry = m_res.next(); return true; } catch (LDAPReferralException e) { boolean ignoreReferrals = m_ctx.m_ctxEnv.ignoreReferralsMode(); if (ignoreReferrals) { return hasMore(); // PARTIAL_SEARCH_RESULT should be thrown according to the // Implmentation Guidelines for LDAPSP, but is not done by // the Sun LDAPSP 1.2, so we not doing it either. //nextException = new LDAPException("Ignoring referral", 9); //return true; } else { nextException = e; return true; } } catch ( LDAPException e ) { nextException = e; return true; } } return false; } public boolean hasMoreElements() { try { return hasMore(); } catch ( Exception e ) { System.err.println( "Error in BaseSearchEnum.hasMoreElements(): " + e.toString() ); e.printStackTrace(System.err); return false; } } public void close() throws NamingException{ try { m_ctx.m_ldapSvc.getConnection().abandon(m_res); } catch (LDAPException e) { throw ExceptionMapper.getNamingException(e); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/SearchResultEnum.java0000664001003300100330000000735110602743273031417 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import com.netscape.jndi.ldap.controls.NetscapeControlFactory; import com.netscape.jndi.ldap.common.ExceptionMapper; import netscape.ldap.*; import java.util.*; /** * A wrapper for the LDAPSeatchResults. Convert a LDAPSearchResults enumeration * of LDAPEntries into a JNDI NamingEnumeration of JNDI SearchResults. */ class SearchResultEnum extends BaseSearchEnum { boolean m_returnObjs; // ReturningObjFlag in SearchControls String[] m_userBinaryAttrs; public SearchResultEnum(LDAPSearchResults res, boolean returnObjs, LdapContextImpl ctx) throws NamingException{ super(res, ctx); m_returnObjs = returnObjs; m_userBinaryAttrs = ctx.m_ctxEnv.getUserDefBinaryAttrs(); } public Object next() throws NamingException{ LDAPEntry entry = nextLDAPEntry(); String name = LdapNameParser.getRelativeName(m_ctxName, entry.getDN()); Object obj = (m_returnObjs) ? ObjectMapper.entryToObject(entry, m_ctx) : null; Attributes attrs = new AttributesImpl(entry.getAttributeSet(), m_userBinaryAttrs); // check for response controls LDAPControl[] ldapCtls = m_res.getResponseControls(); if (ldapCtls != null) { // Parse raw controls Control[] ctls = new Control[ldapCtls.length]; for (int i=0; i < ldapCtls.length; i++) { ctls[i] = NetscapeControlFactory.getControlInstance(ldapCtls[i]); if (ctls[i] == null) { throw new NamingException("Unsupported control " + ldapCtls[i].getID()); } } SearchResultWithControls searchRes = new SearchResultWithControls(name, obj, attrs); searchRes.setControls(ctls); return searchRes; } else { // no controls return new SearchResult(name, obj, attrs); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/0000775001003300100330000000000010667357332027170 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapSortControl.java0000664001003300100330000001207210602743273033116 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents an LDAP v3 server control that specifies that you want * the server to return sorted search results. (The OID for this * control is 1.2.840.113556.1.4.473.) *

* * When constructing an LDAPSortControl object, you can * specify the order in which you want the results sorted. * You can also specify whether or not this control is critical * to the search operation. *

* * To specify the sort order, you construct an LdapSortKey * object and pass it to the LdapSortControl constructor. * The LdapSortKey object represents a list of the attribute * types used for sorting (a "sort key list"). * * The LDAP server sends back a sort response control to indicate * the result of the sorting operation. (The OID for this control * is 1.2.840.113556.1.4.474.) * * @see com.netscape.jndi.ldap.controls.LdapSortKey * @see com.netscape.jndi.ldap.controls.LdapSortResponseControl */ public class LdapSortControl extends LDAPSortControl implements Control{ /** * Constructs an LDAPSortControl object with a single * sorting key. * @param key A single attribute to sort by. * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation). * @see com.netscape.jndi.ldap.controls.LdapSortKey */ public LdapSortControl(LdapSortKey key, boolean critical) { super (key, critical); } /** * Constructs an LDAPSortControl object with an array of * sorting keys. * @param keys The attributes to sort by. * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation). * @see com.netscape.jndi.ldap.controls.LdapSortKey */ public LdapSortControl(LdapSortKey[] keys, boolean critical) { super(keys, critical); } static LdapSortKey[] toSortKey(String[] keysIn) { LdapSortKey[] keysOut = new LdapSortKey[keysIn.length]; for (int i=0; i < keysIn.length; i++) { keysOut[i] = new LdapSortKey(keysIn[i]); } return keysOut; } /** * Constructs an LDAPSortControl object with an array of * sorting keys. * @param keys The attributes to sort by. * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation). * @see com.netscape.jndi.ldap.controls.LdapSortKey */ public LdapSortControl(String[] keys, boolean critical) { super(toSortKey(keys), critical); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapSortKey.java0000664001003300100330000001246310602743273032232 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import netscape.ldap.LDAPSortKey; /** * Represents sorting instructions for a particular attribute. * */ public class LdapSortKey extends LDAPSortKey{ /** * Constructs a new LdapSortKey object that will * sort based on the specified instructions. * @param keyDescription A single attribute specification to sort by. * If preceded by a hyphen ("-"), the attribute is sorted in reverse order. * You can also specify the object ID (OID) of a matching rule after * a colon (":"). For example: *

*

    *
  • "cn" (sort by the cn attribute)

    *

  • "-cn" (sort by the cn attribute in * reverse order)

    *

  • "-cn:1.2.3.4" (sort by the cn * attribute in reverse order and use the matching rule identified * by the OID 1.2.3.4)

    *

* @see com.netscape.jndi.ldap.controls.LdapSortControl * @see com.netscape.jndi.ldap.controls.LdapVirtualListControl */ public LdapSortKey( String keyDescription ) { super(keyDescription); } /** * Constructs a new LdapSortKey object that will * sort based on the specified attribute and sort order. * @param key A single attribute to sort by. For example: *

*

    *
  • "cn" (sort by the cn attribute) *
  • "givenname" (sort by the givenname * attribute) *
* @param reverse If true, the sorting is done in * descending order. * @see com.netscape.jndi.ldap.controls.LdapSortControl * @see com.netscape.jndi.ldap.controls.LdapVirtualListControl */ public LdapSortKey( String key, boolean reverse) { super(key,reverse); } /** * Constructs a new LdapSortKey object that will * sort based on the specified attribute, sort order, and matching * rule. * @param key A single attribute to sort by. For example: *

*

    *
  • "cn" (sort by the cn attribute) *
  • "givenname" (sort by the givenname * attribute) *
* @param reverse If true, the sorting is done in * descending order. * @param matchRule Object ID (OID) of the matching rule for * the attribute (for example, 1.2.3.4). * @see com.netscape.jndi.ldap.controls.LdapSortControl * @see com.netscape.jndi.ldap.controls.LdapVirtualListControl */ public LdapSortKey( String key, boolean reverse, String matchRule) { super(key, reverse, matchRule); } /** * Returns the attribute to sort by. * @return A single attribute to sort by. */ public String getKey() { return super.getKey(); } /** * Returns true if sorting is to be done in descending order. * @return true if sorting is to be done in descending order. */ public boolean getReverse() { return super.getReverse(); } /** * Returns the object ID (OID) of the matching rule used for sorting. * If no matching rule is specified, null is returned. * @return The object ID (OID) of the matching rule, or null * if the sorting instructions specify no matching rule. */ public String getMatchRule() { return super.getMatchRule(); } }././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapSortResponseControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapSortResponseContr0000664001003300100330000001541110602743273033362 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.NamingException; import javax.naming.ldap.Control; import netscape.ldap.LDAPControl; import netscape.ldap.LDAPException; import netscape.ldap.controls.*; import com.netscape.jndi.ldap.common.ExceptionMapper; /** * The LDAP server sends back a sort response control to indicate * the result of the sorting operation. (The OID for this control * is 1.2.840.113556.1.4.474.) *

* * This control contains: *

* *

    *
  • the result code from the sorting operation *
  • optionally, the first attribute type in the sort key list * that resulted in an error (for example, if the attribute does * not exist) *
*

* * To parse this control, use the parseResponse method. *

* * The following table lists what kinds of results to expect from the * LDAP server under different situations: *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Does the Server Support the Sorting Control?Is the Sorting Control Marked As Critical?Other ConditionsResults from LDAP Server
* No * * Yes * * None * *
    *
  • The server does not send back any entries. *
  • An LDAPException.UNAVAILABLE_CRITICAL_EXTENSION * exception is thrown. *
*
* No * * None * *
    *
  • The server ignores the sorting control and * returns the entries unsorted. *
*

*

* Yes * * Yes * * The server cannot sort the results using the specified * sort key list. * *
    *
  • The server does not send back any entries. *
  • An LDAPException.UNAVAILABLE_CRITICAL_EXTENSION * exception is thrown. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt and (optionally) * the attribute type that caused the error. *
*
* No * *
    *
  • The server returns the entries unsorted. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt and (optionally) * the attribute type that caused the error. *
*
* N/A (could either be marked as critical or not) * * The server successfully sorted the entries. * *
    *
  • The server sends back the sorted entries. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt * (LDAPException.SUCCESS). *
*
* The search itself failed (for any reason). * *
    *
  • The server sends back a result code for the search * operation. *
  • The server does not send back the sorting response control. *
*
*

* @see com.netscape.jndi.ldap.controls.LdapSortKey * @see com.netscape.jndi.ldap.controls.LdapSortControl */ public class LdapSortResponseControl extends LDAPSortControl implements Control { /** * Constructs a new LdapEntryChangeControl object. * This constructor is used by the NetscapeControlFactory * */ LdapSortResponseControl(boolean critical, byte[] value) throws Exception{ super(SORTRESPONSE, critical, value); } /** * Get the first attribute type from the sort key list that * resulted in an error * @return Attribute name that resulted in an error */ public String getFailedAttribute() { return super.getFailedAttribute(); } /** * Return the sort result code * @return The sort result code */ public int getResultCode() { return super.getResultCode(); } /** * Return corresponding NamingException for the sort error code * @return NamingException for the sort error code */ public NamingException getSortException() { if (getResultCode() == 0) { // success return null; } return ExceptionMapper.getNamingException( new LDAPException("Server Sort Failed", getResultCode())); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapProxiedAuthControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapProxiedAuthContro0000664001003300100330000000572710602743273033340 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents an LDAP v3 server control that specifies that you want * the server to use the specified DN's identity for this operation. * (The OID for this control is 2.16.840.1.113730.3.4.12.) * */ public class LdapProxiedAuthControl extends LDAPProxiedAuthControl implements Control { /** * Constructs an LdapProxiedAuthControl object with a * DN to use as identity. * @param dn DN to use as identity for execution of a request. * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation). */ public LdapProxiedAuthControl( String dn, boolean critical) { super( dn, critical); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/NetscapeControlFactory.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/NetscapeControlFactor0000664001003300100330000001360610620653755033360 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; /** * Factory for creating controls. Only controls send by the direcory server * are processed. */ import javax.naming.*; import javax.naming.ldap.*; import netscape.ldap.LDAPControl; import netscape.ldap.controls.*; import com.netscape.jndi.ldap.common.ExceptionMapper; public class NetscapeControlFactory extends ControlFactory { // "1.2.840.113556.1.4.473" Sort Control (Request) final static String REQ_SORT = LDAPSortControl.SORTREQUEST; // "1.2.840.113556.1.4.474" Sort Control (Response) final static String RSP_SORT = LDAPSortControl.SORTRESPONSE; // "2.16.840.1.113730.3.4.2" ManageDSAIT Control final static String REQ_MANAGEDSAIT = LDAPControl.MANAGEDSAIT; // "2.16.840.1.113730.3.4.3" PersistentSearch Control final static String REQ_PERSISTENTSEARCH = LDAPPersistSearchControl.PERSISTENTSEARCH; // "2.16.840.1.113730.3.4.4" PasswordExpired Control final static String RSP_PWDEXPIRED = LDAPPasswordExpiredControl.EXPIRED; // "2.16.840.1.113730.3.4.5" PasswordExpiring Control final static String RSP_PWDEXPIRING = LDAPPasswordExpiringControl.EXPIRING; // "2.16.840.1.113730.3.4.7" EntryChanged Controle final static String RSP_ENTRYCHANGED = LDAPEntryChangeControl.ENTRYCHANGED; // "2.16.840.1.113730.3.4.9" Virtual List (Request) final static String REQ_VIRTUALLIST = LDAPVirtualListControl.VIRTUALLIST; // "2.16.840.1.113730.3.4.10" Virtual List (Response) final static String RSP_VIRTUALLIST = LDAPVirtualListResponse.VIRTUALLISTRESPONSE; // "2.16.840.1.113730.3.4.12" Proxed Authentication final static String REQ_PROXIEDAUTH = LDAPProxiedAuthControl.PROXIEDAUTHREQUEST; /** * Creates a control using this control factory * @param ctrl A non-null control. * @return A possibly null Control. * @exception NamingException If ctrl contains invalid data that prevents it from * being used to create a control. */ public Control getControlInstance(Control ctrl) throws NamingException { if (ctrl == null) { return null; } LDAPControl rawCtrl = new LDAPControl( ctrl.getID(), ctrl.isCritical(), ctrl.getEncodedValue()); return getControlInstance(rawCtrl); } /** * Create a JNDI control from a raw ldapjdk control * @param rawCtrl A non-null control. * @return A possibly null Control. * @exception NamingException If ctrl contains invalid data that prevents it from * being used to create a control. */ public static Control getControlInstance(LDAPControl rawCtrl) throws NamingException { if (rawCtrl == null) { return null; } try { String ctrlID = rawCtrl.getID(); // Entry changed control is parsed by LDAPPersistSearchControl if (ctrlID.equals(RSP_ENTRYCHANGED)) { return new LdapEntryChangeControl( rawCtrl.isCritical(), rawCtrl.getValue()); } // Password Expired control else if(ctrlID.equals(RSP_PWDEXPIRED)) { return new LdapPasswordExpiredControl( rawCtrl.isCritical(), rawCtrl.getValue()); } // Password Expiring control else if(ctrlID.equals(RSP_PWDEXPIRING)) { return new LdapPasswordExpiringControl( rawCtrl.isCritical(), rawCtrl.getValue()); } // Sort Response control else if(ctrlID.equals(RSP_SORT)) { return new LdapSortResponseControl( rawCtrl.isCritical(), rawCtrl.getValue()); } // Virtual List Response control else if(ctrlID.equals(RSP_VIRTUALLIST)) { return new LdapVirtualListResponseControl( rawCtrl.isCritical(), rawCtrl.getValue()); } // No match try another ControlFactory return null; } catch (Exception ex) { throw ExceptionMapper.getNamingException(ex); } } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapEntryChangeControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapEntryChangeContro0000664001003300100330000001165410620653755033314 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents an LDAP v3 server control that specifies information * about a change to an entry in the directory. (The OID for this * control is 2.16.840.1.113730.3.4.7.) You need to use this control in * conjunction with a "persistent search" control (represented * by LdapPersistentSearchControl object. *

* * To use persistent searching for change notification, you create a * "persistent search" control that specifies the types of changes that * you want to track. When an entry is changed, the server sends that * entry back to your client and may include an "entry change notification" * control that specifies additional information about the change. *

* * Once you retrieve an LdapEntryChangeControl object from * the server, you can get the following additional information about * the change made to the entry: *

* *

    *
  • The type of change made (add, modify, delete, or modify DN) *
  • The change number identifying the record of the change in the * change log (if the server supports change logs) *
  • If the entry was renamed, the old DN of the entry *
*

* * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl */ public class LdapEntryChangeControl extends LDAPEntryChangeControl implements Control { /** * Constructs a new LdapEntryChangeControl object. * This constructor is used by the NetscapeControlFactory * */ LdapEntryChangeControl(boolean critical, byte[] value) throws Exception { super(ENTRYCHANGED, critical, value); } /** * Gets the change number, which identifies the record of the change * in the server's change log. * @return Change number identifying the change made. */ public int getChangeNumber() { return super.getChangeNumber(); } /** * Gets the change type, which identifies the type of change * that occurred. * @return Change type identifying the type of change that * occurred. This can be one of the following values: *

* *

    *
  • LdapPersistSearchControl.ADD (a new entry was * added to the directory) *
  • LdapPersistSearchControl.DELETE (an entry was * removed from the directory) *
  • LdapPersistSearchControl.MODIFY (an entry was * modified) *
  • LdapPersistSearchControl.MODDN (an entry was * renamed) *
*

*/ public int getChangeType() { return super.getChangeType(); } /** * Gets the previous DN of the entry (if the entry was renamed). * @return The previous distinguished name of the entry. */ public String getPreviousDN() { return super.getPreviousDN(); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapVirtualListResponseControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapVirtualListRespon0000664001003300100330000000762210602743273033364 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents control data for returning paged results from a search. * * *

 *      VirtualListViewResponse ::= SEQUENCE {
 *               firstPosition    INTEGER,
 *               contentCount     INTEGER,
 *               virtualListViewResult ENUMERATED {
 *                 success                  (0),
 *                 unwillingToPerform       (53),
 *                 insufficientAccessRights (50),
 *                 operationsError          (1),
 *                 busy                     (51),
 *                 timeLimitExceeded        (3),
 *                 adminLimitExceeded       (11),
 *                 sortControlMissing       (60),
 *                 indexRangeError          (?),
 *               }
 *     }
 *
*/ public class LdapVirtualListResponseControl extends LDAPVirtualListResponse implements Control{ /** * Constructs a new LDAPVirtualListResponse object. * @param value A BER encoded byte array. * This constructor is used by the NetscapeControlFactory */ LdapVirtualListResponseControl(boolean critical, byte[] value)throws Exception { super(VIRTUALLISTRESPONSE, critical, value); } /** * Gets the size of the virtual result set. * @return The size of the virtual result set, or -1 if not known. */ public int getContentCount() { return super.getContentCount(); } /** * Gets the index of the first entry returned. * @return The index of the first entry returned. */ public int getFirstPosition() { return super.getFirstPosition(); } /** * Gets the result code. * @return The result code. */ public int getResultCode() { return super.getResultCode(); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapVirtualListControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapVirtualListContro0000664001003300100330000001447710602743273033370 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents control data for returning paged results from a search. * *
 *      VirtualListViewRequest ::= SEQUENCE {
 *                      beforeCount    INTEGER,
 *                      afterCount     INTEGER,
 *                      CHOICE {
 *                      byIndex [0] SEQUENCE {
 *                          index           INTEGER,
 *                          contentCount    INTEGER }
 *                      byFilter [1] jumpTo    Substring }
 * 
* */ public class LdapVirtualListControl extends LDAPVirtualListControl implements Control { /** * Constructs a new LDAPVirtualListControl object. Use this * constructor on an initial search operation, specifying the first * entry to be matched, or the initial part of it. * @param jumpTo An LDAP search expression defining the result set. * @param beforeCount The number of results before the top/center to * return per page. * @param afterCount The number of results after the top/center to * return per page. */ public LdapVirtualListControl( String jumpTo, int beforeCount, int afterCount ) { super( jumpTo, beforeCount, afterCount); } /** * Constructs a new LDAPVirtualListControl object. Use this * constructor on a subsquent search operation, after we know the * size of the virtual list, to fetch a subset. * @param startIndex The index into the virtual list of an entry to * return. * @param beforeCount The number of results before the top/center to * return per page. * @param afterCount The number of results after the top/center to * return per page. */ public LdapVirtualListControl( int startIndex, int beforeCount, int afterCount, int contentCount ) { super( startIndex, beforeCount, afterCount, contentCount ); } /** * Sets the starting index, and the number of entries before and after * to return. Apply this method to a control returned from a previous * search, to specify what result range to return on the next search. * @param startIndex The index into the virtual list of an entry to * return. * @param beforeCount The number of results before startIndex to * return per page. * @param afterCount The number of results after startIndex to * return per page. */ public void setRange( int startIndex, int beforeCount, int afterCount ) { super.setRange(startIndex, beforeCount, afterCount); } /** * Sets the search expression, and the number of entries before and after * to return. * @param jumpTo An LDAP search expression defining the result set. * return. * @param beforeCount The number of results before startIndex to * return per page. * @param afterCount The number of results after startIndex to * return per page. */ public void setRange( String jumpTo, int beforeCount, int afterCount ) { super.setRange(jumpTo, beforeCount, afterCount); } /** * Gets the size of the virtual result set. * @return The size of the virtual result set, or -1 if not known. */ public int getIndex() { return super.getIndex(); } /** * Gets the size of the virtual result set. * @return The size of the virtual result set, or -1 if not known. */ public int getListSize() { return super.getListSize(); } /** * Sets the size of the virtual result set. * @param listSize The virtual result set size. */ public void setListSize( int listSize ) { super.setListSize(listSize); } /** * Gets the number of results before the top/center to return per page. * @return The number of results before the top/center to return per page. */ public int getBeforeCount() { return super.getBeforeCount(); } /** * Gets the number of results after the top/center to return per page. * @return The number of results after the top/center to return per page. */ public int getAfterCount() { return super.getAfterCount(); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapPasswordExpiredControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapPasswordExpiredCo0000664001003300100330000000552310602743273033316 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents an LDAP v3 server control that may be returned if a * password has expired, and password policy is enabled on the server. * The OID for this control is 2.16.840.1.113730.3.4.4. *

*/ public class LdapPasswordExpiredControl extends LDAPPasswordExpiredControl implements Control{ /** * This constractor is used by the NetscapeControlFactory */ LdapPasswordExpiredControl(boolean critical, byte[] value) throws Exception{ super(EXPIRED, critical, value); } /** * Return string message passed in the control * @return message string */ public String getMessage() { return super.getMessage(); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapPasswordExpiringControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapPasswordExpiringC0000664001003300100330000000564010602743273033324 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents an LDAP v3 server control that may be returned if a * password is about to expire, and password policy is enabled on the server. * The OID for this control is 2.16.840.1.113730.3.4.5. *

*/ public class LdapPasswordExpiringControl extends LDAPPasswordExpiringControl implements Control { /** * This constractor is used by the NetscapeControlFactory */ LdapPasswordExpiringControl(boolean critical, byte[] value) throws Exception{ super(EXPIRING, critical, value); } /** * Return parsed number of seconds before password expires * @return number of seconds before password expires */ public int getSecondsToExipre() { return super.getSecondsToExpiration(); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapPersistSearchControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/controls/LdapPersistSearchCont0000664001003300100330000002552410602743273033317 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap.controls; import javax.naming.ldap.Control; import netscape.ldap.controls.*; /** * Represents an LDAP v3 server control that specifies a persistent * search (an ongoing search operation), which allows your LDAP client * to get notification of changes to the directory. (The OID for this * control is 2.16.840.1.113730.3.4.3.) You can use this control in * conjunction with an "entry change notification" control. *

* * To use persistent searching for change notification, you create a * "persistent search" control that specifies the types of changes that * you want to track. You include the control in a search request. * If an entry in the directory is changed, the server determines if * the entry matches the search criteria in your request and if the * change is the type of change that you are tracking. If both of * these are true, the server sends the entry to your client. *

* * The server can also include an "entry change notification" control * with the entry. (The OID for this control is 2.16.840.1.113730.3.4.7.) * This control contains additional information about the * change made to the entry, including the type of change made, * the change number (which corresponds to an item in the server's * change log, if the server supports a change log), and, if the * entry was renamed, the old DN of the entry. *

* * When constructing an LDAPPersistSearchControl object, * you can specify the following information: *

* *

    *
  • the type of change you want to track (added, modified, deleted, * or renamed entries) *
  • a preference indicating whether or not you want the server to * return all entries that initially matched the search criteria * (rather than only the entries that change) *
  • a preference indicating whether or not you want entry change * notification controls included with every entry returned by the * server *
*

* @see com.netscape.jndi.ldap.controls.LdapEntryChangeControl */ public class LdapPersistSearchControl extends LDAPPersistSearchControl implements Control { /** * Change type specifying that you want to track additions of new * entries to the directory. You can either specify this change type * when constructing an LdapPersistSearchControl or * by using the setChangeTypes method. * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#getChangeTypes * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#setChangeTypes */ public static final int ADD = LDAPPersistSearchControl.ADD; /** * Change type specifying that you want to track removals of * entries from the directory. You can either specify this change type * when constructing an LdapPersistSearchControl or * by using the setChangeTypes method. * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#getChangeTypes * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#setChangeTypes */ public static final int DELETE = LDAPPersistSearchControl.DELETE; /** * Change type specifying that you want to track modifications of * entries in the directory. You can either specify this change type * when constructing an LdapPersistSearchControl or * by using the setChangeTypes method. * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#getChangeTypes * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#setChangeTypes */ public static final int MODIFY = LDAPPersistSearchControl.MODIFY; /** * Change type specifying that you want to track modifications of the * DNs of entries in the directory. You can either specify this change type * when constructing an LdapPersistSearchControl or * by using the setChangeTypes method. * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#getChangeTypes * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#setChangeTypes */ public static final int MODDN = LDAPPersistSearchControl.MODDN; /** * Constructs an LdapPersistSearchControl object * that specifies a persistent search. * * @param changeTypes The change types to be monitored. You can perform * a bitwise OR on any of the following values and specify the result as * the change types: *

    *
  • LdapPersistSearchControl.ADD (to track new entries * added to the directory) *
  • LdapPersistSearchControl.DELETE (to track entries * removed from the directory) *
  • LdapPersistSearchControl.MODIFY (to track entries * that have been modified) *
  • LdapPersistSearchControl.MODDN (to track entries * that have been renamed) *
* @param changesOnly true if you do not want the server * to return all existing entries in the directory that match the * search criteria. (You just want the changed entries to be returned.) * @param returnControls true you want the server to return * entry change controls with each entry in the search results. * @param isCritical true if this control is critical to * the search operation (for example, if the server does not support * this control, you may not want the server to perform the search * at all.) * @see com.netscape.jndi.ldap.controls.LdapEntryChangeControl */ public LdapPersistSearchControl(int changeTypes, boolean changesOnly, boolean returnControls, boolean isCritical) { super(changeTypes, changesOnly, returnControls, isCritical); } /** * Gets the change types monitored by this control. * @return Integer representing the change types that you want monitored. * This value can be the bitwise OR of ADD, DELETE, MODIFY, * and/or MODDN. If the change type is unknown, * this method returns -1. */ public int getChangeTypes() { return super.getChangeTypes(); } /** * Indicates whether you want the server to send any existing * entries that already match the search criteria or only the * entries that have changed. * @return If true, the server returns only the * entries that have changed. If false, the server * also returns any existing entries that match the search criteria * but have not changed. */ public boolean getChangesOnly() { return super.getChangesOnly(); } /** * Indicates whether or not the server includes an "entry change * notification" control with each entry it sends back to the client * during the persistent search. * @return true if the server includes "entry change * notification" controls with the entries it sends during the * persistent search. * @see com.netscape.jndi.ldap.controls.LdapEntryChangeControl */ public boolean getReturnControls() { return super.getReturnControls(); } /** * Sets the change types that you want monitored by this control. * @param types Integer representing the change types that you want monitored. * This value can be the bitwise OR of ADD, DELETE, MODIFY, * and/or MODDN. * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#getChangeTypes */ public void setChangeTypes(int types) { super.setChangeTypes(types); } /** * Specifies whether you want the server to send any existing * entries that already match the search criteria or only the * entries that have changed. * @param changesOnly If true, the server returns only the * entries that have changed. If false, the server * also returns any existing entries that match the search criteria * but have not changed. * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#getChangesOnly */ public void setChangesOnly(boolean changesOnly) { super.setChangesOnly(changesOnly); } /** * Specifies whether you want the server to include an "entry change * notification" control with each entry it sends back to the client * during the persistent search. * @param returnControls If true, the server includes * "entry change notification" controls with the entries it sends * during the persistent search. * @see com.netscape.jndi.ldap.controls.LdapEntryChangeControl * @see com.netscape.jndi.ldap.controls.LdapPersistSearchControl#setReturnControls */ public void setReturnControls(boolean returnControls) { super.setReturnControls(returnControls); } /** * Retrieves the ASN.1 BER encoded value of the LDAP control. * Null is returned if the value is absent. * @return A possibly null byte array representing the ASN.1 BER * encoded value of the LDAP control. */ public byte[] getEncodedValue() { return getValue(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/LdapContextFactory.java0000664001003300100330000000544210602743273031742 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.event.*; import javax.naming.spi.*; import java.util.*; public class LdapContextFactory implements InitialContextFactory { public Context getInitialContext(Hashtable env) throws NamingException { Hashtable ctxEnv = (Hashtable)env.clone(); // Read system properties as well. Add a system property to the // env if it's name start with "java.naming." and it is not already // present in the env (env has precedence over the System properties) for (Enumeration e = System.getProperties().keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); if (key.startsWith("java.naming.")|| key.startsWith("com.netscape.")) { if (ctxEnv.get(key) == null) { ctxEnv.put(key,System.getProperty(key)); } } } EventDirContext ctx = new LdapContextImpl(ctxEnv); return ctx; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/EventService.java0000664001003300100330000005147410602743273030575 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import javax.naming.event.*; import netscape.ldap.*; import netscape.ldap.controls.*; import java.util.*; import com.netscape.jndi.ldap.common.*; /** * Event Service monitors changes on the server * Implemented with the persistent search control. Uses ldapjdk asynchronous * interfaces so that multiple search requests can be processed by a single * thread * */ class EventService implements Runnable{ LdapService m_ldapSvc; Vector m_eventList = new Vector(); Thread m_monitorThread; LDAPSearchListener m_msgQueue; // for asynch ldap search /** * Constructor */ public EventService (LdapService ldapSvc) { m_ldapSvc = ldapSvc; } /** * Add change event listener */ synchronized void addListener (LdapContextImpl ctx, String name, String filter,SearchControls jndiCtrls, NamingListener l) throws NamingException{ EventEntry event = null; LDAPSearchListener sl = null; // Search listener for this request Debug.println(1, "ADD LISTENER"); // Create DN by appending the name to the current context String base = ctx.getDN(); if (name.length() > 0) { if (base.length() > 0) { base = name + "," + base; } else { base = name; } } //Create search constraints LDAPConnection ld = (LDAPConnection) m_ldapSvc.getConnection().clone(); LDAPSearchConstraints cons=ld.getSearchConstraints(); LDAPPersistSearchControl psearchCtrl = createSrchCtrl(l); cons.setServerControls(psearchCtrl); // return obj flag is ignored in this implementation boolean returnObjs = jndiCtrls.getReturningObjFlag(); // Attributes in jndiCtrls.getReturningAttributes() are ignored // This is because we are not returning objects in the NamingEvent // and thus listeners can not read attributes from the event. // Request only javaClassName to be able to determine object type String[] attrs = new String[] { "javaclassname" }; // Search scope int scope = ProviderUtils.jndiSearchScopeToLdap(jndiCtrls.getSearchScope()); // Check if such change is already monitored, search for the event entry for (int i=0; i < m_eventList.size(); i++) { EventEntry ee = (EventEntry) m_eventList.elementAt(i); if (ee.isEqualEvent(base, scope, filter, attrs, cons)) { event = ee; break; } } // If event entry does not exist, send an asynch persistent search // request and create a new event entry if (event == null) { try { Debug.println(1, "Do persistent search for " + base); sl = ld.search( base, scope, filter, attrs, false, /*l=*/null, cons); int[] ids = sl.getMessageIDs(); int id = ids[ids.length-1]; event = new EventEntry(id, ctx, base, scope, filter, attrs, cons); m_eventList.addElement(event); } catch(Exception ex) { throw ExceptionMapper.getNamingException(ex); } } // regiter naming listener with the event event.addListener(l); // Add this search request to the m_msgQueue so it can be // processed by the monitor thread if (m_msgQueue == null) { m_msgQueue = sl; } else { m_msgQueue.merge(sl); } // Create new event if reqested change is not already monitored if (m_monitorThread == null) { m_monitorThread = new Thread (this, "EventService"); m_monitorThread.setDaemon(true); m_monitorThread.start(); } } /** * Remove change event listener */ synchronized void removeListener(NamingListener listener)throws NamingException { boolean removed = false; // Check and the listener against all event entries. If an event is // left with no listeners, abandon associated ldap request for(int i = m_eventList.size()-1; i>=0; i--) { EventEntry ee = (EventEntry)m_eventList.elementAt(i); if (ee.removeListener(listener)) { removed = true; // If no listeners left abandon persistent search and // delete entry if (ee.isEmpty()) { abandonRequest(ee.id); m_eventList.removeElement(ee); } } } // Stop the monitor thread if no events are left // Actually, the thread should stop by itself, as when no outstanding // events are left LDAPSearchListener.getResponse() should return null if (m_eventList.size() == 0) { m_monitorThread = null; } if (!removed) { throw new NamingException("Listener not found"); } } /** * Abandon LDAP request with the specified message ID */ private void abandonRequest(int id) { LDAPConnection ldc = m_ldapSvc.getConnection(); try { ldc.abandon(id); } catch (LDAPException ex) {} } /** * Main monitor thread loop. Wait for persistent search change notifications */ public void run() { LDAPMessage msg = null; while (m_monitorThread != null) { try { // Block untill a message is received msg = m_msgQueue.getResponse(); } catch (LDAPException ex) { processNetworkError(ex); } // Terminate if no more requests left if (msg == null) { Debug.println(1, "No more messages, bye"); m_monitorThread = null; return; } synchronized (EventService.this) { EventEntry eventEntry = getEventEntry(msg.getMessageID()); // If no listeners, abandon this message id if (eventEntry == null) { Debug.println(1, "Received ldap msg with unknown id="+msg.getMessageID()); if (! (msg instanceof LDAPResponse)) { abandonRequest(msg.getMessageID()); } continue; } // Check for error message ... if (msg instanceof LDAPResponse) { processResponseMsg((LDAPResponse) msg, eventEntry); } // ... or referral ... else if (msg instanceof LDAPSearchResultReference) { processSearchResultRef((LDAPSearchResultReference) msg, eventEntry); } // ... then must be a LDAPSearchResult carrying change control else if (msg instanceof LDAPSearchResult) { processSearchResultMsg((LDAPSearchResult) msg, eventEntry); } } } // end of synchronized block } /** * On network error, create NamingExceptionEvent and delever it to all * listeners on all events. */ private void processNetworkError(LDAPException ex) { NamingException nameEx = ExceptionMapper.getNamingException(ex); for(int i=0; i0) { str += " "; } str += attrs[i]; } str += "} chanageTypes=" + psearch.getChangeTypes(); str += " listeners=" + listeners.size(); str += " id=" + id; return str; } } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/SearchResultWithControls.java0000664001003300100330000000565010602743273033152 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.ldap.*; import javax.naming.directory.*; /** * An extension of SearchResult that allows access to controls sent * back with the results of a search */ class SearchResultWithControls extends SearchResult implements HasControls { Control[] m_ctrls; /** * Enable constructors */ public SearchResultWithControls(String name, Object obj, Attributes attrs) { super(name, obj, attrs); } public SearchResultWithControls(String name, Object obj, Attributes attrs, boolean isRelative) { super(name, obj, attrs, isRelative); } public SearchResultWithControls(String name, String className, Object obj, Attributes attrs) { super(name, className, obj, attrs); } public SearchResultWithControls(String name, String className, Object obj, Attributes attrs, boolean isRelative) { super(name, className, obj, attrs, isRelative); } /** * Implements HasControls interface */ public Control[] getControls() { return m_ctrls; } /** * Set controls array */ public void setControls(Control[] ctrls) { m_ctrls = ctrls; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/NameClassPairEnum.java0000664001003300100330000000515110602743273031471 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import com.netscape.jndi.ldap.common.ExceptionMapper; import netscape.ldap.*; import java.util.*; /** * Wrapper for the LDAPSearchResult. Convert each LDAPEntry entry into * a JNDI NameClassPair. NameClassPairs are accessed through the NamingEnumeration * interface */ class NameClassPairEnum extends BaseSearchEnum { public NameClassPairEnum(LDAPSearchResults res, LdapContextImpl ctx) throws NamingException{ super(res, ctx); } public Object next() throws NamingException{ LDAPEntry entry = nextLDAPEntry(); String name = LdapNameParser.getRelativeName(m_ctxName, entry.getDN()); String className = ObjectMapper.getClassName(entry); return new NameClassPair(name, className, /*isRelative=*/true); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/com/netscape/jndi/ldap/ContextEnv.java0000664001003300100330000005413310602743273030263 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package com.netscape.jndi.ldap; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import netscape.ldap.*; import netscape.ldap.controls.*; import com.netscape.jndi.ldap.common.*; import java.util.*; /** * Context Environment */ class ContextEnv extends ShareableEnv { public static final String DEFAULT_HOST = "localhost"; public static final int DEFAULT_PORT = LDAPv2.DEFAULT_PORT; public static final int DEFAULT_SSL_PORT = 636; public static final int DEFAULT_LDAP_VERSION = 3; // JNDI defined environment propertiies public static final String P_PROVIDER_URL = Context.PROVIDER_URL; public static final String P_SECURITY_PROTOCOL = Context.SECURITY_PROTOCOL; public static final String P_SECURITY_AUTHMODE = Context.SECURITY_AUTHENTICATION; public static final String P_USER_DN = Context.SECURITY_PRINCIPAL; public static final String P_USER_PASSWORD = Context.SECURITY_CREDENTIALS; public static final String P_APPLET = Context.APPLET; public static final String P_AUTHORITATIVE = Context.AUTHORITATIVE; public static final String P_LANGUAGE = Context.LANGUAGE; public static final String P_BATCHSIZE = Context.BATCHSIZE; public static final String P_REFERRAL_MODE = Context.REFERRAL; // Custom properties public static final String P_CONNECT_CTRLS = "java.naming.ldap.control.connect"; public static final String P_BINARY_ATTRS = "java.naming.ldap.attributes.binary"; public static final String P_ATTRS_ONLY = "java.naming.ldap.typesOnly"; public static final String P_DELETE_OLDRDN = "java.naming.ldap.deleteRDN"; public static final String P_SOCKET_FACTORY = "java.naming.ldap.factory.socket"; public static final String P_CIPHER_SUITE = "java.naming.ldap.ssl.ciphers"; // new public static final String P_TIME_LIMIT = "java.naming.ldap.timelimit"; // new public static final String P_MAX_RESULTS = "java.naming.ldap.maxresults"; // new public static final String P_DEREF_ALIASES = "java.naming.ldap.derefAliases"; public static final String P_REFERRAL_HOPLIMIT = "java.naming.referral.limit"; public static final String P_LDAP_VERSION = "java.naming.ldap.version"; public static final String P_JNDIREF_SEPARATOR = "java.naming.ref.separator"; public static final String P_SASL_AUTHID = "java.naming.security.sasl.authorizationId"; public static final String P_SASL_CALLBACK = "java.naming.security.sasl.callback"; public static final String P_SASL_PKGS = "javax.security.sasl.client.pkgs"; private static final String SASL_PROP_PREFIX = "javax.security.sasl"; public static final String P_TRACE = LDAPConnection.TRACE_PROPERTY; // Possible values for the Context.REFERRAL env property private static final String V_REFERRAL_FOLLOW = "follow"; private static final String V_REFERRAL_IGNORE = "ignore"; private static final String V_REFERRAL_THROW_EXCEPTION = "throw"; // Possible values for the java.naming.ldap.derefAliases env property private static final String V_DEREF_NEVER = "never"; private static final String V_DEREF_SEARCHING = "searching"; private static final String V_DEREF_FINDING = "finding"; private static final String V_DEREF_ALWAYS = "always"; // Possible values for the java.naming... env property private static final String V_AUTH_NONE = "none"; private static final String V_AUTH_SIMPLE = "simple"; /** * Constructor for non root Contexts * * @param parent A reference to the parent context environment * @param parentSharedEnvIdx index into parent's shared environemnt list */ public ContextEnv(ShareableEnv parent, int parentSharedEnvIdx) { super(parent, parentSharedEnvIdx); } /** * Constructor for the root context * * @param initialEnv a hashtable with environemnt properties */ public ContextEnv(Hashtable initialEnv) { super(initialEnv); } /** * Clone ContextEnv * * @return A "clone" of the current context environment */ /** * Clone ShareableEnv * The code is the same as in the superclass (ShareableEnv) except that * a ContextEnv instance is returned * * @return A "clone" of the current context environment */ public Object clone() { // First freeze updates for this context freezeUpdates(); // If the context has been modified, then it is the parent of the clone if (m_sharedEnv != null) { return new ContextEnv(this, m_sharedEnv.size()-1); } // No changes has been done to the inherited parent context. Pass the parent // context to the clone else { return new ContextEnv(m_parentEnv, m_parentSharedEnvIdx); } } /** * Update property value. Properties that pertain to LDAPSearchConstraints * are immediately propagated. To take effect of properties that are connection * related, (like user name/password, ssl mode) the context mujst be reconnected * after the change of environment */ Object updateProperty(String name, Object val, LDAPSearchConstraints cons) throws NamingException{ Object oldVal = getProperty(name); setProperty(name,val); try { if (name.equalsIgnoreCase(P_BATCHSIZE)) { updateBatchSize(cons); } else if (name.equalsIgnoreCase(P_TIME_LIMIT)) { updateTimeLimit(cons); } else if (name.equalsIgnoreCase(P_MAX_RESULTS)) { updateMaxResults(cons); } else if (name.equalsIgnoreCase(P_DEREF_ALIASES)) { updateDerefAliases(cons); } else if (name.equalsIgnoreCase(P_REFERRAL_MODE)) { updateReferralMode(cons); } else if (name.equalsIgnoreCase(P_REFERRAL_HOPLIMIT)) { updateReferralHopLimit(cons); } } catch (IllegalArgumentException e) { if (oldVal == null) { removeProperty(name); } else { setProperty(name, oldVal); } throw e; } return oldVal; } /** * Initialize LDAPSearchConstraints with environment properties */ void updateSearchCons(LDAPSearchConstraints cons) throws NamingException{ updateBatchSize(cons); updateTimeLimit(cons); updateMaxResults(cons); updateDerefAliases(cons); updateReferralMode(cons); updateReferralHopLimit(cons); } /** * Set the suggested number of result to return at a time during search in the * default SearchConstraints for the connection. * Specified with the env property java.naming.batchsize */ void updateBatchSize(LDAPSearchConstraints cons) { String size = (String)getProperty(P_BATCHSIZE); if (size != null) { int n = -1; try { n = Integer.parseInt(size); } catch (Exception e) { throw new IllegalArgumentException("Illegal value for " + P_BATCHSIZE); } cons.setBatchSize(n); } } /** * Set the maximum number of milliseconds to wait for any operation under default * SearchConstraints for the connection. * Specified with the env property java.naming.ldap.timelimit * Note: sun ldap does not have this property */ void updateTimeLimit(LDAPSearchConstraints cons) { String millis = (String)getProperty(P_TIME_LIMIT); if (millis != null) { int n = -1; try { n = Integer.parseInt(millis); } catch (Exception e) { throw new IllegalArgumentException("Illegal value for " + P_TIME_LIMIT); } cons.setTimeLimit(n); } } /** * Set the maximum number of search results to be returned under default * SearchConstraints for the connection. * Specified with the env property java.naming.ldap.maxresults * Note: sun ldap does not have this property */ void updateMaxResults(LDAPSearchConstraints cons) { String max = (String)getProperty(P_MAX_RESULTS); if (max != null) { int n = -1; try { n = Integer.parseInt(max); } catch (Exception e) { throw new IllegalArgumentException( "Illegal value for " + P_MAX_RESULTS); } cons.setMaxResults(n); } } /** * Set how aliases should be dereferenced under default SearchConstraints for the * connection. * Specified with the env property java.naming.ldap.derefAliases */ final void updateDerefAliases(LDAPSearchConstraints cons) throws IllegalArgumentException{ String deref = (String)getProperty(P_DEREF_ALIASES); if(deref != null) { if(deref.equalsIgnoreCase(V_DEREF_NEVER)) { cons.setDereference(LDAPv2.DEREF_NEVER); } else if(deref.equalsIgnoreCase(V_DEREF_SEARCHING)) { cons.setDereference(LDAPv2.DEREF_SEARCHING); } else if(deref.equalsIgnoreCase(V_DEREF_FINDING)) { cons.setDereference(LDAPv2.DEREF_FINDING); } else if(deref.equalsIgnoreCase(V_DEREF_ALWAYS)) { cons.setDereference(LDAPv2.DEREF_ALWAYS); } else { throw new IllegalArgumentException("Illegal value for " + P_DEREF_ALIASES); } } } /** * Set referral parameters for the default SearchConstraints for the connection. * Specified with the env property java.naming.referral */ void updateReferralMode(LDAPSearchConstraints cons) { String mode = (String)getProperty(P_REFERRAL_MODE); if(mode != null) { if(mode.equalsIgnoreCase(V_REFERRAL_FOLLOW)) { cons.setReferrals(true); String user = getUserDN(), passwd = getUserPassword(); if (user != null && passwd != null) { cons.setRebindProc(new ReferralRebindProc(user, passwd)); } } else if(mode.equalsIgnoreCase(V_REFERRAL_THROW_EXCEPTION)) { cons.setReferrals(false); } else if(mode.equalsIgnoreCase(V_REFERRAL_IGNORE)) { //If MANAGEDSAIT control is not supported by the server //(e.g. Active Directory) should enable exception and ignore it cons.setServerControls(new LDAPControl( LDAPControl.MANAGEDSAIT, /*critical=*/false, null)); cons.setReferrals(false); } else { throw new IllegalArgumentException("Illegal value for " + P_REFERRAL_MODE); } } } /** * Check if referrals are to be ignored */ boolean ignoreReferralsMode() { String mode = (String)getProperty(P_REFERRAL_MODE); return mode == null || mode.equalsIgnoreCase(V_REFERRAL_IGNORE); } /** * Implementation for LDAPRebind interface. Provide user name, password * to autenticate with the referred to directory server. */ static class ReferralRebindProc implements LDAPRebind { LDAPRebindAuth auth; public ReferralRebindProc(String user, String passwd) { auth = new LDAPRebindAuth(user, passwd); } public LDAPRebindAuth getRebindAuthentication(String host, int port) { return auth; } } /** * Set maximal number of referral hops under default SearchConstraints for the * connection. * Specified with the env property java.naming.referral.limit */ void updateReferralHopLimit(LDAPSearchConstraints cons) throws IllegalArgumentException{ String limit = (String)getProperty(P_REFERRAL_HOPLIMIT); if(limit != null) { int n = -1; try { n = Integer.parseInt(limit); } catch (Exception e) { throw new IllegalArgumentException("Illegal value for " + P_REFERRAL_HOPLIMIT); } cons.setHopLimit(n); } } /** * Check if SSL mode is enabled */ boolean isSSLEnabled() throws NamingException { String secMode = (String)getProperty(P_SECURITY_PROTOCOL); if(secMode != null) { if(secMode.equalsIgnoreCase("ssl")) { return true; } else { throw new AuthenticationNotSupportedException( "Unsupported value for " + P_SECURITY_PROTOCOL); } } return false; } /** * Get the Directory Server URL */ LDAPUrl getDirectoryServerURL() throws NamingException{ String url = (String) getProperty(Context.PROVIDER_URL); try { return (url == null) ? null : new LDAPUrl(url); } catch (java.net.MalformedURLException e) { throw new IllegalArgumentException( "Illegal value for " + Context.PROVIDER_URL); } } /** * Get Ldap Version. If not specified the default is version 3 */ int getLdapVersion() throws NamingException{ String version = (String) getProperty(P_LDAP_VERSION); if (version != null) { int v = -1; try { v = Integer.parseInt(version); } catch (Exception e) { throw new IllegalArgumentException( "Illegal value for java.naming.ldap.version property."); } /*if ( v !=2 && v !=3) { throw new IllegalArgumentException( "Illegal value for + java.naming.ldap.version property."); }BLITS*/ return v; } return DEFAULT_LDAP_VERSION; } /** * Get user authenticate name */ String getUserDN() { return (String) getProperty(Context.SECURITY_PRINCIPAL); } /** * Get user authenticate password */ String getUserPassword() { return (String) getProperty(Context.SECURITY_CREDENTIALS); } /** * Get full qualified socket factory class name */ String getSocketFactory() { return (String)getProperty(P_SOCKET_FACTORY); } /** * Get cipher suite for the socket factory */ Object getCipherSuite() { return getProperty(P_CIPHER_SUITE); } /** * Get controls to be used during a connection request like ProxyAuth */ LDAPControl[] getConnectControls() throws NamingException{ Control[] reqCtls = (Control[])getProperty(P_CONNECT_CTRLS); if (reqCtls != null) { LDAPControl[] ldapCtls = new LDAPControl[reqCtls.length]; for (int i=0; i < reqCtls.length; i++) { try { ldapCtls[i] = (LDAPControl) reqCtls[i]; } catch (ClassCastException ex) { throw new NamingException( "Unsupported control type " + reqCtls[i].getClass().getName()); } } return ldapCtls; } return null; } /** * Flag whether search operation should return attribute names only * (no values). Read environment property P_ATTRS_ONLY. If not defined * FALSE is returned (return attribute values by default) */ boolean getAttrsOnlyFlag() { String flag = (String)getProperty(P_ATTRS_ONLY); if (flag == null) { return false; //default } else if (flag.equalsIgnoreCase("true")) { return true; } else if (flag.equalsIgnoreCase("false")) { return false; } else { throw new IllegalArgumentException("Illegal value for " + P_ATTRS_ONLY); } } /** * Flag whether rename operation should delete old RDN * Read environment property P_ATTRS_ONLY. If not defined * TRUE is returned (delete old RDN by default) */ boolean getDeleteOldRDNFlag() { String flag = (String)getProperty(P_DELETE_OLDRDN); if (flag == null) { return true; //default } else if (flag.equalsIgnoreCase("true")) { return true; } else if (flag.equalsIgnoreCase("false")) { return false; } else { throw new IllegalArgumentException("Illegal value for " + P_DELETE_OLDRDN); } } /** * A user defined value for the separator for JNDI References. * The default value is '#'. * Read environment property P_JNDIREF_SEPARATOR. */ char getRefSeparator() throws NamingException{ String sep = (String)getProperty(P_JNDIREF_SEPARATOR ); if(sep != null) { if (sep.length() !=1) { throw new IllegalArgumentException("Illegal value for " + P_JNDIREF_SEPARATOR); } return sep.charAt(0); } return '#'; } /** * A user defined list of names of binary attributes. This list augments the * default list of well-known binary attributes. List entries are space separated * Read environment property P_BINARY_ATTRS. */ String[] getUserDefBinaryAttrs() { String binAttrList = (String)getProperty(P_BINARY_ATTRS); if (binAttrList == null) { return null; } StringTokenizer tok = new StringTokenizer(binAttrList); String[] binAttrs = new String[tok.countTokens()]; for (int i=0; tok.hasMoreTokens(); i++) { binAttrs[i] = tok.nextToken(); } return binAttrs; } /** * Check if sasl auth mode is requested. If the value of auth property is * neither of (null, none, or simple) then assume it is a space separated * list of sasl mechanis names */ String[] getSaslMechanisms() { String authMode = (String)getProperty(P_SECURITY_AUTHMODE); if(authMode != null) { if(authMode.equalsIgnoreCase(V_AUTH_NONE)) { return null; } else if (authMode.equalsIgnoreCase(V_AUTH_SIMPLE)) { return null; } else { // The value must be a space separated list of sasl // mechanism names StringTokenizer tok = new StringTokenizer(authMode); int cnt = tok.countTokens(); String[] mechanisms = new String[cnt]; for (int i=0; tok.hasMoreTokens(); i++) { mechanisms[i] = tok.nextToken(); } } } return null; } /** * Returned all sasl properties (startwith javax.security.sasl) except * AUTHID and CALLBACK, as a Hashtable. AUTHID and CALLBACK as used * directly as parameters to authenticate() * */ Hashtable getSaslProps() { Hashtable props = getAllProperties(); Hashtable saslProps = new Hashtable(); String prefixUpperCase = SASL_PROP_PREFIX.toUpperCase(); for (Enumeration e = props.keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); if (key.startsWith(SASL_PROP_PREFIX) || key.startsWith(prefixUpperCase)) { if (!key.equalsIgnoreCase(P_SASL_AUTHID) && !key.equalsIgnoreCase(P_SASL_CALLBACK)) { saslProps.put(key, props.get(key)); } } } return (saslProps.size() > 0) ? saslProps : null; } /** * Return DN to be used for sasl auth. Check first the P_SASL_AUTHID * property, then fallback to P_USERDN if not defined. */ String getSaslAuthId() { String id = (String)getProperty(P_SASL_AUTHID); if (id != null) { return id; } return (String)getProperty(P_USER_DN); } /** * Return the callback object for sasl, if specified */ Object getSaslCallback() { return getProperty(P_SASL_CALLBACK); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/lib/0000775001003300100330000000000010667357333021650 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapsp/lib/jndi.jar0000664001003300100330000030030007012732344023253 0ustar viveklviveklPK V' META-INF/þÊPKPK V'META-INF/MANIFEST.MFå“KKÃ@€ïü‡9*ؼŒÒæ¨E¨ÐZhé}ÙÊH² »›`ÿ½Û´ ô¡’Ø‹ô¼óú¾™2IkÔf°B¥)— „^à: d)ŠŒ*Ñuž2ƒbð´Ù>Gp³(%L‰«\o´ÁLÃDrïÖu\gÆ2LàƒUìÓ—,#ùî§‚¾-Y §5qfl›Á’Lj_m Ìê8`RÀ˜r“«­hP­·í'Y‘b†ÒìRÛI_Á7E„ÉýcÆ0/!F ƒ ãáC qpÜ}…Rä*cŽ»ä4ºUyáÉ<{”šÙÛ1{[æ3ƒÿÜõ¬=ѹ6…-xo<Ï|]ÊÆ$muH–^HKîYòFeC~™ü‹¾nè§ídª×Ïý¾¶ß8Óu÷¶@UG˜«¼"j/Òuà­âÁM[ —ÙA¬lþò½º‡¿/PKP4ÇöJäPK ç V' javax/naming/PK‰ V'*javax/naming/AuthenticationException.classuPËJÃ@=Ó$ÆÔÖGAÔ…Š‹ZÑ ®| HUPJ7Ñì§q¨#éD’‰Ôü÷® .ü?J¼\HÁÅœ{Ï™sîeæëûãvÐt1ïbÁC®)çÀ[zy]Yó1ƒiƒÕÚŠš­îâAÂÕ u&ÕàØèÕ©¤>eX=+ô½PZÆ\ËT]Œbñhš]c°;é`¨uR•k®tÄ“‚8»f¨w¥½bØÙ ï'¤zaZd±¸”†lš£@ñ!í þÙ2ië•%q‘IýüÇÖÈE&y‰,'~{uŽu0z;—±ˆ:ÕYb8t˜ùÂ)ÆÇ¨:í1¬÷2Ð ôÊðl–vï×¾Aº¹©¶·Ç°'ýû4~”¹r•ÿPKëh[Ž“PK¯ V'*javax/naming/NamingSecurityException.classmÍJÃ@…Ï4I£±µõ§â¦â¢?´YéFqaUPJE¢ÙOãPFÒ‰$©[ßH7À‡ïDq¡.æ ÷»çÜË}ÿxyƒ….V]¬y`p,8—Gíç×Ç‹ –°hÄc°Zí¡ÑÞò{îÇ\Mü@§RMö /H%õ!ƒ=HnCu¨Ls¥CçT³s†ÚP*1ʧc‘^ñqLtkħ4!QžJýp2‹Ä–‰ê› ^äi$Neá5læ«"á ;ÿ´ÿÌe¨g"•<EšQ}}vl7Q¢›AoëX¦¿JU NÁé~Ò ‘&ýÆçtæ°žŠ@Ô#°»…Ýû¶o7r§;‡ýÛß§ñ="+Ūú'PK…{‹PK­ V'"javax/naming/NamingException.class­VYsUþ.L2ä Ã$‡-3™ÉÂ*«hv³ A@„Τ&Ì»{BPÙQÑ*Ê*ß,|K•*A©‚*X¾Y꓊–øbùÝžÎ2Žòàܾ÷ÜïžóݳÜ;ßüýÅ—˜Œ¼åC£}ØäÃföø°×‡}>ôxÑïÅ/¼8êÅ‹^¼äÅË^óâ¸'¼8éG–ø1]Š",õC‘¢K‹Ä2)–Ëé )VÊéã~LŪ)˜†Õ~°Æ)Xë‡_ŠÖùQ"Eë§pô„¤xRЧ¤•z¹Z/qõÒTCÁ/þp~ÃÏ«<‡§¥hSp;$С ­R<£ …- ÒhWªàlUpJ‚O£IŠfgХଯ SÁ«ˆ+¸ qo¢E¥¡ÐÎLÆ iq­ÏLdÒ¡„’ê}njæR¤ª©WíWë’jº§®µ³W‹›ëœê6SO¤{¨ž™§n?¤gލI+eöÊ@]ZM\×¢¦¤~r¤ªC <’Û–ÈÔí )“55µÎmi·ž05ÝZªŒŒ§æJ«ú‘€ ÙînZ–\]à3¶ñ1žî B™²cýÞј8¢,·D".ܽÎp…Zn÷º†QÔ ×…t-¥&ÒT…¸Q …m¥‘Iök]¡Œ/VOáz‚Ì žÆL—&0µ1“6L5mv¨É,çb»À´¦DZkɦ:5½]¾] .ܪ°l‚b+q=oi‹5Ý4\äµ$àoËdõ¸¶9!Ý‹ý,Iµ«‹ô)ë“I9èëÓÒÔ”ç;‡ß˜IõeÒZÚ¤CÇ’ô(POr]ÀÇ%cwÂòV%r ¢Y3 µ‡ð'KÓ,U.Â9Mñ ã! H›¸QÍ\/q £S›k¥a­Å‘à,ÕnK&µ5Y¯÷dS<ïPÀY&,+÷†ÈÇ5L-•çy$yÙ³ÂliîàÓÇ¥V`ŽS76ÍÌCŸ<-£Ø—‹…?Ü®«qY“z~œ=/ÈEúØOÕÞ±g74=¡&;4Ýà|×¶–j\êŒq©3œ©3òRç33ñôöË^iíÆ|¾E à‘àïw†ïrø“˜D=Äbü…¥ø•è$vÛþÚþWÆîÁs]º»‹y¶× ËëÜ<¯Qêç ÜFì$3™a Qb<"€„"Jø+ÅL~+Df‹‹YX!й£[msù•Y*ˆ"tm$‚…–òcJÛÇAÉÒ }›Òp…†Ð³”&¶¸@#N臔YlsV9 "Fyz¤ø±V$Ôý bÑhmøe ^aX;šì—™9¿;¤ñ»ØÌª5ÇZj¾ŽÝDñžêÏP3„òê`Á æ]/(®¢@Næ'Q ‚á›/wƱ°æÎUÕܹ%+u¡LU€Õ»e„A­l/qœ N0E'§0GœF8ƒU¯gÑ@ývq­â˜Å²ùc¹Àf¹x,Ëű|‡,ß%Ë‹dy‰,ß#Ë÷ÉòY^&Ë‹dùYÊô¿6RÛ Œ±Õ«ì­’¼Â½ÊŒ«€ó{õ>Oõÿßg¯~Ï^ý–«¯ÿ·½°m/ì´w›ö¾¢½Û´w‡önqõ¬5WJ.§y"–:“XŽœCó\iyQf}i®D?¥rÃ鿹$í奉å™r…šH†:Å“4ex§¹vú8ÏFÂÈ«œaQê¤ø¡ì5©‡Ò’š¢W7(ùnä@M¦y¯øtꜲ+U;vŸ ÝÕcꑸYÆeX1†®hd–) uëì)¬0ÖOQ§)éÁ.ÐÇ4†wxEù­ÂÀ3+f¯g˜Õ ³… ïÑôøo<~ÄKŸ°èqËwîp GXªtä¨ûJÛu"nƒâZÿPK&Pžú£uPK› V''javax/naming/InvalidNameException.classmO»JQ=“ÝÍꚘøH¡ØÄ*FÌvZ(6Q!¶‰n“\•Í]ÙGÈ?ø5V ÁÖNÁïüqîb¡b1g8gΙaž?aá ë.6<”àXrîÞäËÓëÇ{+X6à¬Ö^Hh´ú7b&üHè‰?È¥'ÇF/Ÿ(­²S‚ÝÇ’PíÆ:Í„ÎBåÌ·zz&"5ÄTžÏGò6S±î˜Uº$ÔúJË Ÿer%†'¼Aœ'#y¡ içÜ×bÊýÿvv~y‚¢ý×S™(…2I™_÷ÎÐñ·`ÜÆ&jÜ«ÌJp¸È|ÎXaÅøˆ»Ó^Àº/uF¯ÁÆaa÷¾í»¬›I¹½¿€ý×ïóú+kÅ©Õ/PK°´-Ð…PK’ V' javax/naming/CompositeName.class•W wWþž¼ÌX'޼¥¶ÓÈnYrì,¥ ‰“&1UšÅàÔÆ¡ÔŒå±=©4R¤‘ë„R¶-K ´, º@] m“´•h MÒ½…B—PÎ)? œœäpïh$KãQøßwç.ß]Þ}£7o]záET`þ*#!㈌ÈxPÆÏeüBÆ#2~#ãe¯ÈxUÆk2^—ñ†Œ7%<#áY ÏIÈHÈJø„ç%¼ a^Âï%üA‹ÎH8+ᜄ—¼hÆ~/Ú˜4à€L–3YÁ¤ƒ^¬Ä§˜|šÉ“ƒ¬¸™¹a&#L>Ãn£Ìª!íg™»…Éç˜ÜÊcµ¸cüh‘Ï3QkqÆ™‹°ÛsË&½hÅ”Ë0ÍDgÅaF¹QnãG‹D¹„ñ# &ñª–Õ­7ÝÿÁ±K À “{˜|‹Éw˜|—ɽ ÅLîfB&áKL¾­à—ø¦‚Çñ}sxHÁ¬ø5¾®à·8ªàÒ žÄ1O1y·+8‰¤‚Sø™‚ÓüøR þˆo(ø+ÞæÇ?cVÁ;üø.ã½SÁû¸CÁyÜ% :é­@E +,ÐèÚ{XQ{£ª1Õ{`ü°1·:ÅCfR7¦H|U^œ6õhŽiIÕÔãÆV oØ¢‡šaWX‡¼€ÛZ»7畳½†#‡ÞýjL#E%)(d ^ŒéîÑìjJmyÅ¢ø\N—­-…squ ¤Çí²ÃF"mR(MY¡V: ¤ÍR‹¦ÀâÞñ^¹ÊËÙSÚ›]ä.–nÕ(×ÒbÑ®ô䤖$óµeÍíir³æ (×ÿ+*ñL)“ñ„–4u-e9†ÊèÜsXEk×Ìÿy0š]Mª+Q„c‰¨µç¢W@î‹DuC7· T÷ÙLe|BðõÇc‰xJ75öêaºþ¸‘2UÃV£i2òÌF´çœPÂÆŒÕ'ütbÀÒ½º¡íOÇÆµäAu–Ô§¦©ýµ†6kÚGƒJA3F0æg/sùªNj±ø a×§´¤®F‡µdŠ2»9ü šÎ”~ŒÏ9ú¤iÙŒçwT¾=I-¶ k-6‡‰ºë4ƒ~²èøU¾SðòE„ÖVüÇI÷câ=ØK—÷c†$?$ÉWȃÿöÍ£m4‹Žg°á46øj}K3¸a„Ù%¾Š<[ç“ó¬â“òlOäY¯ÏÃì)ø)ÑN ¼BɼŽ&¼?ÞDˆ®:×ÑMg']töâY>PHg*‰‚YøƒóX9J°Y¬}}  K¬œ/éEº»]°î¡ÚàZT4„²¸ |Dÿ «ìGø =qàDéÖg'S«ËëCòü;a}HÒGñE;›µ¤cmmðYôµug ž,8zÜãC§¡(v¿Ûv_C+'àe÷PÝNoñÈâR‰÷cø²í=FésðMÝçÐþ Uaåð<®È`ÝHðäMRúXuvN:O¿[¹úi宯 Ñ1îÏ`Ÿæ}s¨ Ñ»k;¾‰˜-Ç/_\x [o ÏzÈž ¨ólD½gZi½ÆÓShG=ý?lý þè¿PK1pˆÑ3PK¨ V'javax/naming/NameImpl.class½Yy|ÔÕµÿžßÌd&a $C&  BÀI€ ‹…!™$“™03A -Ö–ÚZ}î}5±Š¨5¶å©T!Z©¶Bk­Ví¾ØÚ¾¥‹Kkíb«å}Ïï÷ËÌ$»¼?^ò™sÏ=÷žåž{î¹çÎ<ý·“à YçÁqø§@  xðc~âÁKüÔƒŸyðs~áñˆ×#Ó<â÷ÈtÌðÈy9ß#xd¦G.ôH©Gfy¤Ì#Txäb¬qË8·¸e¼[&¸Åç–‰n™ä–Én)tË·¹¥Ø-%n™š‡óÑ“‡™ ÊLÇíÌÀUŠ”co*°/—Ø~ïSð~PÞ:ùjÌøFÁ‡tôÃ:zPÁG”v­‚êÀÇTèu:ðqÅ®Wpƒ‚Spcfá&7k÷–Q¸·*ïm nW¶OèÀ¿+öIÅîPЫÝ>rgÎç”í.¸[)¸G»&8¬óîUì>ÅîW«>­àý TðŸUð9Gü‡‚‡<¬à•rT¥|^}ð¨b)8æÅËø¢‚¯(xVÁwüЋWð?^¼ªà5¯+x_óâx\Á7½ø#N{ñ'|Ë?ã×^¼…/{ñœòâm|Ý‹wðœS¶sxÁ+À¼bà /#ë”Wœø¾W\xÒ+9xFÁ·½âÖ®_òJ.Nx%’ežöJ>^ôÊhƒç½2VA¹Ê›­óæà«^¹H»si½ÌçbdTâ[^Y¨“©ŽÅª¼ ¿òÊK,Ãï¼R­Ør—(¨Q°BA­‚•:¥N±U\‘¬ÆI¯\ª ^ÁZœåÒüÁ¤?móÇÚý­±®îX4M ¥³ê9X:kÝÎàžàœH0Ú1§iÇÎPkrÉprs2Žv\8HîI†#sê¢=]¡x0ŽE—˜ò6›ð AQiíHþ=íí¡8g:KëgÕ |l²éFO)Ÿ’¢gÑ®2©ÞUZ_¯ËšXZ?R„N(!CížY:Ò ¬¶ø²MÜü.ô+Ôž‘ôú ƒvÖ³džÍ’òjbÊ÷Yõ½›à ·é¶‡³ cV¶L§oæâcqs•¥Ùæf7dQ–©ÿ¤‹¦”þ-/Ì\u‡âÉp(a:%ð.cÙ]ø/̦ދþî쑦RÁ¤Ò‘^¬7£È^áÞ9Ñ`Ìi v…껺#¦“+ªü­‘X"äßÝK†üÁîîP0žðïµÇâ¡,‰al•?Ëd,¨ò'÷u‡ö#ÿš¨Éi¾á"½Uþžh(Ñìµù9KÃÑp²šñ\ão0aq%!k0êE#ûüÁ=TçOpq‘P¦†²¬Ó÷‡â1,ÎÎÉÎÚXUçׯ¢‰d0šÜŒô°ŸW··5Ô­nN„³. 5ötíÅ7wD8¥ [\ŒÜ ôýlä:›7µ¬«ÛV×\[³¾Žº¬ncSc]jlÃeM›êæíÎÓ©±žxkhUX †Œ#ØÖFOÖD"'R u™KËѽˆêpkg0^CJ®.<mŠqjÊ \anÈbÒIO(mKl ';)#´»'!m¬…ÔwD¹¿µÁ„:ÏÜ3: 9¹O Ú›Œ[“µÔÀ%´‡ã‰dÊ*§î 爫„–áDVÄb‘P0JkØYµ‡÷R–‰›GaŸ5Ò̼¥#c:ƒ‰ÚP—6—”Nk?Ýáh[hoS;§…£ 2×¥¸$œ`è%; Âp›ÂžŸáêOv†ü;£máÙ‰}Ñdpïì¶pœ{È ðw§Lp„5*?Q×Õ­ýœp¢!”䮎 'šCôn›ÎÛÒŒƒplNs(¦šýVД¦c¦&î«7ÍìI6µ¯ˆõÐÙ©°ÌHO­DBÁHM¼£G‘1itzRCP÷iìð;eÉŠSfêì—s~ÖT#ð§é±æžÖNÛŸ¦LÈ–»µgÁô!‰©>jnƒž‘ i¾¬ÉK0-+}ÐV•>1sw„:ÂQ;½LÊ>0O•eÛt]RgÁäËF¦˜‚!t3 3'lžšVóÔ ‘’HGÎ’¬ôTúã<€4±ÍŒØh,Za&;k>ﮬܳͼS’}ÌNÇÃLMÏ6ÀxéÚÁÐÙÅÍ fíüH¨=¹-Ûwtê鎄¢”n'G™R“'Ò±¸n;7’Ùw©¦Ósâ¡®Ø:hŒ…dœÜ|S°jPMÌ%‰ð~Í?‰]á—ÇLOÚ‰+?ax¸}Ÿ•Žr=;ö1(°–T³'˜Á=Î"®ÐÙ ;;7 MƒÆ¢i ¬gЉ&Âɰi¶E_™#›Rm”7ŒBi^›bG=!ì±Ã(óR¤MÜö†L´IÖ–f°ç&c©ü:*[»*·²·'L NÝ[³Ñ;Ðm&Ʀvøù ;Ÿ¯? `èëIÛú1Ûv[k·|¤˜íJ»­±éKìv¹Ý.µÛKì¶Ênë̶@_sÔù_Jã>ìR}û¯gôì¿’ÑwñÃÇñ~øLäÈk'§ÁvvÙ?ŽcX\æ<†ª2×1,)Ë9†EJ[UÀÖ²S(kÀEÇPsT¿aÀ/ g"—ð-ê«$¶£±ã±“QEMáKÿ¯|Ù¿eêü5©Î·i‡íí*¶²ì1tL=Ž•ÕÎJgùq´Tº•9ýØ]VîËñ¹8\3€Õ•9%½«ã¸ô˸ ùVçrvªÜ…n2:#ÇQéT®{1OÙ°½2Gû÷`†ÏÙ‡’A!â8Žæ~x­Îq,ÕY‡Ïݘ^ÙføÏÁ% >¾|É‚É|òNåc·‚Ïܹ|åVó‘{)ñ5|ç6‹›ùÀ½’ïÛv‡¸ŒÇ™€²ý°LÄ ä½{ðߔꤎ€é“Øû°ÚÜC`šé“~ËÊò/à=Gd½ ïÜ«ió&Ò‰©4o:<2>¶S¥„£oà)ÛÑÍ©B/,;Žmw£Ðtõhººù§h)ÈÀ‚Ó¦¦"º#-| r47c¼q &·¢m‰q;f7eدªžµUm´ãh滩òª p=Ã5}Œš®£¦SÓuÔt.0>:DÓïqÆÖÔOMäA“£º¨ÒÙå–—ª\ÿPs¡Ëçä2ÕýpoéǘƒNtìã%G¨Äà]†RÛ´jŒ¡i{`WÁcìågÆûqžñ>\h¼³ØV°È¸U_f|ÕÆ5¨áüãà0ó¿c›Íw²­s,ëÇ¢€i{ã?4½‚Ns.³ìöl£Ÿ*V£]˜Ï³7ÔèVÝ—â§^£ÓŒN¦_;iø.Ì5"˜ÏñJ£ (ІZc÷£ÿ„ÙÑùsŸÇö@Yà¸GÔÞeÜÈmÕÅ%'pE¥ÓaÚMe>×AÏS}•;àË9˜c¢.!Ú‹qzJ<¬m”Øaw[ÄÝUžB¹¤2×—Û‹_îŸó ó\߹ϗ´IEÍFL úKÿ¯à–Wà•W1N^ãùü-Á˜.¿G¹¼‰…ò'žÑ?£NÞÂ:ù+ÏèÛ¸BÞAPÎa'Ã5fÏéØo¸(ù¯Œ1k½¯p½n¶ï×…µU—܉Q%Šßo®¾ä8šªz…Nsÿ4¹ÊShÎàr]ºNWaŽ69ÖrÇšýº>Œs±ð•}*TE™»úP?r¶8Ž8uo}HâªÔÞšÉX ·q)ÏK=|ÆZ~Ö¡Øhàþ6"`4q?×37`¥±kMØh\†­Æf¼×¸F WÝ€$ù®2¶b¯q%W¾Ò߯×í•¿l¯üšÀ<ò^\ø2ʘ™·©îA›5ì¯1}P‘vA†;þO>¨°]ð°óˆ#½Ù¼P _Å(y cå Šä,üò5Ì”¯c–|Ë3¸D¾‰Õò,å9\&Ïc«¼À$ü":å;Üàï"ɹàjù1/ÆsxÁ:ÎYL% lãg¥ÛQé9…™-%˜W•Ûo<és÷â\Y ˜F‡°©¥ÒÓÇ´löÛÙïÅÏ}ž^äé0¦R«\ƒ”°EÙi.yZ¦#núËÉ›uU±º¥e;ôKà.S ßîèXaŽIÊO–æŠcùq,ÛrÐâ’{‘(Ì!)Ø{î‹Å%‡1Us†.!pÉ\\À“T}qM"Åêe ).9$¯RͶð|õËËÃyÜižŒi'3Í f˜9€Í½(Ni.Wz´tXÕ/]©’ò}¸ªQTeWä QKjLUI¹ÝQ™û0y(ÝÚsÿÌ~¤ØèO5F»–=º'já–ÿ§ ʹA…¹ŠÐ‚’CX™Þ,JñR`«ÍŸ›æWåÔjëwTº©ðå©âJ¢³óãVá“o÷x¯§ŽšLÁ*âïᵕãJŒÅ6¾ 3Ð,@ˆUJ;ZÐíèDìÃn\‹8z‘À}èÁC¤E3À>!ïÃO±?ÃʾćX~„ÕÒµ’Ïv>Ærå:ñãz©`uT›äRÜ,M¸E6±¿·In—>!e{=>)wày½LwÊ÷ð)fÿ»™écp¯1ýÆ…xШÂgŒ•øsáýÌ÷A<Ì;ð(/çGx9?Êúâ1V3Æ!œ0îÅIãN'Ù>ÇçpÚxÛŒïáIãøŠñÛßá)Co†Œ›Q±óåùf-«dµ‚Éï‘TêÊa c98esøÙ’ U¿ÖŸ<ýuÅž=Ý–Ÿ[Æë¶áº ާ)Ü…'íéµf¡œWīȺ±¼§0½¥hsOŸB…Æ{ƒ½…i½£µH4|¬&ò>™Lî”Àz ÔòóʧTOQq6‘EÅCDhc³ü(Áhc*K;.[²Åî7Ÿ(,WKõ6ièGyêþl´®kžD£uc(¾»±ˆpÃöT1ü|QÚef¿›eÏ!ä÷`‚qEÜ^¿q?kµO£ÜxåÎ!,5>ËB>/Úvìjl|ÅÖUzVûàv0M;‡;z90_ʾ‹— ›mœO5cð¼={•¨+Óɤeé»…/“ôÅbÝ2<÷#-1«enr>V¯Ã…<¯±]@Zþ®fë»ÄÖg竈)u‚Õé2;Ã%›1€5”¼–’×PÚÜÁ7"¯L3¨dQY  @ëÓÆcè43K‰ys/Ne™>T¤jØ>L?…-vŽí´3Ö˜ÁŒ5ÿtÆÌRJžÄø>†±"ëRÃÏj!<£¥`²É(ð™C»ˆM<µÇX‹ ŠM,Jl¬9"6ÞÄšùϧ^>ƒÑeÚÓ»@+íÐYèøŒÒ°Å8Îdl'6ÁÄvê­a‰h·E´“j‰h·Dì´Eì´ MÆ6bSL,–~íÜÊ|^àd|›½ïpÿ¾‹|¯fÛˆâ VÝmø13éO˜Q_b&ý)3éK¸šUøuÜÛø¢¿‹/ù~J<Š_á4~³lŸÆo˜5^a¾}•”×ð&^gžú-_¨¯3à'ExCÎÛ̵Ùø£\Ìv¡FŒÌ㩳âf¾ý ?˜ÍläÊòáéâä¼TŒ> X:×ÃŽÅ{‡‹\V%¾eÏÞf‡éüt˜ò}n¢öí;%³öUÛe•1ÃÏD#w=&±‚ <1›hÚÂTMÿצ3ã©Q‹y®n]c?Òu¬3]Ê»ËX§Ö¯N»š,c;]ÆšøÐ2ö‘ŒJ~4vò^¬äÍ÷‹QÊŒ;‹é1ÀO9SVÓälÌ0æðYy.6æb‰1+Œ‹Qo,@³Q‰ËŒE¼#ȹ;É×e,EÔX†nc9»ÏXkuÜNÇjBÜÊK£e™£ÚQé”*—Tåèi,ÖW«¡ÈÔ,go¼‹¬S¢2—®bÙ1à ü«œ²J(ëk“]gàrjýÖukg(¦Ö3©Ðu ‡Ê*µd™CÅCæ[sœ•ôã´ð¨ÕX•åýXÌ2ÊçÑ: Ó ÝvÉh•I>U7é´‚B¾9==ƒEÏS|øÜYŠ2göËZg¥ÇQ™Û/Kµ,œ[ðåÚù·ç¥ä*É”œka”M–œL–ö‘,í)–v›/Ú³­Ò±ÙÂu°ø0Ʀxù Ÿ681UP秇ÓXzŽJï)éÅEæîùrMÏ 1'’bˆ 2¬ô9mŽ®l])Ž®AÓŸ¹sÓE¥Ç—[|øo_Õ'{<•d&«È2¾Æ«Y»,ç#íL‘•|…×ñ¾ óe5³¶[N|…Ô£^Ö IÖò¡VËe¶I_äM|¬­GB6`¿läC­™5â&Ö†p£lf ¸}r9î‘<Àþgä=xD¶âQÙŽÒŠ'¤g¥/ÈN¼,»ðâ¯IïH‡8$!£d»Œ–2N®–Ir”ɇd‰|XV_#åJùˆDåZÙOür=ÿo^¹Qîcû€Ü$'äyRn“gävù>G$wÈ+Ò'ïÈF®ÜaxåSÆ8¹Ë˜*‡Œ9r±„ýj¹ÏhOëåjc³çásw3 )÷ðžuÌðÐb‚èxä!ºàaŒ—£(”Ïãy Uò(–¯fŒ5É ¦Ý/ MN""§•/òÝ~äq> N³ô×kê·æ×Ù¿ù_PKàDѸðö&PK¨ V'%javax/naming/NameImplEnumerator.classmRËnÓP=÷Æ©Çy4MZ(}Ay8­Ù§BB(K%,‚*µ+÷ªuåGåÚU~6lX€”4•(bÉG!ææÑV¥¶43÷Ì™sg<þó÷ÇOd°‰­Y¬«x¢â©Šg* u¦Ž¢¥T”5d1'£Š4ó:–P“枎GXÖ±E mb•¡jÔwŽ3ÇòðÐzß=nÒdÈõÝ‘Ýg¨öœšqí$±6eÕâOÏ·v‰ÅMÛ–™™m/ô’— Êëè@00›¡´ã…¢]pº>¡•ÿË m'vpâoÉ$‘¦çV˜"vˆÅ u¢4vÅOÊdÝ( †œðE ÂäÅ¥#çô]‹Ö:e(ߌ溾~*îE!Ãú5ÞŽ:©{4Qiõ\q2¦”ow>QëY¡Ð÷±¦]3¬Ý‰ßœ&ë{GýäCÑK&wÑ7< ãm—ƒvD/ä.!ZñÈ7F^f–pŸX(Ú&¾B¾j1k6(˜ËhæÊúwÂVÈ.ÐÿÞ‡ÂÈñsùótfxL¹±R}t30gö©¾ýÔÌ(Ê×+™IàdŸ£:){KҲ̘–}ƹ‚¹Gç}å#5sŽü· ({6DîòJ­(Gá—Èó_Xå¿ }H(ÇÚ?PK=6¶˜ìPK‹ V'6javax/naming/AuthenticationNotSupportedException.classP=KAœÍ]rz&&~¤±S,bÄœ…h¡D$*(!ÍiúÍe‰+—½°Ù“X[ø'ü‚°°×ÊÚ#¾=,ÔÊbg˜Ùyoà½}>¿ÀÁª=,ùÈÁ³0“x½¿{ÿxÚ)b³|§¶Ñe¨ÖÚ×ü†1Wƒ 4ZªÁ¾õ RIÓd¨¥æJ(##nd¢:‰ ÓÑ(ÑFôO&‘Y³aW0¸­¤/J­D W¦Ëã”4;g(·¥tØú‚÷brý0Iu$N¥ÛvÁ$P|HýÁ?Öt2 E”jinÄ*c¡%»BI_žcŒnÂ,£L…ó˜ Týlø.šYÜÿޝ‘o õÍ)Ü¿ù=Z¿KÎBVUüPK &*«PK V'javax/naming/Binding.classTKOQ=·´¶Lyø¨J[¨¢ <¤ˆ€LÙ 0Ô!eJú Æ…úÔhܻԅL¤5š¸d¡¿Æ?`¸pÚgd8+§ÎyáÆy•A¹Ðæƒí>bäj‡Äœèt=û<ð{÷OÌ¡¢aze¸¢bÝ2ô¨ÁM£¸¨â.«¸-Ã.©˜–£t 4‡zæ6´m-–ÒÌd,žÒ²Ù– taeC_̓sÃLî 'Û£5'òëëz†ôV;z¢ªL¹x­eöé,ÓmƒÛ†jb.×PôˆýPMLû††ÿS»\ÃnʈEÃîQÃ4r·Ô Ã\ãRŸä 8ãé5]ÀO›ÙœfæZ*Ϲ˜81g˜ú|~sEÏ<ÔVRD›ìŽ“o1ϬêS†d¸µ­-Ý\ð¬¤óæI&õœu$i¾?œ×6ÉV8-¼•*Ò·ê$ 4VÛV@¥­ œ²?;<ðráiÌÔ6 ÆÊûTÀ²ËîfPÓ˜Õ3†–J虬‘6—f&Ùcö°GO.½o«lËO¶°ŽÞoàUwÈ;ËQS„À€…¶ÂÃq?"Œ×‰Dù<Ô1«áˆ(ÂŽîÂÿ…sŒ ÖÚkŽ£ž—^*£ee/Ÿ'³ŸÊ`>[i‚Í<‚Š%KÚwÄÔY2JÓ^åš4MZÊXYÙGKr¨luJW;í nò%üxN”ÏUY{ŸÙÁÜ.òXEöàŠì„¿Â¿ÇjL4и#vŠØðŠ†¯áÅ6óMx‡ Þ“Áׯ\8È,˜]²Ì¡Ümï!T¦vZ?†káHEß> ýD«D¦zä~d•¶p=fßÍßÐR„§Iøñ 8Y@}MÕžÆ!ëw_ûPKÝ-dÅ<PK© V' javax/naming/NameClassPair.classSÛRÓP]§·´!(ˆPDÒp‰wä"*¼ Œ(3òd ƒ!a’´"Ÿ ? ¯úà‹0#àè €? ¿âƒã>i¡´äÁÉÌÚ{¯¬³Ï>ûìsø÷ûÂèÇÃ8:ãè£OÀ¨€;ÆÜpODÍ"œåÐ’@­"AšCÏq¯{ç¹ä‚ˆ:¢3,ôîOáå+‰’_äÐ#áº% âš„Ûè’0Äa7%Œà’„ûüÇçà2šäÌôšVÐTS³VÕyÏ1¬Õ†°œYðq‘¡[>¡˜Í­éKÞHà¢>ù4{Z8ž_YÑ’Ÿ ’Ó®=|°Rþ/å"—Fdß$eËö:ÝÔ<£ gBà ±QÃ2¼1Reíe¡6k[®§YÞ‚fæ)fê¦ KŸÉ¯çtç©–3‰Mõ 5£­ëYSsÝ9Íp¸‚Aœ·óÎ’>eðeŒZÓ66tk™!±Ä¥| ƒ´ª{Ùr(PXô¢†ûD7)oýÊéâüÍ [×C3­bQõÕWUAËdh¾†4ÿ±©ZÚ:‘jÅY¨;–_N½ë︠;®a[ÏMPéneéîQé5ä•kŽ{öQB·vv4ÔQÄ}!> ÙÁ’¥Ñ%›Æ8®Fõ¹&$Èï‡L8@Ì(qa²MÊ>JduJï.”¾]H;àC~•°™v^Ð.s´^C94RÌ3eJ™&)S„lk@&¥Ârº4½@àu)Ý&¥{Cé¶ÐBão¯”²,=4D•¯¶—Ç|ò-áP ´¡Zúžžp€´îK•ô€0‹ž’´‹ÎâÿøQNôCôÙêÊ61Áú†jý'Ò$fÊ)}[EƒŠúŸ¤?$fêø”³tW¼Jõ„çÊê? žbŸM…¾¡q"qÉ=Ô¤Âä×’ÙCªÜ¤Ù¿¨¿ÑK–á†?×ÿPKjàéÂiPKŽ V' javax/naming/BinaryRefAddr.classuTMsÛT=/²cYUG4 ä£uÓ’:–°ð™º:mR·n4¤”ÎJòì¸cK®$‡˜]°¡ Ê.€t€váh2|x`ÓÎt€%K~å>ÙI&®î{÷Ü£óλÖ{÷þý© áeÊ“qXÆÓ2ž a6„“!dB8Âé² d *Ø#‚‚¡0͆6¢ Œ}aÂö+!*ÂÕƒ"=üãÚ§·þúþÃYOá &T¼€”Šñ¸ŠcH¨HcJÅ4’*fSqºŠ9ÄU¼ƒ)ôD‚ÑD"As)6žaØÏ^2WÍdÑ´òɹÅK|É;Ò Ÿóœ‚•'¸/–i‹Åù6Ä×âmðL(3¾Ð"Ò”{1Úá@éJ.ÇV/[t’hƒ_L‹Ê#m+ S©‚Uð¦º-/;Üu£óÕ2Ÿ¤†÷6iÛò¸å¹ÓÒËtª¯ðœ(&„*C`Ú^æ ]Dt=ÓòÌb…rvŠ¡'[°øÙJi‘;óæb‘P­]{•svÅYâ3Á踘fMÒNÈ¡Y.sk™!l:ŽY]²ËUú +9B–ìRÙtø¼M4~¹b]Ës¯é™tVLw¥á¯wgá UóÜaˆ´šaèoßøÝܪëñà€Ö’–Y"^rWoè[ÜU܆#.w fq;nÁ¶^ÍgØãÙ'ùÚ–Ù³·¦¡UÑʹ@œ? ƒ~t\h6ˆ3˜Ãó>ú0:F‡ëIŠÏ2† n@‰ë†dÔ7Ðýe GF|`–ÎîŒÿÎDóYz'Hãþ¸¾®8ûZ¼/ð‹L£1ÿšÔØDïŽP¿O?O1E¢¯AÃìÃUÓ½Òý•lh¼¬ß¥ÿå3äõß œ!ÁƒžÛxèæ…ü]¨†?5‘ßÁ€á‘Õżþ‚RMšºL~ôÑ+ó]Ö×ïÿ¨Iµm›“è¦èPÿ\Dà‘Å ¬"·Éø2¨â4Þ¡Ûæ]¼‰÷`Ò¼„÷aãR8ñæVFhd4Å*ßnËwú`Ž"Ý^Mj–v-Ú(îïpoJ:z=CâÅቷRW:ØpÓê?Cµ–~~DwçUtácʯbŸP•næòÍæëý ù‚x´ÀÔÆ2Q¸~B²º¤ä¼XxLÄÆâ›èÛÄ´ŽW¶ý\Gx8]¿ÿ§ŸÑ Š®I‚¢ugÏ£äøQ|‰ÃX§v^§=¯ã |…|M­û†˜GýOóÙÿPK•_¹–¶jPKµ V'javax/naming/RefAddr.classuS[OAþ¦·Ý. ÔŠ((•‹—v·PQT¤Ü% &‚}bÛNËbÙ­Û­ÞŒþ yòɧ&b¢%ÑÄè þÿƒñÌvC´àÜ3óÍùÎùæìÙŸ¿¿|CØ•qV†.cT ²&%L)£[„“QÈ8%v= "è§ÂΈ]ŸÀúÄ.!Bá_ï¤Àø‡EI sQÅeŒ¨¸‚ *Æp^ÅUœSq *ÆÑ¯bƒ La&S ]ÉÔÒ¦ñÌÈ” «”¹—Ûäy7Û ¯¸Ži•²gáDò0%õ¸÷9¢Fú(üt«V,r'ûŸ4T62iZ¦;Íš³ œ¡}檮a¹kF¹Fç(]n¹ýôÀE†Î%Óâ˵­wV\™"âG½I½Ï‹7 gDÜ1(+vÍÉóyS"«/+\ä“ ŠÂŒJ…[ª—··*†ÃWmùÓšQ®½Ä]_ƒD‡&IÞ0ªMÙ]žÓάpÇ4ÊævS[¬µ¥ÿ@Mµ ÝGwÍÏú"c[fü'QŠªWd;UÓ¶,Ü&)®Ý¤†h¬Â ~"@‹Æ@/¦‘&L£}]4n!1U„¤Ñ W´=D5ý3Ú>Ò‰Ñd4áÀ$ÅO!Jž‰ÉóyÛÄ “ŸÖ÷‘Õ@~‹1ý;ä»Ú'´¥i5оƒ­Îå4™‰ÐpOè=¡úð>Ú7ÐQÖjiPÈ®£ bÈ!<†P Z1ŠUß OBL ¿Ç¼ŽA_OyF>,êï¤xàÔÉï¶ôø‰{Y¼!ô’÷2PK0ÜœbPK V')javax/naming/CannotProceedException.classSMOQ=¯´ÚPl)TÀ)S¡~k‚1‘QCЀ°Ê ™¾13¯Ø½îtï^n%Ñ]W~.Ý™ø ”Ÿ ñ¾q€: ‰›óæ{îy÷Þ÷æóï7oцq\ÖPÑpZÙ4í;t¦ÀÐ¥ ›A Ýêë‚\"»½4ÕþõÛ¶ŽAô)(êňŽNèC^‡ag1Â/Í­›fÅ6ÅZåÖÊ:¯ÉI†Þº!-»rÝôîJsÅæé "ÍŠ0ëåT!yS%õ„Cóf]¥´•Æ–U´å Eé’`Rñ}¥È“T¨XŠ>JÅ ¥ˆ³T yÅ–¼ÊÐ_5…pämשq¾:Ó¬ñ{ÒrÄ„JcˆWUÎÐAžž4…\6ííÙMëœ%ø|£¾ÂÝ;ªªý€aE.réE§áÖø¬¥<5Ó–Š':øªÊ&C¢f;‚È –ëˆ:’$k\^ÛÑwìmü”NÚÏ´ªsD,ðºIƒkóüþß´ákC÷¾ÂÂ--)YwßYY»–i/s×#ÉÒijÁkmÁ µà…[ðö·€ãô¾Û$W¯—¾âê)ûëh°§GNëaœóÕÇè;† ÒôMáQbfˆc´-Ä ö i)IÚ&†|£$ác2žF èGM²zä[ËY²Œ)½QÞBâ<RÓTغÈ3OžE< E½ç ­ªÌ„ñÉ»éIŸüNx …©–þ"GO„4–>!œˆ, –nžÇ@  úOejx¯×´Ïþ¤^sýQz-¤g:,CÌEšU„>öFþO‰¹´[ÏÔÎ}”ß#g”_£ábt-ÏÑî_ÏžG²tÇŸÐMk_è.>Pô¤ÿ|ŽüPKå=˜Ÿ‰PK• V'javax/naming/Context.classTksÛD½jR[MÓÆ¤IÓ7…Bë±h¡U9Qk,#Ë&i F–·Ž[òè‘Iøi|àð£ÎÚNf-)°µçÜswïž½»ÿþ÷÷?4Gô§L™vdÚ•I—é¥L¯dªÊô‹L5™ ™ê2ý*“)SC&+OÍ<µòô›D+Åõê{ûÈ.÷m¯WnDëõ6%Z;¥ãÈí—wíð ²;}†È\q½%Ñãb:KœÈè¼gNùgç Ëž=,«¾±c.Þ¸X\³¬n!  :“Í‹,°#×÷¶š•†M=ÏàÓ{ÊÜæ“ÙR/^$Ã˳C¹`a'å”kÙ…~¾2ã€J3¨§NèÙl ©#º™™‡³ÙNož+½°~T°>k6VÊ)õzU³$º¦4­]ÃÔ-ÅÒ[šDW¶KÝmè¯1žWý.ƒn†‘íE-»/NÜ-ñ©%Êo×í¦Y•hA;vØûâ>ê5ÝÒ•j[5j–¶gµ+Šjæ¾DrU©í4•¬°Tu=V‹Xü¶J´œÕFc륦žN¡k Q7–¾­™ã¥eS«h¦©`¸ÖÐÔ&6´ßæ[Ój–®boF /ÇYD5µmQª˜jùŒ®›zMÕë|–Ò° Õ·Ô€KšXÅBÇU\^z•´ë¯v¡Uô=/ØÝ®åkÞ‘øÞ€yLí¸^W¢ËNß‘tÕñCŒøÉ@ïÌŽX#î8cQH—…QàŸˆÜõ‹¦&]ÁgÐ=þm‡ŸÛ„·6DÜÙÒ¸JöpØgȼ=EÆÑ¸zú¬Š±Ž9¡ûø"ßõÂRô%º+²ïl'òƒ“’빑k#z'+êZ?QÄi-a±{Y1,XöÐf+b˜wMl÷uK¤‡ävY0®s*#`ïXð‰tÈœ>œŒî3ºæ=ÌTáÔº\e÷QуLÉ­ì¸C¾Òýs~ä;>â…äÛ0©9ùºM¼I¾J§w­ÖwC¨ùg ]‡(êËõ}ÿ0¢yÇ\ÁC°7æjÀþ«þ`ªÅ ðF=š‹=®Ì¡5©@DKt›ÊôáeºD—¿pø{ç° üTÀ Àž. øðº€ç€Ÿ ø*ðwæõ}#àEàç¾ü­€¯)à+ÀOŒœ—èGº‹Q Ì<¾Ë`~¢{)æ“ó3­&˜t?Å|š`ZK1ÌÝI1ŒJ+ f›n$n¥˜ÌI2'˜ý”f?¥yM7Ṡ æMJó&¥y›rþmÊùßSóüARÌãÓN¹Úžv¿ÍQW|ñ?PK¢pSJïÙ PK × V'javax/naming/spi/PKÕ V'$javax/naming/spi/NamingManager.class½Y X[וþïÓò„xÆD6Ø„m'%©bÇcS“qÀ±CÜÆ~ˆ–-$¢Å1™´Ó¤q›¦mVÒ6K7wIR7€C;í·IgÒÎ’Y;}é´³dfÚigÏß{I]̧{ß»çÜ{ÎýÏ9ÿ½’_yóùá@³hñàŒ_÷àœ¿çÁk|ǃß÷à=xÓƒó¡¨øC¢âOUü™*ªpªÂ¥ ·*TUxTQ¢ ¯*JU¡©b™*ÊT±\媸D>U¬PÅJUT¨¢R«T±Z~UT©¢ZkT±V5ª¨õb5½¨“M /*1äEµlÖÉf†åë!/üˆ–¢‡KÂ/‚ˆ•°ñ¢ q/ê‘ Œz±·xQ‹¤åHÉ&-¥Ù-En•sÉfL6ï–Ío–¢I6ð[^¬Áo—¢·Iãï‘ë½Wª¼O6·{q Ž{±wHãï—Æï”OwIÁds·>œ*”‚Éi÷ÈæÃÒ¿{¥k‘ûý¨tècrûäï×ð“ͧeó´lž×ðGxJÃëRðç˜Òð8©á»ø¼†¿Ähø+|YÃ_ãS²ù¬†¿ÁCþhøœÒðøŠ†¸†–Í÷1©á_ðI ?À£~ˆ ÿ*—ú7|BÃàa oÈ×ÿÄÇ5ü—œñ#Lhø1žÔð?xPÃOñ¸†ÿÅ74üžÐð3¼ª‰¾$›g4QGãblÖã[š¨çRb^ÐÄF|N›0­‰ žÓDÐDŸÑD3Æ  ]‘ÄHk*oë#Ñøpk4ž6’q=Öº×H¦¢‰ø.#6j$¯XIÝÃúQ½5¦SíºÃF$ÍáµyÃ}F$“Œ¦Çºõ¸>\dZ_:I#^57œIGc­»ôÔ¡´>3(YmKŽÍyÔž KǤ­ªBQ¯1d$xDλ´P˜¶vƣ騳—èÐ#éDrlG&4k,6ÇÚÚ]"¶×lop6tJøüì8´}pPªKêW6tv`cÃB4‹|eÅ%Ní\tjê?®5¸ØZÙY=úˆqUñÐ]Àhˇ~EfŠdÓȯڔ„±×H%bGÍÚа0r1hé©TafÑ˦PhIŠ;2CC¦ýŠbê{g’-2þkÉ+.løÐm[tæR“âÈRW(¾ÀâtjWÒÎxfÄHêi2+­e~1k SáÕ¹v÷J&nµPa647\`Û–¤¿(ç8S¸ÙÚP`VÇéÝÉDÄ0w‹£&‹:×°Äù4ÕU :´,†ééòð…—ûåÌæ†%¢=wšÉ ‹L*zôIeÑ»é–H,ÊU¯po±í»wò\¶p Dã©´§Ù´ˆÈ’ x¶' eôÄ”îÕc¾{³ð§§ yÐcIC ¤Œ´À¦%_X–wEãFOfdÀHî‘Ø øŠ±hëEß6-ùÎàë1UìÛP‹œ&0ÞÃä ¤Ô¨‰YP¸šAFüh4™ˆñt ‘ ¤ÆRic$0šLpWé±ÓS=ÐGGcF:0ª'9“˜".`‹¢“eIž@™dÄ EcF8N´X®· Y·D­ Šm$?Þ>s¹Ž¨DÔqCo—À%lóÁbÆðY±¿ànzgÄ È!#r¤Ï˜ŸTÎØ¶0¶-‡ãƒÑ–L’—N¨ŒÌbʽ6v$x/)‹ª#ÜzÚ(šÜ %Í×¼ÑdbÄ’D fºkÐÈ s§ƒÆž‰¥wÞ4†¢Ç8dÜ’Ñc©Îáx"i´ë) ï°‰8[Ór<÷å_*í—h‘´á9˜M7¼Ã9¨¯š1Ò®DÄÆsED²ÃÍÑ|@jŒåçe¥Xvñ+D¡Db–%LËž%ï4)DŽÉý䨔š¯ÖU‹eÇ·‚o"$}iÆeObGT¦_9öèÉ\ûñµœñeXIÙY<Æ‘ßáÈUìå¿ÎS¸j½§°GœÂ~~ö>Ãao²­„‹í68±ƒË^‹2å&øÐƱ—² ­e/—r§Ð:?Õmnå´ïâó´/UǸœ*G}ÞæÐ4¶‡~ç9¸Ä„»O¢ÊïœÄMgÑvù]Á¦Pói\ëBØíwŸC©”õ=rþ{~÷DÖD‹_¢w_D žBžF9žÅ œ¢ç_AÏ¡™ÏaLa–šNΓ ü-¾`;ôŽI‡® ¾„À8<Á³LHÓÓè ;Ob­tåLØ5ƒºþ)¼EúâwMâ ß}Æï4§Ð1Î9 §˜àš*¬:³_K[–ŸWc9]> U|šx’Ÿ§PÁ~µxUâËX˹µâ4ˆgÑÊl“‹)ìÓhçóœïuÜåßá´íûÍpðh Nâ7ºšÎÁ7ƒšþru —v›&q É·Œ¢›÷Í`S?cóÖîÐ$zæÑ«‘;W~—ò&J”óXÁÅV;N4:\yV¿IÛê ¡›}rÝ¡sxWp˃¾’I\}U‡žæs¸dëú}Î)\.C|æYìižÄ¾IôŸEC×Ié” 3¨î÷)S¸ŒÂ¶ID¤:ñ–¡>HØCÁÓ¸RAWû &èKˆ±ÜšÅuˆ)åv8•ãð(wAS>€ ö«ÙûÙW)w£F9uÊ=¨gߨ܋ò1~îG›rÂ|Þª<€mÊChWFû½Êƒ¸QÇå (ŸÄaåñ$¼ò×k;ïרä|{'òÓ^`–ý.ÔÜ_ ‰ 5ˆÝûQ§,NÑMÌÄ}Ý„tq^ÃP¶÷÷Ìb…°)Q÷„#4‹e!Ú¦¹4Tèè2–A5걉½e°cÀ]”žàçƒÔ9Á‘±lîgQ?@íùyˆs䬇ÑÀ¾ Ÿ0·ï¡cXŤ.‘¿Ø[îŠj&C ¥ŸÆÛeäfYî ëömÈÀg‹X8K¬~K¬^V{ß7Œ£ŒïNãÂ,ôY\íwOâš°Çï™E€Õæ™Æ.¹Ô,ÊýN¿;»`pÂ|™Æ»Âª_…Û¯Ú…¶<~•pçñŽss5¤›ZRg+p«o=ªÙ׉M¨ h¸”ýå"È4¡C¼…®]Š^±ûÄ[qP´ÁWàˆ¸1öI±iÑŽÛÄ58.vâNÑ…{Ä;p¯èÎcœ'C-dœf‹qš/‚qšmÆi^ ãœ%ã|ló2?³ÜïËdœsÜó7È8ß$ã¼BÆy•Œó-2Îkdœo“q¾CÆy-¯ößÈÒ÷í6}wøJsé;˜Oß-óôÝ]„¾edÜù‘1yÜq-œŽN”8ºPæèF¹£—ŒÔ‡JÇ2Ò hæsØqcžgÿM®WìÃÌer᪠¢i»»C¡‡$¡‹yS>Y^J ¯åÊÒEM^yÿö’§X öû}šßÙlR)ù2–a›œÜf>¨qù˜¥;ìƒË<Ïü.îßï´RUBp&ìž‹(³SæøA¿z†¦.ÇvþÕ™}G6~f©*;ÉÍØ \ƒfe6+¸\éâ§Û•2ÖuèPvc—r=®WzÉZ}y[ù1ž´ù§Û>)6ËÓ¸aK°¼•ÝÖêG±rò<Õk>oÐQ=‰\¬¬Ã†!ñ"iì ÖóQ‚Ÿàq{éz›Ú4’à9¨Öùd¾Êr«Ï&Ñë\UâgT£P%q›ÆõTúÝV=ì¶êÞíwNP·l[¨[v9Ú˜? ~W…{³œdV{¥_]0é·¨`ñ¼øÄù×svµ—…‘`iŒb™¸+E~‘BH³$R¤ ÅQ„Äm¸L¼oïÅ6ñ>tŠÛÑ#Ž£OÜÁ›Òqô‹÷ãfq'tÊcâDôùŸŽönïæ˜Üm·£Å½-XÁ:Ø*·û6Ž#$Kû:³aË8jåË6‰†Û¦¶wÎSÛNQádÊéOœQTŽè‡[Ü„2±•âX/nF³8€+ÄAl:ï'‡96’á¾j;ØÏÌPØ×1€f]>vnvv^FO Ÿ¬Ä²DýœÄ¼t}ÿ¤¬ÔäkˆHiIf޾GbqFIbRNªµ&X´B?/17¨´¸ ªÜ-1¹$¿¨Òš‘Å9?%•‘˵"9µ $3?¯˜‘ß'3/Õ¯47)µ(d#ƒ$Š6§ÒÌœ”Ô"=á@­Áù¥EÉ©n™ …ÂÉE©‰%©(ÊÐËÈ ƒâ2?0w#ƒ*~‡C]ÀÆ F`dº„Ècò@4sÙL PKÍ3–ÐFPKÜ V'3javax/naming/spi/InitialContextFactoryBuilder.classÏJ1ÆgÚ¥Ký·oöPó=‹B©}Ùth§¤IÉÎÊúj|JL„ ß|!|ó›|~½@&pVÂq '%œ"Ü^/¶ôJ¦QqæêRåx:în[ãi'~m꽘G/*äfÁ+·:'«!¾MŠYX1ÂÑ}ky¯|puðñ]#nÅñ&G#œ/Äó²ÙU_òÌñšhy.Ù\ÚȤ|0ᢃv”Øžª-[Eý!^vòË„0ùßB?ŒL?…‰ ŠäÉeí¥¦¾å7PKókØTPKØ V'$javax/naming/spi/ObjectFactory.classePËNA¬Æ ‹ŠðîY2À‘@4!xè:8dw†ìΚå×<ø|”qŒœ>Lw¥ºª»·ßŸ_8îS\¦è¦¸",¦+þ`•³]ª×l%ÚwH£,&€3.ä9ë¥ù%ªÚ›\=sõî9Ëeøø_ŒÜBãFËÚg+ÂÍÔX™ÕE&åf]~vnvv^FW Ÿ¬Ä²DýœÄ¼týà’¢Ì¼tk$çœÄâbkM°H…~^b.P^¿¸ S?(µ8?§,H•æ”X32¸i ªñKÌM%Ë çü”TF.׊äÔ‚’Ìü¼bF~ŸÌ¼T¿ÒܤԢĤ 4/T[‘È@ òàüÒ¢äT·L¤ÂZÿ¤¬ÔäFtÇ)¸ Œ ’¸œUÄÈÀWa†äƒýÀÆ CF`bÊ2°yì@ˆ†ˆ°"‹1H-'PK‹wÈ1Õ€PKÛ V',javax/naming/spi/InitialContextFactory.classmÏ Â0 ÆÿëU<‹´àQу¾@7ƒVf+['óÕ<ø>”˜Jú%ùÒ__ïÇÊ0†–u>4ÆÃõYÞ¤H­ŠÄR&'+ƒˆ¦£¼š -/JÅÌhK™"x3s „Ú< éj•Ñ Bo¥•U2úN-dhM|Ÿ¸ íµÒ´I/Å{·š½;“Æ!-”Ý#Ù¢¡“E’Þg ¹Ô/àlòôC@ÚÉU‰¿Häÿ#¸@AÀcUaår‰O•ï%ð?PK+Ž”½É*PKá V'*javax/naming/spi/ContinuationContext.classµ—ésEÆŸ •Í$$((‡¢€d³!‰" “p$ÄìÉÂîLœ A@/¼1(ñ‹~«ÅJáe•žU^ÿŠåóî®$3=³¤¬¢Ry»§ç}~ýöÛ½Ý=ßýóÙ燼Á+ŽàÕ^‹àõÞˆàÍÞŠBÃM(ÇB1‹Ä,s³˜[Ä,™ˆ X*f™<.s«˜bVFQ†UQvr›˜Û£ˆ Yj«åmÞ´ˆisGã±F\ÖFÉ['mwŠiÓ.¦CÌz1Äl³IL§˜.1›Åt‹¹«—án1÷Èã½bîÓ±=:öb»Ž}H‹Ðñ„´=‰Œ˜:öã1𨎧°UÌÃ:žFJŒ«ãlÑñ, ñŽçÐñ<Ôqèx½b/â~/!©ãeñ{}b²:ŽHíˆÔÞ)¦_ÇÔ†¤vT¢:*Q½+mïÁ3¨ã¶‰Éé–X†áj¸"V×¶Í0šÒ†ÕÛ´¾g›™p—ù›;]'eõ²ùJOsWŸcï0zÒæè797•nZcdûÜ⛫Šo›,#CLS³m¹æ ô2ÅÿªÃȈd\¬®[C_L,À=Lh ™KÝU¶?Õ´ÉÌÚéÓaóbjvç!ê0І‹;Ë06N6ÅÂ1ù³h±rÓ1Ü”måg-@Æùj hÕÒœ6²Ùya‘KË0n)Í)æ&0]µc“v_´“€9¹ð#¸H'£2‹ù¦Ê°,ÛÝàØ ÓL¶ &Ìþ|Jŵ6°ÞÇXî°&ÇàíY‹Æ&PVÅÔ@GÖôâÿ¬ 6ý Q³»,Ôõ¢‰`GucU³§ ËSVÊ]¡¡¼ÙNšÜí$õ)+—OKqEª!zaƳ&µ¥,³#—é1.Ù04\?¦µÂD‡Mu´ÓÎ9 ³5%´j#™ì²[¬”c[ÓâV_Þ“²’Æ'Òv– ;ÓÏš EC$AN³;ÈÍ7Ñ/ú„c®Ù™ëI:ÐP“4³®cïÝV½5•N¯µ:]#±½Ë1TF{M÷¶´[ÀVŽ<äáò²ù?q<Nfƒ¸®µÄfûó¼Êbca…TÅ¥‘ä”s # |]ͧ.ÃÝOµh¸<àÓ0g 3À³1(ÿfýDFTs•õ°R4\£¸Hí†eôÊø¦…ž+œát*K†.Åíœlzp©MHÛöö\?“_¨påmg«cÖÃÇÌØf«cg<“A+?‡UN¡ƒ.;ÿS囜%R\ËK–ÆûY9oHbyáXòöÃò:Öv¦Ç#|º‰e,'Å?ÁĸvÕñú“¨ù˜MöÐN¦{A4 1U¬krÍ¢Lq^úÄ£*~ ×u4ÔÏ?è8¿ æñðø!vçÃàRç?ïhEB£J¨‡‘ªøXMU *Ñì£ „St•²’ªU¤¬ðPxK,RšYj,gH*jâ'PýM¡8Jžú’ŸäTŠ?hÿ„Ž¿0c:~÷ y÷ OT•š¨aªÞ÷v„&©„w¨òx×-êXJ*…Ð>¿þ4&—)€ýð\®öR´Ïà»hPW”)³´›¢=Lé.Ä …LQ!ƒí$d‡Âû|ËÿF] mdÌД‘œ æ¤GÏO0ýLUššÏ¯¤W+š°7z†Ë«ÐáÎV‡ÛGQÊȆ樀$E¦p¤DsU@–"×àz`Qd{ü˜ ÌSK)Zæô‡jUÀ"Š{C%"ˆ©€C½à„GP§ž¥è p´ÔqW7úvª:¸Ñ·ù(%Ž‹z•²–ªu¤¬ñPÞ-‘ùê`>¢è¸ÀOÿð0Ô0¤ê!†±ÅG §4ª”û¨ºŸ”{=”cØV¤<Ã6¡„ì%·k;¼îù šFŸNq¦øžöž”ç¹ üˆ9ø‰í?ó7ž«îî¿ò ÿÍ`î’xƒà´gàYø%üŠí_3À³ ðxŽ~ë p¸Äáv£z.uStÏ¥Í>Høá¶@…l¢¨“È㬗a׿PK넹ˆ|ÿPKä V'#javax/naming/spi/StateFactory.classePKnÂ@ µiDè–}»oí€]¨ Dp'±ÒAÉ Jœ*½Z€C!<U4µdÙïùó,ïö?[¸€ÆpÃM ·ÙÓ|M_d r¹ùHÖœÊøÈ´ÆQi•\PÉjâp{j4ØÂ¼Sý)”<~þ¿!šøŒ®¦mʱÞÕwsëxÑ” W«0©å¥oª”g6€ÑRHxF©øêû5ìDæ,Gzå߬Ëî»ZÝë5üÊ"<þ)×kÎuú¨B†‘‘¢¾¢{êÍ{pyPKÆb†!ÕLPKà V'$javax/naming/spi/ResolveResult.classuT]OA=ÓÒ––¥”ÒV¨€ý‚ªø ÄD  1ø¸´²Øn›v!ÄDMü>(úàÑÄH¢01>ñà2žÙÖB?L3wfï9sî¹³;ýýçè'ìÁ¤ —]sአW]¸æÂulh÷µ‚_†Ž8ðÀ‰ \…Ü\‘¡Sæº\@· } â8¯ ~£PDXÁ DÜİ‚q "ѹuuSMfTc-ùpu]K™Árz+i¨YȼšÕ˜·G¢K­ß#óà ò§2‹fR3ò?fuÁ:Ñ Í1OŠÕH7”5¤RÃ9©ºyK i*—ÖÚætC›ßÈ®j…Gêj†£sìhXÅ¿ s™MÓFÆ•Ïbn£Òft)fWÓie¼Étªù¼f¤´¬JÆÚT.›Ïša²B $K8Râ¾5ͬ¼VʪŸ¦O~–o=—\Ô ºšÑŸ–úñÕ¶#®jÆ2QÔM­¤ÛWÞ36)•–ÐôVJË›zÎh¯; Þª\1¯'«NG µPÝ@Ká´{_±¾ÃbU‡èã½°AðgC“üöμœÝ\ñÂäÓ˜ÅÚbpÅÄw.¼{L 1úI·J7o—kAÞ²À;ç°%—?`œ8€›:;hZÞ#Ó :É,iöÂÅ8Íç"³w‰Ï’q]ÌKýs§ Ú+-ýÄ>|µ——)´BƒKDFx%•²@wüaiíÍñ}x–¥;©¦H‹ •‚‹ýhf$‰ìr|"¾KÆg„ðgñLþÉ”«‰‚6|9€ ˆAtŠxˆ8^Ïbˆç°Ÿa‘Ç’OÉþˆ¬ ú÷÷)!s{¶¸×ÔUmÄKR⸩Fü{dã„)÷GÒÔ$5#~MŽ’±¿GPtE q¥7[i «ÉXrȌ飭q5Vt²-öxXãq›§‹/¶zrS̕䭣«àÖ¬ î– ù ò•ÞµOŽ*Y¢¶˜f*#w š•òÙ{&Ó4¬êŠU’¿Å¤¾öÇMÅÈŸÉ…ÿ/“ŒF´«z¯)›J²kz#á $Æ]B§Nzrù=”SÕyƒ¡XÔoĵ”B%¹®É2É-UtÙTc%ZíÉßJd¯'+‚¬i1ó€ )J¸c$¤ [>¼…ê"pRI1xæéŒâ³LgÏk.0ó8Cwvwoˆc‡ª©æ.º Úba…¡ª=G·¬ÉƒŠÞÄ71¸Ò% eAUSöÅ£ýŠ~ˆ»&uo,®‡”N•/|óo(C]!c¢¦å3™CeHWˆºp1HR=MhT…ò”“C¢jq+ÚlƒJIסRõ˜U4ˆ$˜³·2½m‹È†ÁѦ[›¤ùn[†eÙžKºu Óú.Í0eKÆCÎ1á)Y§óP¬UÕ  ÙèŽé¤ªá]hJ@Ô4гÜQ™ù”wİn®ŽØÖ”ŸÇTï,9r¤™DbX=“AÿøòQ“ai6‰iš³kq~î'!ÈU$2ªË9U…ú¾2ߘũڻݛùæ¿Z Ì8b Ësl¸ÜÁ +åµózMsì2ë²iJeü†q¸'ØëtЇãüÔ§+é¹Vþg§=µÀp˜¾-£™q©ï*_¡/ ÇhtXÂÝpñÇŠ,ÓHê¤ùxkl˜Ä²€]²ß‚³€p[$ûê¦QpHŽ(Cµä˜F©¯¾¡Q²Ma•ܬ\rpÉVÚi- ·àæ×½öïMIOÇo¥Ç&ð=½¿C ~ ‡ä$ù‰^•?c1~A-~…¿Ñ÷wl¥9@ëø{ðö’ÍQüEÐ~º9ÉÃc8¬â0=‹‹höú&°4X ×!ô• W±$諟€¯¾¢˜TÞ£×± @‘f“ª!W Gv$—=”L/ªÉa-…Js‘&œ‚Œ™´ÃEšo'±‚ã2ƒfªŸª¯)‡ÏÂi‘dÏÄi\²§1âàúnÀ=Ñ7 7‡°ŠÖâ혆8…ÕÌÂqÇ$aË%RÉ ’ •L¢6£ÊŠ! Af¨vK–å·“ðœ’sÉ9žHk÷%D4\†Í7‹ÉKXCã9Âäeªôzç¿Jœ:U£G^G3ÞÀFšx‹štíx›štÝx‡˜x‰žöïfïá$ÞÇ0>Ä(Æñ®à >‹4ŸÃÇäé\À§x“æK¸†Ë¸Aš›˜À—˜Â×ø ·ñÍ_ᛌÆÓ/dãÿ¶ÖÀÙŠ¢9ô-½Žò>Ÿd»Šj‚šŠëJò¸*Áã²$ËRýYK<&³U)¯±'ñ/çžw5Ëìñ4r æDKCØC?§À<°±:”0JY$¶KY3V°ð²MXÏ6c3Û‚šÛhÝÉ8ȶ¡—mÇ1¶ Ù꬧Y+ÎÐú^„#ÿPKFZ¸%æPKæ V'&javax/naming/spi/DirStateFactory.class‘ÁN1†ÿÁ•‚‚ÊQ&êAûœ%šL„èÂK–.i»f}ăàC4F׃fÓùóÍß™öõíùk8E;F3F+ÆvŒ»„§ãþL?h•j;U·ÉŒÇ¡³R eõ܈8Ðs.IÝÌ.>A•“ªkíïƒNÒ2:1N,3÷¨ÎCp&ÉûÎÉOÆ/Œº4ntàž^чwìó4tQ7›0¡]Ζ„úU1æE0™õ„Ƶ캩öž¥löåA>OØ–“ª®Ò6Ìr7æžYª[S+ëQvaì„Ð*¿a¯ü$’¾®&üµáèŸ+ö‘ß±*ÉO’Ä:Šd|T¥ªII®Hlʹ‚ Ô%×E‹¤£Ú;PKxw¥:PKæ V'-javax/naming/spi/DirStateFactory$Result.classQÛJQ]§Ñ™ÆÆKf÷Œ¢"µË<ôAA ½ŸÑƒÑ1fŽQ_c½õIÐCÐGE{ÌŠLHÖ>{íµo³ßÞ_^¡aóf ̘‹€Á0‰À´ƒea) iŒ1¤2ÙB•_r»ÆÝŠ}âTEIí0¬té+ÛåuI‘²ô(Òð®í}¥<é4•ðI§e²ç Û™¿5HRõ]éJµÇÊ7Ê‚æ9^Qq%yG¿”a°Ž\Wxù÷}á3Ä ÒÇͺ#¼3îÔ(/Ùo‹¥vÐO…߬)†H±ÑôJâPÜ4Ô*ZêGÎ`’ÿÙ€!ÑÛ“aáWGÿBÚ= 1¬þ'YþHk8U,ÒÝ€!úèdÝlÀÇ%Œ“·E¼F6ž{F(·Ö†ž[o#üHýÂ$B„-˜¸¥ÔE¦0Ò-&4 çž~øNÓ;ä=á4"}¤z¯ôŽ™èŒ™À(Ù I#oæPK¿÷øk¡PKã V'-javax/naming/spi/ContinuationDirContext.classµX{|Õþ†ìî$›!äÁk%R y-ñ…B ¡òH¤$«n6“daw&…ÐÖÚV[|C1ˆPE±VDåe+ öé£/¡Öö¿ö¿öÏÚþzÎ̲ÙylvIiòÛoîÜ{Îw¿sî½gvöÂŽŸB‚ø<æã—"΋¸ â?ñ ¿ñk¿ñ¡ˆD|,â¿ñ;¿ñô£Kýðb™#ÑìG1Zü…; !a9ÃWý(Š‚Ö2iã¾;Vú!b•Ÿ¬ö#í kx`-Ã] _c¸ÛÜä÷2ý½lbßî ûQŠN? !sKf.†n††»­c뢅ð#Æ ð¨ÊÐËðu!Π¢ † |»‘¡aÃ7¾Éð-†ûî÷Ç$¼†GždØÁð*à ‡ñ ËÞÆ÷$ÁA Gñ¦„cøÃKð°„ãÛÞݪk¥›ºÇYºÛz4uc¨#*§$ôH´îöP¼GOŽŒOŽôÕ)¡ÑÔ-P]îãYÆØ‡ZB1v™jïïŒh¤KÕ6Õ-Œhƒþy•U+ôT:#p¡uá*:£à©•ά¤gdA4“ÝõYìRy®Ïhè{£N ]Ž_©§%k³³{Æ{#i>¦ÍòPD3ÖÌÅ›Va–Kÿâ"aß&_GV]$®ãjtƒL—D”#[24ëÞÈ(*64Yz Y«ÒÂ=œ@M:Ä·—&%“µQÿ`Nó­Í=ž+—°*“„,ÙÊμæª0gØÐë†G¾6ë1p‹ÄmegÊpˆçe$sñlV;#]‘°!d±.ÇŒ]ZYi«U!EQõåš–åΦ¾°ÜkèfÓi•Žèd÷ª43³e¶ˆ®ÌÕ²Œ 9¸Z [$Ë’«s®õg‘›óp ÐÒ,DWV”,lW½=”Û„ÿ×´:£†ÿ¹­½:Ô¶ïúa²¯ ¹î´aסù™Ùr-Döƒïš¥!¿:äàj« äë›Q"úm< ÔNYÀ¶( CÜ ûtöàOUĸ€QË"ŠÜ’ˆuÈZíPâòUnjNõ•¨[Õ„–E˜¨ u“¢÷Èz$LÂ:"J' 3a•a³a°V˜¬©ˆ+%Ó×Ûp/q‡59¤Ë­‰Žðåâ®H4ºXiÕCáõmZ(LVb—ªqRHH·¬7Fuófäàͽ/yŸZyÓ85¦Ï_D÷Mʆˆ¦*1YÑMëf9uóŒtcNRL­r,D+¡t›]EF—Q;©DPF¨£5ÜCVôFjI^(wñR“fÆÎ0iÛBZºÂQ¶õ0ÉÖÓ¢ê‹Ô„2¸4&š´¨—g44MÕh"{9Pæò–#`²±hÓÍE›žZ´ééI›’Ãvpí#Ö«Æ#ºl&o´ÛÛ‡€r·¢0H99ëPáx‚¥—”Ù´!Í2Gëþt¦3”ÓËEr¥,vf”Í!…¶œ«å , É€œ}QU]Ÿè¥õŽqÛ”~|šlÓ"Í´oS“Ì7aòuÕÔŠI(ÂHzw–è“Ï¿Ðõ-ðßDú¼†tÿ#j]‡ôøªkŽbì›à÷í7ýFo-¼¨¡žÃx†îÙ~<ÔªkŽàÖOÀsÕ 3jƒx0HQ„<ÂW!âÆc?~Lw+4_t#¬7 «‚Lx“p¾D„{ÒóùÇ$áMdÅÚK«aòÁe'àm'æÚ£sšlA“y /fô=UÉÌüJ’e±xè:ƈ³%HQ9ÈLÌ£dZ%!¢w0g-1#™&ÙédõLVäð¥t23çlj섅è$¶$‰n +O8ÚPÕ\Kªè3c#<‰§ÏÆóœ› KtS‚î#¢ûmD;ÝÕ³ *úÐÂ]ï´™x¶ñìÏš¡iNAÑc¢wñx¶ Ýè$Â'H6ž²v““§˜xJ,<ç²ë¹ÙÉ3–xÆÙx²ê¹ÅÉSN<צñxø×:“GÒ]>œ¯>Œk î=™­IgPx:Ùi^®3/SÌKÍ1T6מ…Ôâ(n¯=‰JƸƒÔWÖ6º/k ÖBù9î‡T:â&´¿…òÌσy´o ·/·¦7ø¾s( øŽ`É~xK…‘‰Þ€hðÖ `æ´9Kx(HÎ¥¦iN¿‚N °’’° cÐŽr¬Á¬E5î¢ýÕNGúnÌÁ=XŒ–£w"Œ8ºhwãô`"T•ªX*¥´§hÔšÄ]É$ÞB%ÄG#ï/‰VóTNG]ÎéødNç ÓFkN™ `fÖ  ôÍJ¥o,rúN  ý(F³…[×`¬QBý¸™r8ƒrx+å°žr8“r8ƒþgÑR&—b.Vcet>:ÑHç{!ª&<%ØK£° ‡ÐŒºž¤Œ§oì‹x*륜vwƒ³þ?Kõ+Õÿ§m„ýY+÷ì<Ù.ZÇÝ´ovÚÈvg}:±º9NuOº'IÝá+nê,…n®S]?©ÛAê¶[È.åø0¾Í©î0©{›Ô²æö0žç$|ƒáëÂÏh‘.‡;”Â/{µýDøOÙÖ$ټ䱛`’y^&ódÏxÓèJ9Í‚¢àC™ b ]­´ÛRAgÚ0 óì„øœü…‚ÿ+FÑÕJ¸=IØ8dÐMéA5 ?¤ ?B >¦I>Aµ­Ä{ܲéXžEÎlþˆÿn#Ûë–Íz3›U A3›_qdÿ"º/Hß¿©6|a£Ý—õI~»óIþ))¸h#z9I4wÈ`{êΓº Ôþ€^°¢ö¼þ_PK^\Fê¬PKã V')javax/naming/spi/DirContextNamePair.class‘]KA†ßiW7mýH³/3‚0u­ö¢«(º1º ŒîGdDwcÃþUAtÑèGEg,’l æìÙwžóžÃž÷×78À¶… ›ò¶â`XŒ‘Ó!n#…„U¬Ø( Ë+Wê=~ÏG®ÇÒëº >' ÅY½#ÑV~ðàžË æ{JŒqF¹rÃp\žé£k£§Ò“êŒÁ¬ùÁ×¼ô†\Iß›–êj†T]z¢1´DpÍ[}ⳡóïÎ5}¼éƒ¶¸ÚÈh«C¢+Ô”a°è[{2¤µ£ÛçdwÙê‘CéW“»[é†Oóü!§·ÚþŠË€þú?TS$~q&;´Q`mú¡¥R4褤Û4eGDLç§:FÔÙÃz"‰!C1“Ò"L¶‡+!I9°ûÛ @oÝ(â<#úøSÕ"«R¶Ž¥ÔšE]йÉÀËŸPKÄàFº]®PKã V'+javax/naming/spi/DirContextStringPair.class‘[KAÇÿÓênkë%³«ADº]ö¡‡Œ.FObÑûª‹ŒènŒcØ·*H‚ú}¨èŒJK)ÑÀœ9sæwÎù3çãóíö±a`ÕÀš¬õfMD`*³DÜÂ2rX`Èä å–ûà:m×o:U)¸ß—ç ‘RÐð² ç~Ï•<ðÃì•Ì,sß«ô:5Oܺµ6ñéiê·þ¥=V z¢î]qUG«Ë>C¼éÉa0é>ªÊ ]×ZTaçG›î=w¦«'EdøZq;ÞËýúÔHƈӺR`“æÉÌЦyB-)Yv zM‘wHÄ0b¿"jï Û{Ï¢ï#›¦B`Gˆ°"LvŒùÀ2¬qªQÔ~þô¦« ;#osSPã7zAvq(xþ PK—¬b¬PKå V''javax/naming/spi/DirObjectFactory.classePKNÃ0œWFåÓ"ĉ,Àè *ª²€ 8éSq•ؕ󂠸 À¡*œšÊ {ÆófÆþ^~~a×è+*)+ô—ã¹y3:7n¦ŸÒ9g2X1µv¦°‘œ˜‚[ÔÐ;áúW¨+±¹~0嫘4oK§6DKÞõ­H°i%\®¶3 ÉÐO™pvgÚ™ÕàM£%tïëŒb½+ ½±u<©Š”ÃK¯Ÿ}2ÙœÌXÖ®ã²ÈþGþ9úí"„‹þåÂêv#Âù–fC°Gñ«;ˆo@ á»íG”ĽYÝxî@ýPK£±‹­ò—PK¬ V'$javax/naming/NamingEnumeration.classmÏN1Æ¿aD=ÎpÐ>€G³œܺk³”ì¶fÿ˜}6>eœÝ„„€iÚ™ùõë|Ãï÷<ᮺ\ù}&·gdˆö)á}Íy ½?PK¶èÂ}áWPK« V'javax/naming/NameParser.classeMMÁ@}C)õQ7wØà(œ `[›f›vÛlKúÛü?Jì’0ÉdæÍ{oÞýq½¡Žú.<]Âx²‰ù…³„«ˆJ-U´˜¾NS<5my*g™Á[U¡ÈK™©‚ào¤Ûs}äAbhߪ÷\BÏíc8dgе´ôà¶ b–„á_ØÛNý2f|Ò Üêš„¶È!ôàÔ4Èκé¶Ùkh=PKÁ¶ÃrµþPK V')javax/naming/CommunicationException.classmO»NÃ@œ‹íLBÂ# ÐMb  ¥ ¸¿˜StÈ>£³ò”´ü5¢ˆDAEÅG!ö, @7{3;³«ýø|}ƒ…mt\,ºXòPƒk`ÆÙ?¸zx|i`³<«Û‹:Ýþ ¿ãAÂÕ8Zªñ¡ÑëGRÉâ˜Á³kÁ°fiZ*óBfêt‹[óÙ1a†f˜©¼àªˆxR’›]0´úR‰A™Ž„¾ä£„To˜•:gÒM“œЧ´2ø:ÃÚ/× *?Úí\hÉ“HèœøÕù ÖÁèb®`-ªóÄjpè1s=aƒãcT ë¹ ´ ½*¼»•Ýû¶on:uk û¯ß§ñ=RªUÍ/PKQÇŽx‰PK“ V'javax/naming/CompoundName.class•WéwUÿ½ié¤é@K¡)´•¦(&¡­ Šn¥hØŠ¨Q‡v€Ád'(¸á¾‚‚ˆŠûF*‚ÒôH= çxüàñP~w9žãW¿ˆ÷N¦i– ê‡üÞ»¿{ï›yùöïsçQ†ùH{ð„ÏzðœŒ7d¼)ã-oËxGÆ»2Þ“ñ¾Œd|(㘌!É8.ã„^Üà…Œ½ð0( 5 ոɋZÜÌÐɰœ¡‹+˜º…áV†›­djÃj†5 kY¹» SÑÍ6¬c¸­ “q;S=•¤²ž© LmdA¯“pC 6±—Íìe3?Úp''¾…ãnáG‚ ÜÅp÷¤Ž¯¼½\sðkû0À°‹aÃ^†ûP°Q†©@ŒaPÁ °Äà 1ï%$Æv/£_ÁìPð ëм†{Å3 ^çÇ“xZÁ0T³àSŸ`›‚3üø)ûû [œÅN#0Ê­éÖÕ;Õ]j{T5¶·woÝ©õ[K Ù=–©Û‰=sœ²ôh{—‘Ši¦jéqc‰ío£›êW·ü¬ß†,ßűo\8Øn¨12h_«Æ4”“€B‘bŸî>WUòÑ8.(ŠÏÛiu¤ùîÜCÌ déqgÛ#‘²(”¦ÆìPÍ… Ý)+_£.P\;î•+¿”>¥”ªK.ëæÔ¶mšI™Ï+©^¸Ç:7MJ$äÂÏ)ë:3žÐLK×’¶vCà%ï(%,íof ´,TB澎Kjçkស«ê¦lAò‘X"j7¿b©nèÖõ4õñM`jg<–ˆ§ŒÖjc;Éq#i©†µQ¦HÇÛ5د%8Ǥ€1v©Q}ÀOÞI&V T¯Ö mm*¶U3׫[£Äõ¹o\ ¾Djµkã–_õç¦C’aö;L;æu~ʨ'ž2ûµ:+Shc„7E£L$šAœIýѸAòJ6WMm}\ÀC’d¯ní =í¾”¥•m×,z$´í+‰XgjÛôÁ ÝCƒÍtõ5¹&nj]Q-¦zˆ³#SÆrv! ëÉ®XÂÚ#0müpFº³Õ£Ù*y¦©m¥³€\˜atÆM3•°´ßM3ØU“ÉN5iåˆýbªì ®iŽJMáñÏce›zë~ò©Y®cM·Ypj‘„ü¾·äÉœ‰cQN¶S‹&ÉI¡hº¨S±=={ K¥6VÚ åôFÕˆ0åej|Û¦‹ï"‡5IÍÔÕèFÍLRÐ ‘åÔꤾ—ÓrfÉcÅÇËãÙmê–f»¬²ÉŒO´Ð%À J›®;ó •¾·´6à4ž$ÙcDKXÑû°›èGˆ³„.e´ÖG1-A{p µ}áÐ(F0ÿ ‰ž"¬E9á9Â1Tâ rsŽB€ži#„t‹ ê_\6º¸ÇêF*çêç\bò<}µÒ(ê.ØY‰jZÒ˜=œõ2…K*”Y+¦Šqá!ÇÛ2ÇÛe™×;;_DFgÿ——º:F®†Ð(Ž—«•Nçg‡¾Ach¢Ù”®8 ¹lååþ|Txà*į¨Âoh¢µ…ž_o¿-ŽßJ{Ò˜SXŸ;é"ì¨ûiåªz‚vÐ@¡ö*Â#ÐíšÎç8o]ÃÍu"3º÷¢RD‰óJIûà%í&û}Ä¡+º{¶ááülñ!]ãÝµÛ ´ÅõåâÎT?ïä¶gJ•îêÂb\EøéÿôkŠý ú!ôÃÄ¥?Iî¯+HßQ $œýÝI+w!â²§±4DGýª4–ð‰_3„É!z¿upK‰ ½øçÄÛzý†4 ©5’uR fH³©Ê-IMÙÒðïyû[óè?PK÷B°]ÚPK” V')javax/naming/ConfigurationException.classmO»NÃ@œ‹íLBÂ# ÐMHD®ƒD@ERÀýÅæsFg埨¨"QðtH”| bÏ¢Dq³7³3»Ú×Ïç8ØEËDz•øæ¼·‹è‘¿ßÖ°€y ƒÓÞ ZíÁx<:æ£Ü(X½z¨´ÊÜ~z-Öû©¾QqaD®R}2ä½ýôl˜¡NÝ,:ER›34JËa1Ks)Æ ©Á(-L$O•%Û69åZLh%ÿ:ÃÆ/×°,?ÚÍL%’PšŒøÕÙ16Áèb®a ª‹Ä*ðè1{=aëcT½Î ÎShex.öJ{ðmß"Ývªî î_?§ñ=R–ÊUõ/PK^ÿ܉PK– V'+javax/naming/ContextNotEmptyException.classuP;NÃ@œíL‚Ã' ‚R"î Ñ„ "7÷›°Š9ëÈ^#s®À1 ŠDÁ(¹×@¼µ(‰bçiæÍ¼§·¯ŸÏ/°°¦‹e+*p Ì9þöûãÃÛýG ˜7à1X­Ýˆ¡Ùêßð[Ä\ƒN¥½z,•Ô' v7¹ õn¢2Í•Žxœß ®E¡ÃD÷&S}×+Fbªe¢:f»`ðûR‰0Ÿ Ezɇ1¥¼A’§#q& Ù1Î"P|BKƒÿæ1¬ÿò…eùÑnd"•<ŽDš¿:?Å&] Â5¬Â§Z'VC™ ¬‘b|ŒªÓžÁz* B¯ ÂÆAi÷¾í[¤›Nµ½7ƒý×Ðø)KåªÅ/PKI匾PK˜ V'!javax/naming/InitialContext.classWëwTÕÿ™ÉL˜\0 ÉDÞ“™$£«Ä š6$Ô¶7“›paæNœGšÐJ«Ö¢ÖÒ‡¢‚µ¶ÒbÛPaÈ¢Tš¸üÒ/öK»úXöåjýÚ®ºº÷Ü›Iî ²úeŸ×þýö>{ïsî¹ï}üÆ%xцwËq&€ü"€×8À¹òœ`*€BoIokAl­€·±ø4‹ÏQ†m(gáÇv·³èX„vpïw²J'+6H Ÿã¹® *Є=<ìe±“Å]¼°‹õúXìf±‡ùúya >Ïs{Yy‹»YÜÃâ^_`ñE_b!3vÇy8ÄBáá0÷FXìg¡²“˜þ ,’žAFÂq|]Âóx€Å“^@J‹¼ð¾Êâq ßÇ÷$¼Œ¯±8*ác1.á¤%ü÷Iø‘ð*–p £~ŒûY‘ð|CÂi¦:ÍT¯á+~Šç$ü Y ?GNÂ$•p‡Y®Na,M[cXe«`&§ã8[ºô2/§Ì”óW˜3£ªÁUª"_BÍ7Û(P´F'ßH¥æF)Ôz‡ŽÄA drbg:5JëÞÑüiE/bê$Sc|RôÎŽt*i*RЊûòeÔCÔ,Êä3F$ý9Y°’Þx^И¤ß?µô&+¶ô–¢v-­ÓkŽ^œß¢Qµ‚ÚúÈyHqX„"ÞsXy´œ¡Eïl Zà=„E8Š%8†¥È£ŽæŽ SEòG ò½ÔzؤytÑ<ªÞFYW$j2´Š^  ™ÙÐ –á]4ã=¬¡µ9ƒ>2øMÃ`·ap¹ƒÁÆã(·ìh… ô5z• BÍÏß½} #(¸^jC‘³ØmÍã‘<£­,ñÒ u–õï#(~cb¢´ÁÔb0-æ¬f‚ë¼8c!8I¨‚'Ö0A¥@#‚¤‰àÅRú»Œô_¯ë,BӨ⦀¥ôB+ÏRâÏ(!Þ¿¢Vü âC4‹L6NâAÃFØIOt.6~¶*®XOˆU"- Zо܊üµ I¿rQ’Ñj<°b_±`w®!l­{Ê„¥ÿ¶Ú]æ±åáTˆç-ø£Nx¶]gÇ¿Dø“¦Â§*?`ä1J¹[wK#\›SXÎùóñQ¦”Πâ‚{Ïcñ[<œÛš~°ÿE‡áߨƨüÿKGãc¬#ÆùîÒßÛ¼±¹ ~M¨?šô£çŒl¶#?2!éïÐ-µ×ÛÓsÖ‚=â–Ú•vì”)´§K%uµ>NÑÖ?GWù=ÂÚîÖiT·êq^ÕÓ6²¶Éâ¢ùµð‹¥®•¢5¢ËE#VŠ&¬Í›³¥8Nmµ[æÛ,`“À º9½Ô{ÐÝJN°ÝÚ6ÉM¾zß4üõ>‹* ˆò£—ü¸‹|ØE)ë#vc­Øƒ˜èÇF1€›ÅÝóü ò8õô{U¿gÖF*7åÞ©ŒQskã Ô4yN¢¼±éeʨ·1Í“bÎp¨¸‰¿Sa}Hwë?èNý'Vã#20YúFl5RÓ¡ ®Ð/¡ ÕtO7Lë˜;ÕÅDüÂú'ÔàÔã÷¦„_Àa·b‰Ø~Ä‚}­X¢vìS&ìEw»­vì1 ÖÕn›û¬ û&¹Ùm·c-ØÇÜìÆìØaö’»ÝìØ×,XW»7Ú±“&ìå«|97Ú?|iú@Ýg!pÿrÞd'#‚œ‰àÒÎo0¼¯)¾òø¤þ(àfí ð[,¿3ñ\¡‡ÛNn±;ò 9ò€…ài×|ÊNðaa Ë.V<0¸F朷»§÷ç×i ˜7â1X­í¡ÑêÝð ÷#®F~_'RŽ /K%õ ƒÝ‰¯Cµ«Ts¥Ce”³ †ZO*dãH.ù "ºÄ]j“<"»¹>ˇâVËXí™- ^?Î’¡8—ƽnXî+>¦­~P„Ÿ†­ßåÿ&3ÔS‘P!IJùU÷M”ènÐ[Ã*)V)+Á)8ýi…H“¢ñ9í¬û¢¡Fê‘ Ø‡ ¿°{ßöMâ¦RnïÌ`ÿõÒø"KŪúPK—aêlPK¶ V'javax/naming/Reference.classVÙO\eÿ}ÌÀÀp[(;¥Eº2̰ØÅÖRZÊÚÒ …B©Z{ fè,´Pk«Ö­ÕÄå©M4jŒô‡jìm4õ¥ú—_LÔÄ>ûdý;¦CB2s¾óõwÎùîwï÷ÿ}ý-l¨Á[™hÏÄ/8pɸìÀ^ràe^qàªé¨q"KˆµNdÇIÇE±#‹ÜNÑîn·'„ìq"{ÅäI!û$T½ÈêÅw¿'œ8Lm£hÅøÈš„kÒ"¤U‹’H©ÝÂSvé¶¹ Ôö9ÛÜ"¬ÐÈ6"[B®jF¹jA•jE­j#´vìU‡qT—ü Õ~å¥'¿a,¨[­ihÒZ°ôœ‰¢3̶ÿmzôYCVq»Ä#†Ê¶=Ä\!»B{<@WM q´%^sûª]Ú7|üðw•ÔMüÈ#ûêÏ(Ã/f]>vnvv^F) MŸ¬Ä²Ä ý¼ÄÜ̼tý Ô´Ô¢Ô¼äTkFçü”TF.׊äÔ‚’Ìü¼bF~ŸÌ¼T¿ÒܤԢĤ ´\ ˆ¯2 ¨'8¿´(9Õ-¤‚'=µ®ˆ‘A¤D?'h›RVjr #ƒ ŠüÀÜV +±;d#ÐOŒ ÀÈ´—Ècò@4sÙL PK«lHJ°þPK¼ V' javax/naming/StringRefAddr.classmËNAEoóf@|¸p%uöBL j¢MDÙ7Ð&CO2Ó?ÀÒDcâ½~ƒÿÁµ±f F"›ª¾§êV¥ëýûåaì`=Ž•8V 0Ä“!½;ûj|æ>ÞL˜0Lc(”+­¿á–ÍÕкèŽDO׊å?´­]©†õJ‡ak_ÜkH%õ>C¤éôCºé(Os¥;Üžf§ Ù–Tâ|2î ÷Šwm¢ùÿÃŒ¶3q{âXS|)ý¾»ë·3$zŽÒBiš‡B7§Š~ç—o-ÅÇd±f†ÒžȰä Wr»#\O:êúä›t=P ùG£W kÈË4ÔM¤(¦‰ÔH‡)§ªµg„«ÛOˆ<¤Ñ3A©N¦ ì-"93nPöE«ˆÜÿZb<¢˜ö-ÿPKN“'„>äPK ø V'javax/naming/ldap/PKï V'#javax/naming/ldap/LdapContext.class}‘ËNÂP†çR@QohÜÁBúÄ…AHHšaãÂÚ‘””ÓÚž*¾š À‡2N["r ‹ÓË7—þ9ß?Ÿ_€;¸Nù \*PRàŠÁu­þ¤MùŸ«‚Ï,1Qm“»jËÒsì&ƒnmK¸=—(L4ûø /›õ9¾ë©×}m—Ö¶&=Â8Î%Õßì®1(´ôÞ°¯kχÖPïwÛÉ–c"ƒåù’ 9âv@ÿÙöÜ@WZDäÿ 5B Çš%°ÌÆè ùØ¦Š“H\µ9)¤GÐLÙxv¬0£€ Óº‹{SÕ%uhÈŤ~ Ë[Âbãm-i9mĆ/ÜŽ÷Ñ0â0 ¾IOIƒAeeE½èõç•ÁíJØ´<ŒZª–·XƒêΛ`p ð½mÓ ×j$cþ†±ƒ}غ:%ÈBžÞ‡S’T }刄 "EH­‘Ó r¶AÊ^#Ȭ‘ê*¡Sˆ&9úPKÏËY€$PKñ V'(javax/naming/ldap/ExtendedResponse.class]ÁjÂ@†ÿµ±ÁÚúž’C»à­­BAŒxñ´ÉaeÝHÜñÑzèøPʼn 2‡a>æŸÿŸóßÏ/ðŠ(Äsˆ—=AœÌ¶ê[I«\!S_WŒ‚8Ù¼sû(5 'GON“^Òa_º½5hfÍë]FÕJe–7ŸÒ²®rššfˆ ò—ó ½V¶fÒfòõÉ®WKSÊ”*£¬9ÝÔýÿ$‹lK¹5è(Úq0iµÚËû0‚¿jAp­€C  pï"`"Ði8 PK.ÇCŽÏPKð V''javax/naming/ldap/ExtendedRequest.class}OMKÃ@œmÓ‹U‹'/ÞÒƒîÐS5B T0⥧Mò[ÒML6úÓ<øüQâK daßÎì›7o>>ßÞÑÇ%&.Æ.Ž]œ¸8˜xÓùJ½*™)“ÊЖڤ׎7]În¼¿ŸËYl54jÍ”ÌUH¿±dJ©*rSQ;å6OH`ä71V3ˆ»¾—š*{ÕN8škC‹zQù¤¢¬U…y]Æt¯[p—¤,ýö`]JÖ71û$Ï*«™0ܱQ·¹ÎeH¥V™ÞlÇŽw¢ÅVàüG˜EW¾W¸ø/k—aÈQуàô¸üÞcäpm™C ð¾0+°Ïw£/PKKÏä!—PKò V'javax/naming/ldap/Control.classMPANÃ07¡)´Ô$ð8A)R”J¤â''±"W®ƒR!žÆð(Ä&T*>xwÖ£ñÌ~ÿ|~ÁÁ%.Ðé.æaæáÌÃ9Ã,“•x\ SñÌ6ÊT× N>3¸AørË0ŠãeÝ$4‰êR2FµÙXaì“Ð-á aÛÔúª“bðedÚ®sÙ,E®‰0NéNå «Û¦ª{bô‘_I{o Ò.·Š{4‰ïˆª6Q£¬*„&³½SUóL6Jhõñ'>ÝXä+YX†y7zçF¬)×¥xå[‹CÒ† ŠˆæØÇ”ú1meÐ㣘8.Ã1FÕ ûz ¯Û!üž3ùPKH…|`PKó V'#javax/naming/ldap/HasControls.class;õo×>f]>vnvv^F9 ÍhŸ¬Ä²Ä ý¼ÄÜ̼týœ”Ä}çü¼’¢ükFçü”TF.׊äÔ‚’Ìü¼bFÄb¨Šb=fF~ŸÌ¼T¿ÒܤԢĤŽàüÒ¢äT·L‡;=µ¦¨¤G?'h›RVjr #ƒ ŠüÀÜJFYL'"¹è/F`dÚÌÀä±y š ˆ9l&vPKâMúã¶PKô V'&javax/naming/ldap/ControlFactory.classSËnÓ@=ÓLâÔ˜>Òð¥Ð¥±!±Ø¡ØT­@JƒD vwH]œqeOPºÁ[~€mÙı¢Âg׉©Zh#²¸çÎ}œûÈõ÷ŸŸ¿ ƒ ì<.8gà¼Kæ \6°`‚㸉ÆLŠ71‚‰DLZ8) ³8ia',\@ÑB†bÙnlˆ' „j»w[ÒÓu†LÙ~З—÷E¬êÈWíúÀÒÕ~àÞñº­@Œ=W‰…¸‹¡Ò²§ëvà ;nÜU>Ù#%wYx:Œ¶–T·##¡ýPQåëåƒ4ÁšØìsEaP·‡ø¼a©‡7wèëänøÊ×·øb¸&¦RW:M5Ée0—zžÜLfŠÆ¾’Ín§%£ûIr¯†ÝÈ“Ë~òpþA Gß“qŸsE(Ñ–C¡-uÚÛk¡<ªe‘q@ëKêÌXñJ‘c:é»: ­>Jgñé ßÃÙKjöaoh†Ù#w˜NÅ0óoHƒDúßЂŸ£ƒæH~B:d0”è5CȳÎGä?B-‘Ìõ.gɹ“>M/N˜Å(YNÑç$oYŽðf]½ò f³²KDÛ¬Æß£XÙõ¹Z¶”uv0Zã%¾ “¬ÇÞýúQâß/Qw¶÷Š:0I>£BO‘ÇsXx1¼Ä$^¡ˆ×ÔëÌ“~ o÷5D }g~PKáAØPKõ V'-javax/naming/ldap/LdapReferralException.classuQMNÂ@þ hÁ‘˜àFÀ`݉qƒ1„…(WŒXS iü„WpEâÂx`\x㛉¤É{yßß¼é¼}¿¼ÂwŸ»wzïŸÿÜF¦±Ú‹k½X±(âK"nˆxWD^ÄMË"n‰xO‚ˆã„$ôb\B&¸8!QŒ“Üð¼2Nq1)¡a ~LñßQ®‹ñÝ4wŽó]‚‹d¼Ž3\¼ÂÅk\œã₌7ñªŒ·ð¢Œ4ÎËx/ËÈà´Œ,^’1ϯs‘ãˆ÷qQÆ ÎÊø—d(¸Äp(<•¾«|¬$JŠ~'‘]½«¬†aG]KèÊšF–¤¡[j›Æ÷šJE¥œH“hút…§–ÆÂSËm\¹›i”ÈM§¸_$ì¥j£²Ï¶qöjÚ5Ô ]°Lb4ÃC;úª¥•הʇ–²ZRmÓ™ö¦ýÊâ°T¸Ã\ÍRõ¢ZÌ©UÕÊ.ÇN>•²¡WT»I7yÈ á}“þï‘ßOzÎkºf]d8|%•™]If3‹¹lzae>—ŸË-æ‰JÒ(ª U±ÝZRJUú—æjµli¤e8’¢ šRjÉçyúÓš®fªk«ª¹È»ÈðžMMưBŠÒì5dܵ£t FÕ,¨W5¢O1Me½`”׺ %C'Ý êt1[VM…ó¢TwT‹"è4 NÍÄu”³êm¥Z²8ë¤U£!iêxÖ†žpN®à ­Ü9ª¦Và}dñââ;ÝŽónÇ ;.|åDZê_¯Xê…l3o Ç\G紸ё—5c/3a8å6nx‹ch£åu »\ŠšIuæú.¥YÍl° v7†“^›wnF÷j¿®~’ræ„nr•t}Di·¿ŠçÐ0N·n]¬ GqoКà£O¢=ݵ´»Bš Z­=VÇÀo´c¸JR"=p‹®ëeÌÒN }œq_’­›ÖË¡ŽÁèßèß‚ð×ñÜCHÑ | !û £±íÇÎ ±® ÐÛþé€/(l`äFdzG›IãDø”Â~Fô?ǾÀíGñ•ta|Óø†(|KDj.bô68ÄNØeþHG¢›8äãFŠ»Ú‡.(½(n0Û.qè&†˜ù{ ÒÇ_ ¹L O:ÙÀátô䤦ø· æë8ðd ½ùõ¸ÿIô)äfØ zHï¨æïé¸îc0Œ©îŸ0Fë~v‘ïDvØKö± y½2èE>s!éQíÐÛcÞÞþâ‚Ò+ì@'÷@G}Ø;nhýÕW:ÂǼðMZë.xÊžù¹ÿPKäC”2åPK÷ V'/javax/naming/ldap/UnsolicitedNotification.classuOÁN1œ²QààMã‰=è~€G‚ñ@Öôä©Û>HIi7m1ûmü?ÊÐb¢!ļÃäÍ›ÌÌûúþøDwe8Ïp‘aaÈp3ÎgkþΛÂð2«¢ÜôTeÍÃå8Ûk Í£`\D¾3±’3e¨Ün*r/¼Ò‘é-ìÖ zTi¹z5Þj%T YÚ –Jðd|Ÿú+ ¿a?뜖äמaøû\­I†Ûƒ¶Zòº˜6Œ$9'_[ãcèõ±è‰û‰5ÁÙä›ßÿ©Ù‚¡§  Õa8à ±ndNÞPK ü—CìbPKø V'4javax/naming/ldap/UnsolicitedNotificationEvent.class•’ËN1†'L&ὄK‰EH#¨ÄT!¥¤E qÉÞ™1àhâ‰fœˆÇ „è¢ÛJ}ƒnú }ƒŠ3j³¨*fsl>ÿ9ö¯óý÷—¯H£†R‹Y,e±lƒa|)ØyºÉ[?þh|Ûþ\À & XÁ«ÞaŠ¡V^kvø€_;Šw¥ºt|÷œs¾t¥ÞQ å…t¹–ÚaX(›tÇç”{ÜîWוּöþÁŽK|(¿\°?jØx;ª)#-”0³+•ÔÆê'&êŠ4WºÅý>Ù!ÃTS*qÔï¶ExÆÛ>Ñj"·ìÓ º¢!ciéÙˆË2ä<õ¸v¯¨÷¥Ð£iä½q¸¯¥ïÍÐf†d¶1l&vŒìR„]úƼ¹?®á1LG"”Üo‰0"~~ð %?PLÅG»"ÞcžØœ¡YšLFó8Iq–H•XšÖ|¥ú€±Êú=¬[:Ò¿)Nš«MXØ‚ ‡è[L? WM W­<"“Â_•mxƒZí)¢ð¬X¦5~šU¹ƒuó'=cà.Å׿…ožPKœèo¨ZPKù V'7javax/naming/ldap/UnsolicitedNotificationListener.class;õo×>f]^vNv.vnFc Ÿ¬Ä²Ä ý¼ÄÜ̼týœ”ÄýмâüœÌäÌ’Ô¿ü’Ì´ÌäÄ’Ìü<ײԼkÍ0Fçü”TF~ŸÌ¼T¿ÒܤԢĤ Wp~iQrª[&ˆ£‚ßÌâ’Ô¼Ô"=ÍŒ  J?'h»RVjr #ƒ"Š›RAöêû90½Œ †D»¡G$I8(595³,5…*Œ@ÈÄÀÀÀÈÂÈÀÃÀb1°I&PKþó¨Ê8PK Ô V'javax/naming/directory/PKÇ V''javax/naming/directory/DirContext.classµ–moÒPÇÏÛtê˜Ó8 º­:M|à…"t Ê6ˆF^˜ÛrÇŠ´5í­aïôkùÂà‡2žv™+½­-ˆ/úp~¹çzNÒŸ¿¾ÿ€lÀ£÷6ãÞRYØÈÂf¤,Ü'ð¸PïÓ/TP£'5¹¥½RÑCCÉ :šRW³˜ÊMëP*s< 8œÙ¥1=«šU1 Ά=Ÿ†xÖÄ,¶ ¼ ñõ‘=¥~¥„búßÅü$D¬É¨¥¸eYæÀÖ¾ë=dÃÑ™E¹fXø×Dñ:Éë?…wQ)Ät+^ùÃT”#F¦?™x'vDÃ* ›±x¥ˆ5y)â¹cvµ}Mõ©q¦{Sú¤ ¤ÌÏu¤ãÏÂ\“néë0ç‰×ÔˆQ›úž~Kð¿.êûÈþyS;Ó‘ŽœOªO¶«¡“6ñ²¾ˆVKº­såjõc¹ÕjÔ^¾mÉÒ³ËcƒlN Þ¦íù“žmºòròPeŸ]-›©á‘ºf°]GW˜Õ¢ÊòÎ^[öË/6ä7õre„嚦c©l[s}ÒŠftÑUµå¬é(êQTL©ÇøIõfÑnªLÇd–ÿ¼WÔ¶«l_3477T =¥‘Uެ†}½ã" ¬ÅNÓÝúÓÌX쨤Œí-U†@Ò@àþîäáÜÄ÷ëîï>ópÛgÏ }Ëg§`%M gÜ@âªdßÞáà ç.\º8rqÌàx­CÓkõ§|Æýˆ«‰ÿNÅ( .‹ð‹¯x,éd`q§²XžJ­kxb¸ñ~ †©¡´`©x, iµyõÛ)%„Y*¨üþŸÂ¿wYKÕõVg­%ÚùÞ$×y:C¹£Ç‚úR‰A‡Â<ò0¢H}¨33]™o*£H+¢3)C•Öv-^z· öL:<½‰ÒFŒiì¶O©ý¡0’Gr¾p6~ÚïäÂEtwy( «z¡o:ÏY~#b=#K9‘sQ%ÒÏP¢‡¨•ÉŽ*@ÜCÍr®e£`–'¨Ü´<-òÏP!MˆÖ¶¾PK_¼8oPKÏ V'-javax/naming/directory/ModificationItem.classT]OA=”]Ú"P  ]>„R EQ@@”o‹|$€MxÑlÛi³d»Ûl·ü&¾úê« á)Q}4ñgøCŒw¶…‚Ødîìž9sçÜ3½ûó÷×o¨D?^Èè–1 ㌣2Kx&aJ´„ ³æ$ÌKXp£mnÈhwÃS ·E¸SƒP<ð¢Cíc‹”mI3øJ>çÖ†×i[çÿ8Ô¼|&_Ôæ™±‰ap9Ÿ³•\–'´Ô®b˜F¿‘×õ²\%eZç´0øÖxÆÜæçKj\ãY]M\@ÝëfÞJðyMè¬V³Yn$©|Áað¦¹}*‘ÁE¯ÑY†šÏŠ]ÍÒ¿ÃqX3#ëÜÒÈž7¥ÊËÆGu§U}ÊJç3ܰçv<[”[_&­Æ·ÈšsPñÂü—ß/ƒr¹ WPf5‹nØæ;td×B6‘Û¯M*º>çãVŽ_ odÛ,ªCõ_ uD½]!  ™ZŒæVD1DkƒÖŠ*zîGˆb„wpÑ`#t„ºÀÄo¢áà“þÚcÈ›¾ª#Ôá…Ñôó髣éà4Uµ¾¢øw/¡ú÷/PcéëR¢¾§ªšÔb¹H©·ÆE§  *H_ÀÍ©¬®¾v•à/hf(àViÍÇÊêýd7°E&è‰XôfÓê˜s=ÃPK²×¡PKÓ V'+javax/naming/directory/SearchControls.classu”ËRA†ÿ6$!ÉŠˆ@ Q‰÷JˆU¡Rb‘ˆ%,¬!Œ8f¬™‰¥¾„÷g`# –”U.ÜëÖ5ำü{’@ÆPù»ûô7çïs2ÍϿ߾#€Ó˜€)BÊž0.‡q%Œ«QÑA{¥´KéÒ)%!¥+¸ùöþÑÍÖÑó Ž¢[ÁN+H㘂38¥àš”a (È`@ ̹:éꌫ³‰äà\~I}ª¦Ëª±˜.8–n, 4%sêIæ&s>Àì¬ÜmJNVwÕ•ôåFhD7tg”`Æ\ÐâÓ°ÕpfÔr…kÁ“ ž«5¯ÚíÊò¼fÕù2w”©ñÉl¦ø ™º“h™ºÍgg²ùz ^¸;^œÎfë뎂¦Z¥GÌïXfْLj̊UÒné2¥`Ѿ%·«§óG³‹æ´æT,ƒÏ–ÌŠáäõe݈,h–ö§|LëEÍÉ4ìµq=Qß¾UVÙ†ªyhps+9ý7¦æ—ªx £ÕóJæY=E}Y«9tºgÖÍtA³tµ¬¿¨ö¨m»¦ÒJ$Éг´¡.3zA·5­çéÝa=–{>&³­Ûl×cF³lÝ4îæ&X°í)ØÞ]°ý¿‚mß‚moÁöŽ‚#N}Î7<ÄÁ7Qtã8ï—7†c7’ ë=\6¬üò¸óLmäqÇkµ‘·Æy…8À×õç[ø'ä £ö1rÇþÔW„SMPR ÄS‘ Dä,*%–h^—÷Ç©}h¦¾äñ_!‚×Lùx‹ýx‡^¼çþKפ·f2GùÄ ×¤Gš$š¤K",!iqD:v}ŒVh´J£hÅ'$°†¬ã>“Y!y–ÆU£^·ƒ@0õ‘Õ­4!7ø›zŽí¨£b ~𠿨çé²m^ó ¨|³Æ¼Y7©±ÏU¼èwê%_4îEP¯ãP íc«åÿÞPê0û¹ÝÉ(;qAq†‘QÞâå;&yþ,Q/ßE>ÁÈ»íåOîø¥ªüùQFnøçyùòýŒÜÄA?^ñò‚¼ŒŒûóq/¯1rÒ}÷SÿPK4;‰´6©PKÀ V'&javax/naming/directory/Attribute.classuRÝNÔ@=c»[@E@£¢"‚tUì7^‘]LÖH\Ý ïfÛÏÍîÔL[Rx_ Àð-|ã7³ ¤Ô4ééœïïœoúã÷·ï𰇽Ûv< ° lU?½.¿¾ï xaw °vO䩌R©'Ññø„ââMFé Ó[ti9e*:rp Ë)Y¨LsÒN=)Q†»fæ,ê+ÓËtA•ÁFîýI`=4êØ ×éÆÌ;™#Ûºç‘KûÛ—½²q¿—%$°È óBêb$Ó’Ï UL_¬·\@¼X>TšŽÊé˜Ì9NmÊ0+MLo•=x2IZqJÒ8Ì4³s1û–Êöð&T´ù½Ÿ¦,Ü~\JéÓg¥•&°q50<ãòêj¸Åáßã¼ÊMB†xêšsª²hHFÉTÏô­þ[@ÏÊ™±úZxdÓå^ÚØüϵþUɶ M³SÛ=wFdr®ýh•z¹5îçêœÚ¬ŸÐüðRqÏq—q`¦Ž/p+€ÃÛ`Ñáæ>¼àñ™·È•>£ï˜åó7kÌ&nÕ˜'ט-,¸ O±ä°Ë}g8›ü‡/1ÇUÖ…U¿úPK>êYûÎ}PKÁ V'4javax/naming/directory/AttributeInUseException.classuPËN1=eFG|°1lpcd¢[‰M0„ ÂÊMR3tL§cðCüW$.Üë§øÆÛ‰1ÑÄEÏÍ9÷ÜsÛ¾¾¼ÂÁ!ê¶=ìø`ð,¬¹gO…·à¶WÆÖ-ø N«=a¨·wü‡1Wópd´Tó«—N¥’朡qaH2#újœŠËåTÜ™¨Žc(v“™`¨t•®Ì„ÇqvÍPH%†Ù"ú†G1©þ(ÉôT\IK6`*¾ á0/?é _í™Ôbjýþs†Z*´äñDè”ø¸ßCz=èìaUª›Ä ps~‚°BJ“ªõ¹Á Îs>P#ôÉ£ˆ£ÜîÛ÷I·Rp°Bñ¯? ø6)[ùªòPKòWM!•PK V';javax/naming/directory/AttributeModificationException.class•TÛNQ]‡–†B€¢VB¦3½(jBĘh‘­ð€4ž¦íi3M;ÓL§µÄÿð#|ÂD[£‰>ø~ŠÆ}†Z T‚/{öY{íµ/=§ß}þ ’¸7†˜M‚.!!!)!%Ãi™¢3›Þ¬0aq$@8ˆQÌÉÁ•QûÇVòíñÏw qM˜*æÜÁUkXUp×fÕx¶b´ŒtÕ°Êé=×1­òƒOçjüЋ¶Ó–Q£Hºh:¼àÚÎQú…]4KfÁpMÛÚvy’VÔ©Ý|…˜CÕêyô<ñI³TâÑÃÃèÔ^R½|w‚xhZ¦ûˆ!öØ%•|Ó僼§í¯ '%Dü»È&2¶Õp ËÍÕ&·L§áF›oóI£µ‘QöŒa2kZ|§YËs祑¯Rž¼g7ß2ÅAûŸ½Œz[E†H™»ûýºƒÌÃÔÙ1Ì _)Ãü©â;Þ§?>ÃýôvñÚV/95ÛàŽiTsÜi¶¿½IÃ5.n̵ÿ %lž@©%~‘Ý–èÞûºø#âj“A7Á°ì¡Sgâ!]"D#ŒÑWÖº4ö¡÷tb¸E6DO È’Þ:‚xîå-ôòt¯0®é]‡&nR©uÈȧ6N…€(8ª}@踟ðÀ Ù۸ѣ.÷j4ý”¼ì¡‡$@½âÿ€ÊŠHŠfQ²Bÿb_à{¥ÂdcÓ¬Csì[ë`‚üƳúß"ÔÐ"Ý×PÐÆ<Žè¢ÞcÅÛ_ô7PKr¾nX˜PKÅ V'+javax/naming/directory/BasicAttribute.classW xTÕþOv7w³Y^  °¼ÃnB”V$ØBR‰‚A.É–nvÃ> jÕV£E룵¢ñ­¤¶±¢•ŒßokßZk[-õÕVí›þs÷în²,ýøòeιsfæÌœùgÎÙgÿûè~ØPÏœètâ»N|ω]N|߉‡œxÔ‰~ ¯jxMÃëÞÐðS ojø™†Ÿkø…†_jø•†_kø†·4¼­á·ÞÑð; ïº0+\(Jó]†f „x„Œ2+…\àB V‰Ü…"r‘Õ²°&DSkeu­ðZ\p¡Õ…|Â['d½ˆlpa„Ñä£eFRˆ¯ÈgPDÚd’…,„ó1í²°It7‰©ˆ¨ nÄD8.Âq‘Û,¾l‘Í;„\,r—¹TÈW…\&—‰ÆeÂå2»B,Mt¿.>_)ä*Ç…Û^ó­»ÚØïÆ}¸^ÈMBîrBîu£·¹Ñ‡[…ÜéÆ^ìpctã'ø†ûq»ÄÀA!ãF7žÀµn’…'q‹O ï)lwã0®sã\ãÆ³ØêÆs²ú…¦–Õ¿šU¡(«$MŒ-Kða‹[jǵ¡·™ã2ã±Áž²,¦yêS²ñ³mùI ÖÄ×­3"gž`¿ù±Rb?ž_'Nͺýø²I.Ïn"»ƒ‚´B?Ù “â™ZüìÇQvR’+E´(‹¨¹à+;dkôh ¥:FÙµñ˜an˜Sî%™C’;7 Äæ)¸RäÖ™.–üóõP(óê­­ÞÖx{0ТS:öÆCáH«1Z½zR…ÀŸnå0„å顨òD™»j;ZŒv)´¨‚».2"f•üT‹†ÕBFC¼m­9W_¤FA6  ¨ðåf dæ5XÝ„¶\Máx¤ÅXCÍÍ£RåumíAîÄ4ÛåHkƒF›Šñ4ôöv#Dn¾‰è×nŠëÁ¨°VÝ6œT|ÞVcœãPžfG/ÅôGKÐÐ#æÑg »† GPUcË ½5‘Z†cñVD1#ÉÌ3~Usî´æâa¹e§ôÕ¶Þ×I«ƒ ­H&I ð²tàB“éçÀe'—ÍLÐiN%Ü<ŽõFh}lóÂn½41jS~8ÉÙH²FGŒŽÆucˆF$V›ö\ D«å0i.mLà„KvªºÆ عOØàFŸ¸·qÛŒ;CÁ›Áidžã¡Ö»M(Â,Q¤)ÞÞŽÄŒbãÒbuÁ ±^6ÅüÃ3ku+Y&&{Q8%½1Ö©_i˜'ë5– Îä7„›â-¬ó>ΧõAd»øÒþAËíÖn'8ï ºMuºL>©†¤pÚIÉMʬáüoáTéjá$´4B¢µNx®È€ËmáÍÜnXb2¢Ã Ù€\nD¢Œí<¾-*Eå&e~6.‘æ5g,œÌn¾Ùx’C3¿¤ r“ ɹEjÛô+KºÌ1žOÀá öaçq:å±ÄÑ.Ï,Ž£qPæœçà<”rÎg!éýäLäS=‡£æóÛú0é!N~Dê2Ùo#o™ w[ “hØÆÑéó—Scb¦ÆQh|ЉÆ=–F%åí‡ùüc¸…ï,+ïÅ”´âP1¨r‘«4 USy§¥¼„k²Ý8_J}¶=XèóïÏ×¢æ>ŒÙƒe¾R2ÓÆFÓcð•hÇ2äá3ÿœÇówŒ%Oa¾mn´ OôõbÁvx|ô©¢ Cú1¬¹ÀчqLGKzQa\=Šaª…ê1x8«ý˜ ö™Æo·ŒŸÅ£Ã(IÏ÷ùûpÚ “~Ænï±õ¤ŒÈ騭4z-NQ×ÑàõË-c7єĴķs›«ü¤wÃaë±ÍëÆ,ߘ½øÂ»ßÅöÃp;ŽÀ]l/v܇¶™ôbævÑè´©1¥;½hOo>“?J B¢Ât`FªJT”ÅP®â˜¥6ãtµg©Ts½N]JÍÇp½åÜd:§8æIh¶^,ÉÀƒÚ§ºþ¸°TZ¯N9Sê?ˆÑõݹ¢£›iÂÇÿ…I½_ìõ¢ü Š˜cÿns'ç µ¬%΀åü_Aþr®œÏPš ï àÃ*JíO¥cЕޡV4[7ì!W¬«9¤‡’:j$ÑáàÚÿatùGqn¦·ÅK%¥åû0_ÁÌ‚8ÍÏ9Š¿«fu!Ä冿yä,U¬€Õ"Ý¿m¶½›øõØ{1»Üc߇Ós˜á/'²bWû˜ÇÞíÆtê}Qa… }Å«U0=vH"÷¡Jaû±÷»‘»ÂÖcbHanÆ6œbErgÀ%ÅóÉ1£½ƒ³,§·cb?<Íý(h.°÷ÁËDŸÙ‹²EÒ‹Æ>Œ?`•ÄŒÝ)çŠRj\ÊËN7S8úÔDüÐì×ÊL#][[Ž·`kÖVÉ C Äî¤Èã)E[¢(ûQÒÌ*›œ©X8Hñ¾i)N°]ýÕ\ õa ͷi>}MgÍ7i>Kˆ%`4†£h:¤’2-'}øLˆ>ÁÍœC"Ú‹³æZ¹¨2Q×”B]CÅaÔT<&ÌN­`Çœk›­u£¤Â£%:¥ã0òK¤5Î[3·SSÍ“k– «¤"Á̲Y>P’ÆV k è¡pö Ó¹^<Ä;ñaLçe{¯€9ì5,ÚE¬ïF~7smf åƒ8HK¯à†,¡/ÌlG= ö=a~‰k×Ïú™ÎÿEUæXÚ‡±ìÝlm‰«ålÞ.9ÇJwû$݉Í^©þÁšø'òÔ¿xmý£Ô0‘£O}n&&—åa5Þ'þÍ"O6-Lp©5©+O'*q{?BÃ{0‚èÉÆ;Ï2Pd6ÞªÒ;E[J ƒ®ÀD]ÜÉÀ]¬»Y´÷ð&º—«fCJغÐzFTüß [¼lHÞÜ‹+vgœÁ¼äñê~’gpˆ7í^tOïž¡ÔG)œy­¼8-|e¦¦Œôã€ï§óâ˜!½@þ{q›B-Ù ¼õ©¾1Ä_KöŠnœj¯JpOm 4K·Ãå/È‘%…Ùú{1u…­ªÂêûï0½é€Ì›Ï1°çQÆ"©ä8/„/óýñ æãU6Ã×øâ{WäËXƒ7y%’zVèVw©ðùwÁaïñ1¯³dÕú“³<ŸÓz|dÌLŸÄ©DÅ®¨VAS!_­æ#Bç f-{m ¦*ƒæ?ÅwRN¼·*i¦ÒºÝë{Ñd«êFßBÅŒ^œÛ™£J­åÇÞÏ|{}@È$~D|| /Çéêhª³äq³‡Íwn7zÌ'ˆB 5 üPKyó>r —PKÅ V':javax/naming/directory/BasicAttribute$ValuesEnumImpl.classSßOÓPþnÙZÖÕ Ç6 *Ý:¡¨¨$˜ >`öà[WnÜ%]KúƒŒÿÉM@£þþQÆsë¶ÐeƵé=çžó}çÇí¹¿~ÿø‰lॆ–†Ç64lj°4lix¢ƒ¡¨`.·sÐP’Ú¼ÔÊ9¨¨XÆ¢ ˜¨xŠû¶Q5ð ¼ÀC¹Ñ<:³/l˵½Ö»Îw¢†ÚÐGµ¼¸Ç;¾G¾™F³¬ÌFë[žÝàTÀ.­×v(œ½( D'޸ޤ¨¯„'¢]†ù´sS†`Èìû§œA?è;ü\æ ŒCÏãÁ¾k‡!§mñHxü8îuxðÞ^øg™¥žvRMY.•qâÇÃß™%wréE] ‡¡Ð¶Ý˜‡2ÙaïÜeÈ:®h–»¼Ç½ˆêÔºvøÖÈXh#ßÜøq3T&ö0„Þè€a5Uÿq"Rœ•I€á‰2¬OÕ?ÃöT¸úøYd\RC÷Iä¥tN¿?ꊰ¾EÊEÂÂ=UFo†æ¶$g’ôuü}hViUé[ÆÙï¶G8…dÅü†Y³u[fë …¯È]#ÿ…ŒB‚àDS²vY’*Éœ¢¢L:M)ˆ ·F’É$&Kñu™DY"n «´Ï]2›¨˜,aêæòß¡3|±UéQª)&ݾA ÿgÊ‹ý ÕÉ™ †ÏcøR*ÝîÉ™&0 ”£N;+¸›ôMƒK¾‡ÀPKSßb“3}PKÆ V',javax/naming/directory/BasicAttributes.classWësÕÿ]ë±²$ÛŠ'~&vpE’c y@b;D©íBì:šµ½±e¤]#­’> --…>hKÛÚ&`fB§È“f††/|è·~iéL;Óé{¦¦ýšþÎjmÉÂ&Ͻ÷œß=çÜó¸{õëÿýò=xÐ7ø¼†okøŽ†ç5|WÃ÷4|_à ~ á‡~¤áœ†5œ×pAÃ5¼¤áå 4ì""$ˆ=AÔaok°/ˆz!Ü[MrŸàö „ăAxÑ+Ë>ôË저dv(„$CápÕø”àDÕ @†DpDŸ–½ÈŽEóQ! ï˜a‹”$€á}FŒ 9îëoküíåcwÆ Nò˜SˆÆ—p6Œ'ñÙ0žÈ—…|†ñUL†ñ4 !©0¾†Ï…ñu<Æ7 ‡ñ¬çðpßÄÃø–,"Z~*äg˜’ ã¢@^Þ«¢ê’,_-³BÞ‡.㤂'º-©°.ºm`Z?¥÷¤us²çÈØ´1nï®dµ³)s’ì¦vÞN¥{úÍ|ÆÈêvÊ2)ÛìÊÎô˜z†ðž!gX ¢Ña‡WðF“²Ø-ªLY®ù¤9“·iÒÐ3»°©p$o/EtE?~†eÕ°px>]ܵ •¦vF?ÀŠM¤²ÄZÙ'zöÛŒåmƒ-³q%›7Qµuuª€èªÇz0zsÓ«ò.¾¢¢z.5¾Í9z£Žuÿž”™²÷)„E.Å•Ì̤Y°{¶‹jîêµ& …š^ËÌÙºiëé<×Áþ3ãÆŒÔdŽ‹d_IO8išF¶7­çreê°BÝ@Ê4†ò™1#û>–æö†²&8¤ç¦laóD5CV»¾è5µòÙqã`J6)Ö“O¤øÆÓ–IÞš 㤞OÛúD1Æ õ.o$›²fÀHô¹×o<ž×Óœx& Jü¤ûÓôÜÇI²¯ÈHöQ®Mé¹A+K3uî¬QI€œ©bl‚©I“²^='Jåd’tX k:/yd1d¼VlX…æ•{U¡½TRNˆ‡,û •7'Êtw–C$BŽægf¬¬m”Ã"•Ź„U¬`&jÙËjáXKóǛ蓯/…Öå%ŸÚoVô 7ƒ07[VÕ¼õV×= ;Vì\ÚQ·­rWy÷xMã 3’Á-6Ö) €ÕÈ ˜HÊ:˜-«vÖÈX§xšHÎȦôô°‘Í1˜Ç¤’½¹ÔYJB¶5`fS:°­…ìNK‹8:C§KÝ‚~5(~¨=¨’¯%ÀO-?»›ñÎPfs^…»ù¦Pò¥&Í‘³›ßpÅqClkcžw±-v ÁÑHh ï¢ùŠž ­'"ÝÏ'ÃýXϹ(zÌU´>•ÌcuÔÆóX_Àö‘’’Z’¢’i*œr¤]wP˜Xk›GÓ'kx’ا°–' –«¡û«8¶.–X 9%Më©8^v ‡Ñµ’—Š«ñ„O J-טEdä"£±_`½ˆsÒ\@ëui!~ʼne€+¿ke#ó>lÀwM€cÏ@ž7|Øt1SJÞ@®µßЖŸc&þ¦ãï£ö<Æã×Q;(ÖWS|ùø³¼^à•ð‹¤|kºð××[‹~j^:éÙÃÀw΢®%Ẁè‰= 7¢1Ò"ѬAŒ?¢ÙÅâ‚ò FyùïC½ò£Aièà#¯[Uc» Í÷­k½£øäësŽ>Éû´ írÛ®vIÃTî’³'³Ø'gO{Ü)’Áâ æBæÍ ¦£›é¨LÆeÖò›ìÀ·˜· W˜ò*GãY׋}ÜÙÆÿž½±VïED¤ýZ}Sì¿Y„dá+¶"c#ìV‘ö~ºêFëK7þSêÍc@m†WÝ‚jÕ‰:µ­ª œoU[¸(vrܫڑwNYÅ?w¿ºXn»ÊÊ­¼ÔŠG,à¶%' :}þ þçä\Z,„v7b£ß^™Hù3ÃEßé¢\ôøëÕ•âbgÉXñ{FÅjyŸ¦/c 壮ÛÛéïF÷z¹½€»Š³M,¿š8k.!å·‹“­R|e¡s.ÕÀЭgØ6`ƒjD³jbèYkkpÉ•/û‚óIÈâ´“â*þæŒàqgÁ)àÿPKïâžò1ÙPKÆ V'9javax/naming/directory/BasicAttributes$AttrEnumImpl.classS]OQ=·´]º]-BËw±b»Uʇ¢B¤DÄŒ¾m—»d»Kv·¦ü'4Œ>øüQÆsk!nS“¶éÌÜ™sfÎÝÎþúýã'Fð/5¬h¨iXÕ°¦a]Ɔg:îeƸNÔDòY$PÐT4©¢IU˜2PĬ ¨bF™’ÁÖs61mà–òåÊÑ™õɪ¹–÷±ö¶q&íhK`æ&ÝŽ·V÷Ú-X‘ã{¬”+ï»öƒ@µÜ…ujžÕrØàÔ ØÀ.j{VèØ»Q8v$Ã-ÅIo;žíª º¶Î]Šè¯¨žÉ}ÿT èõŽ-ÏÕðÌCÏ“Á¾k…¡ä1wäxò¸ÝjÈàÕp‰žú¯îÂ?•×VØŒù¡¯@)'~;°å£&eN.¼¨)#ÇHY„QOÊvýµQéÊ–ô"¦´¦¾ñ&s½¨~[ëôT9P¾ÀÄñ 1éÇ]£ÍÜÃþÑe—R´d¡-.»Ð­mZjjiùQ–òÿÓÙ݆îÎàìlKMûà‹‰11&FcLŒ‰11&Õ‡n°ÆÖÄÄèƒ>ùV}«¾ùfŒç,ìÜ;Ã.ˆ/ßýý¾sî™sîÞý韯¿´Âë¥ô@Æ×=ðª–<°ì×¼Pa/8 \ÐBÃV‚#eà†ÁQ‚gŽ÷‚ŽSïõNPïY‚çÚÚIà$Á)ÚÒApšž'8Cp–àÁy‚: ºº .¼Hp‘ ‡à’æà2ÁÁÁ¬x™`Ú*\!ˆù`F>xú &} QO£^z Æ} ÓœNs7à%‚Q‚)É+¤¼BÊ7a J0D0L0Cp•@$ˆ à6  ö.ˆ×ÅHRTæ"Q]“•¹ŽæÜÔRDS8ŒtªŠ.-é´Þœ5)®«Úr伎b]Jo—Ù%k›6÷[1Ññ“ó=EøBÜKܼ™Øò:ŠKm-–?c!•D->OÇÕÔdšI®éV2)IuYU0 ·Š²7Qüy¶ïˆ ¢UXy|W”mRiagâS×ê$V9VXɦ|ÎÚŠY0ûÔ„<+ÇsŽôèR*—¥U†BF—“‘‹bz^cI)·r§‘ìï€ö"vÛœb{TÓ§;eE-¶Ü/[‘w\ïJµ]/øÛÅü_+~ÔÖ‡ÿ\ò»#m“8×v¨¾³¢·Ì´Wý9{µbËÞ§Æ}ZVdý Ž;Õ„$€·{).-ÒδzpM“›q;B&ØÛ++R&“´!º-¨ëWõ€¨d%­‹J\ ¨³MêFÕŒ—.È´Ù“•„qMu)š‰Å×·ùç$}ó¤ìÁq4>/¥ÐhÕF¿3)¦Ó]Ò,¹Žž¢£¸te°w@ÃI1“ÔÉïN}I€j‹r‹ÖjLá2Žºáp­Õ']MæeÕLÏÛ`6êü–†‚é*@Ðf÷…0¬)úÞËùatkÒZÈÝé\C¾gKÇP->Iq<£ غBY(ý;X)ˆôèÆWvÈØsâ¼#G3ˆØÒw(œ…2–9‚Oóá<¦“ž½³& >–ÙŽÌ6“M|+ÌÎ9±-'›5á–ÖUð;Uøüð1£0m¥P›S(ç>C…OM øJ7ãØ­ßðaö:àΆ€;Í,CŽY‘k‰\Á“¿1‘¡Ï ×㘼ó„ÂÂ]¨di7Úˆ­Ãûx›·ò„¥ÍÇYÚ -a{ÎÇx›ošÈøŸÇ 2ò÷æð*ì/á¸î¤·¹xî÷&®fo÷ žû#õµ[ÅsÎã–п8ƒ;i+ ß…ê¾–ïÀýT·üe÷À9–…=÷ïk¬RÈ‚÷~Ëpoê6BiŽï†)ÌØiØ3P "ÔaÂÕc{$Ææ¤•Í'·osm^C›I´™B›*Ú\D›*ÚL›b„ÿQ­«·k¯Ž¯½·Qõ-FaÔPhæRù)'ð>øà=F`ʺüÉ…zÞ…wÑ…wÉÊ…\fx>B>4 ¬lu‡5ð.|.|Î(lq‡5ò _¡Â“ÂM4šx:¹|ý‹aG öQ¼¡]ØV¬³««pÈ•Ç/§ Nð.ðbkÖ²½˜ó—Ä/ yØ ãД„ÊÜêCTù û~Ǥ}È(ÍXc-œOóÁø›a_µ F­Œ  ?£ƒágtDÛ³™Ư 9nŒµ#„ø`ûª‚šèf4ñ]ÿô_0~·VRq!úrnïwÏ9÷»_{¿~úöîš1Ž|2fddeädÌÆ(ÚCI]Ž8*ºôD!áXŒ WLûÄ*Aú¥‡Ÿ¥/¿ö®*ÐpRÀ°€”€1ç1(`HÁœU0 .Ḃy 0t¦Æ–6õ]«èæ†VpmÃÜÈ2 ûáûš©oQH+6_s-û6ï©Tu¹C¼‘Ô.õri“8Ù@ÃLCÄ|u}Ûûé¾Éôd½È0ȃ˜‹ 1¨‰0»ö¯Ìî·TCnuú`êX=¤¶ÁšÜýöÞÑgéï‰ýÏøï§`3 áœaîChÁ*s†ø‚e:®nºE½R¥9[dH,&¿^Ý*q{E/U(:ÔÐ}j/pÝ^»wƒ;ÕŠ;! ±‚Uµ×øCØ„õímn–$tí¾ÁÝß mûÏÌÐ|oèòïI)o˜e?ô‡LwçF9Ü6ôJ‘ÛŽa™7¯^¦\œ½¹D\ëgòŽ(Îò:¨…ê^M¢!ÑSæp §¼hdzÖ0B8I‘ u<ÁWÔt¦Yƒø+š3œ!l¥U`aòhAÎSŽúÊ ÒI‚CÊd¨ŽH ¶ˆn!ŽO«hÇ눪ݡ­I¹Z¤­xÚ´¯$e˜Æ6¡MJuÄ‚ÕÅ$ðˆ¢Ô•}uŒFI}øË_’°|Jx‘þ!?¨ƒ^iMMï±yÑç”Æ3ŠP¯÷ùS´­péæÛjmoÑ^G¸ƒÕ¨º5´ÖÐRCbÿž/§¼Wsî;PK€ž´sÄPKÊ V'7javax/naming/directory/InvalidAttributesException.classuPÁJÃ@}Û$ÆÖÖj/EЇZµÑ‹AªB¥ôRí}Û,e%ÝÈfSêÝòTðàøQâlAÁüá½yoæãóíŽP÷Qó±€Á·°âí7jÑá‹(a «§µ?b¨·ú|ÎØ«i84Zªé¹Õ‹RIsÉàv“H0”»‰J WfÄãŒøNOÍy,£+C™qfDz³˜ˆ'#Õ± ØC¥/•d³±Ð÷|S.&™žˆ[iɶu.BÅgt6äíg Ãɯq$µ˜˜D?‡ÿŸf¨¦BK„N‰?ô®ÑD~ª¶P¡^&V€—ëôÂ)MêÖçµ—p^ó@•0 p§¹=ø¶ï’n'ÅöÁî_Hë;¤lä§Ö¿PK63š!›PKË V';javax/naming/directory/InvalidAttributeValueException.class}P=OA}Ëq '~дA¯‘ cbP ¡A¯_¸ Ys왽=ÁcEbaiáðßg/ÆD ‹y“÷æ½™d>Ö¯opÐF­ˆÝ"ö<0-l¸KçóyýÞuJØÂ¦Áiœ µÆà‘Ϲq5õGFK5íZ½p!•4— ù^ †r/V‰áÊ£Óþ0k?k:¿Æ¡Ôbbb½ôÿ?ÏPM„–< „Nˆ?ô¯QGŽ~ªì£B½L,7Óé/„%RêÔ­Ïm®à¼d*¡G6 ƒ<Î3»÷m?"ÝN ÍÓòýmZß"e';µýPKp‹v$£PKÌ V'@javax/naming/directory/InvalidAttributeIdentifierException.classP=OAœôÁcƒÕ‘ÓV‰AMŽôú…[qͱg–=‚­½­ÿÊĂàÿðoß^Œ‰V;/3oÞ¼Í{ÿ|["ÔKØ,aËCÉŠóôr÷±ì:Ïe¬aÕ‚Ë÷š!CÝëÝó÷c®ÆþÀh©Æ'V/žJ%ÍC¡“D‚¡ÒIÔÔpeB§Ä½@Íx,£sC3ÃÔˆ ÊÈ[)ôå|$ŒLTÛ&3°.Cµ'•è§“¡Ð×|S€;HR=WÒ’]ëœûŠOh¿ßÏÊO Ãñ¯v$µ™D?úÿøCm*´äq(ô”øMprtÐÛÁ6ªT+Ärp2.DX&¥AÕúœÖù×l Fè’ 8B‡™Ýý¶ï‘n;ÅÖþ…¿þ&Å{¤ld«Ö¿PKƒ(ªx+­PKÍ V'9javax/naming/directory/InvalidSearchFilterException.class}P»NÃ@œËË`i¡Á(A4DP”‚€ º‹} ‡œ3:ŸCø~ƒ*ÀG!ö,„ÅÎjfgv¥ýø|{Gûh:Xu°æ‚Á±°Pö.Ÿ¶î^®;U,aÑ‚ËPôv†¦×àSîÇ\ý¡ÑR­^9‘JšS†R7‰C­›¨ÔpegÄ[=5屌†‚ëðþBÆFèóY(LÔ]ÉÀ®ê}©Ä ›Œ„¾á£˜’î0Ét((BdÓ:g¾â:ìòö³†áè×8’Z„&ÑÏþǩВÇÐ)ñÛÞZ(Ð@µuԩ׈PÎuú a•”uë+·ç(¾æ¡K6ÀC ;¹Ýý¶o“n'•öÞ¥¿þCZß!e%?µüPKÜ3$ŸPKÎ V';javax/naming/directory/InvalidSearchControlsException.class}P»NÃ@œ‹ó“óHƒh&,¨@4¤ (ôû9gt>G¡åøª >€ß â'{B‚‚bg5³³³Ò¾}¾¼ÂÁ.,W°â‚¡ba®ôüþà=Ö?.«XÀ¼—Áñ· ¿{Ë'<ˆ¹}£¥Y½|,•4' Åv †Z;Q©áÊ xœßì¨ eÔ\‡744:‰Ó³i(îŒLÔž e` õ®T¢—‡B_ñaL»n?Ét(Î¥%ëÖ9 Óé —·Ÿ†Ã_ãHjšDßÿŸgðR¡%B§Ä¯;§h¢@¿ÕVQ§^#V@)×é/„URšÔ­¯ÔšÁyÊL­Ò“Žãå®Ò*=cðzf,ª=£§©Ði(âŒzvÍPë+-Y2’öFŒb¢{ÃèN&"T&©2úbÉ·9v! ÁÐd6’—Ê™w›q- 僼ü 0ð_Çcee”ûÄÿ‹`¨O¥U"¥R{uŽ& ô~ÐÚÁ6Ö©V©+ ”sú Ò ‘&Uç+µ(Îói@6àNr{ðmß'îNÊíü¿þ.]ß!²‘GÕ¿PKÔÊ"ñ—PK³ V'1javax/naming/OperationNotSupportedException.class}ÏJÃ@Æ¿m›FckëŸ^ÄKµ¶hÐkÅKUPJD¢¹oÛ¥lI7a»‘¾€ä©àÁ»>†"Îôàa¾a~óÍ ÌûçË+Š8BÃź‹  ®•%§ßýØ{»{ªW°‚e+C±u14Zý ä~ÌÕØ–jܵ¼|&•4ç ¥^2 Õ^¢f†+ñ8£šÝ0ÔúR‰ ›„¾çƒ˜èîm*472QAbÂ,MmÄèr>©…Çöƒ&™Š+iG¶-›ûŠOé´äég€¡ó«ýÿz†úLhÉãHèÕ×h¢@Å6±J¹JUNÎé¤"MÊÖç´(>ç5RlÀJØÏíÞ·}‡¸í”ÛJý§´þ„ÈZ~ªþPK¶î²™PKœ V'-javax/naming/InterruptedNamingException.classuP½JAœÍÝåôLLüI#‚hcLÐíŒØD…HH=Än“,aå²öö$¯cem°ð| ;_ÀVüö°Q±Øù˜ùffÙ}ý|~ƒ}Ô|¬úX P€oaÁ»y“·ï%,aÑBÀàÔ÷"†Z½{Çïys5ûFK5nY½x"•4§ n; †r;Q©áÊD<Έou”ZgS#F=>¡Øùl(¦F&êÀ2°K†JW*ÑË&¡¯ø ¦\ÐO2=Ò’]뜅*χÿ72lþpþYWS¡%#¡Sâ×3lƒÑËA¸uTh–‰àÑaöK¤X£é5æpžò@•0ÈÃ-¸8ÎíÁ·}‡t»)6šs¸¿ýGTHÊJ~ÕòPK>r&‘PK£ V'javax/naming/LinkRef.classuT[WQþNŠÓàÑL­4-²»iC- ±D-ìb#gjºüˆ~@/½öjVØÊµÊ^|èGµÚgfBAb-ö9{ïo_ÏžýûÏ÷¨Á–¼¸æÅ¼„ w$Ü•0+!%aN‚„{îKHKX”!㘠ºdøÑ-CÁq>ôøˆôúˆ=!CÂI™¼ö mHàúex²ˆÀ’Q‡Ï×ëþ¡wO}P0„Ó‚œä¼ ŒãŒ‚ Œ*¸‰ naPÁ¤Mᬂۈ*˜FLAR‡ò1†`¨?ñL}¥Æ4U_Í,?ãk¸Rœ²Ìœ¾JâšPÿCKh¿Iÿ"ÉÐ~›½n⚚ϓ—ðqobººFll–¯Œf³æpE°`J¢¯Š¼:2ò?ä¾hÝ*×%Õ5n+¼#-§ç¬« u#î¥6nd9ƒ?nèyKÕ­U+/¿ÉðVޤ lŠ¡!‘Óy²°¶ÌÍ9uY#ÈA’<Ayž0Šà(‹¨ÍÐT¥ijï!§Œ‚™á9áÒ—z«[O¹•ËP†aÖËÐî\ì’z’zÝ`da+E…dÁ_Tr‘V ÓÕ¬r‹b¥ú,®saî„jš PW‰‘ˆqÄ Ù3tUH’†5aôl©O Gw!IÃñdš†ÉÐX9se"§% Í»¢¹§¦ñÚévЮ?êÔ-Õ,{é’¸§L<­jÔ‘5žú= wVŽ {Ô­•ÆM®g(—ö2…“·;€4š;so_ˆÁl|÷‘óÜÌ©Ú7ód~rŒÆÒ2è†Ø'@-ÚÄN·6< “a˜îèlÇ#\)ñGhÉР~ âç!þN™¸K„¿Î 4ïÀGô#”Ào¤?£¹ˆöÏèøDz†«DeG‡íV“ë%J›Khá tlÁŸ°È&7ÑTi›BfmÛ‹®í k۲ǶˆÎêæ·¤Mçkxa~†Ö§úZ×[ð¤Éüð&~’¥(×C­r|ÔÙ’Q· Ä\/*ÂËPø ‚;¥SDË{t…¬ˆC‰ÈZ"¿àúÈ6üE´mCZß‚œÞDýÏR¢­´uƒX¢>=ÁIr>ˆ,Fì7£o‹þqûe®ÿPK'>¦%UhPK V'1javax/naming/InsufficientResourcesException.class}=NÃ@…߯v &!á' ¢4!qƒ Ñ‚¢Hp¿ ›h‘½FÞ5ÊE8U$ jÄU¸bÖ¢ Š}£÷ö›iÞ?_^á` ë>6”à[Yò¢¤yõôñvPÁ –­ Nk/bh´÷ü‘‡1W³pd2©fÇ6/ŸH%Í)ƒÛKïCµ—*m¸2sò;Òùt*'R(s-tšg¡Ïçñ`dªºv(»d¨ ¤Ã<‹ì†cê F}!­éXr*žÐêðÿ© Û¿èaQ~|×µÈ$#‘iò·ý3ì€Ñ@º…MÔ¨VÉ•àÑcö¤J,Ǩzíœç¢¡NÍGpqXàÁ7¾K¹ý)·; ¸ùÆw)Y+V­~PKCÒ’×™PK  V')javax/naming/LimitExceededException.classmO»NÃ@œ‹íLBÌ# ÐM".hH +MÀý%>E‡ì3²Ï(ÿÁ𠉂àCøZÄžEˆbg4³³»Ú·Ï—WXØCÛŲ‹5¸æœý÷燧{¿Ìð¬ÎNÄÐî„7üŽ W“`¨s©&GƯK%õ ƒÝÏbÁÐìgªÐ\éˆ'%ivɰÊTê³éXˆXĆoµÌTÏ,dh…R‰A™ŽD~ÅG ÍxìÌÇâ\±mRÓ@ñ”NÿobØø•Tô£í"—<‰D^¾¾8Å&} Â5¬b‘¸Iª‡Š™ï ä˜#vº3XÕ€OèUÃlôª¸÷ß"ßtêÝÝì¿ùCZ@ÎRuªõPK™ÉŒ‰PK¡ V' javax/naming/LinkException.classU]Sg=/ÂJ’ PùP#T‰úÕ*X[A¨Z Vkfôn…‰n61û¡ý½ðN€Ó[;m¡ÕíU;ÓkuüÕéu;mϳY¢lv¦ÜœçÍyŸ÷<ÏyÞÝÍïÿ<|ŒVŒáboGñN‡"˜Š`:‚3ÌD0C½1„Ð'«>Yõ t ‚=íc¯À>´À~ÙŒq5('m Ý)¥>þoBÃadÆ4œDVà †÷q@ÃG8¡á,&4œ8ã.`XçUP# ]™Ñ¹kƺ‘· {5¿°xÍ\ªMúéKµjÑ^%ÝíÑ7ó¶Q"•Ÿ7J&ùÖÌhAa8Ó,(spG‰Sk++fÕ­^ðÉxâ;•ÙJ§LO&À“ltg®¶¿{2=W´¯§/š%£h“KË‘‰ôÈ›[NÙZ7—Óõv'Ò á“Ì­Rh›./› »¦Ë¶S3ìZÁ°Öø[Wˆó°9¿VZ4«Ÿ‹Y]äfn.™•Z±lK7B\™Ôj*ðºb—ÊkÕ%s¶(ÂF¥bÚË ¡%«lKÉU³V¯Z¡˜!uù@xdóHQ¿A×ýÖYÝDzG…„¿=N>ø®ú¶u½m É&K ~Žá#qËï'i5›IXMNâV“ Ǭ «`V ]>w†v 9Ásæ ,Z+o *².ÏÈ öóø9h“Wš«6y«ÝxÖûÍ—ž±ãŽrÝ‚· qÍïñ™rб7»‰ö¬úI] !ÿŽ› ïºBaâ—þ í¸…NÜF _c7¾p%Ç<ÉYJ¶H~6·‰Žh–i£‚n Ž*ºà 63NaØÓÜÃ(m†²? þ q<ì’ß?ÀH@jŸz—øa`jÒŸú ñ4¤êþÔûņÿAÏ8›Ûæ5æ²Oèõ1™O0îåOmÍ+÷+RÙÜÏèTøë[DÝ¡½Öèáià%ïà’Œ]ø“³úƒ»óÿ¯—ôô’~½gÔ{N½gÔ{A½§Ü]@.Èî÷ó7þ"s¡qWÓüÓ“© =Bè «îŸÐ³‰˜Þ²]r'ÐtÅõR¯ÙÉCPQ¤T;E0ï ¸'¥Æûï!&óÿ>6ÐõÀ-À…W µ^@gmÚ®IÕ5€„Ú‹!µYF…I÷xï?PK:GÔlªPK¢ V'$javax/naming/LinkLoopException.classeÏNÂ@Æ¿¥-Õ ‚ðÀÁOPƒ\5^¦ñ‚ö¾à†¬–]Ò?†'ð xãE>€gŸÇ8Ûõ0ßd~óÍLæýóõ ºh¸Øt±åÁ5²â|¼ÈÁâñ鼂5¬ñ¬v'bh´Ã;þÀƒ˜«I0Ì©&G†—¥’Ù ƒÝ×·‚¡Ú×*͸Ê"çT³K†Z(•¸Ê§#‘\óQLt‡È}¨õl0‹Y&µ:0Û¼¡Î“±8“ÆÕ4l(>¥kù±3ìþkþÚÇPOE"y‰$¥úæâ-”èKP4±uÊUªJp N“Vˆ´(Ÿã/a=5Rl@6 »÷mß#n:e û¯ß§õ"Å©úPK¡=/ô}PK¤ V')javax/naming/MalformedLinkException.classm=NÃ@…߯v &!á'M¨´ š(@p¿I–hÁ^Gk圂;PE¢€žŽ‚«P"f-š Š}£÷ÍÛÍû÷Ë+,ì ábÕÅš×È‚ó9yûøºz|ª` ‹F<Ëo‡ ¿wÇxq5ú™–j|`xùP*™1ØÝd$ªÝD¥WYÈ£œ<;g¨õ¤—y<úš"¢<ºMt,FÔº?™Å$“‰Ú5+¼~’ë¡8•&Ú4l(ÓÊ`.ΰ5×ü(C=Zò(:%svŒJt/è5±ŽeªUr%8§ÛI+DZTMÎéÌ`=j¤Å€}ØØ+âÞo|“¸é”;Û3ØómïY)VÕPK¾ÀNR‡PK¦ V',javax/naming/NameAlreadyBoundException.classuPÍJÃ@œm’FckëO/"‚$V4ÞA«‚Rz©Æó¶YËJ²‘M"õôi<<ø>€oàkˆßRð°ó1óÍì°ûñýö ;h¹Xt±ä¡×ÀŒóìßÞ…/_Ÿ5ÌaÖ€Ç`ù[!CËïÞóGÄ\‚~®¥½z$•ÌìN †z'UYÎUò¸ ή]©D¯HB_óALêZ'â$Ö‚GO§i¡¢óñP<ä2U»¦…Áë§…Š iÜ›FŠ'ÔüeX6Òø³nfBK‡BgÄo.ϰFïá –1O³N¬‡3@X#ÅøM§=õZ„^>€ýÒîýÚ7H7›j{{{Ú¿Gפ,”UÍPKK»X”PKª V'(javax/naming/NameNotFoundException.classmOÍJÃ@œmšFckëO/Å‹½+jA)¹Tsß¶KYIv%ÙHCÅSÁƒ o ¾‡ ~|~ð·Ç÷¯:Ö°jÁgp‚ý˜¡ où=®fáÈdRÍN¬^;•Jš3†j_OC£¯Un¸21O â슡9”JDE:Ù5'¤v"žŠH›.Ôôb>wFjudü‘.²‰HëìZm*žRcøoŒagÙDãϺ•‹Lò$YNüæò»`t/;ØÆ:ͱ \zÌÞNX'ÅúM··€óTš„~>Fai÷í]Òí¦Ö;X ºìèû=R6ʪÖPKˆ2Ör‡PK± V'(javax/naming/NoPermissionException.classmÏJÃ@Æ¿m“VckëŸ^zkŒ•O^AÚ J BµWÙÆ¥¬$Ùl¤^}ßÁSÁƒàC‰³AÅÃ~³óÍofØýø|{G}´ªØ¬bËCÕÊŠkž^Ά£ÛÖ°jÅc(û{S†–?¾ç<ˆ¹š£¥š[¿r"•4§ Î ½ õAª2Õ™ò8§œ]24ÆR‰0OfB_óYLn;L¯„Nd–ÉT‘x0t9°¼IšëHœKKîXo(žÐÆ ,ÂDD¹–æé§‘¡ûûo:C3Zòx*´-Ü\ ÑA‰Þ :mlcb²ܧ? ­‘Ó¡h9··Dùµhhz„‡p¸÷wÉ·•Jo ç/ïÓø]r6ŠUÍ/PKl(5)PK² V'&javax/naming/NotContextException.classeÏJÃ@Æ¿m’FÓÖÖ?ÖS­Øõ¦ x© JÉ¥šû¶.e%Ýh²‘¼ƒOã©àAðÚwñÄÙ ‚z˜o˜ß|3Ã,>_ßààmk>Ö0øV–¼Úâãñù½Ïê¨aÙJÀàt÷"†vwx/ž…žò‘I•žžX^=UZ™3wÜI†Æ Ñ™ÚD"Ωf× Í¡Ò2Ìgc™ÞˆqLt3L ,ÌE1‘F%ºo÷3£$O'òRYß¶e×bF÷xX¦Ÿ†ßíÿ;Z™L•ˆ#™fTß^£ƒ ý Š-l`…rƒª ¼’Óߤu"ÊÖçõæp^Ê&i@6à.ŽJ{ðmß%n;ÕÞþî_ÿ!­çDVËS­/PK]¦ƒPK´ V')javax/naming/PartialResultException.classmÏJÃ@Æ¿m’Fck럂¨—ÚK[ÑèMP¼T¥±šû¦.e%ÝÈf#}/¾…^ |ÇgƒЇù†ùÍ73Ìûçëì ácÙÇJßÊœ×zY;øxzŒ+XÀ¼•€Áiw"†F»Çx˜p5‡FK5>´¼|$•4Ç n/½ Õ^ª2Õ‰x’SÍ.j}©Ä ŸÄB_ó8!ºqɵ‘<¹Yž˜ÓéHÜ™ª]{‚!¦¹‰3i­›–MCÅ't2ég€¡õ«ýÿZ†z&4ñHèŒê›ó4Q¢A±ŽU,R®RU‚Wpúž´B¤IÙú¼î Îs1P# ÈìÃÅ^a¾í[Äm§ÜÝžÁýëïÐú6‘¥âTý PKxûÙ‰PK¸ V'$javax/naming/ReferralException.classu’MNA…_Ëà(‚ *þ¡ ®ƒãBˆAL@Y¸k°ÁÖa =Ác¹2qá<^ÆX=‚S•~ï«×•ô||¿½#€,öllÙØÁ6e!øh|õOk…0¢X2%°–>¨<ð'žs¸ÛÉ]5DKç6Gò0çò®$ç¬çj14V }Ððë-Ãzzj¸®‘yãfGú@K'wν{Í›ŽÈÿ›9,]©O¬³Þ`ˆåiîêwt‡-Ñ×’TvÁ­HWTݦP×&š!Qm¡w&葹Œfë½j‰’4T¼#ô]OaSbÙm÷’¿ö¬úm’˰÷Ëþs1í¯„VÏcƒ!æ %¹ÓÊ#ÿ¦\`{²?&¬æè‰@ß6’X¥¾B§9aÃ2ÏEJŒ”uÃ3¯¼økTC„UB/}<2Â÷I7Î|æðÖ,_¢ø¢Å°óÄI±L¼¯,Ï(›X¤Ã­bú.Â~ZÂ_sýPKO)­^wvPK¹ V'.javax/naming/ServiceUnavailableException.class}»NÃ@EïÆv &/i¡2‰ÀD4$P”ÆÄýƬ¢EÎ:ZÛQ~†šš*R >€šïAÌZ н£9sgF³ïŸë7X8AÛÅŽ‹] ®‘ gýrÑÏý¶°iÄc°ü㈡íŸø‚ WÓ ÌµTÓKë}©d~Å`ÒGÁP¤*˹Ê#ž”³{†æP*1*f¡ø$!z ½±+š)o–±˜ç2U§fƒ¦…ŽÅ­4þÖâ3ÚŒÊðÓÀàÿ*ÿ3›¡• -y Q>¾»Fºôö±‡Å:e8%§ ­éP4>§»‚õZ64I=²ç°qVÚ½oûqS©v{+Øý=ß%²]®j}PK†ur“PK» V'-javax/naming/SizeLimitExceededException.classu=NÃ@…߯v &!á'4(P è@4$Ecp¿ŽWÑ"{üƒ"zn¨"QpNà ³ Š}£yûÍ‘JV§ ¦Ÿ'‚¡ë窬¸ª"žÖÔ³+†^ •¸®³X7„ÑëÃM û0Žnbˆø0…>â¦ÌHˆ‰Y 2ØÃI†ÆðÀü†¼-Gr²ºI¯nðŒ>ÆÐ\rïDTyS¡™IEÍ’¥©žò)¾ÍU=ÓTïˆÁðé°+ ™ð¹'+¯|†÷Ô*=WIÄXËPõ¡šW :WyÞV+ª¢O08bZ–3ÔPª]Võ9W$Îè Ù,Cݼ¢òTqs•ç—äÕÍ*nÓÿŽÖoÉpXh|éÉÙxléqtj*>ÅP[¢±D45cu,ÆÒ+'©è‚pxhÅ|†O+"OfRáIõ‰ÆPU [²žY§­q=f™ª#n-Š©Hñ§¥dMžÎe¸›¸¹ƒ‹ÆK϶h4¶_Ô•œYcó :Ïù0H•KÃ)ã 7SýW#†Ž³«ÍÐ_A`æRÊ£Z6éÕ M4›åYÚ²fùâ˜/òMmû§e÷h–óñx^‘s+<_P4u9I•qètF覛ì¤vàF#m]t²!\³pñën'~ÕÂô£@c‡¸à†¥Ûnؘa[Äå#}#õF}ãáyä«"Û& ~GjÛGƒrì# í£F 9÷áý$µ3Kh_SæoàÁ[øñA¼G+^‘âúKQ_™¤=4|€ñ,™Æh‡]ôŠx£ôÎ À%}E­‚I%⤽Dêñq©Ä~œ’D‰€Õ¡—Õc˜0‚cM˜`!$X æX;–Y²Zúâ6¼™b;YFÖI)zwÂUÎCÂ;è)I»JÒjé3|¨*Wÿ ÅÅ kÊ¥Ç*JåÒß„wµË¥ ˤ{„7Œò^ù PKßQ8a|PKì V'%javax/naming/event/EventContext.class’ÍNÂ@Çg(REùRü@1ÞL9hÏÊfM0•‹¼˜6¤¶¦lIŸÍƒàC§hi<°Éîìÿ—™ÉÌì~~½€Wp®­øÀøÈép¬Ã‰ N4£õ‚pcØS¾äæŒË‰éªÀ““v7A‘)ùœ¤)–B*³—Û[(!EÐn nuGr_:æ-,J–/ŠK5à³tÅ•ˆÔuœ ¡È¢‘xSy"`¡b{RôÂùP}>œQØžÓ¹gVÿÕµœG†PvzÌff¯@É}îôŸ[é¢ë‡ÁHÜyqpÇë"TÿÆç §b¤êký”ˆÐÌ‹ÌoÁÿŒ#Ý#å ÄÜ_ŠlщPáB±ˆhA‡< lÑÛ7`ªt/Å€lR:GºžÒäóG°C¤B$ÎRHH1CÎ`7Cš°&´“œåoPKsÙbUPKè V''javax/naming/event/NamingListener.class;õo×>f]^vNv.vnF Ÿ¬Ä²Ä ý¼ÄÜ̼týÔ²Ô¼}?0ǵ"9µ $3?Ï$h­ÆÈÀ✟’ÊÈÀï“™—êWš›”Z’˜”†hñÉ,.IÍK-ÒÊÈÀœ_Z”œê– R"ÓÏIÚ⟔•š\ÂÈ *-ÉÌÑÛÓÎÈ ˆÓU5¢y¨Î É(Ê/Ïccz’™YxX@, ÉÄÀPK$ÄR¿¼PKë V'0javax/naming/event/NamespaceChangeListener.classuNÁjÂ@}cBccmü/¥—Zh÷z*bO!‚Š÷Mvˆ fS’ü6~€UÜU¡ÊÀ¼yooæð·ÛÃÁ|=Âë[˜ËVn…–E¦SÁ-ëFD'2±ó×hIpÇ¥bBfš£MsµñÚ(CãäúW&<^Ir˜Õ k®>m(ÁŸ—›*áŸÌzVkcÓ8ç¤!¼ß¾}+‘ðr÷ÑO¯<%+ÅŠÐ?³e{ÅM«BdÊค'¸€ÁþŸ-š}×ô¼#PKÃnûwÌ@PKê V'-javax/naming/event/ObjectChangeListener.classuO1 Â@œÁh4hk)j¡÷Ë Uˆ…bÑ%&Ä Ä|›…ðQâ"XD–™av†}4IJz,dº° BKo Î PK# ÿ® PKê V'-javax/naming/event/NamingExceptionEvent.classR]OA=·Ðn?V@h¡Ý¢%QŸä#Ñ4ÔDìƒoÓ2!Ë,Ùbÿ?ÀMD£1Æg”áît©„šMîÌœ9çÌÝ“ûó××ïÂ}TÌ9˜wpÏÁB„BŽq7Þ])`#éo zûnåõ²‹¸æb·]ÜŨ‹EŒÆË•ú85_è½Z£u Ûf…PLànM‹CÅ7ÛvÙì¶å‘QfÊ\?EKmj›q]´‘ÝØh¢ü¯}¥IxZ(¾¼ØdéB“>¦õ´ô…Kèu©eh‰™U¥•yB^v%'É-EFhÓ~‡Ïôœ0ZWZnw[2Ü-ŸÑ™A‰M^ÔÙƒXDÈ¿ :a[n©Ø)»«¢#aÚû„œüÍæ'÷¤ù;!‚#g„{>¼½c”ßKµ—=av@ì„ÅÿÌ”P'÷¡ÏKwöÃà ÷:ÉP ¿)ÈÑWÏ6PâÁ%)þxJy7…2&»eÑ3ñ_çz“‘*cC¼¼êg¤½¥d>ð‘XŒØ«GHã1òxÈè &á¼}ÈV½/Ȧp¦Ê[ü4)âj¢(ò·–õ>ÁùÔû?ŠŒÅ·¸–0–°§vÚûˆL?uë´ýŸ;§PK¥PÔÅPKí V'(javax/naming/event/EventDirContext.classµS½NÃ0<—Ð@AÐBÙLe€<@ÇR¦¨ A,LNò©¸JpÜ*Ýá¥x agèOJ¤t°ì;ßç»üýóù…ÜàÌEÓEËʼn‹Sm†·Ž?âSî%\½@+!‡Ý &÷$äÅBQ¤S5óâ*zé¥R«4ÉJ2š’ÔÞ ¾È4IRÝë'†÷<Ÿ—¨‡pdÿ9†ê¬ „¶Þýc3Ó­—wziL í¾Ü eç)×·vš¡ÑÏ#zÕ"•ñ/$ &ãÔ#3ÕÒ‰Šè^XÐâq¼jÀÐ,§g8/×6ÛÜ…á²¢Ý"ÃÅÕŠüsÅU•bñLa 58æGŽc ¢n˜C‹ìMÁ¸kÌÞ³¿Ì˜udÎ5üPKÛ7J nPK½ V'-javax/naming/TimeLimitExceededException.classu1NÃ0…Ÿ›¤ÐÒ­„XPa  ‚ 0 X H ˆ¥%‹ÛZ•Qâ ÄA=gagªÄÀ¸wAüŽX@0ø=½çÏÿ/ùíóåöÐv±êb̓kdÁyo}Ü>=®Õ°„E#ƒÕíE ínxÇxs5 :“jzlúê‰TRŸ2Øýt"êýTåš+ñ¸ Ì®¡TâºHF"òQL­7H‹l,.¤ ›C™ˆP&RŸÏÆBLÄÄø½–©Ú7;¶ÍÅZü2ìü þÊÐÌE&y‰,§|sy†*ô ³–Éë”*pÊž>ƒ´FM‡ÜpŽ?‡õ\>hz„>lôJÜûÆ·¨77Uwû7Hã¨i–«V¾PKÑÐ.w˜PK ™ V'com/sun/naming/PK  V'com/sun/naming/internal/PKû V'-com/sun/naming/internal/ResourceManager.class¥X |SåÿšäÞ¦·-ª^RQ°M_Š1€Zjµ/l¡µuŠ—öBiR“,ê†Ísnn:ØÜtNгRW uàd+êÔmÎÍùvOu¾uæœìœ{“4)©c¿Ñ_Îw¿ós¾ó>÷òø'{ö" et”ŠTüPÅ ŠÝ*ö¨xBÅ*þ¢âMo©x[¥,•*å)xRÁS ~®à ÞQð®‚÷¼¯à*ø«‚¿)ø»‚(8¨àŸ >Rð/+ø·‚OR ‘BܘŠÏ¹Q(`&.pc–€I¸ÐŽ0GÀqXéF>.ʆ†¬â¡ë`ЍÕÙ˜ˆ5"ªËÍO~Á­u3Ç:Ý‚nLFHHz\,¸°€ˆ€hf£7Çb½Ü»A„^âÆtô ñF©à.Å/ŽÏËÁÜ8 ›„÷ á½Rx¯º«…ã‹bÇ—DçkDÝkåà:z½†Ü,àVw Ø. _Ã~<ªá1|SÃã¸]ÃÏðwiø%îÐð4Ñð+|[Ã3øš†_ãË~ƒ5<;5¼€ohx·hx ß×ð2vhxßÕð*¶jø¾¥á÷جáøº†? ø“€?cŸ†×p“†×Óȉ¯jäb5HÁTlÓ(÷käÆW4Ê  ÈeÊg…h"¾§Ñ$ܧ‘7h4Y¦ÈAn#d׊‹Šë:BÝ‘Þ`EÐèö×TøƒQ34-f8â—š3¼€0™i×늀ÁdU#a¬~8¶.dtZSÒÎW­5;¢‡¡›£a¾6URoÔ¨¨öv›a#ÊðÙÑigKHWÔX0Xv´X°PPT|~&ÉE5ot0ž™ë‹ÆõA“ õ†;Ìz#h¬1Ã',1:¢¡p_­Ù·`|³)²ü¡Šš`Oo”ï3îr•¯è0®XqFvBíaÌñ+ÇqIžkIw霢Ãc“1\ÿ0éÎÒ#"\Ü»zµå¦âñÉ‹rA&Ú–qðœ ó3àÐÜ4µþKDæŒOû)®—0éš‚LäcÍMàÙÜ…ðãäJ¦>ñÓÙSX7.嘥ç_Uˆ êqøx…/¬ôíýÿn;"£2¥@Óÿwo{Æ8&Uèò®phƒ%B¼šÈŽ1ÒÇ+†²Ìä™e¤duÔbŠ£-<ùêÂŽ€?èžAp-Œ?U¹lÙÊ¦êæÆMUÕ+—ÔÔU¯l¨¬¯&äUÁ`(Zhtt˜‘H!„8ÂŒD`ÔoDMÆ:ªB&!—ýa¡[Œ@/ïO¬‡CáB.NöH¡ÑÓðwX¡fœÝf WûLYœNÙ­÷s®f‚»ú’³G¤Dx3ÚŸ ZM0h†­7ùL?§©º®fñÊeM˪›–·¥vâÁü:Ðlèí^e†—‹ƒ žŒgœÐ9åöfÂ4^[jήnÊèç)cÆN¹cëš-äËGÙÍ}Áh—õwp2N=ÕÓ '1§ÑÙY0»Í`”ãÌž7ƒ,bU(DÃFÁ{ä…Éî:ÂqI˜û¿VÂì# b^Ük8´Új›»Êèèb×d­1ÙÌ£VŽæXâB&WùÄJ Ž“<Úe›Ò$Y"ãm•üÂáNnûlž®¿¨®÷‡CAÛ¯S‡ai¨Û¬ó¯²‡a’ ƒþeákµäå§ãúì —a£ÛŒÊý9²MN¶wV$ì°±‰]e$q–‚å›&òvŒÛ”.#R ³„üøS<5˜<7ŽYZgJA¹º¾¶ƒÀ=À©óGR”óHê•Û¡*—¢çOKEÆ£SÞÁއ„©™NCV÷å:ÍtÈ}$Ê OÏtÖ”÷¬[‰«RaëPQWerrt7&[E*vt ³CÆÌÆ…Iá.ÅÖæ#PiÕÚ8$ÉîÈ')$ÇŽž¸ßâulvô†ýÑ¾Ì v•s¯ÎüÁYšñU:aPzcâÜŦæ©>ж¥[yáß(L;SLJ«ýkzÃcÍž’ihŽýô7ÖxðÇŒŠ‘vè4z*ê$åç¯å‚+ïI±îhÁ$†KÚ‰cÙÇK^`4Óm|€û7NYâ ’Ã ®1­Y » ¹Á·T¨#hÝœ#K²ýfËÎò£„‚R‡£w'Z'%×r„k™{t•Ñqö<·¯h(ý|Îý%i½OY/öq5NæÏÚ©T†?ÁAâÝäòþÁ”½Æû½é{ùÌäç©ò *«|NZû§íU¾"yÍaÙ;q3sîâÝ-p@þ-Q~„émYžìæ6‡'§¹Íéq7·¹™Æ!À ¦°óßå¿„ïî—ïáß½PxuÓäÐ}˜B÷c&=€Ù´'ÓæÑƒ8ƒvño7>KC¨¡=¨£a¬ ‡ÐI{á§}èæµ‡~Œ |vÀu4‚èQÜDa =ŽÛ9wÑ“ØÎëú9XÞ ý Cô ¢_c/¯ûé7xœžÅ“ôž¦çñ½ˆ×è%¼Ëº KäYï9ÓgYs;ÆŒsóÉ€·¤Ô1„ʆ²pRÿ0&µ•íB©se¾Ï¥»8¼óu‡ßYâ÷êê ÎÛÊvÇ  #¿MWwádŸs:t' 8®­ÌÃ*žäËƬ6>+ñ©1ÌÔU¦ž=ˆå:ßwÊ qj Jk Y‚^ºõÐ+Ö]"¾¥5M0'F¿îâèp0÷oWØ„.\ŽM\+…ØÆ‰°´ã(†ïsòÀµÿ!òðwƒƒLõO®£0£‘³þ|"˜ÄR(‹N¬å.±‘×Ëy¿‰C®æóͤáVÊ妹ñ·¸×vãN©iZw£]Ç cF›îÂù»ÀÎÄežÐËåºÓöyN ›¬ËsØÑ¶è²øÍšø_Ó] çŸësÇÐìËÆKO–è¡%ô¨ðåéyz®ÔNÞ¾ª ãSY¡tàcųOÔždY¡»%¨1äY;±ƒËβ€k¿_W9¶Ù ·g³ïĹëÖú2ÇWrp¬—Ó"Z”Œõ8žç#›NGùPÌk)-ÄIt&—X%S/Æ…T…ªÆ¥Tƒk©–˪wR=ÿYf=—Ð2ì¡&.™sñ 5ãZŽ—i^¥V¤|DçQ9¨œTO*ÕR­¤©tÍæµˆVÑ)ÔÉzU¦åÇsøA¼õ¾Æ­ÄÅëU;1·Î{¹ÉTëõ(VYM®·Úì Yó1Ô{K s%èNiX JG[j£Î²QÇ”À]Ƙr˜³€3ëL;íò,^»§]í GÉÞ;íôÁÇÑ;Úù›¸ŸYÝK¹T.“ÿjæq ;ôZã:œ‚ë17ðpÚŒ%ìèZÜ„F|-cÕRyb®µêê>ëšÄxbùjIéþ} ¥û·g±ªõhåf7“ùuàæ¤ùr‘€Ö³{7 —ú0™6B§Ë0‡.G }§Ð&,¤«x¶^‰¥ôEÔÓ—øw Zym§kñ9ºÑõ¸˜×õt·ÃÍÜ¿Âesnfy©.{±ø‹HD#`ûçœÚ¬…1LòîDý´¹wÃéØq5Ñ4Þq"¾µ#©éTÉ ú˜'οyv~šB?N˜ÀûlÜ—}‡CòÇÏouõ1´—îF³ˆ˜Þà-“"qH¦Lò–•ÈÎn1ó¸¥ÖnA……²²É[fço2¤p•ÊxæŽ;G_¤æò½Á*¾ •Þ‚‡Þfg¾ƒcé]î5ïp¯yú>ÑXÉ4]ô:»aÄzïü)眼Rñ3¿Û=„©ÿPK5‰zF PKû V'8com/sun/naming/internal/ResourceManager$FactoryKey.class•TÏOAþfwËÒº¶¨…¶ H ­à­ÄƒDbQc &ž– ,ÙîÖÝ­¡ŠÜ—4‘j<½xð2¾ÙVÅ’&x˜yoÞ¾÷}o¾™Ù??Š›¸­£ £¨£¤£¬£¢ãV &b`HJo2†19©˜’Ëi¹œŽBAJNW Ì#c «È9k` iëX4°%5_Øf(ä uÓm–ý¶SvxÓrÊ–ÏávyWx¾å:÷…Ý^•a–rø+^¶9¥Õlîûu—ï‡ßm—a'?ì‰ðݶgŠîðá-mq3p½ÎÑ©ŽFMåÏ|z´w$Ì Zx>o1U%ÿئåXÁ­æî †Ø_cÛq„Ÿ!Q·ñ°ÝÜÞS¾gSvzd“ç馇¶´&sˆ³·, mtœàP–É0ÎMSøþR…aå‚*1¬ÿ¿ž Ë:Q’K¼ls›´Hˆ æRÖqpfãÔò!÷ûRN CöŒ(Âl{VйwlŠV@ÿô%#>{€«·<·µËmTèºjÍŠ¼•¡GW”¬ŒÎcŽnüUò‡ÀLñ#ôâ'Œ÷péñ·ÐžK§H¼§< q$!ïzX«Xš’ 18Ù¤’Ĥ2…4ÅÇéyd S¢KF6Rü€ø;rúc2¨XÂ=¥A;ªdï–¾A9ADí–¾BÙ¡òÄ*b¯±(Áhƒœt¿#ù;ÒCôºJÝkÝ?lý†ÓЕD• 5œENÉaE™Ã&ùL>àÿñˆ³Åír?4=„«¾èmcJn„ú.c¬ü—HkÈüPK¬OsxPKý V'+com/sun/naming/internal/VersionHelper.classVÛsUÿ-I³ilHI/´ È¥Mi.  !¥)!­M(ÔºM–²ìÖ͆›w//Ž—gÀqƧ¾‚Ì€#ƒOÎø—øà£ÏâïlÒ² )Ó´ù¾|—ó]~çÛ³ç¯ÿ~†ñ• ü" ²J— nAZñx¡x1ëżïzazQöÂò¢âÅE/.yqYF^ÆWe¼'ã}ÈøPÆG2>–ñ‰ŒOe|&ãšÝöa=">ô"êC¢­èÀ¡Û)È.BØ- / Ã+BÜ#ĽÂúªi$.HÒfüx£~óCŘ:ùa`ÚÏ1âÇ8àÇ—xM‚k œ”§òF)Z®èQ])iú\TÓ-ÕÔ•btZ5Ëš¡©ÅyÕÜ/¡‡¾ç•‹J´¨Ð-^TÊ唡lÛÚ:ÛÄìy5o=£ÎX&ì·sOÛô´„Ð@øL3ŸÐ@²iÈý’¿›zÝ7ÐXãþg½k4#šÔç+µªRbŒcÏ,®5¸\ˆË‹ ¥m–Ð+%ÕT,¢fWúlý¢ÄðÀÊ+Úº¼¯£Ã†\‹~̵¹™¾†·®ZÑS)®iâµ Í’ï}þòç”íÉ5]³JðŒÔ~¬‰O¤³S©™ÑX<;1•Ld¸¹q£ JX7ô²¥èÖ´R¬P–¤33lA‚/q9¯Î àË$vW2Ì&c©-q*[‹–“пâoOiºš®”fU3«Ì™00qx<Ï:Kk™œš˜$÷“O'$¦ªµg²±lÂéèË3¯Žjv :ÍL;:39•Mžö`]úˆKBGÓgç ‰¢ZRu‹ý°Û‰TÛ‰,¶©‹·sçŠ=wqìV‘„VµZEŒuÈg “› Í©wÊR/[ŽÑái@ý8»3JjJ›­97\¨õ‚6i ji*·°½^w…HP3¥–m cåŵ~‡–ËÚ(ž0‹1ÓT¸$@©¡àÕç”òqÃT³ÆUŒŠç\ÍÐ!`^¦ —#³(¡×©=«ä-üɳ5ÓXÎ*¦XSh]×ÌjØÇÏÒfF޶EøúšÙXNdþÂKîvšçMã¢Fp«åvUMªáxÕA¿Á¶”Õ|ÅÔ¬+‘IS»È9œS ±¼xhjýÛçÏÄÒ£Ämhxd%llФ kÔ¨èÇ¢Ž§.m ñ,¬SUG»V§}2WЍ’Z`+Ž0~çÑUÃ1Z±´b-„½±ÚUÑsà©mZ(rëíÚŒJX_§.”ùhŠdÉÞZ$Œ5ÚtõRÒ>…òÜ«VvNReæuo⛺›÷„VøÄ{—¿ºÅ‹™¼'…„7ÄÍ‚¼§ò*Êo9då3ÙMù´Cn¡<å=”'²ŒÕðâ8R3ÉûÌ:FŸóÒ]„òCôä\A&ç®ÎäZ‚활'øB&'™œ7èËäž`[æ.¶×ü†þ“Á M[Iïað1:eî“¿"ü'ºƒÞz½|r®;¬bÆYCëšå}¤‹µœd _c3éVVÔ6 °Ò~F<„Aúõc¶ó¦Ó1„Mä[x=ÛF>ˆ(5ýŒ|€ßƒØƒCÁaþŠñï0Žàuæ<À¬qÞŠŽ2ó¿Ç¸ã܇cxIÖ2ÆjR8K®12ÄMªŠ/V|ˆËÞà}l¼#n‚vÉ[¹žÅ~,ç\ðsL(¸Æä‚Ÿg ‚_@‚k2âòH¾~YÂ*;ÉŒ'“W /ÇD›S°>ðÝǦã hÚ~üßÊïÀÍ'ÿÝÃ÷+íÚã^@ÇpÈ=rßöÇèÉ\sK!÷ð£_žü3üè!z÷µ¸öxÐÙÓò<@on8äÙu/e®y¤§§…~÷´Ü^jj^ ý†³ú-§ö;tâ{l ߊˆö ìÆlî˾ɩºÅ5?±í[0ñóRc븺ÄHUôúl˜há\Ün/ã–pˆ?¥“0]çž85Â'UÓxW'3HÜ51ÓoÿPK•‘Ýà© PK V'0com/sun/naming/internal/FactoryEnumeration.classuT[OAþÆݲ¬ ÈÅõŠâ¥´… Þ[D¡‚%&ðäPX²%»[E„o&Æ'}R4Ñ’H"^ÞüQÆ3«@µ˜Éž3ûÍw¾9çÌÎþøùé3bèÃDý d \470dà²aW \50bÂ@—‰ö™0µIÀ6шý&84’ÄAýzH¯Ö³#šÒ­ŽZ$B›”… HZ¸„SFÑcáÎXC¯…q¤-\Ç1 7pÜBçbÉÞ"C{²wrY<YW¨Åìí¹eY óÿÂwCßQ‹ù(æ^dg:’ÅC3Éz´^l´²° }¢wî@/ê]:’õh|_->½ä{Åœ+óµ!•Ðq³÷HÉó#<>ä('fh.¥¼°[”J2ºöþ„B…Ž%¡¼àÍKslµ$WBÇSC׸ÐzÆT¥,}¡Ñ~½£6¶L:JNUÊsÒŸÖé0´Õ§BŠw½Š_’ãŽfÄÅÊŠTó ©’WΕU¢LUfJ_ 7[¿%C£teYªp$d0–DpËóI«e»%W”o÷6Rt]¹(Ü‘¨è­šþ¦lÕO+5”=ÿž ØÎG¹É­)˜á †V7뚊\z“’ï\¢¸’«¤ÏW¼€Ö¬@†cÛ¥ê×;žD%ÐÜÀyL.z¿s ò,a€n„` úÈ£Ýò1zúÃiš‰@Kj M©ØG´¦ÒÑùž †³dÛèâèGèºõ¡9 Íáä …3òí©ûU´¿„{Îßn©Ä#ÎM²ôPE²v4D)¾ÐQ·2ß´KÍÊ,¿OyTÑ’ã6ÿ þM6Ÿ|JúÍ¿€W±'Ç5ÛÖ¶•ÏWѦÓïr ë0gÖ‘˜iÛµË&rskØ‹Ûq»¡Š½v|£†ÅþÏÊ|ߘÊ|£–¥1I#y?ÊûÍê&¨K –ÄBz¨áiúý¤©Oç§ÆQÜeLá 0Œ%\…‡REHyBŒ§ôzF¤ÄIפç|tlƒ¿PK€åOä=PK V'-com/sun/naming/internal/VersionHelper11.classWiwU~¦ “„©-¡uZ@ ¤iH(®@EÙZJÓ‚ ‹·irÛ&3u2A*ˆ (‹‚+.èQñ ~,EÛ{„ozŽ¿Åß >w2i“8=9sï}ßû¼û{gnþþ÷÷Û¨Å&\óá}Îúp·|øÒ‡«*ÞPa«È©pT|¨â¼Š *.ª¸¤â#«¸¬âŠŠOT|ªâ3Ÿ«ø"à—ƒ†Çh”Ã294Ë!€'ü„<)ɧðái?‡­rØ@¶ð ºåê™Z°CÏð°ðœÄí”6vðvKrK±Wêë `9z5¼Œ¸ŽÈá˜×5dqXƒ‰„ ÃÆå—ä[èÓp /j8~ oã†3Òð.ŽkxG5\•¸¯Öð5R¾‘ßây„:âÇõz,£›£±Ý=—‹[zZØÛ4—í%Û0GÉ^UƶÅHF¤œØ€pƬ4·.nç#;h[ãÂv ‘ãVm¨ãˆ‚–PDZjz[B}Uím Uz¸ýn˜'iX±>s<ï+ô,…ûïö»—Š“1SÏ’Œ ºÓ^3Ÿ¶î–ImJµ>ÎÀ·Wõ¹#´x×ß[r…ñ*¸yã‘EwåGFÜ2·Tƒ³Nëªñ½Ê™Â‰ŠSº» ê)¯ÔS÷¿O:ž«"yì.Ü}[5ªG†íëNe Ópv(XÒí-êv[i¡ °÷dJŒË^È)ÐúLSØ®A²1n˜b0Ÿö!}8Cô²*N«ÕkÅý|¬?8tà`‚æ†JRIWVÞN‰CZò'&LgL8FЇöˆ°sôpŸÈðàuuE¥nÊ‹ –W=v>=•¹\ûfÆ« 3ÍEJÚjWð`a!ÅÚ¥X{AŒ”l0{íÌ;9eec¹¼Y¦…s\¹…X°nëûÃÁ%õ !Y;…ö?áçxZ°v&o¡=‘¬›Â:—¿Nòk üu‰il¤Š¨;z“ëЋýhâJ§ö ¼YkÉÝÈ'D;èG;9÷’·èÇjb^ž÷,Ìh¤gð  ×þ†ÈMR}ðöD©ëQjŽ2¢ uÔ¸r«\)fe ±Éy‰%.wí|Fx§òð[¨«†s0Ìà'ãsX–ìœÆ†´Þqeêùk,Ó²ÚÓœÀ>ÏÛœå^RisŠÏ›òpïÒZçî 2‹ŽÈ_¨W&çМŒÌbË Ú¦°ykƒõ Kú²v]ƒsÐ’›f°rò(-H½[ù+æ7ÌŒ‚—;à­~Gê{^c@+~DŒófüDôulÃÏĜĀçÍÆ&½Ùþ‘o¥+³Åo`éÑp®LNaÍí?°| vÇ #­¤[·L#œ8W«´ÊÍëÿý‘þøYÏ&=ž$œeoãÎy>È9OÄE^ª/ñ®üïÆ—±†¬Ç'èâÜÏ(3AÏ·§YYfVna²æ#÷óW´tý?Åç4¹o3ò3\ŸÁOKuÈ^YÒ™Fgem®òy=ì뛃?9ƒ•è_8^ï›VRÒ¿úNÙ7Ð.¼êL¾]3/xB1ÏD# ïs#,ptA¼ÐÙ[)ºñt—¨‘¶“žš½^±GbA›Cc²s«îÌ! ‰}²zpS¹âB¢zè_/•õc%›àU×ßÒqu_ ^sÑ5sFØØ~·ÕƒÿPKŒ¾`u PK V':com/sun/naming/internal/VersionHelper11$RClassLoader.classTYOÔPþî,jVqDvfÊæ‚¨ !I“‘DíÌ\‡B¹%mùþ }â£ðÕ?â¿PÏ­#Îfbš{îéw¾³ÜÓ{úíǧ1ŠY£ ÆL(˜T0¥`ZÁu7ÜTBDE-*ZUÔ£MEÚUÐ!Eg‰Ëú•⚆\Ñ £KÃ8®j¸…n 3èÑpI†ŽX|iËØ3tËy}eÓ±_‹Ï2DË,iñ¬§?äÞ¦#s0_e˜‰•pe¶ˆ2»Q Å«!†ÁRß´ç˜"_Fœ· ×%^[-垪ÿF÷ôÇ©¥šÑ†jx=­EŒÄ6*¢Qκ;¦0½{ ¡y;ÇÔûûY¾ë™¶p´E!¸ãûszm\2_.ìd¸³"{J„”o\²wÈ9mœ,_0¥­u•;.ÅyÀ­]îLLŒÉܤ¢†z#›å®;0Î0œµwt· taìÐ9tSx܆¥WÄb˜þOæ@y…‘<÷V ‡äù9©¦Ø³·©äÆŠ¦Ñ§ª@þÄé©À—moÁ.ˆ\IÔÊ¢eñ¼aÍùç,¡4U^"†dõ ]¤ê²†ô¨ª¼ó_÷™¡Á¢R‹§ÐÎõ¹Â>Ýô‚cÑìhö@SƒCš|ëG!¤%Ю&Ži%? ùÏ&y‰æH‘Gšf5E( !±¥_†PiMï =‘L¼GstòM‡k¾°¨DNÞþüþáõä1.œ’Íô„‹ñ»¡|FïÏi½ ‹ém„õ‚cЯVz…(so1³¬@f®K$Ðxx^míÀ“¯€ü_½öÉ.O>ý ²I¯‡’é#\:Cðpyô¿"üšÔÎ>]û[¹ìP=õþžðsÉœ}>²EËB ¶É&Ð ›ð]b¹Ôï½²zâ¤È2$;~PK³,²ÃDPK V'/com/sun/naming/internal/VersionHelper11$1.class‘I/AÇÿ5[Ó†±ïdFB›3q‘ÆaD­¦½˜’îjéEÆ7²&\HH¸ûPâuk$}r¨ÿ[ò{KU}|¾¼!eÌ30i`ÊÀ´‰zLγô–Ѿ2f` Œ.ÖvÏä…´©O­ýöÙáš@~±v˜è±@i]in6½(ïhMþ¦#ƒ€Ê®ÒÔŒÜ6ù²í0`¶¼È·iKÅAoëR‡ •ÍÃÉ”§·É9'¿^_‰' mÇ ­Ùžk‘¶´to£tH¾–Ž•)[¨ ìy>WUR¯áK:䳨&©(TŽÕôZ‘ÝIéFצó{ ÌÇH÷gv31 ¹äËo  ©Ë­úb“–c•ß3ǧ Ä‡–ãöæ8+Ø—žQ|d‡÷J 8y…a ÉrH ¦’˜O¾gG9ŦӾ¹ü]†»føwÃÊŸrÕd çù£g”Þ3ô-ëì/ýw«'ôŽ[ Å#1‚ [3…á/PKÛDIº‚˜PK V'-com/sun/naming/internal/VersionHelper12.class•WmSU~–$\XVhK)E ­ö-$@߰Т”BK /’¶Új—ä–nÝìâÕjBuÆ/:ý ýâ‡ê(02V¾9ãoñ7¨çn¶a ˜É9¹çžç¼Ü{ÎÍáï‰:ñÃm•a–!Ëcà wæî2î3<`X`Xdø„áS†Ï2ïh¦A;¡hÇu MÑŽ>…´ciÆ\¿vÉÃ$'X"šÊšù¤]0’†š§­¤f8Ü2T=y[6y¸Ìõynõœèß©úŒ„¡ÊÕ‹1MO…<·T7=á´³r+3B¿/Z~Šý›OÀ;ÍLŽó‡¤\ÍÓ¹«L^Æ6)zwµ•¯…WÑO¸ÌŸ¥{°[#çÑÊ3:ºµ®/ɲÌô|%Ôá ¹W”w’צS„> µEîAQönß&¿óÈ™x>åámž-Xš³˜œ²´ûšÎçxn0[,VjröÏ:>·°Ro‡Œ–áö!{Zêsš¡9ÔõCfŽKKžm ʨapËpZîóU¯F%4¤4ƒOò³ÜºªÎêd&25=9•&si³`eùˆ&„µéEùË-+aoYv‰%Hô44¾V5j6ËmûH÷úתàŠÚ_Âñ Ÿ êŸ 5…÷Šuwb÷ätOí@÷ôtÏH¨Tw«¢Præz=K`wL‹ž7*ƒ¦9î ™dnÁñÕ"H^ª>ªZ^¡:¸læyJ›-z°[ˆœ6e™äßÑDa6l”-J¨#Éúª‘VÓÜvKqÐ~eIñIí¢¿ô¢íð¼Ú#*Ež+Zºf郖¥ K¥‡tÒjcÀóJQ•u#eØŸ•É'LgÄ,9Ÿ‹]å-!¡½ÔÕãªN§›ç9jo¦y‹¶-½;ƒn?‰;±L]wûeû÷Ìç¤)ð×™Žs]ZBðŽ£ÎàF ÛQ,G7ÍQ@Ÿ*1üÐ7…>4L‘$MßbÞ¾[ƾXè7ýÙÕ~h= q ±0Œ8 q4×}€wH_àÚHGà"±_qô§¤ÚÆ1ñWƒqÁ´¯±Ö N6" ¶²ÐêWQ“YFó ®áµ%¤ìÚû‘¦ÊˆçqÉÃÅ)l±Ó°ŠêL|m.°®øˆÂ{HÜÀ9ø„¦Ô0ñ‹"§o‘^¬"œ¡ƒiq-4¥â á/hùÆCϱ'ѧuÛ‰%I? ImbóÙÿ$Ö½u¡Žh†Âœ¡S¼EÓìMìÇ] )µÒ=FãiœÂï%~&éš8¿9•P¦uûÝ@ÊSIQ*cÄ?ÆLP"âòv­"’‰'–Ñ|…d·0ìÝÓmBFˆGWÁ\äZÃÞ‰ç¨ï ·„—px òŸ«¨ÍÄ:—ñú ÷ŽvÑàÞèYn§T§ôù†¬M{Oiï;šê¿§½g¸J;aÒÓýc\öüF)^±[›ãñpbo”GÛM‘õ”ðõÄSîEüAÏÊ¡Å;ëƒ ·ã¬—@"Ýfá¶O@µ„Wp|"îÜ`¦Ø ÉÜ0etÉ5WMFêiUE× ¢7pxårky[N‚G<^íqæñ‹w®ÿPK-¶8åOŠ PK V'/com/sun/naming/internal/VersionHelper12$1.classQMoÓ@}Ó|˜8.)iø ´PRêD“\ƒP"RÔ˜º*NŽ» [9ëj½ŽÈ¿*Uˆ?€…‡ZàP[3ã}~oæiçç¯ï?PÀS¸6,lZxhaËÂc - Û6Šp* ¬Ú(ãz…©5 Üpp<ºƒÜ"4Üöð8œ…^ª‰7‹Èô ·}H(ºƒ¼™°þá¶£d꥙òT8eēʭÂػԄ°s%^·Gh_‘Ùêªa|ðÙÌ k_,¡yÁ²ˆ2-Íüõ§HœntIÌS#¦„”.¹ž¯åŒ/h"Ž^E4q.͸%ñœ]äµ[õ|Á\›ÈŸŽc+¸É_[\sÄî|ŵNó ªŸùD¸Ã¹Ì.u¼}¬qÎU}Öäÿjg¨tÎQí}ƒ}úžN ÃoiÙ¢Î&€=Ž£>VñŽ¥÷6îãv>˜™…Å€úoPK'yA‹µËPK V'/com/sun/naming/internal/VersionHelper12$2.classRmkA~6‰¹æ¼˜ZãkµjšDëµ~­(R…`…HAt³Ò-—½²»WÌ¿ª XüàðG‰³×J±ŸrËÌÞ>ó<3û2¿ÿüü…*Vp/ÂKnE¸a9˜gc$1ΠÙ@ç´q>Áu\Hpó îâ²@»ÛìÊ}™fÒŒÓÍÑ.)¿.på\x¥om¾GÖkrªv{[»•ORW˜Ôȉf­6ž¬‘YºEÖéܼ¢ŒEk×}evú‡À¯?ÑFû§µ|›ø¯!»‘IçÈ ôfÎ&ÐhCoŠÉˆì;9Ê8Y<Ì «è¥‹Æpjüy­ø2N©…+˜“J‘s5û3Öå-ÎÈì0·9&rÇó§_D`ñ’*¬öÓ_íyNõŸ`8už&K%䎹ü„zŸÏ;¦íçêHSµûºßÑ®³ŠUn‘*7Lm!´Ï×¾ [›± .òß2ωû?õ|Gü•WÜ0ìƒøx¬è Å>¨ž±&ÄZ‡h¼ïC\;Äœ8(ÁZ9ŽR\âv>±}fL¢šP,¿Zne‘\œÙ•²ÈÂ_PK÷MIX·PK V'/com/sun/naming/internal/VersionHelper12$3.classQÛNÛ@=›¤qâšô ”KI(˜¶©*!¤ªH*Rñ¾1£°ÈY£õ:E%.ý€~TŬSU4ðP?ÌÙ=3gvŽç×ïÛŸ(b o<ÌyXððÖâ|ŸSO«( pa"@µó˜ °ŒçVðB`¦ÙÚ;•CÆR÷ÃÞ)E¶#Pl¶ŽV›÷r;±LÓÎ=¢kÒýŽ+l5áG”JÂ]}–YfI¸uù“ÒÊ~(í$Ç$ìjM&ïN©@mOiÚÏ=2ße/æ‚©CÔ¾'àw“ÌDôE9Uµ{®í Y±É#2©JôWŠÏȼÿ°éÄkQ2ÓL‡Z¸C¨´%£eŽ•³¿ÿ¬l|˜î“=¤4e;Ùf[c&Ç»ÀBN¥eFÙóð›QCöÒ§ãíÈò+¼“q|2”qƒmUòD„-^p œa¬»ÅòùÜWw»þ{+äÌ$ã4ŸÖ‹Œµö Êíõ+TÚï®PýÁ”À,Ç2#`ÿˆ–ðŒ£“6XêrAû’U—¨^ûøGWÁk^æ¾Æ £Ïla4ÔPKæÖõu£¹PK V'/com/sun/naming/internal/VersionHelper12$4.classS[OQþ-ÝvYKo "Bo²rñ ‚J4’ Ô`xÜnOË’íÙæìÙÆ¾•xû7Õ(I|5ñGg[Œ‚}`7gæÌì7óÍœ=óó×·ïˆà*îÅ1Ç “L Óf4Ìj¸®á††›ni¸­#ŽA1 éÐÛâ´ŽœI gCó\Qœ×‘À°+¸Š1ƒò_6p £æ‘1p ,„»E\bH¥3+[VÝ2]KTÌÕâ·ÕÜQwAIGTÈIgÖÆÓÿ‡t„x;óÇ>Êe. >Ð N…Åæá¨†è’Wâ Æ²\.¹–ïsŸ¡wÅüiP-rùÌ*ºHv*F/x´ù#'D$ ¡6¹rl:”u.}ǹ[ãrjz2 &V«Vã¢Ä0a{UÓ„)¬*¥2¡¸–k‰cÈ96ËÐSájMzd«ÕrNnzÕ°½VñŽg¶Kú×\µ@QKܪ2ôÿíòá ›×Q0ôý‰‡\íã`ìüc¾âÄ3Òrùܤ£æštêTJ…—îÛmʈëIÊ€ö Ÿ×,i)rÅ•÷‡Ï¨[îX™Âèh¨)Ì€¯–éGiè;­dxIç>]´è¦“§Ý(éУgwq"›ûŠÔ'²Ò$c¤—q s!FmÓ FH/&ÙN­ä~ ›5÷¡oäö0°‹ÞÏHî /ÙE¢½Í~AŠÔúŸì#¶‘ßÅÉæsÖlÌÓ«Pfi0W´^ý²¶©…·Æ;L“žÁ{B ±üHeg[íä16@¢­B“¿PK|ÙØ_*PK V'/com/sun/naming/internal/VersionHelper12$5.classR]kA=“¤Ùf³mê¶±~´~F›¤ÕUÁ§ˆPJÅB°b¤ï›Í%NÙÌ–ÙÙ`þˆ¨ÀW«âƒ¯‚?J¼“”jöž¹ç~̹»÷×ïï?Ç4\upÍÁM5·Üv1ÏE Ö,–CÅš%Uø®cÅà kê¸ä¡Ë+õFû0†Aª~°ß=¤È´òõÆÀV}&¶‡iÚNÂéÖ Ý1Zª~˦oÖÏà'Tfdìªl@:42Q|Eñ‘TÒ<(ì$=pw_Gtdƒ©€·§éñ•Än¥-=Ë]Ò/ÃnÌÙ«ÿP&àÿ-‚›w’LGôDÚÚRg¤Ì+22âùH§|çSŠHßp× lDÉ H3¨pÀ© iÆÁ©tÆfÖòT}2/(Ká©|v;£ÔÐ`†\«—I°·?ý Õ3§X:ýïXú˜J)Ê´4£à¹–CžºO½i»íhÒ4¯3¶Åa×¢X`Þx Â=^š9pˆÑ·{ÂçuØÇ·«3õrüV±ÌxžOŒyÆJó+œææ1ÜæÖ1ÊŸ˜¸È¶È¼9)f¥8wRºÍhcëÍÏpb¡ü ¥X´„õ¾`þã´‘Ïë]À[”ñŽý÷Xãó*óŽç¹ÕÚXÛ\`t™ËM´ÿPKçHÿoì<PK V'/com/sun/naming/internal/VersionHelper12$6.classePMKÃ@}kµÑµÖïï‹+hÔƒE‚(Z¼o“¡Ý’nd³û‡Ä£^T<øüQâ$*h½Ì›};oÞ̼¼¾¡€-¬8˜u°à`ÑÁ’‹ »ÌdÁõ0qsó0Q…J­#o¤IÝò«‘L’Z,C2Óþ.š ì?ºÑ6$C¦ •+â¡ÒÊ Vã¼3­Éä})˜¨)Mçi·I¦!›¸õ85¨ì1RïiÛ&«¶¹"“¨XŸRtMfwo;ó¨q×ORíkÙU쯴%£eä÷•¯ï Œ©1¤í׌3-²Õ˜·öצ¥þ-ÿP?êÕœJˆ›*Ûó/ºá¡[–ù&ÕØà“óþ#²{3–8[aV0m>cè‘2ÇbNÞaȹex3ÁÚ·ÀyAñ ÎCŸäžûNå.3˜dt¿Ëò'PK.‰kwU PK V'Dcom/sun/naming/internal/VersionHelper12$InputStreamEnumeration.class¥T[OQþ-ݶ¬\ ‚ÈEDÔ¶ DQŠ$X1’`5©!Á·e9¡K¶gÉ^ü/<@"BõILü}ðÁK|1ñç,µ@ †Mvæìœ™o¾™ÙsÞÿÙz®aTAJAŸ‚~7 )¸¥àvAÄ¢IQú(*Ñ%ÿ³R4JÑ!qNŠf)ΫèD«T ࢊëhQ1ˆ6Ãr•F\Å®¨¸ƒCC<19¯-j)Ss©G3ó\wÓ xbÊ—O¦ã“ºUH9žH ­`›!\n ÍLMqÛ1,ñ€› Üîèš ž›sm®Æ…Wà¶æÒvº˜Âs 3uÐÎ9=öÔÿ ¤a"Qã{›×=Ûp—SmcÑ0ùŸÓÖq¸U¡Cî(C0cÍruBngLÍq¸ÃÐx4o†Ä‰93ÔL‚g½Â ·Ÿh3&e‰E¥éØ>Gs–gëü¾!c#¹eáæ¹kè4ÿ²d½!¬é:wœ®>†JÝ´ŠºzBºTÙIG:Ä0zºñS»g­ý91TÏq7Ë—Üq“¸p”¼æ<´l* ¦¸*nÑljË{ÈÐ~øóÛ±„k[¦Ém†Žýg­œ§ç‹pãK:_Ø£äc,ý«(ë«Cœƒ‚2T‰ƒDCnÞðôlÓAæ ˆ?é˜<°´î†|bòä’®g™t˜ÞNòg¸D«{dnHn œì^Gm’­£&Ù³Žº5²Ó I¶.°Ct¥ìГ@[¨Æ+ÔÓw˜n¤vB’ˆmÃHW&_ nµò›ER ½h-Rhö¿é]+sþMˆtÝâÄSZÕmTLÛè&ªöáå}ì“·dôYȨ»d—QíĦf•Á•$Ū²D2¼ƒxŽ`p¥„£TïGªðêð™vn”ðö«{‰3+e„¿.ÎPjIªEº>ÛK8éw·{u¡é DÞ”©¯ÀWÊû *¾SÞÔÙŸ´›.Ì]]ÞÙ_”+é¹]~!~Ã.û6ÿGø PKg²EÍ=PK V'/com/sun/naming/internal/VersionHelper12$7.class¥SÝNAþ†B—nWÀ­‚VÅ*ý–rã†hšIŠ«½Û.:dw¶™%ð*¾·˜øa¼2Š>¯¢žm+!„ ’n²çœùÎß7gÏýùü ,`ÙÀ-· Ì((¨¸c`ÁÄÆMŠ™Hcc‘1‘Äd C˜²0‹œ….[(â’…Ed-ؘ¶PÅ5†\±ÔØqv[öšìDº©wü†©ÿÏ‘ÛöFk‡»šàD±´Ù•¯^nàÛa$méø‚Â„Ô\Idz7¹ E q¯ÃUu¹p¢v]F>WŽ&÷J¿E¤…gŸÄjƒ×&žÉ{B ½Ê0\ ¶8ƒµ&%W5Ï C2dÏNe¸?hs†ñ†üqä·¸zæ´Ut1 èãº< K óç¤ÃP:/ñ» «ƒ]’îØvÂõ@ñºÇ}.5Mtòx™6ê{.ïôâ&N/}‰.$¹¶Ÿ?m0ä»Ç»‘zß~¢Ä.i›o=p{%¦Ï\†´ä{ºßŸFt¸ì¥%U$u[„…*–èwƒAo&^~ÒsˆŸ!zg1Cú Ys¤cÄ,@ª\y‡±7tb¸N2IøÖÏcT3K2ÎrIǾÊfÊo1öæ'X _‘| ‡/8†Ó ¯ÿþf‡” Y ÷Ëç‰ðÐd‘ç'rdç +áѺѥ{WIgÈJPf¾BþPK+ÐâO(.PK V' META-INF/þÊPK V'P4ÇöJä=META-INF/MANIFEST.MFPK ç V' Éjavax/naming/PK‰ V'ëh[Ž“*ôjavax/naming/AuthenticationException.classPK¯ V'…{‹*ijavax/naming/NamingSecurityException.classPK­ V'oaéÝ  "×javax/naming/NamingException.classPK¥ V'&Pžú£uG javax/naming/Name.classPK› V'°´-Ð…'/ javax/naming/InvalidNameException.classPK’ V'1pˆÑ3 ›javax/naming/CompositeName.classPK¨ V'àDѸðö&ºjavax/naming/NameImpl.classPK¨ V'=6¶˜ì%ó*javax/naming/NameImplEnumerator.classPK‹ V' &*«62-javax/naming/AuthenticationNotSupportedException.classPK V'Ý-dÅ<À.javax/naming/Binding.classPK© V'jàéÂi Í1javax/naming/NameClassPair.classPKŽ V'•_¹–¶j Ý4javax/naming/BinaryRefAddr.classPKµ V'0Üœbá8javax/naming/RefAddr.classPK V'å=˜Ÿ‰)Å;javax/naming/CannotProceedException.classPK• V'¢pSJïÙ »>javax/naming/Context.classPK × V'òBjavax/naming/spi/PKÕ V'YÙÔºè h $!Cjavax/naming/spi/NamingManager.classPKÚ V'Í3–ÐF+[Qjavax/naming/spi/ObjectFactoryBuilder.classPKÜ V'ókØT3„Rjavax/naming/spi/InitialContextFactoryBuilder.classPKØ V'^Q‹ÕH$½Sjavax/naming/spi/ObjectFactory.classPKÝ V'‹wÈ1Õ€äTjavax/naming/spi/Resolver.classPKÛ V'+Ž”½É*,Vjavax/naming/spi/InitialContextFactory.classPKá V'넹ˆ|ÿ*)Wjavax/naming/spi/ContinuationContext.classPKä V'Æb†!ÕL#ý]javax/naming/spi/StateFactory.classPKà V'9tž_$#_javax/naming/spi/ResolveResult.classPK× V'FZ¸%æ'ubjavax/naming/spi/DirectoryManager.classPKæ V'xw¥:&°hjavax/naming/spi/DirStateFactory.classPKæ V'¿÷øk¡- jjavax/naming/spi/DirStateFactory$Result.classPKã V'^\Fê¬-ækjavax/naming/spi/ContinuationDirContext.classPKã V'ÄàFº]®)+ujavax/naming/spi/DirContextNamePair.classPKã V'—¬b¬+ßvjavax/naming/spi/DirContextStringPair.classPKå V'£±‹­ò—'šxjavax/naming/spi/DirObjectFactory.classPK¬ V'¶èÂ}áW$áyjavax/naming/NamingEnumeration.classPK« V'Á¶Ãrµþ{javax/naming/NameParser.classPK V'QÇŽx‰)|javax/naming/CommunicationException.classPK“ V'÷B°]Ú‚}javax/naming/CompoundName.classPK” V'^ÿ܉)©„javax/naming/ConfigurationException.classPK– V'I匾+†javax/naming/ContextNotEmptyException.classPK˜ V'c„—hä!Їjavax/naming/InitialContext.classPK° V'—aêl,½javax/naming/NoInitialContextException.classPK¶ V'³cA‰ 4‘javax/naming/Reference.classPK· V'«lHJ°þ ——javax/naming/Referenceable.classPK¼ V'N“'„>ä •˜javax/naming/StringRefAddr.classPK ø V'!šjavax/naming/ldap/PKï V'ÏËY€$#Qšjavax/naming/ldap/LdapContext.classPKñ V'.ÇCŽÏ("œjavax/naming/ldap/ExtendedResponse.classPKð V'KÏä!—'Gjavax/naming/ldap/ExtendedRequest.classPKò V'H…|`£žjavax/naming/ldap/Control.classPKó V'âMúã¶#õŸjavax/naming/ldap/HasControls.classPKô V'áAØ&ü javax/naming/ldap/ControlFactory.classPKõ V'»Á•oŸ-j£javax/naming/ldap/LdapReferralException.classPKö V'äC”2å*4¥javax/naming/ldap/InitialLdapContext.classPK÷ V' ü—Cìb/‘©javax/naming/ldap/UnsolicitedNotification.classPKø V'œèo¨Z4Úªjavax/naming/ldap/UnsolicitedNotificationEvent.classPKù V'þó¨Ê87ä¬javax/naming/ldap/UnsolicitedNotificationListener.classPK Ô V'®javax/naming/directory/PKÇ V'k@=pg 'H®javax/naming/directory/DirContext.classPKà V'_¼8o'±javax/naming/directory/Attributes.classPKÏ V'²×¡-‘²javax/naming/directory/ModificationItem.classPKÓ V'4;‰´6©+ðµjavax/naming/directory/SearchControls.classPKÀ V'>êYûÎ}&¹javax/naming/directory/Attribute.classPKÁ V'òWM!•4¡»javax/naming/directory/AttributeInUseException.classPK V'r¾nX˜;$½javax/naming/directory/AttributeModificationException.classPKÅ V'yó>r —+å¿javax/naming/directory/BasicAttribute.classPKÅ V'Sßb“3}:ËËjavax/naming/directory/BasicAttribute$ValuesEnumImpl.classPKÆ V'ïâžò1Ù,fÎjavax/naming/directory/BasicAttributes.classPKÆ V''µþs:|9ñÕjavax/naming/directory/BasicAttributes$AttrEnumImpl.classPKÆ V'o—ÓÃlÕ7’Øjavax/naming/directory/BasicAttributes$IDEnumImpl.classPKÉ V'R“,Ky.cÛjavax/naming/directory/InitialDirContext.classPKÔ V'€ž´sÄ) ájavax/naming/directory/SearchResult.classPKÊ V'63š!›7îãjavax/naming/directory/InvalidAttributesException.classPKË V'p‹v$£;tåjavax/naming/directory/InvalidAttributeValueException.classPKÌ V'ƒ(ªx+­@çjavax/naming/directory/InvalidAttributeIdentifierException.classPKÍ V'Ü3$Ÿ9šèjavax/naming/directory/InvalidSearchFilterException.classPKÎ V'o—‹)£;%êjavax/naming/directory/InvalidSearchControlsException.classPKÐ V'Îåƒß —5·ëjavax/naming/directory/NoSuchAttributeException.classPKÑ V'ÔÊ"ñ—5:íjavax/naming/directory/SchemaViolationException.classPK³ V'¶î²™1¼îjavax/naming/OperationNotSupportedException.classPKœ V'>r&‘-9ðjavax/naming/InterruptedNamingException.classPK£ V''>¦%Uh­ñjavax/naming/LinkRef.classPK V'CÒ’×™1Jõjavax/naming/InsufficientResourcesException.classPK  V'™ÉŒ‰)Æöjavax/naming/LimitExceededException.classPK¡ V':GÔlª 4øjavax/naming/LinkException.classPK¢ V'¡=/ô}$îûjavax/naming/LinkLoopException.classPK¤ V'¾ÀNR‡)Týjavax/naming/MalformedLinkException.classPK¦ V'K»X”,Ãþjavax/naming/NameAlreadyBoundException.classPKª V'ˆ2Ör‡(8javax/naming/NameNotFoundException.classPK± V'l(5)(£javax/naming/NoPermissionException.classPK² V']¦ƒ&javax/naming/NotContextException.classPK´ V'xûÙ‰)~javax/naming/PartialResultException.classPK¸ V'O)­^wv$îjavax/naming/ReferralException.classPK¹ V'†ur“.·javax/naming/ServiceUnavailableException.classPK» V'üœ ʘ-. javax/naming/SizeLimitExceededException.classPK í V'¢ javax/naming/event/PKç V'ßQ8a|$Ó javax/naming/event/NamingEvent.classPKì V'sÙbU%>javax/naming/event/EventContext.classPKè V'$ÄR¿¼'æjavax/naming/event/NamingListener.classPKë V'ÃnûwÌ@0÷javax/naming/event/NamespaceChangeListener.classPKê V'# ÿ® -!javax/naming/event/ObjectChangeListener.classPKê V'¥PÔÅ-*javax/naming/event/NamingExceptionEvent.classPKí V'Û7J n(Yjavax/naming/event/EventDirContext.classPK½ V'ÑÐ.w˜-Êjavax/naming/TimeLimitExceededException.classPK ™ V'Acom/sun/naming/PK  V'ncom/sun/naming/internal/PKû V'5‰zF -¤com/sun/naming/internal/ResourceManager.classPKû V'¬Osx8E&com/sun/naming/internal/ResourceManager$FactoryKey.classPKý V'•‘Ýà© +)com/sun/naming/internal/VersionHelper.classPK V'€åOä=0W/com/sun/naming/internal/FactoryEnumeration.classPK V'Œ¾`u -Ä2com/sun/naming/internal/VersionHelper11.classPK V'³,²ÃD:9com/sun/naming/internal/VersionHelper11$RClassLoader.classPK V'ÛDIº‚˜/ª<com/sun/naming/internal/VersionHelper11$1.classPK V'-¶8åOŠ -‰>com/sun/naming/internal/VersionHelper12.classPK V''yA‹µË/3Dcom/sun/naming/internal/VersionHelper12$1.classPK V'÷MIX·/EFcom/sun/naming/internal/VersionHelper12$2.classPK V'æÖõu£¹/YHcom/sun/naming/internal/VersionHelper12$3.classPK V'|ÙØ_*/YJcom/sun/naming/internal/VersionHelper12$4.classPK V'çHÿoì</Mcom/sun/naming/internal/VersionHelper12$5.classPK V'.‰kwU /^Ocom/sun/naming/internal/VersionHelper12$6.classPK V'g²EÍ=DQcom/sun/naming/internal/VersionHelper12$InputStreamEnumeration.classPK V'+ÐâO(./ˆTcom/sun/naming/internal/VersionHelper12$7.classPK{{) Wldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/0000775001003300100330000000000010667357315021745 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/0000775001003300100330000000000010667357315023547 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/0000775001003300100330000000000010667357315024467 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/0000775001003300100330000000000010667357315025444 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/BadFilterException.java0000664001003300100330000000636410602743267032025 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; /** * The exception thrown when there is a problem with either an LDAPFilter * or with the File/URL/Buffer form which we're creating the LDAPFilter. * * @see LDAPFilter * @see LDAPFilterDescriptor * @version 1.0 */ public class BadFilterException extends Exception { private String m_strException; private int m_nLine = -1; /** * Creates an Unknown BadFilterException */ public BadFilterException () { m_strException = "Unknown Error"; } /** * Creates a BadFilterException with the * given string */ public BadFilterException ( String s ) { m_strException = s; } /** * Creates a BadFilterException with the * given string and line number */ public BadFilterException ( String s, int nErrorLineNumber ) { m_strException = s; m_nLine = nErrorLineNumber; } /** * Returns the exception string. */ public String toString() { return m_strException; } /** * If appropriate, return the line number of the ldapfilter.conf * file (or url or buffer) where this error occurred. This method * will return -1 if the line number was not set. */ public int getErrorLineNumber() { return m_nLine; } /** * Set the line number in the ldapfilter.conf file/url/buffer where * this error occurred. */ void setErrorLineNumber ( int nErrorLineNumber ) { m_nLine = nErrorLineNumber; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/LDAPFilterList.java0000664001003300100330000000770510602743267031034 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; /** * The list of LDAPFilter objects returned from a LDAPFilterDescriptor * Object. Note that this is an enumeration, so if multiple iterations * are needed, save the results. * * @see LDAPFilterDescriptor * @see LDAPFilter * @version 1.0 */ public class LDAPFilterList implements Enumeration { private Vector m_vFilterList; private static int DEFAULT_LIST_SIZE = 2; /** * Constructs an LDAPFilterList object. This methos shouldn't need to * be called by the developer directly. Construction of the * LDAPFilterList object should take place when the Prepare function * of LDAPFilterDescriptor is called. * */ public LDAPFilterList () { m_vFilterList = new Vector ( DEFAULT_LIST_SIZE ); } /** * Add an LDAPFilter to the private vector. Since the filter we're * being passed has already been cloned from the master * LDAPFilterDescriptor set, all we have to do is add it to the list. */ void add ( LDAPFilter filter ) { m_vFilterList.addElement ( filter ); } /** * Returns true if there are any LDAPFilter objects to returned. */ public boolean hasMoreElements() { return ( ! m_vFilterList.isEmpty() ); } /** * Returns the next LDAPFilter as an Object. Note: the preferred way * to return the next LDAPFilter is to call next() * * @see LDAPFilterList#next() * @return The next LDAPFilter object (as an instance of Object) */ public Object nextElement() { Object o = m_vFilterList.firstElement(); m_vFilterList.removeElementAt ( 0 ); return o; } /** * Returns the next LDAPFilter * * @return The next LDAPFilter */ public LDAPFilter next() { Object o = m_vFilterList.firstElement(); m_vFilterList.removeElementAt ( 0 ); return (LDAPFilter)o; } /** * Return the number of filters in the filter list. * Note that this number decreases every time next() or nextElement() is * called because the elements are removed as they're returned. */ public int numFilters (){ return m_vFilterList.size(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/LDAPFilterDescriptor.java0000664001003300100330000004527210602743267032240 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.io.*; import java.util.*; import java.util.regex.Pattern; import java.util.regex.Matcher; import java.util.regex.PatternSyntaxException; import java.net.*; import netscape.ldap.*; /** * Represents an LDAP filter configuration file read into memory. *

* * Once you read in a filter file to create an object of this class, * you can access the filter information through the methods that create * LDAPFilterList and LDAPFilter objects. * (You do not need to manually construct these objects yourself.) *

* * This class (along with the other LDAP filter classes) provide * functionality equivalent to the LDAP filter functions in the LDAP C API. *

* * The format of the file/URL/buffer must be that as defined in the * ldapfilter.conf(5) man page from the University of Michigan LDAP-3.3 * distribution.

* * The LDAP filter classes provide a powerful way to configure LDAP clients * by modifying a configuration file.

* * The following is a short example for how to use the * LDAP filter classes. * *

 *
 * // ... Setup LDAPConnection up here ...
 * 

* * LDAPFilterDescriptor filterDescriptor; *

* * // Create the LDAPFilterDescriptor given the file * // "ldapfilter.conf". * try { * filterDescriptor = new LDAPFilterDescriptor ( "ldapfilter.conf" ); *

* * // Now retrieve the Filters in the form of an * // LDAPFilterList * LDAPFilterList filterList = new filterDescriptor.getFilters("match_tag", "string_user_typed"); *

* * // For each filter, do the search. Normally, you wouldn't * // do the search if the first filter matched, but this is * // just showing the enumeration type aspects of * // LDAPFilterList * LDAPFilter filter; * while ( filterList.hasMoreElements() ) { * filter = filterList.next(); * LDAPResults results = LDAPConnection.search ( * strBase, // base DN * filter.getScope(), // scope * filter.getFilter(), // completed filter * null, // all attribs * false ); // attrsOnly? * } *

* * // ...more processing here... * } catch ( BadFilterException e ) { * System.out.println ( e.toString() ); * System.exit ( 0 ); * } catch ( IOException e ) { * // ...handle exception here... * } *

* * * @see LDAPFilterList * @see LDAPFilter * @version 1.0 */ public class LDAPFilterDescriptor { private Vector m_vFilterSet = new Vector(); private String m_strLine; private int m_nLine; private String m_strPrefix; private String m_strAffix; private LDAPIntFilterSet m_tmpFilterSet = null; private String m_strLastMatchPattern = null; private String m_strLastDelimiter = null; /** * The Default scope is used when a scope is not defined * in the filter file. The scope is the only "optional" parameter * in the file. */ private static final int DEFAULT_SCOPE = LDAPConnection.SCOPE_SUB; /** * Creates an LDAPFilterDescriptor object from an existing filter * configuration file. This file has the format as defined in the * ldapfilter.conf(5) man page. * * @exception netscape.ldap.util.BadFilterException * One of the filters was not generated properly. Most likely * this is due to an improperly formatted ldapfilter.conf file. */ public LDAPFilterDescriptor ( String strFile ) throws FileNotFoundException, BadFilterException { DataInputStream inputStream = new DataInputStream ( new FileInputStream ( strFile ) ); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); init( reader ); } /** * Creates an LDAPFilterDescriptor object from an existing * StringBuffer. This file has the format as defined in the * ldapfilter.conf(5) man page. * * @exception netscape.ldap.util.BadFilterException * One of the filters was not generated properly. Most likely * this is due to an improperly formatted ldapfilter.conf file. */ public LDAPFilterDescriptor ( StringBuffer strBuffer ) throws BadFilterException { init( strBuffer ); } /** * Creates an LDAPFilterDescriptor object from a URL. * This file has the format as defined in the * ldapfilter.conf(5) man page. * * @exception netscape.ldap.util.BadFilterException * One of the filters was not generated properly. Most likely * this is due to an improperly formatted ldapfilter.conf file. */ public LDAPFilterDescriptor ( URL url ) throws IOException, BadFilterException { URLConnection urlc = url.openConnection(); DataInputStream inputStream = new DataInputStream ( urlc.getInputStream() ); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); init( reader ); } /** * This function initializes the LDAPFilterDescriptor. It's * called internally, and should never be called directly by the * developer. */ private void init ( Object inputObj) throws BadFilterException { String strCommentPattern = "^\\s*#|$"; String strDataPattern = "\\s*(?:\"([^\"]*)\")|([^\\s]*)\\s*"; Pattern patComment; Pattern patData; Vector vStrings = new Vector ( 5 ); try { patComment = Pattern.compile ( strCommentPattern ); patData = Pattern.compile ( strDataPattern ); } catch ( PatternSyntaxException e ) { // This should NEVER happen... System.out.println ( "FATAL Error, couldn't compile pattern"); System.out.println ( " " + e.getMessage() ); return; } // Setup some temporary variables. m_nLine = 0; try { if (inputObj instanceof StringBuffer) { StringBuffer ibuffer = (StringBuffer)inputObj; StringBuffer buffer = new StringBuffer(); for (int i=0; i " + m_strLine + "\nThe error is: " + strMsg, m_nLine ); } /** * Output a text dump of this filter descriptor. It cycles * through all of the internal LDAPIntFilterSet objects and calls * their toString() methods. * * @see LDAPIntFilterSet#toString */ public String toString() { StringBuffer strBuf = new StringBuffer ( 4000 ); for ( int i = 0; i < m_vFilterSet.size(); i++ ) { strBuf.append ( "Filter Set number: " + i + "\n" ); strBuf.append ( ((LDAPIntFilterSet)m_vFilterSet.elementAt ( i )).toString() + "\n" ); strBuf.append ( "\n" ); //System.out.println ( (m_vFilterSet.elementAt ( i )).toString()); } return strBuf.toString(); } /** * Return all the filters which match the strTagPat (regular * expression), and the user input (strValue) */ public LDAPFilterList getFilters ( String strTagPat, String strValue ) throws IllegalArgumentException { strTagPat = strTagPat.trim(); strValue = strValue.trim(); if ( ( strTagPat == null ) || ( strTagPat.equals ("") ) ) { throw new IllegalArgumentException ( "The Tag Pattern can not be null" ); } if ( ( strValue == null ) || ( strValue.equals ("") ) ) { throw new IllegalArgumentException ( "The Value can not be null" ); } LDAPFilterList retList = new LDAPFilterList(); Pattern patTag; // The strTagPat that's compiled // first we need to make a new regexp from the strTagPat // For efficiency, we're precompiling the strTagPat into // a pattern here. That pattern doesn't change, the Tag string // changes per LDAPFIlterSet. try { patTag = Pattern.compile ( strTagPat ); } catch ( PatternSyntaxException e ) { throw new IllegalArgumentException ( "The parameter: " + strTagPat + " is not valid" ); } // We "ask" each of the filterset's to see if there is // a matching filter. boolean bMatched = false; int i = 0; while ( ! bMatched ) { Vector vMatchingFilters = ((LDAPIntFilterSet)m_vFilterSet.elementAt ( i )).getFilters (patTag, strValue ); if ( vMatchingFilters.size() > 0 ) { for ( int j = 0; j < vMatchingFilters.size(); j++ ) { LDAPFilter tmpFilter = (LDAPFilter) ((LDAPFilter) vMatchingFilters.elementAt ( j )).clone(); tmpFilter.setupFilter ( strValue, m_strPrefix, m_strAffix ); bMatched = true; // this really doesn't matter. retList.add ( tmpFilter ); } return retList; } i++; } return null; } /** * Prepend the parameter (strPrefix) and append the second * parameter (strAffix) to every filter that is returned by the * getFilters() method.

*/ public void setFilterAffixes ( String strPrefix, String strAffix ) { m_strPrefix = strPrefix; m_strAffix = strAffix; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/LDAPFilter.java0000664001003300100330000004703310602743267030176 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import netscape.ldap.*; import java.util.*; /** * Represents an LDAP search filter, which includes the string-based * representation of the filter and other information retrieved from the * LDAP filter configuration file (or from a buffer in memory or from a URL). *

* * Although this class provides methods to create and modify LDAP * filters, in most cases, you do not need to use these methods. * In most situations, these classes are used to access individual * filters from filter configuration files. *

* * For example, you might do the following: *

* *

    *
  1. Connect to the LDAP server and accept a set of search criteria. *
  2. Create an LDAP filter configuration file. *
  3. Call the LDAPFilterDescriptor constructor to * read the filter configuration file into memory. *
  4. Call the getFilters method to get a list of * filters that match the search criteria. This list of filters * is represented by an LDAPFilterList object. *
  5. Iterate through the list of filters (each filter is represented * by an LDAPFilter object), and apply the filter to * a search. *
*

* * For an example of using an object of this class and for more information on * the filter configuration file syntax, see the documentation for LDAPFilterDescriptor. *

* * @see LDAPFilterDescriptor * @see LDAPFilterList * @version 1.0 */ public class LDAPFilter implements Cloneable { private static final int DEFAULT_FILTER_LENGTH = 256; private String m_strFilter = null; private String m_strDescription; // token 4 from filter configuration file private int m_nScope; // token 5 from filter configuration file private boolean m_bIsExact; private String m_strMatchPattern; // token 1 from filter configuration file private String m_strDelimiter; // token 2 from filter configuration file private String m_strFilterTemplate; // token 3 from filter configuration file private int m_nLine; private String m_strSuffix; private String m_strPrefix; /** * Constructs an LDAPFilter object. In most situations, * you do not need to construct an LDAPFilter object. Instead, you * work with LDAPFilter objects created from the * LDAPFilter objects and LDAPFilterDescriptor * objects. *

* * This constructor uses the integer value for a search scope in * addition to other information to construct an LDAPFilter * object. The integer value of the search scope can be one of the * following: *

    *
  • LDAPConnection.SCOPE_BASE *
  • LDAPConnection.SCOPE_ONE *
  • LDAPConnection.SCOPE_SUB *
* * If an invalid scope is specified, the constructor throws an * illegalArgumentException. */ public LDAPFilter ( String strMatchPattern, String strDelimiter, String strFilterTemplate, String strDescription, int nScope ) throws IllegalArgumentException{ m_strMatchPattern = convertMatchPattern ( strMatchPattern ); m_strDelimiter = strDelimiter; m_strFilterTemplate = strFilterTemplate; m_strDescription = strDescription; m_nScope = nScope; } /** * Constructs an LDAPFilter object. In most situations, * you do not need to construct an LDAPFilter object. Instead, you * work with LDAPFilter objects created from the * LDAPFilter objects and LDAPFilterDescriptor * objects. *

* * This constructor uses the string value for a search scope in * addition to other information to construct an LDAPFilter * object. The string value of the search scope can be one of the * following: *

    *
  • "base" *
  • "onelevel" *
  • "subtree" *
* * If an invalid scope is specified, the constructor throws an * illegalArgumentException. */ public LDAPFilter ( String strMatchPattern, String strDelimiter, String strFilterTemplate, String strDescription, String strScope ) throws IllegalArgumentException { if ( strScope.equals ( "base" ) ) { m_nScope = LDAPConnection.SCOPE_BASE; } else if ( strScope.equals ( "onelevel" ) ) { m_nScope = LDAPConnection.SCOPE_ONE; } else if ( strScope.equals ( "subtree" ) ) { m_nScope = LDAPConnection.SCOPE_SUB; } m_strMatchPattern = strMatchPattern; m_strDelimiter = strDelimiter; m_strFilterTemplate = strFilterTemplate; m_strDescription = strDescription; } /** * Print out a string representation of the LDAPFilter. * Basically, it prints out the appropriate fields. *

* * For example, suppose you called the method in this way: *

* *

System.out.println(filter.toString());
* * The resulting output might look like this: *

* *

     *      matchPtn: "@"
     *      delim:    " "
     *      filttmpl: "(mail=%v*)"
     *      descript: "start of email address"
     *      scope: "LDAPConnection.SCOPE_SUB"
     *      line:     "32"
     *      FILTER:   "(mail=babs@aceindustry.com*)"
     * 
*/ public String toString() { StringBuffer strBuf = new StringBuffer ( 300 ); strBuf.append ( " matchPtn: \"" + m_strMatchPattern+"\"\n" ); strBuf.append ( " delim: \"" + m_strDelimiter+"\"\n" ); strBuf.append ( " filttmpl: \"" + m_strFilterTemplate+"\"\n" ); strBuf.append ( " descript: \"" + m_strDescription+"\"\n" ); switch ( m_nScope ) { case LDAPConnection.SCOPE_BASE: strBuf.append ( " scope: \"LDAPConnection.SCOPE_BASE\"\n" ); break; case LDAPConnection.SCOPE_ONE: strBuf.append ( " scope: \"LDAPConnection.SCOPE_ONE\"\n" ); break; case LDAPConnection.SCOPE_SUB: strBuf.append ( " scope: \"LDAPConnection.SCOPE_SUB\"\n" ); break; } strBuf.append ( " line: \"" + m_nLine+"\"\n" ); strBuf.append ( " FILTER: \"" + m_strFilter+"\"\n" ); return strBuf.toString(); } /** * Sets up the filter string, given the string strValue. * If the strPrefix and strSuffix arguments * are non-null strings, they are prepended and appended * to the filter string (respectively). *

* * This string, which is available through the getFilter() * method, should be suitable for use as search criteria when * calling the LDAPConnection.search() method. *

* * Notes: *

* *

    *
  • This method does not maintain the affixes * set with the LDAPFilterDescriptor.setFilterAffixes * method, so you * need to explicitly define any filter prefixes or suffixes here.

    * *

  • This method only uses the * strPrefix and strSuffix for this invocation of setupFilter. It * does not redefine strPrefix and strSuffix for later * invocations.

    *

*

* * @see netscape.ldap.util.LDAPFilterDescriptor#setFilterAffixes * @see #setFilterAffixes */ public void setupFilter ( String strValue, String strPrefix, String strSuffix ) { createFilterString ( strValue, strPrefix, strSuffix ); } /** * Sets up the filter string, given the string strValue. * This string, which is available through the getFilter() * method, should be suitable for use as search criteria when * calling the LDAPConnection.search() method. *

* * Note: If you want to specify a filter prefix and suffix, * you need to explicitly define them by calling the * setFilterAffixes() method. * * @see netscape.ldap.util.LDAPFilterDescriptor#setFilterAffixes * @see #setFilterAffixes * */ public void setupFilter ( String strValue ) { createFilterString ( strValue, null, null ); } /** * Create the filter string which can be used in * LDAPConnection.search() and others given the parameter * strValue. If strPrefix and strSuffix are non-null strings, * prepend strPrefix and append strSuffix. */ void createFilterString ( String strValue, String strPrefix, String strSuffix ) { StringTokenizer strTok = new StringTokenizer ( strValue, m_strDelimiter ); // Initialize an array of broken up values so that we // can reference them directly. String[] aValues = new String[strTok.countTokens()]; int nTokens = strTok.countTokens(); for ( int i = 0; i < nTokens; i++ ) { aValues[i] = strTok.nextToken(); } StringBuffer sbFilter = new StringBuffer ( DEFAULT_FILTER_LENGTH); if ( strPrefix != null ) { sbFilter.append ( strPrefix ); } char[] cFilterTemplate = m_strFilterTemplate.toCharArray(); int i = 0; while ( i < cFilterTemplate.length ) { if ( cFilterTemplate[i] == '%' ) { i++; if ( cFilterTemplate[i] == 'v' ) { if ( i == (cFilterTemplate.length-1) ) { sbFilter.append ( strValue ); break; } i++; switch ( cFilterTemplate[i] ) { case '$': sbFilter.append ( aValues[aValues.length] ); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': int nValue = Integer.parseInt ( new Character (cFilterTemplate[i]).toString() ); nValue--; i++; if ( cFilterTemplate[i] == '-' ) { i++; if ( Character.isDigit ( cFilterTemplate[i] )) { int nValue2 = Integer.parseInt ( new Character (cFilterTemplate[i]).toString() ); nValue2--; for ( int j = nValue; j <= nValue2; j++ ) { sbFilter.append ( aValues[j] ); sbFilter.append ( ( j == nValue2 ) ? "" : " " ); } } else { for ( int j = nValue; j < aValues.length;j++ ) { sbFilter.append ( aValues[j] ); sbFilter.append ( ( j == aValues.length - 1 ) ? "" : " " ); } sbFilter.append ( cFilterTemplate[i]); } } else { sbFilter.append ( aValues[nValue] ); sbFilter.append ( cFilterTemplate[i] ); } break; // We just got a plain old %v, so insert the // strValue default: sbFilter.append ( strValue ); sbFilter.append ( cFilterTemplate[i] ); break; } } else { sbFilter.append ( "%" ); sbFilter.append ( cFilterTemplate[i] ); } } else { sbFilter.append ( cFilterTemplate[i] ); } i++; } if ( strSuffix != null ) { sbFilter.append ( strSuffix ); } m_strFilter = sbFilter.toString(); } /** * Makes a copy of this LDAPFilter object. */ public Object clone() { try { return super.clone(); } catch ( CloneNotSupportedException e ) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } } /** * Set the line number from which this filter was created. This * is used only when the LDAPFilter is created when an * LDAPFilterDescriptor is initialized from a file/URL/buffer. */ void setLine ( int nLine ) { m_nLine = nLine; } /** * The ldapfilter.conf specifies match patterns in a funny way. * A "." means "any character" except when used inside of a set of * square brackets "[]", in which case, the "." means just a * plain old period (not a * special character). * * This function converts periods inside of a set of square * brackets into a "\." as per normal regexp code. */ String convertMatchPattern ( String strMatchPattern ) { StringBuffer sb = new StringBuffer ( strMatchPattern.length() + 1); char[] a_cMatchPattern = strMatchPattern.toCharArray(); boolean bInBrackets = false; for ( int i = 0; i < a_cMatchPattern.length; i++ ) { if ( a_cMatchPattern[i] == '.' ) { if ( bInBrackets ) { sb.append ( "\\" ); } } else if ( a_cMatchPattern[i] == '[' ) { bInBrackets = true; } else if ( a_cMatchPattern[i] == ']' ) { bInBrackets = false; } sb.append ( a_cMatchPattern[i] ); } return sb.toString(); } /** * Returns the filter string. This method will return null if the * filter string has not been calculated by the setupFilter(), * getFilter (strValue), or getFilter (strValue, * strPrefix, strSuffix ) methods. * * @see #setupFilter * @see #getFilter */ public String getFilter () { return m_strFilter; } /** * Create a filter string given a string value. This method uses * any Prefixes or Suffixes that have been set by the * setFilterAffixes() method.

* * This is the same as doing: *

     *   setupFilter ( strValue );
     *   getFilter();
     * 
*/ public String getFilter ( String strValue ) { createFilterString ( strValue, m_strPrefix, m_strSuffix ); return m_strFilter; } /** * Create a filter string given a string value. If strPrefix * and/or strSuffix is non-null, these values are prepended and * appended to the returned string.

* * This is the same as doing: *

     *   setupFilter ( strValue, strPrefix, strSuffix );
     *   getFilter();
     * 
*/ public String getFilter ( String strValue, String strPrefix, String strSuffix ) { createFilterString ( strValue, strPrefix, strSuffix ); return m_strFilter; } /** * Return this filter's match pattern. The match pattern is * found as the first token in a filter configuration line in the * ldapfilter.conf file. */ public String getMatchPattern() { return m_strMatchPattern; } /** * Return this filter's delimiter. The delmimeter is * found as the second token in a filter configuration line in the * ldapfilter.conf file. */ public String getDelimiter() { return m_strDelimiter; } /** * Return this filter's filter template. The filter template is * found as the third token in a filter configuration line in the * ldapfilter.conf file. */ public String getFilterTemplate() { return m_strFilterTemplate; } /** * Return this filter's description. The description is * found as the fourth token in a filter configuration line in the * ldapfilter.conf file. */ public String getDescription() { return m_strDescription; } /** * Return this filter's scope. The scope is * found as the fifth (optional) token in a filter configuration * line in the ldapfilter.conf file. */ public String getScope() { switch ( m_nScope ) { case LDAPConnection.SCOPE_BASE: return "base"; case LDAPConnection.SCOPE_ONE: return "onelevel"; case LDAPConnection.SCOPE_SUB: return "subtree"; default: return "UNKNOWN!"; } } /** * Return this filter's line number. The line number is * mostly a debugging variable to let the developer know which * filter from the filter configuration file is being used. */ public String getLineNumber() { return Integer.toString ( m_nLine ); } public void setFilterAffixes ( String strPrefix, String strSuffix ) { m_strPrefix = strPrefix; m_strSuffix = strSuffix; } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/LDAPIntFilterList.java0000664001003300100330000001061310602743267031477 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; /** * Represents an Internal LDAPFilterList object. This is an internal object * that should never be instantiated directly by the developer. We * store all filters that have the same match pattern here. */ public class LDAPIntFilterList { private Vector m_vFilter; private String m_strMatchPattern; // a regexp pattern of m_strMatchPattern private Pattern m_patMatch = null; LDAPIntFilterList ( LDAPFilter filter ) throws BadFilterException { m_strMatchPattern = filter.getMatchPattern(); try { m_patMatch = Pattern.compile( m_strMatchPattern ); } catch ( PatternSyntaxException e ) { throw new BadFilterException ( "The Regular Expression for this filter is bad. " + "Line number: " + filter.getLineNumber() ); } m_vFilter = new Vector(); m_vFilter.addElement ( filter ); } /** * Add a "relative" filter to an existing filter list. We do this * becuse the ldapfilter file defines that we can have multiple * filters per match pattern (and delimiter). This method is * called by the parent LDAPIntFilterSet because the file specified * a "relative" filter (a filter in the ldapfilter.conf file that * only has 2 or 3 tokens). */ void AddFilter ( LDAPFilter filter ) { m_vFilter.addElement ( filter ); } /** * Return the number of Filters this InternalFilterList contains. */ // Since we're storing the filters as a vector, just return // Vector.size(). int numFilters () { return m_vFilter.size(); } public String toString() { StringBuffer strBuf = new StringBuffer ( 100 ); strBuf.append ( " Match Pattern: \"" + m_strMatchPattern + "\"\n" ); for ( int i = 0; i < m_vFilter.size(); i++ ) { strBuf.append ( ((LDAPFilter)m_vFilter.elementAt(i)).toString() ); strBuf.append ( "\n" ); } return strBuf.toString(); } /** * Return the requested filter. */ LDAPFilter getFilter ( int nFilter ) { return (LDAPFilter)m_vFilter.elementAt ( nFilter ); } /** * Try to match the filter to the given string. This method is called * when the user types in data. We match the expression (stored in * m_strMatchPattern) to the value that the user typed in (the * parameter to this method). */ boolean MatchFilter ( String matcherValue ) { return m_patMatch.matcher(matcherValue).matches(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapfilter/netscape/ldap/util/LDAPIntFilterSet.java0000664001003300100330000001347610602743267031331 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.util; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Represents an LDAPIntFilterSet object. This is an internal object that * should never be instantiated directly by the developer. */ public class LDAPIntFilterSet { private Vector m_vLDAPIntFilterList; private String m_strTag; private Matcher m_matcher = null; /** * Return a Vector of filters that match botht the tag pattern * (in Perl5Pattern form), and the string strValue. This method * should only be called by LDAPFilterDescriptor(). */ // remember, we have the string (m_strTag), the pattern has // been precompiled by the LDAPFilterDescriptor (patTag) Vector getFilters ( Pattern patTag, String matcherValue ) { Vector vRet = new Vector(); if ( m_matcher == null ) { m_matcher = patTag.matcher(m_strTag); } // Check to see if the strTag (converted into patTag) // matches the tag string from the file (converted into // m_matcherTag) if ( m_matcher.find() ) { LDAPIntFilterList tmpIntFilterList; LDAPFilter tmpFilter; for ( int i = 0; i < m_vLDAPIntFilterList.size(); i++ ) { tmpIntFilterList = (LDAPIntFilterList)m_vLDAPIntFilterList.elementAt ( i ); if ( tmpIntFilterList.MatchFilter ( matcherValue ) ) { for (int j=0; j < tmpIntFilterList.numFilters(); j++ ) { vRet.addElement ( tmpIntFilterList.getFilter ( j )); } // potential BUGBUG, i'm not sure if we want // to get out of this loop now or if we just // want to get out of the external loop. For // now, go with the former. return vRet; } } } return vRet; } /** * Create an LDAPIntFilterSet with a given Tag string. The tag * string specifies which applications or query types should use * this filter set. It is normally a single token on a line by * itself in the filter configuration file.

* For more information about the filter configuration file, see * the man page for ldapfilter.conf. */ public LDAPIntFilterSet ( String strTag ) { m_strTag = strTag; m_vLDAPIntFilterList = new Vector(); } /** * Add a new filter to this filter set. * * @exception netscape.ldap.util.BadFilterException * If the regular expression pattern given in the first token * is bad. */ void newFilter ( LDAPFilter filter ) throws BadFilterException { LDAPIntFilterList tmpFilterList = new LDAPIntFilterList( filter ); m_vLDAPIntFilterList.addElement ( tmpFilterList ); } /** * Append a new filter to the existing set. This happens when the * LDAPFilterDescriptor object reads a line from the filter * configuration file that has 2 or 3 tokens. */ void appendFilter ( LDAPFilter filter ) { ((LDAPIntFilterList)m_vLDAPIntFilterList.lastElement()).AddFilter ( filter ); } /** * Return true if this filter set matches the regular expression * string that is passed in. */ boolean match ( String strTagPat ) { return Pattern.matches(strTagPat, m_strTag); } /** * Print out the String representation of this object. It calls * the toString() method of all the LDAPFilter objects contained * within it's set. * * @see LDAPFilter#toString() */ public String toString() { StringBuffer strBuf = new StringBuffer ( 2000 ); strBuf.append ( " strTag: " + m_strTag + "\n" ); for ( int i = 0; i < m_vLDAPIntFilterList.size(); i++ ) { strBuf.append ( " filter #: " + i + "\n" ); strBuf.append ( ((LDAPIntFilterList)m_vLDAPIntFilterList.elementAt(i)).toString() ); strBuf.append ( "\n" ); } return strBuf.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/0000775001003300100330000000000010667357314021547 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/0000775001003300100330000000000010667357314023351 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/0000775001003300100330000000000010667357314024271 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/0000775001003300100330000000000010667357315025362 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/DisplayStringBeanInfo.java0000664001003300100330000000602610602743267032421 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import java.beans.SimpleBeanInfo; import java.beans.BeanDescriptor; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.beans.ParameterDescriptor; import java.beans.BeanInfo; /** * BeanInfo for displaying string * */ public class DisplayStringBeanInfo extends SimpleBeanInfo { public DisplayStringBeanInfo() throws Exception { beanClass = Class.forName( "netscape.ldap.beans.DisplayString" ); // Publish descriptor --------------------------------------------- try { _beanDescriptor = new BeanDescriptor(beanClass); _beanDescriptor.setDisplayName( "Text Field" ); _beanDescriptor.setShortDescription( "LDAP property retrieval -" + " provided a host, port, base, search filter," + " and optionally a username and password," + " return an array of string values both as a" + " function return and as a Property change event." ); } catch (Exception e) { } } public BeanDescriptor getBeanDescriptor() { return _beanDescriptor; } private static Class beanClass; private BeanDescriptor _beanDescriptor; private EventSetDescriptor[] _eventSetDescriptor; private PropertyDescriptor[] _propertyDescriptor; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPGetEntriesBeanInfo.java0000664001003300100330000001265410602743267032343 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import java.beans.SimpleBeanInfo; import java.beans.BeanDescriptor; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.beans.ParameterDescriptor; import java.beans.BeanInfo; /** * BeanInfo for LDAPGetEntries */ public class LDAPGetEntriesBeanInfo extends SimpleBeanInfo { public LDAPGetEntriesBeanInfo() throws Exception { beanClass = Class.forName( "netscape.ldap.beans.LDAPGetEntries" ); try { PropertyDescriptor host = new PropertyDescriptor("host", beanClass); PropertyDescriptor port = new PropertyDescriptor("port", beanClass); PropertyDescriptor authDN = new PropertyDescriptor("authDN", beanClass); PropertyDescriptor authPassword = new PropertyDescriptor("authPassword", beanClass); PropertyDescriptor base = new PropertyDescriptor("base", beanClass); PropertyDescriptor userName = new PropertyDescriptor("userName", beanClass); PropertyDescriptor userID = new PropertyDescriptor("userID", beanClass); PropertyDescriptor filter = new PropertyDescriptor("filter", beanClass); PropertyDescriptor scope = new PropertyDescriptor("scope", beanClass); PropertyDescriptor debug = new PropertyDescriptor("debug", beanClass); PropertyDescriptor rv[] = {host, port, authDN, authPassword, base, filter, scope, userName, userID, debug}; _propertyDescriptor = new PropertyDescriptor[rv.length]; for( int i = 0; i < rv.length; i++ ) _propertyDescriptor[i] = rv[i]; } catch (Exception e) { throw new Error(e.toString()); } // Publish events -------------------------------------------------- try { _eventSetDescriptor = new EventSetDescriptor[1]; _eventSetDescriptor[0] = new EventSetDescriptor(beanClass, "propertyChange", Class.forName("java.beans.PropertyChangeListener"), "propertyChange"); } catch (Exception e) { throw new Error(e.toString()); } // Publish descriptor --------------------------------------------- try { _beanDescriptor = new BeanDescriptor(beanClass); _beanDescriptor.setDisplayName( "LDAP entry retrieval" ); _beanDescriptor.setShortDescription( "LDAP property retrieval -" + " provided a host, port, base, search filter," + " and optionally a username and password," + " return an array of string values both as a" + " function return and as a Property change event." ); } catch (Exception e) { } } /** * @return the public properties */ public PropertyDescriptor[] getPropertyDescriptors() { return _propertyDescriptor; } public EventSetDescriptor[] getEventSetDescriptors() { return _eventSetDescriptor; } public BeanInfo[] getAdditionalBeanInfo() { return null; } public int getDefaultEventIndex() { return -1; } public int getDefaultPropertyIndex() { return -1; } public BeanDescriptor getBeanDescriptor() { return _beanDescriptor; } private static Class beanClass; private BeanDescriptor _beanDescriptor; private EventSetDescriptor[] _eventSetDescriptor; private PropertyDescriptor[] _propertyDescriptor; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPGetProperty.mf0000664001003300100330000000026206726072220030621 0ustar viveklviveklName: netscape/ldap/beans/LDAPGetProperty.class Java-Bean: True Name: netscape/ldap/beans/LDAPBasePropertySupport.class Name: netscape/ldap/beans/LDAPGetPropertyBeanInfo.class ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPIsMember.mf0000664001003300100330000000025406726072220030041 0ustar viveklviveklName: netscape/ldap/beans/LDAPIsMember.class Java-Bean: True Name: netscape/ldap/beans/LDAPBasePropertySupport.class Name: netscape/ldap/beans/LDAPIsMemberBeanInfo.class ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/DisplayString.mf0000664001003300100330000000016506726072217030500 0ustar viveklviveklName: netscape/ldap/beans/DisplayString.class Java-Bean: True Name: netscape/ldap/beans/DisplayStringBeanInfo.class ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPIsMemberBeanInfo.java0000664001003300100330000001122310602743267031764 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import java.beans.SimpleBeanInfo; import java.beans.BeanDescriptor; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.beans.ParameterDescriptor; import java.beans.BeanInfo; /** * BeanInfo for LDAPIsMember */ public class LDAPIsMemberBeanInfo extends SimpleBeanInfo { public LDAPIsMemberBeanInfo() throws Exception { beanClass = Class.forName( "netscape.ldap.beans.LDAPIsMember" ); // Publish properties ------------------------------------------------- try { PropertyDescriptor host = new PropertyDescriptor("host", beanClass); PropertyDescriptor port = new PropertyDescriptor("port", beanClass); PropertyDescriptor authDN = new PropertyDescriptor("authDN", beanClass); PropertyDescriptor authPassword = new PropertyDescriptor("authPassword", beanClass); PropertyDescriptor group = new PropertyDescriptor("group", beanClass); PropertyDescriptor member = new PropertyDescriptor("member", beanClass); PropertyDescriptor debug = new PropertyDescriptor("debug", beanClass); PropertyDescriptor rv[] = {host, port, authDN, authPassword, group, member, debug}; _propertyDescriptor = new PropertyDescriptor[rv.length]; for( int i = 0; i < rv.length; i++ ) _propertyDescriptor[i] = rv[i]; } catch (Exception e) { throw new Error(e.toString()); } // Publish descriptor --------------------------------------------- try { _beanDescriptor = new BeanDescriptor(beanClass); _beanDescriptor.setDisplayName( "LDAP IsMember" ); _beanDescriptor.setShortDescription( "LDAP IsMember -" + " provided a host, port, group name and member name," + " and optionally an authentication name and password," + " return true if the member belongs to the group." ); } catch (Exception e) { } } /** * @return the public properties */ public PropertyDescriptor[] getPropertyDescriptors() { return _propertyDescriptor; } public EventSetDescriptor[] getEventSetDescriptors() { return _eventSetDescriptor; } public BeanInfo[] getAdditionalBeanInfo() { return null; } public int getDefaultEventIndex() { return -1; } public int getDefaultPropertyIndex() { return -1; } public BeanDescriptor getBeanDescriptor() { return _beanDescriptor; } private static Class beanClass; private BeanDescriptor _beanDescriptor; private EventSetDescriptor[] _eventSetDescriptor; private PropertyDescriptor[] _propertyDescriptor; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPGetEntries.java0000664001003300100330000003166110620653753030740 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import netscape.ldap.*; import netscape.ldap.beans.LDAPBasePropertySupport; import java.util.Enumeration; import java.util.Vector; import java.io.Serializable; import java.awt.event.*; /** * Invisible Bean that just takes a host, port, directory base, * search string, and optional authentication name and password, * and returns a list of all matching DNs. The search has the scope * "SUB", which means that it will find an entry anywhere at or * below the directory base, unless a different scope is specified. *

* Optionally, a client can register as a PropertyChangeListener * and will be notified when the values are available. *

* A null result means no matching DNs were found. The reason is * available through getErrorCode(), which returns one of * the following: *

 *     OK
 *     INVALID_PARAMETER
 *     CONNECT_ERROR
 *     AUTHENTICATION_ERROR
 *     PROPERTY_NOT_FOUND
 *     AMBIGUOUS_RESULTS
 *
* */ public class LDAPGetEntries extends LDAPBasePropertySupport implements Serializable { /** * Constructor with no parameters */ public LDAPGetEntries() { super(); } /** * Constructor with host, port, and base initializers * @param theHost host string * @param thePort port number * @param theBase directory base string */ public LDAPGetEntries( String theHost, int thePort, String theBase ) { setHost( theHost ); setPort( thePort ); setBase( theBase ); } /** * Constructor with host, port, base, and scope initializers * @param theHost host string * @param thePort port number * @param theBase directory base string * @param theScope one of LDAPConnection.SCOPE_BASE, * LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONE */ public LDAPGetEntries( String theHost, int thePort, String theBase, int theScope ) { setHost( theHost ); setPort( thePort ); setBase( theBase ); setScope( theScope ); } private void notifyResult( String error ) { firePropertyChange( "error", _errorMsg, error ); _errorMsg = error; } private void notifyResult( String[] newResult ) { String sNewResult = convertToString( newResult ); firePropertyChange( "result", _result, newResult ); _sResult = sNewResult; _result = newResult; } /** * Returns the name of the attribute to retrieve * @return attribute name to retrieve */ public String getAttribute() { return _attribute; } /** * Sets the attribute to retrieve */ public void setAttribute( String attr ) { _attribute = attr; } public void setResultString( String sNewValue ) { _sResult = sNewValue; } public String getResultString() { return _sResult; } /** * Searches and returns values for a specified attribute * @param host host string * @param port port number * @param base directory base string * @param scope one of LDAPConnection.SCOPE_BASE, * LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONE * @param filter search filter * @return Array of values for the property */ public String[] getEntries( String host, int port, String base, int scope, String filter) { setHost( host ); setPort( port ); setBase( base ); setScope( scope ); setFilter( filter ); return getEntries(); } /** * Searches and returns values for a specified attribute * @param host host string * @param port port number * @param base directory base string * @param scope one of LDAPConnection.SCOPE_BASE, * LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONE * @param userName The user name * @param userid The user id * @return Array of DNs */ public String[] getEntries( String host, int port, String base, int scope, String userid, String userName) { setHost( host ); setPort( port ); setBase( base ); setScope( scope ); if (userName == null) userName = new String(""); setUserName( userName ); if (userid == null) userid = new String(""); setUserID( userid ); return getEntries(); } // Added this method in order to get exposed in BDK public void getEntries(ActionEvent x) { getEntries(); } /** * Searches and returns values of a previously registered property, * using previously set parameters * @return Array of values for the property */ public String[] getEntries() { boolean invalid = false; if ((getUserName().length() < 1) && (getUserID().length() < 1) && (getFilter().length() < 1)) { printDebug("No user name or user ID"); invalid = true; } else if ( (getHost().length() < 1) || (getBase().length() < 1) ) { printDebug( "Invalid host name or search base" ); invalid = true; } if ( invalid ) { setErrorCode( INVALID_PARAMETER ); notifyResult( (String)null); return null; } if (getFilter().length() < 1) { String filter = new String(""); if ((getUserName().length() > 1) && (getUserID().length() > 1)) { filter = "(|(cn="+getUserName()+")(uid="+getUserID()+"))"; } else if (getUserName().length() > 1) { filter = "cn="+getUserName(); } else if (getUserID().length() > 1) { filter = "uid="+getUserID(); } setFilter(filter); } String[] res = null; LDAPConnection m_ldc = new LDAPConnection(); try { try { printDebug("Connecting to " + getHost() + " " + getPort()); connect( m_ldc, getHost(), getPort()); } catch (Exception e) { printDebug( "Failed to connect to " + getHost() + ": " + e.toString() ); setErrorCode( CONNECT_ERROR ); notifyResult( (String)null ); m_ldc = null; throw( new Exception() ); } // Authenticate? if ( (!getAuthDN().equals("")) && (!getAuthPassword().equals("")) ) { printDebug( "Authenticating " + getAuthDN() ); try { m_ldc.authenticate( getAuthDN(), getAuthPassword() ); } catch (Exception e) { printDebug( "Failed to authenticate: " + e.toString() ); setErrorCode( AUTHENTICATION_ERROR ); notifyResult( (String)null ); throw( new Exception() ); } } // Search try { printDebug("Searching " + getBase() + " for " + getFilter() + ", scope = " + getScope()); String[] attrs = { _attribute }; LDAPSearchResults results = m_ldc.search( getBase(), getScope(), getFilter(), attrs, false); // Create a vector for the results Vector v = new Vector(); LDAPEntry entry = null; while ( results.hasMoreElements() ) { try { entry = results.next(); } catch (LDAPException e) { if (getDebug()) notifyResult(e.toString()); continue; } // Add the DN to the list String value = ""; if ( _attribute.equals("dn") ) { value = entry.getDN(); } else { LDAPAttribute attr = entry.getAttribute( _attribute ); if ( attr != null ) { Enumeration vals = attr.getStringValues(); if ( (vals != null) && (vals.hasMoreElements()) ) { value = (String)vals.nextElement(); } } } v.addElement( value ); printDebug( "... " + value ); } // Pull out the DNs and create a string array if ( v.size() > 0 ) { res = new String[v.size()]; v.copyInto( res ); v.removeAllElements(); setErrorCode( OK ); } else { printDebug( "No entries found for " + getFilter() ); setErrorCode( PROPERTY_NOT_FOUND ); } } catch (Exception e) { if (getDebug()) { printDebug( "Failed to search for " + getFilter() + ": " + e.toString() ); } setErrorCode( PROPERTY_NOT_FOUND ); } } catch (Exception e) { } // Disconnect try { if ( (m_ldc != null) && m_ldc.isConnected() ) m_ldc.disconnect(); } catch ( Exception e ) { } // Notify any clients with a PropertyChangeEvent notifyResult( res ); return res; } /** * The main body if we run it as application instead of applet. * @param args list of arguments */ public static void main(String args[]) { String[] scope = { "base", "one", "sub" }; int scopeIndex = -1; for( int i = 0; (i < scope.length) && (args.length == 5); i++ ) { if ( args[3].equalsIgnoreCase(scope[i]) ) { scopeIndex = i; break; } } if ( scopeIndex < 0 ) { System.out.println( "Usage: LDAPGetEntries host port base" + " scope filter" ); System.exit(1); } LDAPGetEntries app = new LDAPGetEntries(); app.setHost( args[0] ); app.setPort( java.lang.Integer.parseInt( args[1] ) ); app.setBase( args[2] ); app.setScope( scopeIndex ); app.setFilter( args[4] ); String[] response = app.getEntries(); if ( response != null ) { for( int i = 0; i < response.length; i++ ) System.out.println( "\t" + response[i] ); } System.exit(0); } /* * Variables */ private String _attribute = "dn"; private String[] _result; private String _sResult = null; private String _errorMsg = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPSimpleAuth.mf0000664001003300100330000000026006726072220030406 0ustar viveklviveklName: netscape/ldap/beans/LDAPSimpleAuth.class Java-Bean: True Name: netscape/ldap/beans/LDAPBasePropertySupport.class Name: netscape/ldap/beans/LDAPSimpleAuthBeanInfo.class ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPGetEntries.mf0000664001003300100330000000026106726072220030405 0ustar viveklviveklName: netscape/ldap/beans/LDAPGetEntries.class Java-Bean: True Name: netscape/ldap/beans/LDAPBasePropertySupport.class Name: netscape/ldap/beans/LDAPGetEntriesBeanInfo.class ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPGetPropertyBeanInfo.java0000664001003300100330000001302210602743267032544 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import java.beans.SimpleBeanInfo; import java.beans.BeanDescriptor; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.beans.ParameterDescriptor; import java.beans.BeanInfo; /** * BeanInfo for LDAPGetProperty */ public class LDAPGetPropertyBeanInfo extends SimpleBeanInfo { public LDAPGetPropertyBeanInfo() throws Exception { beanClass = Class.forName( "netscape.ldap.beans.LDAPGetProperty" ); try { PropertyDescriptor host = new PropertyDescriptor("host", beanClass); PropertyDescriptor port = new PropertyDescriptor("port", beanClass); PropertyDescriptor authDN = new PropertyDescriptor("authDN", beanClass); PropertyDescriptor authPassword = new PropertyDescriptor("authPassword", beanClass); PropertyDescriptor base = new PropertyDescriptor("base", beanClass); PropertyDescriptor filter = new PropertyDescriptor("filter", beanClass); PropertyDescriptor scope = new PropertyDescriptor("scope", beanClass); PropertyDescriptor attribute = new PropertyDescriptor("attribute", beanClass); PropertyDescriptor debug = new PropertyDescriptor("debug", beanClass); PropertyDescriptor rv[] = {host, port, authDN, authPassword, base, scope, attribute, filter, debug}; _propertyDescriptor = new PropertyDescriptor[rv.length]; for( int i = 0; i < rv.length; i++ ) _propertyDescriptor[i] = rv[i]; } catch (Exception e) { throw new Error(e.toString()); } // Publish events -------------------------------------------------- try { _eventSetDescriptor = new EventSetDescriptor[1]; _eventSetDescriptor[0] = new EventSetDescriptor(beanClass, "propertyChange", Class.forName("java.beans.PropertyChangeListener"), "propertyChange"); } catch (Exception e) { throw new Error(e.toString()); } // Publish descriptor --------------------------------------------- try { _beanDescriptor = new BeanDescriptor(beanClass); _beanDescriptor.setDisplayName( "LDAP property retrieval" ); _beanDescriptor.setShortDescription( "LDAP property retrieval -" + " provided a host, port, base, search filter," + " and optionally a username and password," + " return an array of string values both as a" + " function return and as a Property change event." ); } catch (Exception e) { } } /** * @return the public properties */ public PropertyDescriptor[] getPropertyDescriptors() { return _propertyDescriptor; } /** * @return the public methods */ public MethodDescriptor[] getMethodDescriptors() { return _methodDescriptor; } public EventSetDescriptor[] getEventSetDescriptors() { return _eventSetDescriptor; } public BeanInfo[] getAdditionalBeanInfo() { return null; } public int getDefaultEventIndex() { return -1; } public int getDefaultPropertyIndex() { return -1; } public BeanDescriptor getBeanDescriptor() { return _beanDescriptor; } private static Class beanClass; private BeanDescriptor _beanDescriptor; private EventSetDescriptor[] _eventSetDescriptor; private MethodDescriptor[] _methodDescriptor; private PropertyDescriptor[] _propertyDescriptor; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPIsMember.java0000664001003300100330000003772210620653753030376 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import netscape.ldap.*; import netscape.ldap.util.*; import java.util.Enumeration; import java.util.StringTokenizer; import java.io.Serializable; import java.awt.event.*; /** * Invisible Bean that just takes a host and port, optional * authentication name and password, and DN of a group and another DN * which might be a member of the group, and returns true or * false, depending on whether the second DN is a member of the first. *
* Also handles the case of dynamic groups by derefencing the URL * and searching for membership based on the url search. *
* It doesn't handle nested groups. *

* A false result means the member could not be identified as * belonging to the group. The exact reason is * available through getErrorCode(), which returns one of * the following: *
 *     OK
 *     INVALID_PARAMETER
 *     CONNECT_ERROR
 *     AUTHENTICATION_ERROR
 *     PROPERTY_NOT_FOUND
 *     AMBIGUOUS_RESULTS
 *     NO_SUCH_OBJECT
 *
*/ public class LDAPIsMember extends LDAPBasePropertySupport implements Serializable { /** * Constructor with no parameters */ public LDAPIsMember() {} /** * Constructor with host, port, and group DN initializers * @param host host string * @param port port number * @param group distinguished name of the group */ public LDAPIsMember( String host, int port, String group ) { setHost( host ); setPort( port ); setGroup( group ); } /** * Constructor with host, port, authentication DN and password * and group DN initializers * @param host host string * @param port port number * @param dn fully qualified distinguished name to authenticate * @param password password for authenticating the dn * @param theGroup distinguished name of the group */ public LDAPIsMember( String host, int port, String dn, String password, String theGroup ) { setHost( host ); setPort( port ); setGroup( theGroup ); setAuthDN( dn ); setAuthPassword( password ); } private void notifyResult( String newResult ) { firePropertyChange( "result", _result, newResult ); _result = newResult; } /** * Checks if an entity (specified by distinguished name) is a * member of a particular group (specified by distinguished name) * @return true if the specified member belongs to the group */ public boolean isMember() { String host = getHost(); int port = getPort(); String dn = getAuthDN(); String password = getAuthPassword(); String group = getGroup(); String member = getMember(); _result = new String(""); if ( (host == null) || (host.length() < 1) ) { printDebug( "Invalid host name" ); setErrorCode( INVALID_PARAMETER ); notifyResult(null); return false; } if ( (member == null) || (group == null) || (member.length() < 1) || (group.length() < 1) ) { printDebug( "Invalid member or group name" ); setErrorCode( INVALID_PARAMETER ); notifyResult(null); return false; } LDAPConnection m_ldc; boolean isMember = false; try { m_ldc = new LDAPConnection(); printDebug("Connecting to " + host + " " + port); connect( m_ldc, getHost(), getPort()); } catch (Exception e) { printDebug( "Failed to connect to " + host + ": " + e.toString() ); setErrorCode( CONNECT_ERROR ); notifyResult(null); return false; } // Authenticate? if ( (dn != null) && (password != null) && (dn.length() > 0) && (password.length() > 0) ) { printDebug( "Authenticating " + dn + " - " + password ); try { m_ldc.authenticate( dn, password ); } catch (Exception e) { printDebug( "Failed to authenticate to " + host + ": " + e.toString() ); setErrorCode( AUTHENTICATION_ERROR ); notifyResult(null); return false; } } int numDataEntries = 0; // Search try { String[] attrs = new String[4]; attrs[0] = "member"; attrs[1] = "uniqueMember"; attrs[2] = "memberOfGroup"; attrs[3] = "memberurl"; LDAPSearchResults results = m_ldc.search( group, LDAPConnection.SCOPE_BASE, "objectclass=*", attrs, false); // Should be only one result, at most LDAPEntry entry = null; LDAPEntry currEntry = null; while ( results.hasMoreElements() ) { try { currEntry = (LDAPEntry)results.next(); if (numDataEntries == 0) entry = currEntry; if (++numDataEntries > 1) { printDebug( "More than one entry found for " + getFilter() ); setErrorCode( AMBIGUOUS_RESULTS ); break; } } catch (LDAPReferralException e) { if (getDebug()) { notifyResult("Referral URLs: "); LDAPUrl refUrls[] = e.getURLs(); for (int i = 0; i < refUrls.length; i++) notifyResult(refUrls[i].getUrl()); } continue; } catch (LDAPException e) { if (getDebug()) notifyResult(e.toString()); continue; } } if (numDataEntries == 1) { printDebug( "... " + entry.getDN() ); String normMember = normalizeDN( member ); // Good - exactly one entry found; get the attributes LDAPAttributeSet attrset = entry.getAttributeSet(); Enumeration attrsenum = attrset.getAttributes(); while ( attrsenum.hasMoreElements() && !isMember ) { LDAPAttribute attr = (LDAPAttribute)attrsenum.nextElement(); printDebug( attr.getName() + " = " ); boolean urlHandler = attr.getName().equalsIgnoreCase("memberurl"); /* Get the values as strings. The following code also handles dynamic groups by calling URLMatch to see if an entry DN is found via a URL search. This is transparent to the caller of the bean. */ Enumeration valuesenum = attr.getStringValues(); if (valuesenum != null) { while (valuesenum.hasMoreElements()) { String val = (String)valuesenum.nextElement(); if (urlHandler) { if ( URLMatch(m_ldc, val, normMember) ) { isMember = true; setErrorCode( OK ); break; } } printDebug( "\t\t" + val ); String normFound = normalizeDN( val ); if ( normMember.equals( normFound ) ) { isMember = true; setErrorCode( OK ); break; } } } else { setErrorCode(PROPERTY_NOT_FOUND); printDebug("Failed to do string conversion for "+ attr.getName()); } } if ( !isMember ) setErrorCode( PROPERTY_NOT_FOUND ); } } catch (Exception e) { printDebug( "Failed to search for " + group + ": " + e.toString() ); setErrorCode( NO_SUCH_OBJECT ); } if (numDataEntries == 0) { printDebug( "No entries found for " + group ); setErrorCode( NO_SUCH_OBJECT ); } try { if ( (m_ldc != null) && m_ldc.isConnected() ) m_ldc.disconnect(); } catch ( Exception e ) { } if (isMember) notifyResult("Y"); else notifyResult("N"); return isMember; } /** * Checks if an entity (specified by distinguished name) is a * member of a particular group (specified by distinguished name) * @param host host string * @param port port number * @param dn fully qualified distinguished name to authenticate; * can be null or "" * @param password password for authenticating the dn; can be null * or "" * @param group distinguished name of the group * @param member distinguished name of member to be checked * @return true if the specified member belongs to the group */ public boolean isMember( String host, int port, String dn, String password, String group, String member ) { setHost(host); setPort(port); setAuthDN(dn); setAuthPassword(password); setGroup(group); setMember(member); return isMember(); } /** * Checks if an entity (specified by distinguished name) is a * member of a particular group (specified by distinguished name) */ public void isMember(ActionEvent e) { isMember(); } /** * Returns the distinguished name of the group * @return group name */ public String getGroup() { return _group; } /** * Sets the distinguished name of the group * @param group group name */ public void setGroup( String group ) { _group = group; } /** * Returns the distinguished name of the member * @return member name */ public String getMember() { return _member; } /** * Sets the distinguished name of the member * @param member member name */ public void setMember( String member ) { _member = member; } private String normalizeDN( String dn ) { return new DN( dn ).toRFCString().toUpperCase(); } /** * Return true if normMember is result of url search. * Urls from dynamic groups do not typically contain * the host and port so we need to fix them before * constructing an LDAP URL. * current ldap:///.... make ldap://host:port/... **/ private boolean URLMatch(LDAPConnection ld, String URL, String normMemberDN) { String cURL = URL; boolean isMember = false; int loc = URL.indexOf(":///"); if ( loc > 0) { cURL = URL.substring(0,loc) + "://" + ld.getHost() + ":" + ld.getPort() + URL.substring(loc+3); } printDebug("URLMatch: url = " + cURL + ", member DN = " + normMemberDN); LDAPUrl ldapurl; try { ldapurl = new LDAPUrl(cURL); printDebug("URL ->"+ldapurl.getUrl()); } catch (java.net.MalformedURLException murl) { printDebug("bad URL"); return isMember; } try { LDAPSearchResults results = ld.search(ldapurl); String entry = ""; while ( results.hasMoreElements() && !isMember ) { try { entry = ((LDAPEntry)results.next()).getDN(); String normEntry = normalizeDN( entry ); if (normEntry.equals(normMemberDN)) { isMember = true; break; } } catch (LDAPReferralException e) { if (getDebug()) { notifyResult("Referral URLs: "); LDAPUrl refUrls[] = e.getURLs(); for (int i = 0; i < refUrls.length; i++) notifyResult(refUrls[i].getUrl()); } continue; } catch (LDAPException e) { if (getDebug()) notifyResult(e.toString()); continue; } } } catch (LDAPException lde) { printDebug("Failed search for url " + ldapurl.getUrl()); setErrorCode(NO_SUCH_OBJECT); } return isMember; } /** * The main body if we run it as application instead of applet. * @param args list of arguments */ public static void main(String args[]) { if (args.length != 4) { System.out.println( "Usage: LDAPIsMember host port group" + " member" ); System.exit(1); } LDAPIsMember app = new LDAPIsMember(); app.setHost( args[0] ); app.setPort( java.lang.Integer.parseInt( args[1] ) ); app.setGroup( args[2] ); app.setMember( args[3] ); boolean response = app.isMember(); if ( response == false ) System.out.println( "Not a member" ); else System.out.println( "Is a member" ); System.exit(0); } /* * Variables */ public static final int OK = 0; public static final int INVALID_PARAMETER = 1; public static final int CONNECT_ERROR = 2; public static final int AUTHENTICATION_ERROR = 3; public static final int PROPERTY_NOT_FOUND = 4; public static final int AMBIGUOUS_RESULTS = 5; public static final int NO_SUCH_OBJECT = 5; private String _group = new String(""); private String _member = new String(""); private String _result = new String(""); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPGetProperty.java0000664001003300100330000003140710602743267031151 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import netscape.ldap.*; import netscape.ldap.beans.LDAPBasePropertySupport; import java.util.Enumeration; import java.util.Vector; import java.io.Serializable; import java.beans.*; import java.awt.event.*; /** * Invisible Bean that just takes a name and password, host and * port, and directory base and attribute name, and returns an * attribute's values from a Directory Server. The values are * assumed to be strings, and are returned as an array. The * search has the scope "SUB", which means that it will find * an entry anywhere at or below the directory base. *

* Optionally, a client can register as a PropertyChangeListener * and will be notified when the values are available. *

* A null result means the property fetch failed. The reason is * available through getErrorCode(), which returns one of * the following: *
 *     OK
 *     INVALID_PARAMETER
 *     CONNECT_ERROR
 *     AUTHENTICATION_ERROR
 *     PROPERTY_NOT_FOUND
 *     AMBIGUOUS_RESULTS
 *
*/ public class LDAPGetProperty extends LDAPBasePropertySupport implements Serializable { /** * Constructor with no parameters */ public LDAPGetProperty() {} /** * Constructor with host, port, and base initializers * @param theHost host string * @param thePort port number * @param theBase directory base string */ public LDAPGetProperty( String theHost, int thePort, String theBase ) { setHost( theHost ); setPort( thePort ); setBase( theBase ); } /** * Returns the name of the attribute to retrieve * @return attribute name to retrieve */ public String getAttribute() { return _attribute; } /** * Sets the attribute to retrieve */ public void setAttribute( String attr ) { _attribute = attr; } private void notifyResult( String[] newResult ) { String sNewResult = convertToString( newResult ); firePropertyChange( "result", _result, newResult ); _sResult = sNewResult; _result = newResult; } private void notifyResult( Vector newResult ) { firePropertyChange( "result", _resultV, newResult ); _resultV = (Vector)newResult.clone(); } private void notifyResult( String error ) { firePropertyChange( "error", _errorMsg, error ); _errorMsg = error; } public void setDNs(PropertyChangeEvent evt) { Object obj = (Object)evt.getNewValue(); if ((obj != null) && (obj instanceof String[])) { String[] strings = (String[])obj; if (strings.length == 0) return; _dns = new String[strings.length]; System.arraycopy(obj, 0, _dns, 0, strings.length); System.out.println("length of dns -> "+_dns.length); } } /** * Searches and returns values for a specified attribute * @param host host string * @param port port number * @param base directory base string * @param filter search filter * @param attribute name of property to return values for * @return Array of values for the property */ public String[] getProperty( String host, int port, String base, String filter, String attribute) { setHost( host ); setPort( port ); setBase( base ); setFilter( filter ); setAttribute( attribute ); return getProperty(); } // Added this method in order to get exposed in BDK public void getProperty(ActionEvent x) { getProperty(); } /** * Searches and returns values of a previously registered property, * using previously set parameters * @return Array of values for the property */ public String[] getProperty() { if ( (_attribute.length() < 1) || (getFilter().length() < 1) ) { printDebug( "Invalid attribute name or filter" ); setErrorCode( INVALID_PARAMETER ); notifyResult( (String[])null ); return null; } String[] res = null; LDAPConnection m_ldc; try { m_ldc = new LDAPConnection(); printDebug("Connecting to " + getHost() + " " + getPort()); connect( m_ldc, getHost(), getPort()); } catch (Exception e) { printDebug( "Failed to connect to " + getHost() + ": " + e.toString() ); setErrorCode( CONNECT_ERROR ); notifyResult( (String[])null ); return null; } // Authenticate? if (_dns != null) { for (int i=0; i<_dns.length; i++) { try { m_ldc.authenticate(_dns[i], getAuthPassword()); break; } catch (Exception e) { if (i == _dns.length-1) { printDebug( "Failed to authenticate to " + getHost() + ": " + e.toString() ); setErrorCode( AUTHENTICATION_ERROR ); notifyResult( (String[])null ); return null; } } } } else if ( (!getAuthDN().equals("")) && (!getAuthPassword().equals("")) ) { printDebug( "Authenticating " + getAuthDN() + " - " + getAuthPassword() ); try { m_ldc.authenticate( getAuthDN(), getAuthPassword() ); } catch (Exception e) { printDebug( "Failed to authenticate to " + getHost() + ": " + e.toString() ); setErrorCode( AUTHENTICATION_ERROR ); notifyResult( (String[])null ); return null; } } int numDataEntries = 0; // Search try { String[] attrs = new String[1]; attrs[0] = _attribute; LDAPSearchResults results = m_ldc.search(getBase(), getScope(), getFilter(), attrs, false); // Should be only one result, at most LDAPEntry currEntry = null; LDAPEntry entry = null; while ( results.hasMoreElements() ) { try { currEntry = results.next(); if (numDataEntries == 0) entry = currEntry; if (++numDataEntries > 1) { printDebug( "More than one entry found for " + getFilter() ); setErrorCode( AMBIGUOUS_RESULTS ); break; } } catch (LDAPException e) { if (getDebug()) notifyResult(e.toString()); continue; } } if (numDataEntries == 1) { printDebug( "... " + entry.getDN() ); // Good - exactly one entry found; get the attribute // Treat DN as a special case if ( _attribute.equalsIgnoreCase( "dn" ) ) { res = new String[1]; res[0] = entry.getDN(); setErrorCode( OK ); } else { LDAPAttributeSet attrset = entry.getAttributeSet(); Enumeration attrsenum = attrset.getAttributes(); if (attrsenum.hasMoreElements()) { LDAPAttribute attr = (LDAPAttribute)attrsenum.nextElement(); printDebug( attr.getName() + " = " ); // Get the values as strings Enumeration valuesenum = attr.getStringValues(); if (valuesenum != null) { // Create a string array for the results Vector v = new Vector(); while (valuesenum.hasMoreElements()) { String val = (String)valuesenum.nextElement(); v.addElement( val ); printDebug( "\t\t" + val ); } res = new String[v.size()]; v.copyInto( res ); setErrorCode( OK ); } else { Enumeration byteEnum = attr.getByteValues(); Vector v = new Vector(); while (byteEnum.hasMoreElements()) { byte[] val = (byte[])byteEnum.nextElement(); v.addElement( val ); printDebug( "\t\t" + val ); } setErrorCode( OK ); notifyResult(v); return (res = null); } } else { printDebug( "No properties found for " + _attribute ); setErrorCode( PROPERTY_NOT_FOUND ); } } } } catch (Exception e) { if (getDebug()) { printDebug( "Failed to search for " + getFilter() + ": " + e.toString() ); } setErrorCode( PROPERTY_NOT_FOUND ); } if (numDataEntries == 0) { printDebug( "No entries found for " + getFilter() ); setErrorCode( PROPERTY_NOT_FOUND ); } // Disconnect try { if ( (m_ldc != null) && m_ldc.isConnected() ) m_ldc.disconnect(); } catch ( Exception e ) { } notifyResult( res ); return res; } /** * The main body if we run it as application instead of applet. * @param args list of arguments */ public static void main(String args[]) { if (args.length != 5) { System.out.println( "Usage: LDAPGetProperty host port base" + " filter attribute" ); System.exit(1); } LDAPGetProperty app = new LDAPGetProperty(); app.setHost( args[0] ); app.setPort( java.lang.Integer.parseInt( args[1] ) ); app.setBase( args[2] ); app.setFilter( args[3] ); app.setAttribute( args[4] ); String[] response = app.getProperty(); if ( response != null ) { for( int i = 0; i < response.length; i++ ) System.out.println( "\t" + response[i] ); } System.exit(0); } /* * Variables */ private String[] _dns = null; private String _attribute = new String("cn"); transient private String[] _result; private Vector _resultV = null; private String _sResult = null; private String _errorMsg = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/DisplayString.java0000664001003300100330000000573110602743267031021 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import java.awt.*; import java.awt.event.*; import java.beans.*; import java.io.Serializable; public class DisplayString extends TextArea implements Serializable { public DisplayString() { super(); setEditable(false); } public void reportChange(PropertyChangeEvent evt) { Object obj = (Object)evt.getNewValue(); if (obj == null) { append("null\n"); return; } String[] values = null; if (obj instanceof String) { values = new String[1]; values[0] = (String)obj; } else values = (String[])obj; int width = getSize().width - 10; Font f = getFont(); for (int i=0; i width) { text = text.substring(0, text.length()-1); } } append(text+'\n'); } } public void clear (ActionEvent e) { setText(""); invalidate(); repaint(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPSimpleAuthBeanInfo.java0000664001003300100330000001152610602743267032342 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import java.beans.SimpleBeanInfo; import java.beans.BeanDescriptor; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.beans.ParameterDescriptor; import java.beans.BeanInfo; /** * BeanInfo for LDAPSimpleAuth */ public class LDAPSimpleAuthBeanInfo extends SimpleBeanInfo { public LDAPSimpleAuthBeanInfo() throws Exception { beanClass = Class.forName( "netscape.ldap.beans.LDAPSimpleAuth" ); try { PropertyDescriptor host = new PropertyDescriptor("host", beanClass); PropertyDescriptor port = new PropertyDescriptor("port", beanClass); PropertyDescriptor authDN = new PropertyDescriptor("authDN", beanClass); PropertyDescriptor authPassword = new PropertyDescriptor("authPassword", beanClass); PropertyDescriptor debug = new PropertyDescriptor("debug", beanClass); PropertyDescriptor rv[] = {host, port, authDN, authPassword, debug}; _propertyDescriptor = new PropertyDescriptor[rv.length]; for( int i = 0; i < rv.length; i++ ) _propertyDescriptor[i] = rv[i]; } catch (Exception e) { throw new Error(e.toString()); } // Publish events -------------------------------------------------- try { _eventSetDescriptor = new EventSetDescriptor[1]; _eventSetDescriptor[0] = new EventSetDescriptor(beanClass, "propertyChange", Class.forName("java.beans.PropertyChangeListener"), "propertyChange"); } catch (Exception e) { throw new Error(e.toString()); } // Publish descriptor --------------------------------------------- try { _beanDescriptor = new BeanDescriptor(beanClass); _beanDescriptor.setDisplayName( "LDAP user authentication" ); _beanDescriptor.setShortDescription( "LDAP user authentication -" + " provided a host, port, base, username, and password," + " report if the user can be authenticated both as a" + " function return and as a Property change event." ); } catch (Exception e) { } } /** * @return the public properties */ public PropertyDescriptor[] getPropertyDescriptors() { return _propertyDescriptor; } public EventSetDescriptor[] getEventSetDescriptors() { return _eventSetDescriptor; } public BeanInfo[] getAdditionalBeanInfo() { return null; } public int getDefaultEventIndex() { return -1; } public int getDefaultPropertyIndex() { return -1; } public BeanDescriptor getBeanDescriptor() { return _beanDescriptor; } private static Class beanClass; private BeanDescriptor _beanDescriptor; private EventSetDescriptor[] _eventSetDescriptor; private PropertyDescriptor[] _propertyDescriptor; } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPSimpleAuth.java0000664001003300100330000001541010602743267030734 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import netscape.ldap.*; import netscape.ldap.beans.LDAPBasePropertySupport; import java.io.Serializable; import java.awt.event.*; /** * Invisible Bean that just authenticates a user with a Directory * Server and returns Y or N. It takes a host and port, and then either * a full distinguished name and password, an RDN and directory base, or * a cn value and directory base. *

* Optionally, a client can register as * a PropertyChangeListener and will be notified when an authentication * completes. *

* The Bean can be used from JavaScript, as in the following example * where the parameters are taken from HTML text fields in an HTML * form called "input": *
 * 
 * <SCRIPT LANGUAGE="JavaScript">
 * function checkAuthentication() {
 *     auth = new Packages.netscape.ldap.beans.LDAPSimpleAuth();
 *     auth.setHost( document.input.host.value );
 *     auth.setPort( parseInt(document.input.port.value) );
 *     auth.setAuthDN( document.input.username.value );
 *     auth.setAuthPassword( document.input.password.value );
 *     result = auth.authenticate();
 *     alert( "The response is: " + result );
 * }
 * </SCRIPT>
 * 
 *
*/ public class LDAPSimpleAuth extends LDAPBasePropertySupport implements Serializable { /** * Constructor with no parameters */ public LDAPSimpleAuth() {} /** * Constructor with host and port initializers * @param theHost host string * @param thePort port number */ public LDAPSimpleAuth( String theHost, int thePort ) { setHost( theHost ); setPort( thePort ); } /** * Constructor with all required authentication parameters * @param theHost host string * @param thePort port number * @param dn fully qualified distinguished name to authenticate * @param password password for authenticating the dn */ public LDAPSimpleAuth( String theHost, int thePort, String dn, String password ) { setHost( theHost ); setPort( thePort ); setAuthDN( dn ); setAuthPassword( password ); } private void notifyResult( String newResult ) { firePropertyChange( "result", result, newResult ); result = newResult; } /** * Connect to LDAP server using parameters specified in * constructor and/or by setting properties and attempt to * authenticate. * @return "Y" on successful authentication, "N" otherwise */ public String authenticate() { LDAPConnection m_ldc = null; String result = "N"; try { m_ldc = new LDAPConnection(); System.out.println("Connecting to " + getHost() + " " + getPort()); connect( m_ldc, getHost(), getPort()); } catch (Exception e) { System.out.println( "Failed to connect to " + getHost() + ": " + e.toString() ); } if ( m_ldc.isConnected() ) { System.out.println( "Authenticating " + getAuthDN() ); try { m_ldc.authenticate( getAuthDN(), getAuthPassword() ); result = "Y"; } catch (Exception e) { System.out.println( "Failed to authenticate to " + getHost() + ": " + e.toString() ); } } try { if ( (m_ldc != null) && m_ldc.isConnected() ) m_ldc.disconnect(); } catch ( Exception e ) { } notifyResult( result ); return result; } /** * Connect to LDAP server using parameters specified in * constructor and/or by setting properties and attempt to * authenticate. * @param dn fully qualified distinguished name to authenticate * @param password password for authenticating the dn * @return "Y" on successful authentication, "N" otherwise */ public String authenticate( String dn, String password ) { setAuthDN( dn ); setAuthPassword( password ); return authenticate(); } public void authenticate( ActionEvent x) { authenticate(); } /** * The main body if we run it as stand-alone application. * @param args list of arguments */ public static void main(String args[]) { if (args.length != 4) { System.out.println( " LDAPSimpleAuth " + "host port DN password" ); System.exit(1); } LDAPSimpleAuth app = new LDAPSimpleAuth(); app.setHost( args[0] ); app.setPort( java.lang.Integer.parseInt( args[1] ) ); app.setAuthDN( args[2] ); app.setAuthPassword( args[3] ); String response = app.authenticate(); System.out.println( "Response: " + response ); System.exit(0); } /* * Variables */ transient private String result = new String(""); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapbeans/netscape/ldap/beans/LDAPBasePropertySupport.java0000664001003300100330000003070110602743267032675 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package netscape.ldap.beans; import netscape.ldap.*; import java.util.StringTokenizer; // This class has a bound property import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeSupport; import java.io.Serializable; /** * This is a base class that is extended by various specialized LDAP * Beans. It provides the common properties and accessors used by * them. */ public class LDAPBasePropertySupport implements Serializable { /** * Constructor with no parameters */ public LDAPBasePropertySupport() {} /** * Returns the host to search at. * @return DNS name or dotted IP name of host to search at */ public String getHost() { return _host; } /** * Sets host string. * @param theHost host name */ public void setHost( String theHost ) { _host = theHost; } /** * Returns the port to search at. * @return Port to search at */ public int getPort() { return _port; } /** * Sets port number. * @param thePort port */ public void setPort( int thePort ) { _port = thePort; } /** * Returns the directory base to search at. * @return directory base to search */ public String getBase() { return _base; } /** * Sets the starting base * @param theBase starting base */ public void setBase( String theBase ) { _base = theBase; } /** * Returns the DN to authenticate as; null or empty for anonymous. * @return DN to authenticate as */ public String getAuthDN() { return _authDN; } /** * Sets the DN to authenticate as; null or empty for anonymous. * @param authDN the DN to authenticate as */ public void setAuthDN( String authDN ) { this._authDN = authDN; } /** * Returns the password for the DN to authenticate as * @return Password of DN to authenticate as */ public String getAuthPassword() { return _authPassword; } /** * Sets the password for the DN to authenticate as * @param authPassword the password to use in authentication */ public void setAuthPassword( String authPassword ) { this._authPassword = authPassword; } /** * Returns the user name * @return The user name */ public String getUserName() { return _userName; } /** * Set the user name. The name should be of the form "Polly Plum". * @param name The user name */ public void setUserName( String name ) { _userName = name; } /** * Return the user ID. * @return name the user id */ public String getUserID() { return _userID; } /** * Set the user ID. * @param name the value of the user id */ public void setUserID( String name ) { _userID = name; } /** * Get the current search scope * @return the current search scope as integer */ public int getScope() { return _scope; } /** * Set the search scope using an integer * @param scope one of LDAPConnection.SCOPE_BASE, * LDAPConnection.SCOPE_SUB, LDAPConnection.SCOPE_ONE */ public void setScope( int scope ) { _scope = scope; } /** * Returns the search filter * @return search filter */ public String getFilter() { return _filter; } /** * Sets the search filter * @param filter search filter */ public void setFilter( String filter ) { _filter = filter; } /** * Returns true if debug output is on * @return true if debug output is on */ public boolean getDebug() { return _debug; } /** * Turns debug output on or off * @param on true for debug output */ public void setDebug( boolean on ) { _debug = on; } /** * Returns the latest error code * @return The latest error code */ public int getErrorCode() { return _errCode; } /** * Sets an error code for retrieval by a client * @param code An error code */ public void setErrorCode( int code ) { _errCode = code; } /** * Add a client to be notified when an authentication result is in * @param listener a client to be notified of changes */ public void addPropertyChangeListener( PropertyChangeListener listener ) { printDebug( "Adding listener " + listener ); m_propSupport.addPropertyChangeListener( listener ); } /** * Remove a client which had requested notification on authentication * @param listener a client to not be notified of changes */ public void removePropertyChangeListener( PropertyChangeListener listener ) { m_propSupport.removePropertyChangeListener( listener ); } /** * Support for bound property notification * @param propName Name of changed property * @param oldValue Previous value of property * @param newValue New value of property */ public void firePropertyChange( String propName, Object oldValue, Object newValue ) { if (m_propSupport == null) m_propSupport = new PropertyChangeSupport( this ); m_propSupport.firePropertyChange( propName, oldValue, newValue ); } protected void printDebug( String s ) { if ( _debug ) System.out.println( s ); } /** * Sets up basic connection privileges for Communicator if necessary, * and connects * @param host Host to connect to. * @param port Port number. * @exception LDAPException from connect() */ protected void connect( LDAPConnection conn, String host, int port ) throws LDAPException { boolean needsPrivileges = true; /* Running standalone? */ SecurityManager sec = System.getSecurityManager(); printDebug( "Security manager = " + sec ); if ( sec == null ) { printDebug( "No security manager" ); /* Not an applet, we can do what we want to */ needsPrivileges = false; /* Can't do instanceof on an abstract class */ } else if ( sec.toString().startsWith("java.lang.NullSecurityManager") ) { printDebug( "No security manager" ); /* Not an applet, we can do what we want to */ needsPrivileges = false; } else if ( sec.toString().startsWith( "netscape.security.AppletSecurity" ) ) { /* Connecting to the local host? */ try { if ( host.equalsIgnoreCase( java.net.InetAddress.getLocalHost().getHostName() ) ) needsPrivileges = false; } catch ( java.net.UnknownHostException e ) { } } if ( needsPrivileges ) { /* Running as applet. Is PrivilegeManager around? */ String mgr = "netscape.security.PrivilegeManager"; try { Class c = Class.forName( mgr ); java.lang.reflect.Method[] m = c.getMethods(); if ( m != null ) { for( int i = 0; i < m.length; i++ ) { if ( m[i].getName().equals( "enablePrivilege" ) ) { try { Object[] args = new Object[1]; args[0] = new String( "UniversalConnect" ); m[i].invoke( null, args ); printDebug( "UniversalConnect enabled" ); args[0] = new String( "UniversalPropertyRead" ); m[i].invoke( null, args ); printDebug( "UniversalPropertyRead enabled" ); } catch ( Exception e ) { printDebug( "Exception on invoking " + "enablePrivilege: " + e.toString() ); break; } break; } } } } catch ( ClassNotFoundException e ) { printDebug( "no " + mgr ); } } conn.connect( host, port ); setDefaultReferralCredentials( conn ); } protected void setDefaultReferralCredentials( LDAPConnection conn ) { final LDAPConnection m_conn = conn; LDAPRebind rebind = new LDAPRebind() { public LDAPRebindAuth getRebindAuthentication( String host, int port ) { return new LDAPRebindAuth( m_conn.getAuthenticationDN(), m_conn.getAuthenticationPassword() ); } }; try { conn.setOption(LDAPConnection.REFERRALS, Boolean.TRUE); conn.setOption(LDAPConnection.REFERRALS_REBIND_PROC, rebind); } catch (LDAPException e) { //will never happen } } /** * Utility method to convert an array of Strings to a single String * with line feeds between elements. * @param aResult The array of Strings to convert * @return A String with the elements separated by line feeds */ public String convertToString( String[] aResult ) { String sResult = ""; if ( null != aResult ) { for ( int i = 0; i < aResult.length; i++ ) { sResult += aResult[i] + "\n"; } } return sResult; } /* * Variables */ /* Error codes from search operations, etc */ public static final int OK = 0; public static final int INVALID_PARAMETER = 1; public static final int CONNECT_ERROR = 2; public static final int AUTHENTICATION_ERROR = 3; public static final int PROPERTY_NOT_FOUND = 4; public static final int AMBIGUOUS_RESULTS = 5; public static final int NO_SUCH_OBJECT = 6; private boolean _debug = false; private int _errCode = 0; private String _host = new String("localhost"); private int _port = 389; private int _scope = LDAPConnection.SCOPE_SUB; private String _base = new String(""); private String _filter = new String(""); private String _authDN = new String(""); private String _authPassword = new String(""); private String _userName = new String(""); private String _userID = new String(""); transient private PropertyChangeSupport m_propSupport = new PropertyChangeSupport( this ); } ldapjdk-4.18/mozilla/directory/java-sdk/ldapsp-relnotes.htm0000664001003300100330000005403006767763004023451 0ustar viveklvivekl Netscape LDAP Service Provider - Readme

                Netscape LDAP Service Provider for JNDI (09-15-99)

The Netscape LDAP service provider for JNDI implements the JNDI DirContext interface. It is implemented as a layer on top of the Netscape Directory SDK for Java (ldapjdk.jar). While the ldapjdk uses the LDAP connection as the primary abstraction enabling the access to the directory services, the JNDI provider uses the concept of  a  Directory Context (the DirContext interface) to achieve the same functionality. A DirContext as an equivalent of a directory entry in the ldapjdk.

The following sections are available in this document:

Using Netscape Ldap Service Provider
Environment Properties
Working With Controls
What's Not Implemented
 

Using Netscape LDAP Service Provider

The current implementation  is based on the JNDI 1.2 FCS. In addition to the DirContext interface implementation, the Netscape LDAP provider implements the new JNDI event service (javax.naming.event package) and support for controls (javax.naming.ldap package) which were introduced with the JNDI 1.2.

To use the service provider, you'll need to:

(1) Add the provider and the jars it depends on in the classpath. For example, on Windows NT the classpath should be set as follows:

set classpath=%classpath%;ldapsp.jar;ldapjdk.jar;jndi.jar;

Assuming that all the jars are available in the current directory. The listed jar files are:
 
ldapsp.jar  Netscape LDAP Service Provider for JNDI
ldapjdk.jar Netscape Directory SDK for Java 4.0
jndi.jar JNDI 1.2

(2) Specify the Netscape LDAP provider as the provider in the context environment created for the initial context;
       Hashtable env = new Hashtable();
   env.put(Context.INITIAL_CONTEXT_FACTORY,
          "com.netscape.jndi.ldap.LdapContextFactory");
    env.put(...
    ...
    DirContext ctx = new InitialDirContext(env);

(3) For storing of  Java objects in a LDAP Directory, the JNDI java object schema must be added to the directory. To enable the JNDI schema copy the file java-object-schema.conf  to your <server-root>/slapd-<id>/config directory, and include the file into your  <server-root>/slapd-<id>/config/ns-schema.conf schema configuration file. If you are using Netscape Directory Server 4.1, you just need to replace the existing  java-object-schema.conf  file.

For examples of using JNDI please go to the official JNDI site.

Environment Properties

The environment properties can be passed directly to the initial context as a hash table, or specified as system properties. For compatibility reasons, for those environment properties that are relevant to LDAP protocol but are not defined in the JNDI, the Netscape LDAP provider is using the same property names as the SUN LDAP service provided, if a property with the same semantics is defined by the SUN provider.

Note: If a new property is added to the context environment, or an existing property is changed after the initial context is created, the change will be immediately visible unless the changed property pertains to the connection. For changes related to connection, in order to take effect you'll need to invoke LdapContext.reconnect().

The following table contains JNDI environment properties are relevant for the Netscape LDAP service provider. Properties not found in this table are silently ignored.
 
Environment Property Description
java.naming.factory.initial
This environment property is used to select the LDAP provider. To select the Netscape LDAP provider "com.netscape.jndi.ldap.LdapContextFactory" should be specified.

 env.put(Context.INITIAL_CONTEXT_FACTORY, "com.netscape.jndi.ldap.LdapContextFactory");

java.naming.provider.url
Specifies LDAP server information. For example:

env.put(Context.PROVIDER_URL, "ldap://dilly.mcom.com:389");

If it has not been set then the provider will attempt to access an LDAP server at port 389 on the local host.

java.naming.ldap.version
Specifies the protocol version for the provider. Two values are
possible:
  • 2 - selects LDAP Version 2 (LDAPv2)
  • 3 - selects LDAP Version 3 (LDAPv3)
 For example,  env.put("java.naming.ldap.version", "3");

If this environment property has not been set then the provider will
attempt to use LDAPv3.

java.naming.security.authentication
Specifies the authentication mechanism for the provider to use.
The following values are permitted for this property:
  •    none     - use no authentication (anonymous)
  •    simple   - use weak authentication (clear text password)
  • space separated list of sasl mechanisms
If this environment property has not been set but the     java.naming.security.principal environment property has been
set then the provider will use 'simple'. If neither have been set then the provider will use anonymous bind.
java.naming.security.principal
Specifies the DN of the principal to be authenticated. For example:

env.put(Context.SECURITY_PRINCIPAL, "cn=Directory manager");

If this environment property has not been set then the provider
will use anonymous bind.

java.naming.security.credentials
Specifies the password of the principal to be authenticated. For example:

env.put(Context.SECURITY_CREDENTIALS, "secret");

java.naming.security.protocol
 Specifies the security protocol for the provider to use. One possible value is defined:  ssl - use Secure Socket Layer

 env.put(Context.SECURITY_PROTOCOL, "ssl");

When this environment property has been set and the
 java.naming.ldap.factory.socket property has not been set, then the ldapjdk default socket factory  netscape.net.SSLSocket is used. This class is provided with Netscape Communicator 4.05 and higher. If java.naming.ldap.factory.socket property has been set, the
socket factory specified therein is used.

java.naming.security.sasl.authorizationId
Specifies which user DN to use for SASL authentication. 
java.naming.security.sasl.callback
Specifies a callback handler for SASL mechanisms. This value of this property  must be an instance of
 javax.security.auth.callback.CallbackHandler.

  java.naming.security.sasl.client.pkgs

Specifies a "|"-separated list of packages. These packages are used to located factories that produce SASL mechanism drivers. 
java.naming.ldap.factory.socket Specifies the class name of a socket factory. This environment
property is used to override the default socket factory. For example:

env.put("java.naming.ldap.factory.socket", "crysec.SSL.SSLSocket");

If  the security protocol environment property has been set but this property has not been set, then this property's value is set to netscape.net.SSLSocket. See ldapjdk documentation for more information for connecting over SSL.
 

java.naming.ldap.ssl.ciphers Specifies the suite of ciphers used for SSL connections made through sockets created by the factory specified with java.naming.ldap.factory.socket. The value of this property is of type java.lang.Object. For example:

try {
    Class c = Class.forName("crysec.SSL.SSLParams");
    java.lang.reflect.Method m = 
         getMethod("getCipherSuite",new Class[0]);
    Object cipherSuite = m.invoke(null,null);
    if (cipherSuite != null) {
       env.put("java.naming.ldap.ssl.ciphers", cipherSuite);
    }
}
catch (Exception e) {}
 

java.naming.batchsize Specifies that search results are to be returned in batches. A setting of zero indicates that the provider should block until all results have been received. If this environment property has not been set then search  results are returned in batches of one.
java.naming.ldap.maxresults
The default  maximum number of search results to be returned for a search request. 0 means no limit. If not specified, the ldapjdk default is 1000. This value can be overridden per request with the parameter SearchConstraints in the DirContex.search() method.
java.naming.ldap.timelimit The default maximum number of milliseconds to wait for a search operation to complete. If 0, which is the ldapjdk default, there is no maximum time limit for a search operation. This value can be overridden per request with the parameter SearchConstraints in the DirContex.search() method.
java.naming.referral
 Specifies how referrals shall be handled by the provider. Three  possible values are defined:
  •  follow - automatically follow any referrals
  •  throw  - throw a ReferralException for each referral
  •  ignore - ignore referrals if they appear in results and treat them like ordinary attributes if they appear in entries.
If this environment property has not been set then the LDAP provider by default follows referrals.
java.naming.ldap.referral.limit
Specifies the maximum number of referrals to follow in a chain of
referrals. A setting of zero indicates that there is no limit. The default limit is 10.
java.naming.ldap.deleteRDN  Specifies whether the old RDN is removed during rename().
 If the value is "true", the old RDN is removed; otherwise,
 the RDN is not removed.  The default value is true.
java.naming.ldap.derefAliases
 Specifies how aliases are dereferenced during search operations.
 The possible values are:
  • always        always dereference aliases
  • never         never dereference aliases
  • finding       dereference aliases only during name resolution
  • searching   dereference aliases only after name resolution
 NOTE: Netscape LDAP Server 3.x and 4.x do not support aliases
java.naming.ldap.typesOnly
 Specifies whether only attribute types are to be returned during
 searches and getAttributes(). Its possible values are "true" or "false". The default is false.
java.naming.ldap.conntrol.connect An array of Controls to be set on the LDAPConnection before a connection attempt is made to the server. 
java.naming.ldap.attributes.binary Specifies attributes that have binary syntax. It extends the provider's list of known binary attributes. Its value is a space separated list of attribute names.

env.put("java.naming.ldap.attributes.binary", "mpegVideo");

In contrast to ldapjdk, JNDI does not provide for reading of attribute values as either Strings or byte arrays. All attributes are returned as Strings unless recognized as having binary syntax. The values of attributes that have binary syntax are returned as byte arrays instead of Strings. 

If this environment property has not been set then, by default, only the following attributes are considered to have binary syntax:

  • attribute names containing ';binary'
  • photo                      (0.9.2342.19200300.100.1.7)
  • personalSignature  (0.9.2342.19200300.100.1.53)
  • audio                      (0.9.2342.19200300.100.1.55)
  • jpegPhoto               (0.9.2342.19200300.100.1.60)
  • javaSerializedData   (1.3.6.1.4.1.42.2.27.4.1.7)
  • thumbnailPhoto         (1.3.6.1.4.1.1466.101.120.35)
  • thumbnailLogo          (1.3.6.1.4.1.1466.101.120.36)
  • userPassword           (2.5.4.35)
  • userCertificate          (2.5.4.36)
  • cACertificate            (2.5.4.37)
  • authorityRevocationList    (2.5.4.38)
  • certificateRevocationList  (2.5.4.39)
  • crossCertificatePair          (2.5.4.40)
  • x500UniqueIdentifier        (2.5.4.45)
java.naming.ldap.ref.separator Specifies the character to use when encoding a RefAddr object in
the javaReferenceAddress attribute. This environment property should be used to avoid a conflict in  the case where the default separator character appears in the components of a RefAddr object.

 If unspecified, the default separator is the hash character '#'.

Working with Controls

JNDI 1.2 adds support for Controls which are fully implemented with the Netscape LDAP provider. However, JNDI 1.2 does not define interfaces for any of the standard controls, like for example the sort control. Instead, the task of defining particular controls and their interfaces is left to service providers. Therefore, if using controls, you will also need to import the  com.netscape.jndi.ldap.controls package in your souce in addition to the JNDI packages.

Being implemented on the top of ldapjdk, the Netscape LDAP provider simply exposes all of the ldapjdk controls as JNDI controls. Thus, the control APIs are exactly the same as in ldapjdk. The only difference is that for the LDAP provider controls class names start with  "Ldap" while in ldapjdk the class names start with "LDAP". For instance, the ldapjdk control LDAPSortControl is LdapSortControl in the Netscape LDAP provider.

Here is an example of how to use the LdapSortControl. Notice that you'll need to obtain a LdapContext object as an initial context, because controls are not part of the directory context (DirContext). That means that instead of calling getInitialDirContext() you 'll need to call getInitialLdapContext().

import java.util.Hashtable;
import javax.naming.*;
import javax.naming.directory.*;
import javax.naming.ldap.*;
import com.netscape.jndi.ldap.controls.*;

public class SortReverseOrder {

public static void main(String[] args) {

    Hashtable env = new Hashtable(5, 0.75f);
    /*
     * Specify the initial context implementation to use.
     */
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.netscape.jndi.ldap.LdapContextFactory");

    /* Specify host and port to use for directory service */
    //env.put(Context.PROVIDER_URL, "ldap://localhost:389");

    LdapContext ctx = null;
    try {
        /* get a handle to an Initial DirContext */
        ctx = new InitialLdapContext(env, null);

        /* specify search constraints to search subtree */
        SearchControls cons = new SearchControls();
        cons.setSearchScope(SearchControls.SUBTREE_SCOPE);
        cons.setReturningAttributes(new String[] { "sn" });

        // specify sort control
        ctx.setRequestControls(
           new Control[] {new LdapSortControl(
              new LdapSortKey[]{
                 new LdapSortKey("sn", true,null)},Control.CRITICAL)});

        /* search for all entries of type person */
        NamingEnumeration results
            = ctx.search("o=mcom.com", "(objectclass=person)", cons);

        /* for each entry print out name + all attrs and values */
        while (results != null && results.hasMore()) {
            SearchResult si = (SearchResult)results.next();

            Attributes attrs = si.getAttributes();
            /* print each attribute */
            for (NamingEnumeration ae = attrs.getAll(); ae.hasMoreElements();) {
                Attribute attr = (Attribute)ae.next();
                String attrId = attr.getID();

                    /* print each value */
                for (NamingEnumeration vals = attr.getAll(); vals.hasMore();
                    System.out.println(attrId + ": " + vals.next()));
                }
            System.out.println();
        }
    }
    catch (NamingException e) {
        System.err.println("Search example failed.");
        e.printStackTrace();
    }
    finally {
       // cleanup
       if (ctx != null) {
           try { ctx.close(); } catch (Exception e) {}
       }
    }
}
}

For full documenation on available controls and their interfaces, please check the ldapjdk documentation.

What's Not Implemented

Currently, the following JNDI features are not implemented by the Netscape JNDI provider:
  • Support for federated names
  • Support for the code base attribute for objects stored in LDAP directory. Therefore, the class name specified with the javaClassName attribute must be available in the local CLASSPATH.
  • search()  method for schema directory contexts. Instead, Context.lookup() should be used..
ldapjdk-4.18/mozilla/directory/java-sdk/build.xml0000664001003300100330000002602210667347007021437 0ustar viveklvivekl The following targets are defined: dist : will build entire sdk and package all the pieces dist-jdk : will build only the ldap jdk jar (ldapjdk.jar) dist-filter : will build only the ldap filter jar (ldapfilt.jar) dist-beans : will build only the beans jar (ldapbeans.jar) dist-jndi : will build only the jndi service provider (ldapsp.jar) dist-docs : will package up all the documentation (ldapdoc.zip) build : will compile the entire sdk but not package build-jdk : will compile only the ldap jdk jar build-filter : will compile only the filter classes build-beans : will compile only the ldap beans build-jndi : will compile only the jndi service provider build-docs : will compile the complete javadocs clean : will remove all compiled files and packages clean-dists : will remove all the jars and zips clean-builds : will remove all the compiled classes compiling for jdk version=${ant.java.version} ssl libraries path=${jsselibs} Building all packages.... ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/0000775001003300100330000000000010667357314021406 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/tools/0000775001003300100330000000000010667357314022546 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/tools/LDAPTool.java0000664001003300100330000001165010602743267024765 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ import org.ietf.ldap.*; import org.ietf.ldap.util.*; import org.ietf.ldap.controls.*; /** * LDAPTool * Base class for LDAP command-line tools * * @version 1.0 * @author Rob Weltman **/ class LDAPTool { /** * This function is to extract specified parameters from the * arguments list. * @param args list of args */ protected static GetOpt extractParameters(String privateOpts, String args[]) { GetOpt options = new GetOpt("vnRMD:h:O:p:w:d:V:y:" + privateOpts, args); if (options.hasOption('n')) m_justShow = true; if (options.hasOption('v')) m_verbose = true; if (options.hasOption('R')) m_referrals = false; /* -D bind DN */ if (options.hasOption('D')) m_binddn = options.getOptionParam('D'); /* -h ldap host */ if (options.hasOption('h')) m_ldaphost = options.getOptionParam('h'); /* -p ldap port */ if (options.hasOption('p')) { /* if the option is -p */ try { m_ldapport = Integer.parseInt(options.getOptionParam('p')); } catch (NumberFormatException e) { m_ldapport = 389; } } /* if the option is -p */ /* -O hop limit */ if (options.hasOption('O')) { /* if the option is -O */ try { m_hopLimit = Integer.parseInt(options.getOptionParam('O')); } catch (NumberFormatException e) { m_hopLimit = 10; } } /* if the option is -O */ /* -d debug level */ if (options.hasOption('d')) { /* if the option is -d */ try { m_debugLevel = Integer.parseInt(options.getOptionParam('d')); } catch (NumberFormatException e) { m_debugLevel = 0; } } /* if the option is -d */ /* -V ldap protocol version */ if (options.hasOption('V')) { /* if the option is -V */ try { m_version = Integer.parseInt(options.getOptionParam('V')); } catch (NumberFormatException e) { m_version = 3; } } /* if the option is -V */ /* -w bind password */ if (options.hasOption('w')) m_passwd = options.getOptionParam('w'); /* -y proxy DN */ if (options.hasOption('y')) m_proxyControl = new LDAPProxiedAuthControl( options.getOptionParam('y'), true ); /* -M treat ref attribute as ordinary entry */ if (options.hasOption('M')) m_ordinary = true; return options; } protected static void setDefaultReferralCredentials( LDAPConstraints cons ) { LDAPAuthHandler rebind = new LDAPAuthHandler() { public LDAPAuthProvider getAuthProvider( String host, int port ) { return new LDAPAuthProvider( m_client.getAuthenticationDN(), m_passwd.getBytes() ); } }; cons.setReferralFollowing( true ); cons.setReferralHandler( rebind ); } protected static int m_ldapport = 389; protected static String m_binddn = null; protected static String m_ldaphost = "localhost"; protected static String m_passwd = null; protected static int m_version = 3; protected static int m_debugLevel = 0; protected static int m_hopLimit = 10; protected static boolean m_referrals = true; protected static LDAPConnection m_client = null; protected static boolean m_justShow = false; protected static boolean m_verbose = false; protected static boolean m_ordinary = false; protected static LDAPControl m_proxyControl = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/tools/LDAPModify.java0000664001003300100330000005030710602743267025301 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * @(#) LDAPModify.java * */ import java.io.*; import java.net.*; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.util.*; /** * Executes modify, delete, add, and modRDN. * This class is implemented based on the java LDAP classes. * *
 * usage       : java LDAPModify [options]
 * example     : java LDAPModify -D "uid=johnj,ou=People,o=Airius.com"
 *                 -w "password" -h ldap.netscape.com -p 389
 *                 -f modify.cfg
 *
 * options: {np = no parameters, p = requires parameters}
 *  'D' bind DN --------------------------------------------- p
 *  'w' bind password --------------------------------------- p
 *  'f' input file ------------------------------------------ p
 *  'h' LDAP host ------------------------------------------- p
 *  'p' LDAP port ------------------------------------------- p
 *  'e' record rejected records in a text file -------------- p
 *  'c' continuous, do not stop on error ------------------- np
 *  'a' add, if no operation is specified ------------------ np
 *  'r' replace, if no operation is specified -------------- np
 *  'b' binary, read values starting with / from a file ---- np
 *  'd' debugging level ------------------------------------- p
 *  'V' version, specify LDAP protocol version (2 or 3) ----- p
 *  'R' do not follow referrals ---------------------------- np
 *  'O' hop limit ------------------------------------------- p
 *  'H' help, display usage--------------------------------- np
 *  'M' manage referrals, do not follow them --------------- np
 *  'n' show what would be done but do not do it ----------- np
 *  'v' verbose mode --------------------------------------- np
 *  'e' reject file, where to list rejected records --------- p
 *  'y' proxy DN, DN to use for access control -------------- p
 *
 * note: '-' or '/' is used to mark an option field.
 *       e.g. -a -b /c /d parameter -e parameter
 *
 * 
* * @version 1.0 */ public class LDAPModify extends LDAPTool { /* LDAPModify */ public static void main(String args[]) { /* main */ /* extract parameters from the arguments list */ extractParameters(args); /* perform an LDAP client connection operation */ try { if (!m_justShow) { m_client = new LDAPConnection(); m_client.connect( m_ldaphost, m_ldapport ); } } catch(Exception e) { System.err.println("Error: client connection failed!"); System.exit(0); } /* perform an LDAP bind operation */ if (!m_justShow) { if ( (m_binddn != null) && (m_passwd != null) ) { try { m_client.bind( m_version, m_binddn, m_passwd.getBytes() ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } } } try { if ( m_file != null ) m_ldif = new LDIF(m_file); else { m_ldif = new LDIF(); } } catch (Exception e) { if ( m_file == null ) m_file = "stdin"; System.err.println("Failed to read LDIF file " + m_file + ", " + e.toString()); System.exit(0); } /* performs a JDAP Modify operation */ try { doModify(); } catch (Exception e) { System.err.println( e.toString() ); } /* disconnect */ try { if (!m_justShow) m_client.disconnect(); } catch (Exception e) { System.err.println( e.toString() ); } System.exit(0); } /* main */ /** * Prints usage. */ private static void doUsage() { System.err.println( "usage: LDAPModify [options]" ); System.err.println("options"); System.err.println(" -h host LDAP server name or IP address"); System.err.println(" -p port LDAP server TCP port number"); System.err.println(" -V version LDAP protocol version " + "number (default is 3)"); System.err.println(" -D binddn bind dn"); System.err.println(" -w password bind passwd (for simple " + "authentication)"); System.err.println(" -d level set LDAP debugging level " + "to \'level\'"); System.err.println(" -R do not automatically follow " + "referrals"); System.err.println(" -O hop limit maximum number of referral " + "hops to traverse"); System.err.println(" -H display usage information"); System.err.println(" -c continuous mode (do not " + "stop on errors)"); System.err.println(" -M manage references (treat them " + "as regular entries)"); System.err.println(" -f file read modifications from " + "file instead of standard input"); System.err.println(" -a add entries"); System.err.println(" -b read values that start with " + "/ from files (for bin attrs)"); System.err.println(" -n show what would be done but " + "don\'t actually do it"); System.err.println(" -v run in verbose mode"); System.err.println(" -r replace existing values by " + "default"); System.err.println(" -e rejectfile save rejected entries in " + "\'rejfile\'"); System.err.println(" -y proxy-DN DN to use for access control"); } /** * This class-method is used to extract specified parameters from the * arguments list. */ /* extract parameters */ protected static void extractParameters(String args[]) { String privateOpts = "abcHFre:f:"; GetOpt options = LDAPTool.extractParameters( privateOpts, args ); /* -H Help */ if (options.hasOption('H')) { doUsage(); System.exit(0); } /* Help */ if (options.hasOption('F')) m_force = true; if (options.hasOption('a')) m_add = true; if (options.hasOption('c')) m_continuous = true; if (options.hasOption('r')) m_add = false; if (options.hasOption('b')) m_binaryFiles = true; /* -f input file */ if(options.hasOption('f')) { /* Is input file */ m_file = (String)options.getOptionParam('f'); } /* End Is input file */ /* -e rejects file */ if(options.hasOption('e')) { /* rejects file */ m_rejectsFile = (String)options.getOptionParam('e'); } /* End rejects file */ } /* extract parameters */ /** * Call the LDAPConnection modify operation with the * specified options, and/or parameters. */ private static void doModify() throws IOException { /* doModify */ PrintWriter reject = null; LDAPConstraints baseCons = null; if (!m_justShow) { baseCons = m_client.getConstraints(); Vector controlVector = new Vector(); if (m_proxyControl != null) controlVector.addElement(m_proxyControl); if (m_ordinary) { controlVector.addElement( new LDAPControl( LDAPControl.MANAGEDSAIT, true, null) ); } if (controlVector.size() > 0) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto(controls); baseCons.setControls(controls); } baseCons.setReferralFollowing( m_referrals ); if ( m_referrals ) { setDefaultReferralCredentials( baseCons ); } baseCons.setHopLimit( m_hopLimit ); } LDIFRecord rec = m_ldif.nextRecord(); for (; rec != null; rec = m_ldif.nextRecord() ) { LDAPConstraints cons = baseCons; if (!m_justShow) { // Were there any controls specified in the LDIF // record? LDAPControl[] newControls = rec.getControls(); if ( newControls != null ) { LDAPControl[] controls = newControls; LDAPControl[] oldControls = baseCons.getControls(); if ( oldControls != null ) { // If there were already controls defined, merge in // the new ones controls = new LDAPControl[oldControls.length + newControls.length]; for( int i = 0; i < oldControls.length; i++ ) { controls[i] = oldControls[i]; } for( int i = 0; i < newControls.length; i++ ) { controls[i+oldControls.length] = newControls[i]; } } // Assign the merged controls to a copy of the constraints cons = (LDAPSearchConstraints)baseCons.clone(); cons.setControls( controls ); } } LDIFContent content = rec.getContent(); LDAPModification mods[] = null; LDAPAttribute addAttrs[] = null; boolean doDelete = false; boolean doModDN = false; LDAPEntry newEntry = null; /* What type of record is this? */ if ( content instanceof LDIFModifyContent ) { mods = ((LDIFModifyContent)content).getModifications(); } else if ( content instanceof LDIFAddContent ) { addAttrs = ((LDIFAddContent)content).getAttributes(); } else if ( content instanceof LDIFAttributeContent ) { /* No change type; decide what to do based on options */ if ( m_add ) { addAttrs = ((LDIFAttributeContent)content).getAttributes(); } else { LDAPAttribute[] tmpAttrs = ((LDIFAttributeContent)content).getAttributes(); mods = new LDAPModification[tmpAttrs.length]; for( int ta = 0; ta < tmpAttrs.length; ta++ ) { mods[ta] = new LDAPModification( LDAPModification.REPLACE, tmpAttrs[ta] ); } } } else if ( content instanceof LDIFDeleteContent ) { doDelete = true; } else if (content instanceof LDIFModDNContent ) { doModDN = true; } else { } /* Prepare for adding */ if ( addAttrs != null ) { LDAPAttributeSet newAttrSet = new LDAPAttributeSet(); for( int a = 0; a < addAttrs.length; a++ ) newAttrSet.add( addAttrs[a] ); newEntry = new LDAPEntry( rec.getDN(), newAttrSet ); } /* Get values from files? */ boolean skip = false; if ( m_binaryFiles ) { /* Check each value of each attribute, to see if it needs replacing with the contents of a file */ if ( mods != null ) { for( int m = 0; m < mods.length; m++ ) { LDAPModification mod = mods[m]; LDAPAttribute attr = mods[m].getAttribute(); LDAPAttribute newAttr = checkFiles( attr ); if ( newAttr == null ) skip = true; else mods[m] = new LDAPModification( mod.getOp(), newAttr ); } } else if ( addAttrs != null ) { LDAPAttributeSet newAttrSet = new LDAPAttributeSet(); for( int a = 0; a < addAttrs.length; a++ ) { LDAPAttribute attr = addAttrs[a]; LDAPAttribute newAttr = checkFiles( attr ); if ( newAttr == null ) { skip = true; break; } else { newAttrSet.add( newAttr ); } } if ( !skip ) { newEntry = new LDAPEntry( rec.getDN(), newAttrSet ); } } } /* Do the directory operation */ int errCode = 0; if ( !skip ) { try { if ( mods != null ) { System.out.println("\nmodifying entry "+rec.getDN() ); for( int m = 0; m < mods.length; m++ ) { if (m_verbose) { System.out.println("\t"+mods[m] ); } } if (!m_justShow) { m_client.modify( rec.getDN(), mods, cons ); } } else if ( newEntry != null ) { System.out.println( "\nadding new entry " + newEntry.getDN() ); if ( m_verbose ) { LDAPAttributeSet set = newEntry.getAttributeSet(); Iterator it = set.iterator(); while( it.hasNext() ) { System.out.println("\t"+it.next() ); } } if (!m_justShow) { m_client.add( newEntry, cons ); } } else if ( doDelete ) { System.out.println( "\ndeleting entry " + rec.getDN() ); if (!m_justShow) m_client.delete( rec.getDN(), cons ); } else if ( doModDN) { System.out.println( "\nmodifying RDN of entry " + rec.getDN()+" and/or moving it beneath a new parent"); if ( m_verbose ) { System.out.println( "\t"+content.toString()); } if (!m_justShow) { LDIFModDNContent moddnContent = (LDIFModDNContent)content; m_client.rename( rec.getDN(), moddnContent.getRDN(), moddnContent.getNewParent(), moddnContent.getDeleteOldRDN(), cons ); System.out.println( "rename completed"); } } } catch (LDAPException e) { System.err.println( rec.getDN() + ": " + e.resultCodeToString() ); if (e.getLDAPErrorMessage() != null) System.err.println( "additional info: " + e.getLDAPErrorMessage() ); if ( !m_continuous ) { System.exit(1); } skip = true; errCode = e.getResultCode(); } } /* Write to rejects file? */ if ( skip && (m_rejectsFile != null) ) { try { if ( reject == null ) { reject = new PrintWriter( new FileOutputStream( m_rejectsFile ) ); } } catch ( Exception e ) { } if ( reject != null ) { reject.println( "dn: "+rec.getDN()+ " # Error: " + errCode ); if ( mods != null ) { for( int m = 0; m < mods.length; m++ ) { reject.println( mods[m].toString() ); } } else if ( newEntry != null ) { reject.println( "Add " + newEntry.toString() ); } else if ( doDelete ) { reject.println( "Delete " + rec.getDN() ); } else if (doModDN) { reject.println( "ModDN "+ ((LDIFModDNContent)content).toString() ); } reject.flush(); } } } System.exit(0); } /* doModify */ /** * Read in binary data for values specified with a leading / * @param attr Source attribute. * @return Updated attribute. **/ private static LDAPAttribute checkFiles ( LDAPAttribute attr ) { LDAPAttribute newAttr = new LDAPAttribute( attr.getName() ); /* Check each value and see if it is a file name */ Enumeration e = attr.getStringValues(); if (e != null) { while ( e.hasMoreElements() ) { String val = (String)e.nextElement(); if ( (val != null) && (val.length() > 1)) { try { File file = new File( val ); FileInputStream fi = new FileInputStream( file ); byte[] bval = new byte[(int)file.length()]; fi.read( bval, 0, (int)file.length() ); newAttr.addValue( bval ); } catch (FileNotFoundException ex) { newAttr.addValue(val) ; } catch ( IOException ex ) { System.err.println( "Unable to read value " + "from file " + val ); if ( !m_continuous ) System.exit(1); newAttr = null; } } else { newAttr.addValue( val ); } } } else System.err.println("Failed to do string conversion for "+attr.getName()); return newAttr; } private static boolean m_continuous = false; private static boolean m_force = false; private static boolean m_add = false; private static boolean m_binaryFiles = false; private static String m_rejectsFile = null; private static LDIF m_ldif = null; private static String m_file = null; } /* LDAPModify */ ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/tools/LDAPSearch.java0000664001003300100330000004473410602743267025266 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ import java.io.*; import java.net.*; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.util.*; import org.ietf.ldap.controls.*; /** * Execute Search operations through the LDAP client interface. * This class is implemented based on the LDAP class library. * *
 * usage       : java LDAPSearch -b baseDN [options] filter [attributes...]
 * for example : java LDAPSearch -b "c=us" -h ds.internic.net -p 389 
 *               "(objectClass=*)"
 *     
 *   note: '-' or '/' is used to distinct the option field.
 *         e.g. -a -b /c /d parameter -e parameter
 *
 * filter:
 *   Any string in RFC1558 specification.
 *    e.g. "(objectClass=*)"
 *
 * attributes: {0..n}
 *   All the string parameters follows with the filter.
 *     e.g. filter attrsA attrsB attrsC
 * 
* * @version 1.0 */ public class LDAPSearch extends LDAPTool { /** * This is the main function. * @param args list of arguments */ public static void main(String args[]) { /* extract parameters from the arguments list */ extractParameters(args); if (!m_justShow) { /* perform an LDAP client connection operation */ try { m_client = new LDAPConnection(); m_client.connect( m_ldaphost, m_ldapport ); } catch(Exception e) { System.err.println("Error: client connection failed!"); System.exit(0); } /* perform an LDAP bind operation */ if ( (m_binddn != null) && (m_passwd != null) ) { try { m_client.bind( m_version, m_binddn, m_passwd.getBytes() ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } } /* perform a search operation */ dosearch(); m_pw.flush(); m_pw.close(); /* disconnect */ try { m_client.disconnect(); } catch (Exception e) { System.err.println( e.toString() ); } } System.exit(0); } /** * Prints usage. */ private static void doUsage() { System.err.println("usage: LDAPSearch -b basedn [options] " + "filter [attributes...]"); System.err.println("options"); System.err.println(" -h host LDAP server name or IP address"); System.err.println(" -p port LDAP server TCP port number"); System.err.println(" -V version LDAP protocol version " + "number (default is 3)"); System.err.println(" -D binddn bind dn"); System.err.println(" -w password bind passwd (for simple " + "authentication)"); System.err.println(" -v run in verbose mode"); System.err.println(" -n show what would be done but "+ "don't actually do it"); System.err.println(" -d level set LDAP debugging level " + "to \'level\'"); System.err.println(" -R do not automatically follow " + "referrals"); System.err.println(" -O hop limit maximum number of referral " + "hops to traverse"); System.err.println(" -H display usage information"); System.err.println(" -t write values to files"); System.err.println(" -A retrieve attribute names only"); System.err.println(" -F sep print \'sep\' instead of " + "\'=\' between attribute names and values"); System.err.println(" -S attr sort the results by attribute " + "\'attr\'"); System.err.println(" -s scope one of base, one, or sub " + "(search scope)"); System.err.println(" -a deref one of never, always, search, " + "or find (alias dereferencing)"); System.err.println(" -l timelimit time limit (in seconds) for " + "search"); System.err.println(" -T do not fold (wrap) long lines "+ "(default is to fold)"); System.err.println(" -x perform sorting on server"); System.err.println(" -M manage references (treat them "+ "as regular entries)"); System.err.println(" -z sizelimit size limit (in entries) for " + "search"); System.err.println(" -G before:after:index:count | before:after:value "+ "where 'before' and 'after' are the number of "+ "entries surrounding 'index'. 'count' is the "+ "content count, 'value' is the search value."); System.err.println(" -y proxy-DN DN to use for access control"); System.err.println(" -X output DSML instead of LDIF"); } /** * This function is to extract specified parameters from the * arguments list. * @param args list of args */ protected static void extractParameters(String args[]) { String privateOpts = "HATtxvnXa:b:F:l:s:S:z:G:"; GetOpt options = LDAPTool.extractParameters( privateOpts, args ); /* -H Help */ if (options.hasOption('H')) { doUsage(); System.exit(0); } /* Help */ /* -A retrieve attribute name only == no values */ if (options.hasOption('A')) m_attrsonly = true; if (options.hasOption('x')) m_sortOnServer = true; if (options.hasOption('t')) m_tempFiles = true; /* -F separator */ if (options.hasOption('F')) m_sep = options.getOptionParam('F'); /* -a set alias deref option */ if (options.hasOption('a')) { /* has option a */ String param = options.getOptionParam('a'); if (param.equalsIgnoreCase("never")) m_deref = 0; else if (param.equalsIgnoreCase("search")) m_deref = 1; else if (param.equalsIgnoreCase("find")) m_deref = 2; else if (param.equalsIgnoreCase("always")) m_deref = 3; else System.err.println("Error: alias deref option " + "should be never, search, find, " + "or always."); } /* has option a */ /* -b searchbase */ if (options.hasOption('b')) m_base = options.getOptionParam('b'); /* -S sort attribute */ if (options.hasOption('S')) m_sort.addElement( options.getOptionParam('S') ); /* -l time limit */ if (options.hasOption('l')) { /* if the option is -l */ try { m_timelimit = Integer.parseInt(options.getOptionParam('l')); } catch (NumberFormatException e) { m_timelimit = 0; } } /* if the option is -l */ /* -s search scope */ if (options.hasOption('s')) { /* has option s */ String param = options.getOptionParam('s'); if (param.equalsIgnoreCase("base")) m_scope = 0; else if (param.equalsIgnoreCase("one")) m_scope = 1; else if (param.equalsIgnoreCase("sub")) m_scope = 2; else System.err.println("Error: scope should be base, " + "one or sub."); } /* has option s */ /* -z size limit */ if (options.hasOption('z')) { /* if the option is -z */ try { m_sizelimit = Integer.parseInt(options.getOptionParam('z')); } catch (NumberFormatException e) { m_sizelimit = 0; } } /* if the option is -z */ /* -T fold line */ if (options.hasOption('T')) { /* if the option is -T */ m_foldLine = false; } if (options.hasOption('X')) m_printDSML = true; parseVlv(options); /* extract the filter string and attributes */ Enumeration pa = options.getParameters().elements(); Vector vec = new Vector(); while (pa.hasMoreElements()) { /* while */ vec.addElement(pa.nextElement()); } /* while */ int counter = vec.size(); if (counter <= 0) { /* No filter */ System.err.println("Error: must supply filter string!"); doUsage(); System.exit(0); } /* No filter */ if (counter == 1) { /* Has filter but no attributes */ /* gets filter string */ m_filter = (String)vec.elementAt(0); if (m_verbose) System.err.println("filter pattern: "+m_filter); /* no attributes */ m_attrs = null; if (m_verbose) { System.err.println("returning: ALL"); System.err.println("filter is: ("+m_filter+")"); } } /* Has filter but no attributes */ if (counter > 1) { /* Has filter and attributes */ /* gets filter string */ m_filter = (String)vec.elementAt(0); if (m_verbose) { System.err.println("filter pattern: "+m_filter); System.err.print("returning:"); } /* gets attributes */ m_attrs = new String[counter]; for (int j = 1; j < counter; j++) { m_attrs[j-1] = (String)vec.elementAt(j); if (m_verbose) System.err.print(" "+m_attrs[j-1]); } if (m_verbose) { System.err.println(); System.err.println("filter is: ("+m_filter+")"); } } /* Has filter and attributes */ } private static void parseVlv(GetOpt options) { /* -G virtual list */ if (options.hasOption('G')) { /* if the option is -G */ String val = options.getOptionParam('G'); StringTokenizer tokenizer = new StringTokenizer(val, ":"); m_vlvTokens = tokenizer.countTokens(); if (m_vlvTokens < 3) { doUsage(); System.exit(0); } try { m_beforeCount = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_beforeCount = 0; } try { m_afterCount = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_afterCount = 0; } if (m_vlvTokens == 3) { m_searchVal = (String)tokenizer.nextElement(); } else if (m_vlvTokens > 3) { try { m_index = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_index = 0; } try { m_count = Integer.parseInt((String)tokenizer.nextElement()); } catch (NumberFormatException e) { m_count = 0; } } } /* if the option is -G */ } /** * This class-method is used to call the LDAP Search Operation with the * specified options, parameters, filters and/or attributes. */ private static void dosearch() { LDAPControl[] controls = null; try { Vector cons = new Vector(); LDAPSortControl sort = null; if ( m_sortOnServer && (m_sort.size() > 0) ) { LDAPSortKey[] keys = new LDAPSortKey[m_sort.size()]; for( int i = 0; i < keys.length; i++ ) { keys[i] = new LDAPSortKey( (String)m_sort.elementAt(i) ); } sort = new LDAPSortControl( keys, true ); cons.addElement(sort); } if ((sort == null) && (m_vlvTokens >= 3)) { System.err.println("Server-side sorting is required for "+ "virtual list option"); doUsage(); System.exit(0); } LDAPVirtualListControl vControl = null; if (m_vlvTokens == 3) { vControl = new LDAPVirtualListControl(m_searchVal, m_beforeCount, m_afterCount); } else if (m_vlvTokens > 3) { vControl = new LDAPVirtualListControl(m_index, m_beforeCount, m_afterCount, m_count); } if (vControl != null) cons.addElement(vControl); if (m_proxyControl != null) cons.addElement(m_proxyControl); if (m_ordinary) { LDAPControl manageDSAITControl = new LDAPControl( LDAPControl.MANAGEDSAIT, true, null); cons.addElement(manageDSAITControl); } if (cons.size() > 0) { controls = new LDAPControl[cons.size()]; cons.copyInto(controls); } } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } /* perform an LDAP Search Operation */ LDAPSearchResults res = null; try { LDAPSearchConstraints cons = m_client.getSearchConstraints(); cons.setControls(controls); cons.setDereference( m_deref ); cons.setMaxResults( m_sizelimit ); cons.setServerTimeLimit( m_timelimit ); cons.setReferralFollowing( m_referrals ); if ( m_referrals ) { setDefaultReferralCredentials( cons ); } cons.setHopLimit( m_hopLimit ); res = m_client.search( m_base, m_scope, m_filter, m_attrs, m_attrsonly, cons ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(1); } /* Sort? */ if ( (m_sort.size() > 0) && !m_sortOnServer ) { String[] sortAttrs = new String[m_sort.size()]; for( int i = 0; i < sortAttrs.length; i++ ) sortAttrs[i] = (String)m_sort.elementAt( i ); res.sort( new LDAPCompareAttrNames( sortAttrs ) ); } /* print out the values of the entries */ printResults( res ); /* Any sort control responses? */ showControls( m_client.getResponseControls() ); } /** * Print the result entries. * @param res Search results */ private static void printResults( LDAPSearchResults res ) { boolean isSchema = false; boolean didEntryIntro = false; LDAPWriter writer; if ( m_printDSML ) { printString( DSML_INTRO ); writer = new DSMLWriter( m_pw ); } else { writer = new LDIFWriter( m_pw, m_attrsonly, m_sep, m_foldLine, m_tempFiles ); } /* print out the retrieved entries */ try { /* Loop on results until finished */ while ( res.hasMore() ) { LDAPEntry entry = null; try { /* Next directory entry */ entry = res.next(); } catch (LDAPReferralException ee) { String[] urls= ee.getReferrals(); System.err.println("Referral entries: "); for (int i=0; i"; private static final String DSML_END = ""; private static final String DSML_RESULTS_INTRO = " "; private static final String DSML_RESULTS_END = " "; private static boolean m_attrsonly = false; private static int m_deref = 0; private static int m_scope = 2; // default is sub search private static int m_sizelimit = 0; private static int m_timelimit = 0; private static int verbose = 0; private static String m_attrs[] = null; private static String m_base = "o=ace industry,c=us"; private static String m_filter = null; private static String m_sep = ":"; private static Vector m_sort = new Vector(); private static boolean m_sortOnServer = false; private static boolean m_tempFiles = false; private static int m_beforeCount = 0; private static int m_afterCount = 0; private static int m_index = 0; private static int m_count = 0; private static int m_vlvTokens = 0; private static String m_searchVal = null; private static boolean m_foldLine = true; private static final int MAX_LINE = 77; private static PrintWriter m_pw = new PrintWriter(System.out); private static MimeBase64Encoder m_encoder = new MimeBase64Encoder(); private static boolean m_printDSML = false; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/tools/LDAPDelete.java0000664001003300100330000002004410602743267025247 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ import java.io.*; import java.net.*; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.util.*; /** * Executes the delete command to delete an LDAP entry. * This class is implemented based on the java LDAP classes. * *
 * usage       : java LDAPDelete [options] DN
 * for example : java -D "dn" -w password -h ds.internic.net -p 389
 *               "cn=Johnny James,o=Ace Industry"
 *
 * options: {np = no parameters, p = requires parameters}
 *  'D' bind DN --------------------------------------------- p
 *  'h' LDAP host ------------------------------------------- p
 *  'p' LDAP port ------------------------------------------- p
 *  'w' bind password --------------------------------------- p
 *
 * note: '-' or '/' is used to distinct the option field.
 *       e.g. -a -b /c /d parameter -e parameter
 *
 * 
* * @version 1.0 */ public class LDAPDelete extends LDAPTool { /* LDAPDelete */ public static void main(String args[]) { /* main */ if ( args.length < 1 ) { doUsage(); System.exit(1); } /* extract parameters from the arguments list */ extractParameters(args); if (!m_justShow) { /* perform an LDAP client connection operation */ try { m_client = new LDAPConnection(); m_client.connect( m_ldaphost, m_ldapport ); } catch(Exception e) { System.err.println("Error: client connection failed!"); System.exit(1); } /* perform an LDAP bind operation */ if ( (m_binddn != null) && (m_passwd != null) ) { try { m_client.bind( m_version, m_binddn, m_passwd.getBytes() ); } catch (Exception e) { System.err.println( e.toString() ); System.exit(0); } } /* perform a delete operation */ dodelete(); /* disconnect */ try { m_client.disconnect(); } catch (Exception e) { System.err.println( e.toString() ); } } else dodelete(null); System.exit(0); } /* main */ /** * Prints usage. */ private static void doUsage() { System.err.println( "usage: LDAPDelete [options] dn" ); System.err.println("options"); System.err.println(" -h host LDAP server name or IP address"); System.err.println(" -p port LDAP server TCP port number"); System.err.println(" -V version LDAP protocol version " + "number (default is 3)"); System.err.println(" -D binddn bind dn"); System.err.println(" -w password bind passwd (for simple " + "authentication)"); System.err.println(" -d level set LDAP debugging level " + "to \'level\'"); System.err.println(" -f file read DNs to delete from file"); System.err.println(" -R do not automatically follow " + "referrals"); System.err.println(" -O hop limit maximum number of referral " + "hops to traverse"); System.err.println(" -H display usage information"); System.err.println(" -c continuous mode (do not "+ "stop on errors)"); System.err.println(" -M manage references (treat them "+ "as regular entries)"); System.err.println(" -y proxy-DN DN to use for access control"); } /** * This class-method is used to extract specified parameters from the * arguments list. */ protected static void extractParameters(String args[]) { GetOpt options = LDAPTool.extractParameters( "Hcf:", args ); /* -H Help */ if (options.hasOption('H')) { doUsage(); System.exit(0); } /* Help */ /* -c continuous mode */ if (options.hasOption('c')) { m_cont = true; } /* continous mode */ /* -f file */ if (options.hasOption('f')) { String filename = options.getOptionParam('f'); if (filename == null) { doUsage(); System.exit(0); } try { FileInputStream fs = new FileInputStream(filename); DataInputStream ds = new DataInputStream(fs); m_reader = new BufferedReader(new InputStreamReader(ds)); } catch (FileNotFoundException e) { System.err.println("File "+filename+" not found"); } catch (IOException e) { System.err.println("Error in opening the file "+filename); } } /* input file */ if (m_reader == null) { Enumeration pa = options.getParameters().elements(); Vector vec = new Vector(); while (pa.hasMoreElements()) { /* while */ vec.addElement(pa.nextElement()); } if (vec.size() <= 0) { doUsage(); System.exit(0); } m_delete_dn = new String[vec.size()]; vec.copyInto(m_delete_dn); } } /* extract parameters */ /** * This class-method is used to call the LDAP Delete Operation with the * specified options, and/or parameters. */ private static void dodelete() { /* dodelete */ int msgid = 0; LDAPConstraints cons = m_client.getConstraints(); Vector controlVector = new Vector(); if (m_proxyControl != null) controlVector.addElement(m_proxyControl); if (m_ordinary) { controlVector.addElement( new LDAPControl( LDAPControl.MANAGEDSAIT, true, null) ); } if (controlVector.size() > 0) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto(controls); cons.setControls(controls); } cons.setReferralFollowing( m_referrals ); if ( m_referrals ) { setDefaultReferralCredentials( cons ); } cons.setHopLimit( m_hopLimit ); dodelete(cons); } /* dodelete */ private static void dodelete(LDAPConstraints cons) { try { if (m_reader == null) { for (int i=0; iLDAPTraceWriter interface enables logging of LDAP * trace messages in environments where an OutputStream can not be used. *

* The interface is primarily meant for integrating LDAP tracing with the * servlet log facility: *

*

 *     servletCtx = config.getServletContext();
 *     ...
 *     LDAPConnection ld = new LDAPConnection();
 *     ld.setProperty(ld.TRACE_PROPERTY, 
 *            new LDAPTraceWriter() { 
 *                public void write (String msg) {
 *                    servletCtx.log(msg);
 *                }
 *            });
 * 
 * 

* * @version 1.0 * @see org.ietf.ldap.LDAPConnection#setProperty(java.lang.String, java.lang.Object) */ public interface LDAPTraceWriter { /** * Writes an LDAP trace message. * * @param msg An incoming or outgoing LDAP message * * @version 1.0 * @see org.ietf.ldap.LDAPConnection#setProperty(java.lang.String, java.lang.Object) */ public void write (String msg); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSearchResult.java0000664001003300100330000000632710602743265027755 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import org.ietf.ldap.client.opers.JDAPSearchResponse; /** * A LDAPSearchResult object encapsulates a single search result. * * @version 1.0 */ public class LDAPSearchResult extends LDAPMessage { static final long serialVersionUID = 36890821518462301L; /** * LDAPEntry */ private LDAPEntry _entry; /** * Constructor * * @param msgid message identifier * @param rsp search operation response * @param controls array of controls or null * @see org.ietf.ldap.LDAPEntry */ LDAPSearchResult( int msgid, JDAPSearchResponse rsp, LDAPControl[]controls ) { super( msgid, rsp, controls ); } /** * Returns the entry of a server search response * * @return an entry returned by the server in response to a search * request * @see org.ietf.ldap.LDAPEntry */ public LDAPEntry getEntry() { if (_entry == null) { JDAPSearchResponse rsp = (JDAPSearchResponse)getProtocolOp(); LDAPAttribute[] lattrs = rsp.getAttributes(); LDAPAttributeSet attrs; if ( lattrs != null ) { attrs = new LDAPAttributeSet( lattrs ); } else { attrs = new LDAPAttributeSet(); } String dn = rsp.getObjectName(); _entry = new LDAPEntry( dn, attrs ); } return _entry; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPAttribute.java0000664001003300100330000004551710602743265027320 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.*; import java.util.*; import org.ietf.ldap.ber.stream.*; /** * Represents the name and values of an attribute in an entry. * * @version 1.0 * @see org.ietf.ldap.LDAPAttributeSet */ public class LDAPAttribute implements Cloneable, Serializable { static final long serialVersionUID = -4594745735452202600L; private String name = null; private byte[] nameBuf = null; /** * Internally, this is a list of "byte[]"-based attribute values. */ private Object values[] = new Object[0]; /** * Constructs an attribute from another existing attribute. * Effectively, this makes a copy of the existing attribute. * @param attr the attribute to copy */ public LDAPAttribute( LDAPAttribute attr ) { name = attr.name; nameBuf = attr.nameBuf; values = new Object[attr.values.length]; for (int i = 0; i < attr.values.length; i++) { values[i] = new byte[((byte[])attr.values[i]).length]; System.arraycopy((byte[])attr.values[i], 0, (byte[])values[i], 0, ((byte[])attr.values[i]).length); } } /** * Constructs an attribute with no values. * @param attrName name of the attribute */ public LDAPAttribute( String attrName ) { name = attrName; } /** * Constructs an attribute with a byte-formatted value. * @param attrName name of the attribute * @param attrValue value of the attribute in byte format */ public LDAPAttribute( String attrName, byte[] attrValue ) { name = attrName; addValue(attrValue); } /** * Constructs an attribute that has a single string value. * @param attrName name of the attribute * @param attrValue value of the attribute in String format */ public LDAPAttribute( String attrName, String attrValue ) { name = attrName; addValue( attrValue ); } /** * Constructs an attribute that has an array of string values. * @param attrName name of the attribute * @param attrValues the list of string values for this attribute */ public LDAPAttribute( String attrName, String[] attrValues ) { name = attrName; if (attrValues != null) { setValues( attrValues ); } } /** * Constructs an attribute from a BER (Basic Encoding Rules) element. * (The protocol elements of LDAP are encoded for exchange using the * Basic Encoding Rules.) * @param element element that you want translated into an attribute * @exception IOException The attribute could not be created from * the specified element. */ public LDAPAttribute(BERElement element) throws IOException { BERSequence seq = (BERSequence)element; BEROctetString type = (BEROctetString)seq.elementAt(0); nameBuf = type.getValue(); BERSet set = (BERSet)seq.elementAt(1); if (set.size() > 0) { Object[] vals = new Object[set.size()]; for (int i = 0; i < set.size(); i++) { vals[i] = ((BEROctetString)set.elementAt(i)).getValue(); if (vals[i] == null) { vals[i] = new byte[0]; } } setValues( vals ); } } /** * Returns the number of values of the attribute. * @return number of values for this attribute. */ public int size() { return values.length; } /** * Returns an enumerator for the string values of an attribute. * @return enumerator for the string values. */ public Enumeration getStringValues() { Vector v = new Vector(); synchronized(this) { try { for (int i=0; iString * objects. * @return array of attribute values. Each element in the array * is a String object. */ public String[] getStringValueArray() { String s[] = new String[values.length]; synchronized(this) { try { for (int i=0; i < values.length; i++) { if ( values[i] !=null ) { s[i] = new String((byte[])values[i], "UTF8"); } else { s[i] = new String(""); } } } catch (Exception e) { return null; } } return s; } /** * Returns an enumerator for the values of the attribute in byte[] * format. * @return a set of attribute values. Each element in the enumeration * is of type byte[]. */ public Enumeration getByteValues() { Vector v = new Vector(); synchronized(this) { for (int i=0; ibyte[] * format. * @return array of attribute values. Each element in the array * will be of type byte[]. */ public byte[][] getByteValueArray() { byte b[][] = new byte[values.length][]; synchronized(this) { try { for (int i=0; i < values.length; i++) { b[i] = new byte[((byte[])(values[i])).length]; System.arraycopy((byte[])values[i], 0, (byte[])b[i], 0, ((byte[])(values[i])).length); } } catch (Exception e) { return null; } } return b; } /** * Returns the name of the attribute. * @return name of the attribute. */ public String getName() { if ((name == null) && (nameBuf != null)) { try{ name = new String(nameBuf, "UTF8"); } catch(Throwable x) {} } return name; } /** * Extracts the subtypes from the specified attribute name. * For example, if the attribute name is cn;lang-ja;phonetic, * this method returns an array containing lang-ja * and phonetic. *

* * @param attrName name of the attribute from which to extract the subtypes * @return array of subtypes, or null (if the name has no subtypes). * @see org.ietf.ldap.LDAPAttribute#getBaseName */ public static String[] getSubtypes(String attrName) { StringTokenizer st = new StringTokenizer(attrName, ";"); if( st.hasMoreElements() ) { // First element is base name st.nextElement(); String[] subtypes = new String[st.countTokens()]; int i = 0; // Extract the types while( st.hasMoreElements() ) subtypes[i++] = (String)st.nextElement(); return subtypes; } return null; } /** * Extracts the subtypes from the attribute name of the current * LDAPAttribute object. For example, if the attribute * name is cn;lang-ja;phonetic, this method returns an array * containing lang-ja and phonetic. *

* * @return array of subtypes, or null (if the name has no subtypes). */ public String[] getSubtypes() { return getSubtypes(getName()); } /** * Extracts the language subtype from the attribute name of the * LDAPAttribute object, if any. For example, if the * attribute name is cn;lang-ja;phonetic, this method * returns the String lang-ja. *

* * @return the language subtype, or null (if the name has no * language subtype). */ public String getLangSubtype() { String[] subTypes = getSubtypes(); if ( subTypes != null ) { for( int i = 0; i < subTypes.length; i++ ) { if ((subTypes[i].length() >= 5) && (subTypes[i].substring(0, 5).equalsIgnoreCase("lang-"))) return subTypes[i]; } } return null; } /** * Extracts the base name from the specified attribute name. * For example, if the attribute name is cn;lang-ja;phonetic, * this method returns cn. *

* * @param attrName name of the attribute from which to extract the base name * @return base name (the attribute name without any subtypes). * @see org.ietf.ldap.LDAPAttribute#getSubtypes */ public static String getBaseName( String attrName ) { String basename = attrName; StringTokenizer st = new StringTokenizer(attrName, ";"); if( st.hasMoreElements() ) // First element is base name basename = (String)st.nextElement(); return basename; } /** * Extracts the base name from the attribute name of the current * LDAPAttribute object. For example, if the attribute * name is cn;lang-ja;phonetic, this method returns * cn. *

* * @return base name (the attribute name without any subtypes). * @see org.ietf.ldap.LDAPAttribute#getSubtypes */ public String getBaseName() { return getBaseName(getName()); } /** * Reports whether the attribute name contains the specified subtype. * For example, if you check for the subtype lang-en * and the attribute name is cn;lang-en, this method * returns true. *

* * @param subtype the single subtype for which you want to check * @return true if the attribute name contains the specified subtype. * @see org.ietf.ldap.LDAPAttribute#getSubtypes */ public boolean hasSubtype( String subtype ) { String[] mytypes = getSubtypes(); for(int i = 0; i < mytypes.length; i++) { if( subtype.equalsIgnoreCase( mytypes[i] ) ) return true; } return false; } /** * Reports if the attribute name contains all specified subtypes * For example, if you check for the subtypes lang-en * and phonetic and the attribute name is * cn;lang-en;phonetic, this method returns true. * If the attribute name is cn;phonetic or * cn;lang-en, this method returns false. *

* @param subtypes an array of subtypes to check * @return true if the attribute name contains all subtypes * @see org.ietf.ldap.LDAPAttribute#getSubtypes */ public boolean hasSubtypes( String[] subtypes ) { for(int i = 0; i < subtypes.length; i++) { if( !hasSubtype(subtypes[i]) ) return false; } return true; } /** * Adds a string value to the attribute. * @param attrValue the string value to add to the attribute */ public synchronized void addValue( String attrValue ) { if (attrValue != null) { try { byte[] b = attrValue.getBytes("UTF8"); addValue( b ); } catch(Throwable x) {} } } /** * Sets the string values as the attribute's values. * @param attrValues the string values to use in the attribute */ protected void setValues( String[] attrValues ) { Object[] vals; if (attrValues != null) { vals = new Object[attrValues.length]; for (int i = 0; i < vals.length; i++) { try { vals[i] = attrValues[i].getBytes("UTF8"); } catch(Throwable x) { vals[i] = new byte[0]; } } } else { vals = new Object[0]; } setValues(vals); } /** * Adds a byte[]-formatted value to the attribute. * @param attrValue the byte[]-formatted value to * add to the attribute */ public synchronized void addValue( byte[] attrValue ) { if (attrValue != null) { Object[] vals = new Object[values.length+1]; for (int i = 0; i < values.length; i++) vals[i] = values[i]; vals[values.length] = attrValue; values = vals; } } /** * Sets the byte[] values as the attribute's values. * @param attrValues the values to use in the attribute */ protected synchronized void setValues( Object[] attrValues ) { values = attrValues; } /** * Removes a string value from the attribute. * @param attrValue the string value to remove */ public synchronized void removeValue( String attrValue) { if (attrValue != null) { try{ byte b[] = attrValue.getBytes("UTF8"); removeValue ( b ); } catch(Throwable x) {} } } /** * Removes a byte[]-formatted value from the attribute. * @param attrValue byte[]-formatted value to remove */ public synchronized void removeValue( byte[] attrValue) { if ((attrValue == null) || (values == null)|| (values.length < 1)) return; int ind = -1; for (int i=0; i= 0) { Object[] vals = new Object[values.length-1]; int j = 0; for (int i = 0; i < values.length; i++) { if (i != ind) { vals[j++] = values[i]; } } values = vals; } } private static boolean equalValue(byte[] a, byte[] b) { if (a.length != b.length) return false; for (int i=0; i 0 ) { for (int i = 0; i < values.length; i++) { if (i != 0) { sb.append(","); } byte[] val = (byte[])values[i]; try { String sval = new String(val, "UTF8"); if (sval.length() == 0 && val.length > 0) { sb.append(""); } else { sb.append(sval); } } catch (Exception e) { if (val != null) { sb.append(""); } else { sb.append("null value"); } } } } return "{type='" + getName() + "', values='" + sb.toString() + "'}"; } /** * Creates and returns a new LDAPAttribute object that * contains the same information as this one. The cloned object has * a deep copy of the contents of the original. * * @return A deep copy of this object */ public synchronized Object clone() { return new LDAPAttribute( this ); } /** * Retrieves the string representation of an attribute * in an LDAP entry. For example: * *

LDAPAttribute {type='cn', values='Barbara Jensen,Babs Jensen'}
* * @return string representation of the attribute. */ public String toString() { return "LDAPAttribute " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPCache.java0000664001003300100330000006306510602743265026356 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import java.io.*; import org.ietf.ldap.client.*; import org.ietf.ldap.util.*; import java.util.zip.CRC32; /** * LDAPCache represents an in-memory cache that you can use * to reduce the number of search requests sent to the LDAP server. *

* * Each item in the cache represents a search request and * its results. Each item is uniquely identified by the * search criteria, which includes: *

* *

    *
  • the host name and port number of the LDAP server *
  • the base DN of the search *
  • the search filter *
  • the scope of the search *
  • the attributes to be returned in the search results *
  • the DN used to authenticate the client when binding * to the server *
  • the LDAP v3 controls specified in the search request *
*

* * After a search request is cached, the results of any * subsequent search requests using the same criteria are * read from the cache. Note that if any part of the * criteria differs (for example, if a different DN is used * when binding to the server or if a different set of * attributes to be returned is specified), the search * request is sent to the server. *

* * When you create the cache, you specify the maximum amount * of time that an item can be kept in the cache. When an * item's age exceeds that time limit, the item is removed * from the cache. *

* * The cache also has a maximum size that you specify when * creating the cache. If adding a new item exceeds the * maximum size of the cache, the first entries in the cache * are removed to make enough space for the new item. *

* * Finally, when creating the cache, you can specify a list * of the base DNs in search requests that you want to cache. * For example, if you specify o=Airius.com as * a base DN to cache, your client caches search requests * where the base DN is o=Airius.com. *

* * To specify that you want to use a cache for a particular * LDAP session, call the setCache method of * the LDAPConnection object that you are * working with. *

* * All clones of an LDAPConnection object share * the same LDAPCache object. *

* * Note that LDAPCache does not maintain consistency * with the directory, so that cached search results may no longer be * valid after a directory update. If the same application is performing * both cached searches and directory updates, then the * application should flush the corresponding cache entries after an update. * To do this use the flushEntries method. *

* * Also, note that search requests that return referrals are not cached. *

* * The LDAPCache class includes methods for * getting statistics (such as hit rates) from the cache and * for flushing entries from the cache. *

* * @see org.ietf.ldap.LDAPConnection#setCache(org.ietf.ldap.LDAPCache) * @see org.ietf.ldap.LDAPConnection#getCache */ public class LDAPCache implements Serializable { static final long serialVersionUID = 6275167993337814294L; /** * A hashtable of search results. The key is created from the search * request parameters (see createKey() method). The value is a Vector * where the first element is a Long integer representing the size * of all entries, followed by the actual search result entries (of type * LDAPEntry). */ private Hashtable m_cache; /** * A list of cached entries ordered by time (augments m_cache). Each * element in the list is a 2 element Vector where the element at index * 0 is the key in the m_cache table, and the element at index 1 is the * time when the entry was created. * The list is used to track the time-to-live limit and to implement the * FIFO algorithm when adding new entries; if the size of the new entry * exceeds the cache available space, the extra space is made by removing * existing cached results in the order of their entry in the cache. */ private Vector m_orderedStruct; private long m_timeToLive; private long m_maxSize; private String[] m_dns; private long m_remainingSize = 0; // Count of LDAPConnections that share this cache private int m_refCnt = 0; /** * Delimiter used internally when creating keys * for the cache. */ public static final String DELIM = "#"; private TTLTimer m_timer = null; private long m_totalOpers = 0; private long m_hits = 0; private long m_flushes = 0; // Debug can be activated by defining debug.cache property private static boolean m_debug = false; static { try { String traceProp = System.getProperty("debug.cache"); m_debug = (traceProp != null); } catch (Exception e) { ;// In browser access to property might not be allowed } } /** * Constructs a new LDAPCache object, using the * specified maximum size of the cache (in bytes) and the maximum * age of cached items (in seconds). When items in the cache * exceed this age, they are removed from the cache. *

* * @param ttl the maximum amount of time that an item can be cached * (in seconds) * @param size the maximum size of the cache (in bytes) */ public LDAPCache(long ttl, long size) { init(ttl, size); } /** * Constructs a new LDAPCache object, using the * specified maximum size of the cache (in bytes), and the maximum * age of cached items (in seconds), and an array of the base DNs * of searches that you want to cache. (For example, * if the array of base DNs includes o=Airius.com, * the cache stores search results if the base DN in the search * request is o=Airius.com.) *

* * @param ttl the maximum amount of time that an item can be cached * (in seconds) * @param size the maximum size of the cache (in bytes) * @param dns the list of base DNs of searches that you want to cache. */ public LDAPCache(long ttl, long size, String[] dns) { init(ttl, size); m_dns = new String[dns.length]; if ((dns != null) && (dns.length > 0)) for (int i=0; i * * @return the maximum size of the cache (in bytes). */ public long getSize() { return m_maxSize; } /** * Gets the maximum age allowed for cached items (in * seconds). (Items that exceed this age are * removed from the cache.) *

* * @return the maximum age of items in the cache (in * seconds). */ public long getTimeToLive() { return m_timeToLive/1000; } /** * Gets the array of base DNs of searches to be cached. * (Search requests with these base DNs are cached.) *

* * @return the array of base DNs. */ public String[] getBaseDNs() { return m_dns; } /** * Flush the entries identified by DN and scope from the cache. *

* * @param dn the distinguished name (or base DN) of the entries * to be removed from the cache. Use this parameter in conjunction * with scope to identify the entries that you want * removed from the cache. If this parameter is null, * the entire cache is flushed. * @param scope the scope identifying the entries that you want * removed from the cache. The value of this parameter can be * one of the following: *

    *
  • LDAPConnection.SCOPE_BASE (to remove the entry identified * by dn) *
  • LDAPConnection.SCOPE_ONE (to remove the entries that * have dn as their parent entry) *
  • LDAPConnection.SCOPE_SUB (to remove the entries in the * subtree under dn in the directory) *
*

* @return true if the entry is removed from the cache; * false if the entry is not removed. */ public synchronized boolean flushEntries(String dn, int scope) { if (m_debug) System.out.println("DEBUG: User request for flushing entry: dn "+ dn+" and scope "+scope); // if the dn is null, invalidate the whole cache if (dn == null) { // reclaim all the cache spaces m_remainingSize = m_maxSize; m_cache.clear(); m_orderedStruct.removeAllElements(); // reset stats m_totalOpers = m_hits = m_flushes = 0; return true; } DN dn2 = new DN(dn); Enumeration e = m_cache.keys(); while(e.hasMoreElements()) { Long key = (Long)e.nextElement(); Vector val = (Vector)m_cache.get(key); // LDAPEntries start at idx 1, at idx 0 is a Long // (size of all LDAPEntries returned by search()) int j=1; int size2=val.size(); for (; j"+key); return true; } } if (m_debug) System.out.println("DEBUG: The number of keys in the cache is " +m_cache.size()); return false; } /** * Gets the amount of available space (in bytes) left in the cache. *

* * @return the available space (in bytes) in the cache. */ public long getAvailableSize() { return m_remainingSize; } /** * Gets the total number of requests for retrieving items from * the cache. This includes both items successfully found in * the cache and items not found in the cache. *

* * @return the total number of requests for retrieving items from * the cache. */ public long getTotalOperations() { return m_totalOpers; } /** * Gets the total number of requests which failed to find and * retrieve an item from the cache. *

* * @return the number of requests that did not find and retrieve * an item in the cache. */ public long getNumMisses() { return (m_totalOpers - m_hits); } /** * Gets the total number of requests which successfully found and * retrieved an item from the cache. * @return the number of requests that successfully found and * retrieved an item from the cache. */ public long getNumHits() { return m_hits; } /** * Gets the total number of entries that are flushed when timer expires * and flushEntries is called. *

* * @return the total number of entries that are flushed when timer * expires. */ public long getNumFlushes() { return m_flushes; } /** * Create a key for a cache entry by concatenating all input parameters * @return the key for a cache entry * @exception LDAPException Thrown when failed to create key. */ Long createKey(String host, int port, String baseDN, String filter, int scope, String[] attrs, String bindDN, LDAPConstraints cons) throws LDAPException { DN dn = new DN(baseDN); baseDN = dn.toString(); if (m_dns != null) { int i=0; for (; i= m_dns.length) throw new LDAPException(baseDN+" is not a cached base DN", LDAPException.OTHER); } String key = null; key = appendString(baseDN); key = key+appendString(scope); key = key+appendString(host); key = key+appendString(port); key = key+appendString(filter); key = key+appendString(attrs); key = key+appendString(bindDN); LDAPControl[] serverControls = null; // get server and client controls if (cons != null) { serverControls = cons.getControls(); } if ((serverControls != null) && (serverControls.length > 0)) { String[] objID = new String[serverControls.length]; for (int i=0; i "+key+ " not found in the cache."); else System.out.println("DEBUG: Entry whose key -> "+key+ " found in the cache."); } if (obj != null) m_hits++; return obj; } /** * Flush entries which stay longer or equal to the time-to-live. */ synchronized void flushEntries() { Vector v = null; boolean delete = false; long currTime = System.currentTimeMillis(); m_flushes = 0; while(true) { if (m_orderedStruct.size() <= 0) break; v = (Vector)m_orderedStruct.firstElement(); long diff = currTime-((Long)v.elementAt(1)).longValue(); if (diff >= m_timeToLive) { Long key = (Long)v.elementAt(0); if (m_debug) System.out.println("DEBUG: Timer flush entry whose key is "+key); Vector entry = (Vector)m_cache.remove(key); m_remainingSize += ((Long)entry.firstElement()).longValue(); // always delete the first one m_orderedStruct.removeElementAt(0); m_flushes++; } else break; } if (m_debug) System.out.println("DEBUG: The number of keys in the cache is " +m_cache.size()); } /** * Add the entry to the hashtable cache and to the vector respectively. * The vector is used to keep track of the order of the entries being added. * @param key the key for the cache entry * @param value the cache entry being added to the cache for the specified * key * @return a flag indicating whether the entry was added. */ synchronized boolean addEntry(Long key, Object value) { // if entry exists, dont perform add operation if (m_cache.get(key) != null) return false; Vector v = (Vector)value; long size = ((Long)v.elementAt(0)).longValue(); if (size > m_maxSize) { if (m_debug) { System.out.println("Failed to add an entry to the cache since the new entry exceeds the cache size"); } return false; } // if the size of entry being added is bigger than the spare space in the // cache if (size > m_remainingSize) { while (true) { Vector element = (Vector)m_orderedStruct.firstElement(); Long str = (Long)element.elementAt(0); Vector val = (Vector)m_cache.remove(str); if (m_debug) System.out.println("DEBUG: The spare size of the cache is not big enough "+ "to hold the new entry, deleting the entry whose key -> "+str); // always remove the first one m_orderedStruct.removeElementAt(0); m_remainingSize += ((Long)val.elementAt(0)).longValue(); if (m_remainingSize >= size) break; } } m_remainingSize -= size; m_cache.put(key, v); Vector element = new Vector(2); element.addElement(key); element.addElement(new Long(System.currentTimeMillis())); m_orderedStruct.addElement(element); // Start TTL Timer if first entry is added if (m_orderedStruct.size() == 1) { scheduleTTLTimer(); } if (m_debug) { System.out.println("DEBUG: Adding a new entry whose key -> "+key); System.out.println("DEBUG: The current number of keys in the cache "+ m_cache.size()); } return true; } /** * Flush entries which stayed longer or equal to the time-to-live, and * Set up the TTLTimer for the next flush. Called when first entry is * added to the cache and when the TTLTimer expires. */ synchronized void scheduleTTLTimer() { if (m_orderedStruct.size() <= 0) { return; } if (m_timer == null) { m_timer = new TTLTimer(this); } Vector v = (Vector)m_orderedStruct.firstElement(); long currTime = System.currentTimeMillis(); long creationTime = ((Long)v.elementAt(1)).longValue(); long timeout = creationTime + m_timeToLive - currTime; if (timeout > 0) { m_timer.start(timeout); } else { flushEntries(); scheduleTTLTimer(); } } /** * Gets the number of entries being cached. * @return the number of entries being cached. */ public int getNumEntries() { return m_cache.size(); } /** * Get number of LDAPConnections that share this cache * @return Reference Count */ int getRefCount() { return m_refCnt; } /** * Add a new reference to this cache. * */ synchronized void addReference() { m_refCnt++; if (m_debug) { System.err.println("Cache refCnt="+ m_refCnt); } } /** * Remove a reference to this cache. * If the reference count is 0, cleaup the cache. * */ synchronized void removeReference() { if (m_refCnt > 0) { m_refCnt--; if (m_debug) { System.err.println("Cache refCnt="+ m_refCnt); } if (m_refCnt == 0 ) { cleanup(); } } } /** * Cleans up */ synchronized void cleanup() { flushEntries(null, 0); if (m_timer != null) { m_timer.stop(); m_timer = null; } } /** * Initialize the instance variables. */ private void init(long ttl, long size) { m_cache = new Hashtable(); m_timeToLive = ttl*1000; m_maxSize = size; m_remainingSize = size; m_dns = null; m_orderedStruct = new Vector(); } /** * Concatenates the specified integer with the delimiter. * @param str the String to concatenate with the delimiter * @return the concatenated string. */ private String appendString(String str) { if (str == null) return "null"+DELIM; else return str.trim()+DELIM; } /** * Concatenates the specified integer with the delimiter. * @param num the integer to concatenate with the delimiter * @return the concatenated string. */ private String appendString(int num) { return num+DELIM; } /** * Concatenate the specified string array with the delimiter. * @param str a string array * @return the concatenated string. */ private String appendString(String[] str) { if ((str == null) || (str.length < 1)) return "0"+DELIM; else { String[] sorted = new String[str.length]; System.arraycopy( str, 0, sorted, 0, str.length ); sortStrings(sorted); String s = sorted.length+DELIM; for (int i=0; i 0) { String t = str[i]; str[i] = str[j]; str[j] = t; } } } /** * Create a 32 bits CRC from the given byte array. */ private long getCRC32(byte[] barray) { if (barray==null) { return 0; } CRC32 crcVal = new CRC32(); crcVal.update(barray); return crcVal.getValue(); } } /** * Represents a timer which will timeout for every certain interval. It * provides methods to start, stop, or restart timer. */ class TTLTimer implements Runnable{ private long m_timeout; private LDAPCache m_cache; private Thread t = null; /** * Constructor with the specified timout. * @param timeout the timeout value in milliseconds */ TTLTimer(LDAPCache cache) { m_cache = cache; } /** * (Re)start the timer. */ void start(long timeout) { m_timeout = timeout; if (Thread.currentThread() != t) { stop(); } t = new Thread(this, "LDAPCache-TTLTimer"); t.setDaemon(true); t.start(); } /** * Stop the timer. */ void stop() { if (t !=null) { t.interrupt(); } } /** * The runnable waits until the timeout period has elapsed. It then notify * the registered listener who listens for the timeout event. */ public void run() { synchronized(this) { try { this.wait(m_timeout); } catch (InterruptedException e) { // This happens if the timer is stopped return; } } m_cache.scheduleTTLTimer(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPAttributeSet.java0000664001003300100330000005233510602743265027770 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.client.opers.*; /** * Represents a set of attributes (for example, the set of attributes * in an entry). * * @version 1.0 * @see org.ietf.ldap.LDAPAttribute */ public class LDAPAttributeSet implements Cloneable, Serializable, Set { static final long serialVersionUID = 5018474561697778100L; HashMap _attrHash = null; LDAPAttribute[] _attrs = new LDAPAttribute[0]; /* If there are less attributes than this in the set, it's not worth creating a Hashtable - faster and cheaper most likely to do string comparisons. Most applications fetch attributes once only, anyway */ static final int ATTR_COUNT_REQUIRES_HASH = 5; /** * Constructs a new set of attributes. This set is initially empty. */ public LDAPAttributeSet() { // For now, always create the hashtable prepareHashtable( true ); } /** * Constructs an attribute set. * @param attrs the list of attributes */ public LDAPAttributeSet( LDAPAttribute[] attrs ) { this(); if ( attrs == null ) { attrs = new LDAPAttribute[0]; } _attrs = attrs; if ( _attrs.length > 0 ) { for( int i = 0; i < _attrs.length; i++ ) { add( _attrs[i] ); } } } /** * Removes all mappings from this attribute set */ public void clear() { _attrHash = null; if ( _attrs.length > 0 ) { _attrs = new LDAPAttribute[0]; } } /** * Adds the specified attribute to this attribute set, overriding * any previous definition with the same attribute name * * @param attr attribute to add to this set * @return true if this set changed as a result of the call */ public synchronized boolean add( Object attr ) { if ( attr instanceof LDAPAttribute ) { if ( contains( attr ) ) { return false; } LDAPAttribute attrib = (LDAPAttribute)attr; LDAPAttribute[] vals = new LDAPAttribute[_attrs.length+1]; for ( int i = 0; i < _attrs.length; i++ ) { vals[i] = _attrs[i]; } vals[_attrs.length] = attrib; _attrs = vals; if ( _attrHash != null ) { _attrHash.put( attrib.getName().toLowerCase(), attr ); } return true; } else { throw new ClassCastException( "Requires LDAPAttribute"); } } /** * Adds the collection of attributes to this attribute set, overriding * any previous definition with the same attribute names * * @param attrs attributes to add to this set * @return true if any attribute was added */ public synchronized boolean addAll( Collection attrs ) { if ( attrs == null ) { return false; } boolean present = true; Iterator it = attrs.iterator(); while( it.hasNext() ) { Object attr = it.next(); if ( !contains( attr ) ) { present = true; add( attr ); } } return !present; } /** * Returns a deep copy of this attribute set * * @return a deep copy of this attribute set */ public synchronized Object clone() { try { LDAPAttributeSet attributeSet = new LDAPAttributeSet(); attributeSet._attrs = new LDAPAttribute[_attrs.length]; for (int i = 0; i < _attrs.length; i++) { attributeSet._attrs[i] = new LDAPAttribute(_attrs[i]); } return attributeSet; } catch (Exception e) { return null; } } /** * Returns true if this attribute set contains the specified attribute * * @param attr attribute whose presence in this set is to be tested * @return true if the attribute set contains the specified attribute */ public boolean contains( Object attr ) { if ( !(attr instanceof LDAPAttribute) ) { return false; } else { if ( _attrHash != null ) { return _attrHash.containsValue( attr ); } else { for ( int i = 0; i < _attrs.length; i++ ) { if ( attr.equals(_attrs[i]) ) { return true; } } } return false; } } /** * Returns true if this attribute set contains all the specified attributes * * @param attrs attributes whose presence in this set is to be tested * @return true if the attribute set contains the specified attributes */ public boolean containsAll( Collection attrs ) { if ( _attrHash != null ) { Iterator it = attrs.iterator(); while( it.hasNext() ) { if ( !_attrHash.containsValue( it.next() ) ) { return false; } } return true; } else { return false; } } /** * Returns true if this attribute set contains the specified attribute name * * @param attrName attribute name whose presence in this set is to be tested * @return true if the attribute set contains the specified attribute */ public boolean containsKey( Object attrName ) { if ( !(attrName instanceof String) ) { return false; } else { return ( getAttribute( (String)attrName ) != null ); } } /** * Returns true if this attribute set equals a specified set * * @param attrSet attribute set to compare to * @return true if this attribute set equals a specified set */ public boolean equals( Object attrSet ) { if ( !(attrSet instanceof LDAPAttributeSet) ) { return false; } return ((LDAPAttributeSet)attrSet)._attrHash.equals( _attrHash ); } /** * Returns the hash code for this attribute set * * @return the hash code for this attribute set */ public int hashCode() { return _attrHash.hashCode(); } /** * Returns true if there are no attributes in this attribute set * * @return true if there are no attributes in this attribute set */ public boolean isEmpty() { return ( _attrs.length < 1 ); } /** * Returns an iterator over the attributes in this attribute set * * @return an iterator over the attributes in this attribute set */ public Iterator iterator() { return _attrHash.values().iterator(); } /** * Removes the specified attribute * * @param attr the attribute to remove * @return true if the attribute was removed */ public boolean remove( Object attr ) { if ( !(attr instanceof LDAPAttribute) ) { return false; } boolean present = contains( attr ); if ( present ) { synchronized(this) { LDAPAttribute[] vals = new LDAPAttribute[_attrs.length-1]; int j = 0; for (int i = 0; i < _attrs.length; i++) { if ( !attr.equals(_attrs[i] ) ) { vals[j++] = _attrs[i]; } } if (_attrHash != null) { _attrHash.remove( ((LDAPAttribute)attr).getName().toLowerCase() ); } _attrs = vals; } } return present; } /** * Removes the specified attributes * * @param attrs the attributes to remove * @return true if any attribute was removed */ public boolean removeAll( Collection attrs ) { if ( attrs == null ) { return false; } boolean present = true; Iterator it = attrs.iterator(); while( it.hasNext() ) { Object attr = it.next(); if ( !contains( attr ) ) { present = true; remove( attr ); } } return !present; } /** * Retains only the attributes in this set that are contained in the * specified collection * * @param attrs attributes to retain * @return true if the attribute set was changed as a result of the * operation */ public boolean retainAll( Collection attrs ) { HashMap newmap = new HashMap(); Iterator it = attrs.iterator(); while( it.hasNext() ) { Object attr = it.next(); if ( attr instanceof LDAPAttribute ) { newmap.put( ((LDAPAttribute)attr).getName().toLowerCase(), attr ); } } if ( newmap.equals( _attrHash ) ) { return false; } else { _attrHash = newmap; _attrs = (LDAPAttribute[])_attrHash.values().toArray( new LDAPAttribute[0] ); return true; } } /** * Returns the number of attributes in this set. * @return number of attributes in this attribute set. */ public int size() { return _attrs.length; } /** * Returns the attributes of the set as an array * * @return the attributes of the set as an array */ public Object[] toArray() { return _attrs; } /** * Returns the attributes of the set as an array * * @param attrs an attribute array to fill with the attributes of this * set. If the array is not large enough, a new array is allocated. * @return the attributes of the set as an array */ public Object[] toArray( Object[] attrs ) { if ( !(attrs instanceof LDAPAttribute[]) ) { throw new ArrayStoreException( "Must provide an LDAPAttribute array" ); } else if ( attrs.length >= _attrs.length ) { for( int i = 0; i < _attrs.length; i++ ) { attrs[i] = _attrs[i]; } return attrs; } else { return _attrs; } } /** * Creates a new attribute set containing only the attributes * that have the specified subtypes. *

* * For example, suppose an attribute set contains the following attributes: *

* *

     * cn
     * cn;lang-ja
     * sn;phonetic;lang-ja
     * sn;lang-us
     * 
* * If you call the getSubset method and pass * lang-ja as the argument, the method returns * an attribute set containing the following attributes: *

* *

     * cn;lang-ja
     * sn;phonetic;lang-ja
     * 
* * @param subtype semi-colon delimited list of subtypes * to find within attribute names. * For example: *
     *     "lang-ja"        // Only Japanese language subtypes
     *     "binary"         // Only binary subtypes
     *     "binary;lang-ja" // Only Japanese language subtypes
     *                         which also are binary
     * 
* @return attribute set containing the attributes that have * the specified subtypes. * @see org.ietf.ldap.LDAPAttribute * @see org.ietf.ldap.LDAPAttributeSet#getAttribute * @see org.ietf.ldap.LDAPEntry#getAttributeSet */ public LDAPAttributeSet getSubset( String subtype ) { LDAPAttributeSet attrs = new LDAPAttributeSet(); if ( subtype == null ) return attrs; StringTokenizer st = new StringTokenizer(subtype, ";"); if( st.countTokens() < 1 ) return attrs; String[] searchTypes = new String[st.countTokens()]; int i = 0; while( st.hasMoreTokens() ) { searchTypes[i] = (String)st.nextToken(); i++; } Iterator it = _attrHash.values().iterator(); while( it.hasNext() ) { LDAPAttribute attr = (LDAPAttribute)it.next(); if( attr.hasSubtypes( searchTypes ) ) attrs.add( new LDAPAttribute( attr ) ); } return attrs; } /** * Returns a single attribute that exactly matches the specified attribute * name. * @param attrName name of attribute to return * For example: *
     *     "cn"            // Only a non-subtyped version of cn
     *     "cn;lang-ja"    // Only a Japanese version of cn
     *
* @return attribute that has exactly the same name, or null * (if no attribute in the set matches the specified name). * @see org.ietf.ldap.LDAPAttribute */ public LDAPAttribute getAttribute( String attrName ) { if ( attrName == null ) { return null; } else if ( _attrHash != null ) { return (LDAPAttribute)_attrHash.get( attrName.toLowerCase() ); } else { for ( int i = 0; i < _attrs.length; i++ ) { if ( attrName.equalsIgnoreCase(_attrs[i].getName()) ) { return _attrs[i]; } } return null; } } /** * Prepares hashtable for fast attribute lookups. */ private void prepareHashtable( boolean force ) { if ( (_attrHash == null) && (force || (_attrs.length >= ATTR_COUNT_REQUIRES_HASH)) ) { if ( _attrHash == null ) { _attrHash = new HashMap(); } else { _attrHash.clear(); } for ( int j = 0; j < _attrs.length; j++ ) { _attrHash.put( _attrs[j].getName().toLowerCase(), _attrs[j] ); } } } /** * Returns the subtype that matches the attribute name specified * by attrName and the language specificaton identified * by lang. *

* * If no attribute in the set has the specified name and subtype, * the method returns null. * * Attributes containing subtypes other than lang * (for example, cn;binary) are returned only if * they contain the specified lang subtype and if * the set contains no attribute having only the lang * subtype. (For example, getAttribute( "cn", "lang-ja" ) * returns cn;lang-ja;phonetic only if the * cn;lang-ja attribute does not exist.) *

* * If null is specified for the lang argument, * calling this method is the same as calling the * getAttribute(attrName) method. *

* * For example, suppose an entry contains only the following attributes: *

*

    *
  • cn;lang-en *
  • cn;lang-ja-JP-kanji *
  • sn *
*

* * Calling the following methods will return the following values: *

*

    *
  • getAttribute( "cn" ) returns null. *
  • getAttribute( "sn" ) returns the "sn" attribute. *
  • getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute. *
  • getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute. *
  • getAttribute( "cn", "lang-ja" ) returns null. *
  • getAttribute( "sn", "lang-en" ) returns the "sn" attribute. *
*

* @param attrName name of attribute to find in the entry * @param lang a language specification * @return the attribute that matches the base name and that best * matches any specified language subtype. * @see org.ietf.ldap.LDAPAttribute */ public LDAPAttribute getAttribute( String attrName, String lang ) { if ( (lang == null) || (lang.length() < 1) ) return getAttribute( attrName ); String langLower = lang.toLowerCase(); if ((langLower.length() < 5) || ( !langLower.substring( 0, 5 ).equals( "lang-" ) )) { return null; } StringTokenizer st = new StringTokenizer( langLower, "-" ); // Skip first token, which is "lang-" st.nextToken(); String[] langComponents = new String[st.countTokens()]; int i = 0; while ( st.hasMoreTokens() ) { langComponents[i] = st.nextToken(); i++; } String searchBasename = LDAPAttribute.getBaseName(attrName); String[] searchTypes = LDAPAttribute.getSubtypes(attrName); LDAPAttribute found = null; int matchCount = 0; for( i = 0; i < _attrs.length; i++ ) { boolean isCandidate = false; LDAPAttribute attr = _attrs[i]; // Same base name? if ( attr.getBaseName().equalsIgnoreCase(searchBasename) ) { // Accept any subtypes? if( (searchTypes == null) || (searchTypes.length < 1) ) { isCandidate = true; } else { // No, have to check each subtype for inclusion if( attr.hasSubtypes( searchTypes ) ) isCandidate = true; } } String attrLang = null; if ( isCandidate ) { attrLang = attr.getLangSubtype(); // At this point, the base name and subtypes are okay if ( attrLang == null ) { // If there are no language attributes, this one is okay found = attr; } else { // We just have to check for language match st = new StringTokenizer( attrLang.toLowerCase(), "-" ); // Skip first token, which is "lang-" st.nextToken(); // No match if the attribute's language spec is longer // than the target one if ( st.countTokens() > langComponents.length ) continue; // How many subcomponents of the language match? int j = 0; while ( st.hasMoreTokens() ) { if ( !langComponents[j].equals( st.nextToken() ) ) { j = 0; break; } j++; } if ( j > matchCount ) { found = attr; matchCount = j; } } } } return found; } /** * Retrieves the string representation of all attributes * in the attribute set. For example: * *

     * LDAPAttributeSet: LDAPAttribute {type='cn', values='Barbara Jensen,Babs
     * Jensen'}LDAPAttribute {type='sn', values='Jensen'}LDAPAttribute {type='
     * givenname', values='Barbara'}LDAPAttribute {type='objectclass', values=
     * 'top,person,organizationalPerson,inetOrgPerson'}LDAPAttribute {type='ou',
     * values='Product Development,People'}
     * 
* * @return string representation of all attributes in the set. */ public String toString() { StringBuffer sb = new StringBuffer("LDAPAttributeSet: "); for( int i = 0; i < _attrs.length; i++ ) { if (i != 0) { sb.append(" "); } sb.append(_attrs[i].toString()); } return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSSLSocketWrapFactory.java0000664001003300100330000003106610602743265031343 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.*; import java.net.*; import java.util.Hashtable; /** * Creates an SSL socket connection to an LDAP Server. This class is provided * by the package in which the SSL socket does not extend Socket object. * The class internally provides a wrapper to convert the SSL socket extending * the Object class to the one extending the Socket class. * This factory class implements the LDAPSocketFactory interface. *

* * To use this class, pass the instance of this factory object to the * LDAPConnection constructor. * * @version 1.0 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(org.ietf.ldap.LDAPSocketFactory) */ public class LDAPSSLSocketWrapFactory implements LDAPSSLSocketFactoryExt, java.io.Serializable { static final long serialVersionUID = -4171548771815037740L; /** * The constructor with the specified package for security * @param className the name of a class which has an implementation * of the SSL Socket extending Object class */ public LDAPSSLSocketWrapFactory(String className) { _packageName = new String(className); } /** * The constructor with the specified package for security and the * specified cipher suites. * @param className the name of a class which has an implementation * of the SSL Socket extending Object class * @param cipherSuites the cipher suites */ public LDAPSSLSocketWrapFactory(String className, Object cipherSuites) { _packageName = new String(className); _cipherSuites = cipherSuites; } /** * Returns socket to the specified host name and port number. * @param host the host to connect to * @param port the port number * @return the socket to the host name and port number as passed in. * @exception LDAPException A socket to the specified host and port * could not be created. */ public Socket createSocket(String host, int port) throws LDAPException { LDAPSSLSocket s = null; try { if (_cipherSuites == null) s = new LDAPSSLSocket(host, port, _packageName); else s = new LDAPSSLSocket(host, port, _packageName, _cipherSuites); return s; } catch (Exception e) { System.err.println("Exception: "+e.toString()); throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } /** * Returns true if client authentication is to be used. * @return true if client authentication is enabled; * falseif client authentication is disabled. */ public boolean isClientAuth() { return _clientAuth; } /** * (Not implemented yet)
* Enables client authentication for an application running in * a java VM which provides transparent certificate database management. * Calling this method has no effect after createSocket() has been * called. * @exception LDAPException Since this method is not yet implemented, * calling this method throws an exception. */ public void enableClientAuth() throws LDAPException { throw new LDAPException("Client Authentication is not implemented yet."); } /** * Returns the name of the class that implements SSL sockets for this factory. * * @return the name of the class that implements SSL sockets for this factory. */ public String getSSLSocketImpl() { return _packageName; } /** * Returns the suite of ciphers used for SSL connections made through * sockets created by this factory. * * @return the suite of ciphers used. */ public Object getCipherSuites() { return _cipherSuites; } /** * Indicates if client authentication is on. */ private boolean _clientAuth = false; /** * Name of class implementing SSLSocket. */ private String _packageName = null; /** * The cipher suites */ private Object _cipherSuites = null; } // LDAPSSLSocket class wraps the implementation of the SSL socket class LDAPSSLSocket extends Socket { public LDAPSSLSocket(String host, int port, String packageName) throws LDAPException { super(); _packageName = packageName; try { // instantiate the SSLSocketFactory implementation, and // find the right constructor Class c = Class.forName(_packageName); java.lang.reflect.Constructor[] m = c.getConstructors(); for (int i = 0; i < m.length; i++) { /* Check if the signature is right: String, int */ Class[] params = m[i].getParameterTypes(); if ((params.length == 2) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int"))) { Object[] args = new Object[2]; args[0] = host; args[1] = new Integer(port); _socket = (Object)(m[i].newInstance(args)); return; } } throw new LDAPException("No appropriate constructor in " + _packageName, LDAPException.PARAM_ERROR); } catch (ClassNotFoundException e) { throw new LDAPException("Class " + _packageName + " not found", LDAPException.OTHER); } catch (Exception e) { throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } public LDAPSSLSocket(String host, int port, String packageName, Object cipherSuites) throws LDAPException { super(); _packageName = packageName; String cipherClassName = null; if (cipherSuites != null) cipherClassName = cipherSuites.getClass().getName(); try { // instantiate the SSLSocketFactory implementation, and // find the right constructor Class c = Class.forName(_packageName); java.lang.reflect.Constructor[] m = c.getConstructors(); for (int i = 0; i < m.length; i++) { /* Check if the signature is right: String, int */ Class[] params = m[i].getParameterTypes(); if (cipherSuites == null) throw new LDAPException("Cipher Suites is required"); if ((params.length == 3) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int")) && (params[2].getName().equals(cipherClassName))) { Object[] args = new Object[3]; args[0] = host; args[1] = new Integer(port); args[2] = cipherSuites; _socket = (Object)(m[i].newInstance(args)); return; } } throw new LDAPException("No appropriate constructor in " + _packageName, LDAPException.PARAM_ERROR); } catch (ClassNotFoundException e) { throw new LDAPException("Class " + _packageName + " not found", LDAPException.OTHER); } catch (Exception e) { throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } public InputStream getInputStream() { try { Object obj = invokeMethod(_socket, "getInputStream", null); return (InputStream)obj; } catch (LDAPException e) { printDebug(e.toString()); } return null; } public OutputStream getOutputStream() { try { Object obj = invokeMethod(_socket, "getOutputStream", null); return (OutputStream)obj; } catch (LDAPException e) { printDebug(e.toString()); } return null; } public void close() throws IOException { try { invokeMethod(_socket, "close", null); } catch (LDAPException e) { printDebug(e.toString()); } } public void close(boolean wait) throws IOException { try { Object[] args = new Object[1]; args[0] = new Boolean(wait); invokeMethod(_socket, "close", args); } catch (LDAPException e) { printDebug(e.toString()); } } public InetAddress getInetAddress() { try { Object obj = invokeMethod(_socket, "getInetAddress", null); return (InetAddress)obj; } catch (LDAPException e) { printDebug(e.toString()); } return null; } public int getLocalPort() { try { Object obj = invokeMethod(_socket, "getLocalPort", null); return ((Integer)obj).intValue(); } catch (LDAPException e) { printDebug(e.toString()); } return -1; } public int getPort() { try { Object obj = invokeMethod(_socket, "getPort", null); return ((Integer)obj).intValue(); } catch (LDAPException e) { printDebug(e.toString()); } return -1; } private Object invokeMethod(Object obj, String name, Object[] args) throws LDAPException { try { java.lang.reflect.Method m = getMethod(name); if (m != null) { return (m.invoke(obj, args)); } } catch (Exception e) { throw new LDAPException("Invoking "+name+": "+ e.toString(), LDAPException.PARAM_ERROR); } return null; } private java.lang.reflect.Method getMethod(String name) throws LDAPException { try { java.lang.reflect.Method method = null; if ((method = (java.lang.reflect.Method)(_methodLookup.get(name))) != null) return method; Class c = Class.forName(_packageName); java.lang.reflect.Method[] m = c.getMethods(); for (int i = 0; i < m.length; i++ ) { if (m[i].getName().equals(name)) { _methodLookup.put(name, m[i]); return m[i]; } } throw new LDAPException("Method " + name + " not found in " + _packageName); } catch (ClassNotFoundException e) { throw new LDAPException("Class "+ _packageName + " not found"); } } private void printDebug(String msg) { if (_debug) { System.out.println(msg); } } private final boolean _debug = true; private Object _socket; private Hashtable _methodLookup = new Hashtable(); private String _packageName = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/0000775001003300100330000000000010667357314025021 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/GetOpt.java0000664001003300100330000002273610602743267027073 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; /** * This class is similar to the getopt() function in * UNIX System V. You can use this class to parse command-line * arguments. *

* * When you create an object of this class, you specify a string * containing the command-line options that you want to check for. * The string should contain the letters of these options. If an * option requires an argument (for example, "-h "), * you should add a colon after the letter in this string. *

* * For example, in the following string, the -h, * -p, -D,, and -w options * all require arguments. The -H option does not * require any arguments. *

 * "h:p:D:w:H"
 * 
* * You can use the hasOption method to determine if * an option has been specified and the getOptionParam * method to get the argument specified after a particular option. *

* * If an option not specified in the string is passed in as an * argument, the GetOpt object prints out an error * message. Note that the object does not throw an exception or * exit the application if an invalid option is specified. *

* * Note that you are still responsible for verifying that any * required arguments have been specified. *

* * The following example parses the command-line arguments for * the hostname, port number, DN, and password to use when * connecting and authenticating to an LDAP server. *

 * import org.ietf.ldap.*;
 * import org.ietf.ldap.controls.*;
 * import org.ietf.ldap.util.*;
 * import java.util.*;
 *
 * public class SearchDirectory {
 *
 *     public static void main( String[] args )
 *     {
 *
 *         String usage = "Usage: java SearchDirectory -h  -p  "
 *                      + "[-D ] [-w ]"
 *
 *         int portnumber = LDAPConnection.DEFAULT_PORT;
 *
 *         // Check for these options. -H means to print out a usage message.
 *         GetOpt options = new GetOpt( "h:p:D:w:H", args );
 *
 *         // Get the arguments specified for each option.
 *         String hostname = options.getOptionParam( 'h' );
 *         String port = options.getOptionParam( 'p' );
 *         String bindDN = options.getOptionParam( 'D' );
 *         String bindPW = options.getOptionParam( 'w' );
 *
 *         // Check to see if the hostname (which is mandatory)
 *         // is not specified or if the user simply wants to
 *         // see the usage message (-H).
 *         if ( hostname == null || options.hasOption( 'H' ) ) {
 *             System.out.println( usage );
 *             System.exit( 1 );
 *         }
 *
 *         // If a port number was specified, convert the port value
 *         //  to an integer.
 *         if ( port != null ) {
 *             try {
 *                 portnumber = java.lang.Integer.parseInt( port );
 *             } catch ( java.lang.Exception e ) {
 *                 System.out.println( "Invalid port number: " + port );
 *                 System.out.println( usage );
 *                 System.exit( 1 );
 *             }
 *         }
 *
 *         // Create a new connection.
 *         LDAPConnection ld = new LDAPConnection();
 *
 *         try {
 *             // Connect and authenticate to server.
 *             ld.connect( 3, hostname, portnumber, bindDN, bindPW );
 *             ...
 *         } catch ( LDAPException e ) {
 *             System.out.println( "Error: " + e.toString() );
 *         }
 *         ...
 *     }
 * }
 * 
* * @version 1.0 */ public class GetOpt implements java.io.Serializable { /** * Internal variables */ private int m_pos; private String optarg; private String m_control; private Vector m_option; private Vector m_ParameterList; private Hashtable m_optionHashTable; private Hashtable m_optionParamHashTable; static final long serialVersionUID = -2570196909939660248L; /** * Constructs a GetOpt object. * @param strControl a string specifying the letters of * all available options. If an option requires an argument * (for example, "-h "), use a colon after the * letter for that option (for example, "h:p:D:w:H"). * @param args an array of strings representing the list * of arguments to parse (for example, the * array passed into Main). */ public GetOpt(String strControl, String args[]) { m_option = new Vector(); m_control = strControl; m_optionHashTable = new Hashtable(); m_optionParamHashTable = new Hashtable(); m_ParameterList = new Vector(); for (int i=0;i0) { if ((sOpt.charAt(0)=='-') || (sOpt.charAt(0)=='/')) { if (sOpt.length()>1) { int nIndex = m_control.indexOf(sOpt.charAt(1)); if (nIndex == (-1)) { System.err.println("Invalid usage. No option -" + sOpt.charAt(1)); } else { char cOpt[]= new char[1]; cOpt[0]= sOpt.charAt(1); String sName = new String(cOpt); m_optionHashTable.put(sName,"1"); if ((m_control != null) && (m_control.length() > (nIndex+1))) { if (m_control.charAt(nIndex+1)==':') { i++; if (i < args.length) m_optionParamHashTable.put(sName,args[i]); else System.err.println("Missing argument for option "+ sOpt); } } } } else { System.err.println("Invalid usage."); } } else { // probably parameters m_ParameterList.addElement(args[i]); } } } } /** * Determines if an option was specified. For example, * hasOption( 'H' ) checks if the -H option * was specified. *

* * @param c letter of the option to check * @return true if the option was specified. */ public boolean hasOption(char c) { boolean fReturn = false; char cOption[]=new char[1]; cOption[0]=c; String s = new String(cOption); if (m_optionHashTable.get(s)=="1") { fReturn = true; } return(fReturn); } /** * Gets the argument specified with an option. * For example, getOptionParameter( 'h' ) * gets the value of the argument specified with * the -h option (such as "localhost" in "-h localhost"). *

* * @param c the letter of the option to check * @return the argument specified for this option. */ public String getOptionParam(char c) { char cOption[] = new char[1]; cOption[0]=c; String s = new String(cOption); String sReturn=(String)m_optionParamHashTable.get(s); return(sReturn); } /** * Gets a list of any additional parameters specified * (not including the arguments for any options). * @return a list of the additional parameters. */ public Vector getParameters() { return(m_ParameterList); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFWriter.java0000664001003300100330000001470510602743267027601 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * bugzilla 62700: Joe Rank (joer@trapdoor.net) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; import org.ietf.ldap.*; import java.io.*; /** * Class for outputting LDAP entries to a stream as LDIF. * * @version 1.0 */ public class LDIFWriter extends LDAPWriter { // static final long serialVersionUID = -2710382547996750924L; private String m_sep; private boolean m_foldLines; private boolean m_attrsOnly; private boolean m_toFiles; private static final String DEFAULT_SEPARATOR = ":"; private static final int MAX_LINE = 77; /** * Constructs an LDIFWriter object to output entries * to a stream as LDIF. * * @param pw output stream */ public LDIFWriter( PrintWriter pw ) { this( pw, false, DEFAULT_SEPARATOR, true, false ); } /** * Constructs an LDIFWriter object to output entries * to a stream as LDIF. * * @param pw output stream * @param attrsOnly true if only attribute names, not * values, are to be printed * @param separator String to use between attribute names and values; * the default is ":" * @param foldLines true to fold lines at 77 characters, * false to not fold them; the default is true. * @param toFiles true to write each attribute value to a * file in the temp folder, false to write them to the * output stream in printable format; the default is false. */ public LDIFWriter( PrintWriter pw, boolean attrsOnly, String separator, boolean foldLines, boolean toFiles ) { super( pw ); m_attrsOnly = attrsOnly; m_sep = separator; m_foldLines = foldLines; m_toFiles = toFiles; } /** * Print an attribute of an entry * * @param attr the attribute to format to the output stream */ protected void printAttribute( LDAPAttribute attr ) { String attrName = attr.getName(); if ( m_attrsOnly ) { printString( attrName + m_sep ); return; } /* Loop on values for this attribute */ Enumeration enumVals = attr.getByteValues(); if ( enumVals != null ) { while (enumVals.hasMoreElements()) { if ( m_toFiles ) { try { FileOutputStream f = getTempFile( attrName ); f.write( (byte[])enumVals.nextElement() ); } catch ( Exception e ) { System.err.println( "Error writing values " + "of " + attrName + ", " + e.toString() ); System.exit(1); } } else { byte[] b = (byte[])enumVals.nextElement(); String s; if ( LDIF.isPrintable(b) ) { try { s = new String( b, "UTF8" ); } catch ( UnsupportedEncodingException e ) { s = ""; } printString( attrName + m_sep + " " + s ); } else { s = getPrintableValue( b ); if ( s.length() > 0 ) { printString( attrName + ":: " + s ); } else { printString( attrName + m_sep + ' ' ); } } } } } else { printString( attrName + m_sep + ' ' ); } } /** * Print prologue to entry * * @param dn the DN of the entry */ protected void printEntryStart( String dn ) { if ( dn == null ) { printString( "dn" + m_sep + " "); } else { byte[] b = null; try { b = dn.getBytes( "UTF8" ); } catch ( UnsupportedEncodingException ex ) { } if ( LDIF.isPrintable(b) ) { printString( "dn" + m_sep + " " + dn ); } else { dn = getPrintableValue( b ); printString( "dn" + m_sep + m_sep + " " + dn ); } } } /** * Print epilogue to entry * * @param dn the DN of the entry */ protected void printEntryEnd( String dn ) { m_pw.println(); } protected void printString( String value ) { if ( m_foldLines ) { LDIF.breakString( m_pw, value, MAX_LINE ); } else { m_pw.print( value ); m_pw.print( '\n' ); } } /** * Create a unique file name in the temp folder and open an * output stream to the file * * @param name base name of file; an extension is appended which * consists of a number that makes the name unique * @return an open output stream to the file * @exception IOException if the file couldn't be opened for output */ protected FileOutputStream getTempFile( String name ) throws IOException { int num = 0; File f; String filename; do { filename = name + '.' + num; f = new File( filename ); num++; } while ( f.exists() ); printString(name + m_sep + " " + filename); return new FileOutputStream( f ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFAddContent.java0000664001003300100330000000767310602743267030356 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import org.ietf.ldap.LDAPAttribute; /** * * An object of this class represents the content of an LDIF record that * specifies a new entry to be added. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFAddContent. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord#getContent */ public class LDIFAddContent extends LDIFBaseContent { /** * Internal variables */ private LDAPAttribute m_attrs[] = null; static final long serialVersionUID = -665548826721177756L; /** * Constructs a new LDIFAddContent object with * the specified attributes. * @param attrs an array of LDAPAttribute objects * representing the attributes of the entry to be added */ public LDIFAddContent(LDAPAttribute attrs[]) { m_attrs = attrs; } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.ADD_CONTENT). * @see org.ietf.ldap.util.LDIFRecord#getContent */ public int getType() { return ADD_CONTENT; } /** * Retrieves the list of the attributes specified in the content * of the LDIF record. * @return an array of LDAPAttribute objects that * represent the attributes specified in the content of the LDIF record. */ public LDAPAttribute[] getAttributes() { return m_attrs; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; for (int i = 0; i < m_attrs.length; i++) { s = s + m_attrs[i].toString(); } if ( getControls() != null ) { s += getControlString(); } return "LDIFAddContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/DSMLWriter.java0000664001003300100330000002273010602743267027617 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; import org.ietf.ldap.*; import java.io.*; /** * Class for outputting LDAP entries to a stream as DSML. * * @version 1.0 */ public class DSMLWriter extends LDAPWriter { // static final long serialVersionUID = -2710382547996750924L; /** * Constructs a DSMLWriter object to output entries * to a stream as DSML. * * @param pw output stream */ public DSMLWriter( PrintWriter pw ) { super( pw ); } /** * Prints the schema from an entry containing subschema * * entry entry containing schema definitions */ public void printSchema( LDAPEntry entry ) { LDAPSchema schema = new LDAPSchema( entry ); printString( " " ); printObjectClassSchema( schema ); printAttributeSchema( schema ); printString( " " ); } /** * Prints the object class schema from a schema object * * schema schema elements */ protected void printObjectClassSchema( LDAPSchema schema ) { Enumeration en = schema.getObjectClassSchemas(); while( en.hasMoreElements() ) { LDAPObjectClassSchema s = (LDAPObjectClassSchema)en.nextElement(); printString( " " ); if ( s.isObsolete() ) { printString( " obsolete=true" ); } printString( " " + s.getNames()[0] + "" ); printString( " " + s.getDescription() + "" ); Enumeration attrs = s.getRequiredAttributes(); while( attrs.hasMoreElements() ) { printString( " " ); } attrs = s.getOptionalAttributes(); while( attrs.hasMoreElements() ) { printString( " " ); } printString( " " ); } } /** * Prints the attribute schema from a schema object * * schema schema elements */ protected void printAttributeSchema( LDAPSchema schema ) { Enumeration en = schema.getAttributeSchemas(); while( en.hasMoreElements() ) { LDAPAttributeSchema s = (LDAPAttributeSchema)en.nextElement(); printString( " 0) ) { printString( " equality=" + vals[0] ); } vals = s.getQualifier( s.ORDERING ); if ( (vals != null) && (vals.length > 0) ) { printString( " ordering=" + vals[0] ); } vals = s.getQualifier( s.SUBSTR ); if ( (vals != null) && (vals.length > 0) ) { printString( " substring=" + vals[0] ); } printString( " " + s.getNames()[0] + "" ); printString( " " + s.getDescription() + "" ); printString( " " + s.getSyntaxString() + "" ); printString( " " ); } } /** * Print an attribute of an entry * * @param attr the attribute to format to the output stream */ protected void printAttribute( LDAPAttribute attr ) { String attrName = attr.getName(); // Object classes are treated differently in DSML. Also, they // are always String-valued if ( attrName.equalsIgnoreCase( "objectclass" ) ) { Enumeration enumVals = attr.getStringValues(); if ( enumVals != null ) { while ( enumVals.hasMoreElements() ) { String s = (String)enumVals.nextElement(); printString( " " + s + "" ); } } return; } printString( " " ); /* Loop on values for this attribute */ Enumeration enumVals = attr.getByteValues(); if ( enumVals != null ) { while ( enumVals.hasMoreElements() ) { byte[] b = (byte[])enumVals.nextElement(); String s; if ( LDIF.isPrintable(b) ) { try { s = new String( b, "UTF8" ); } catch ( UnsupportedEncodingException e ) { s = ""; } printEscapedValue( " ", s, "" ); } else { s = getPrintableValue( b ); if ( s.length() > 0 ) { printString( " " + "" ); printString( " " + s ); printString( " " ); } } } } printString( " " ); } /** * Print prologue to entry * * @param dn the DN of the entry */ protected void printEntryStart( String dn ) { if ( dn == null ) { dn = ""; } printString( " " ); } /** * Print epilogue to entry * * @param dn the DN of the entry */ protected void printEntryEnd( String dn ) { printString( " " ); } /** * Print the element start, the value with escaping of special * characters, and the element end * * @param prolog element start * @param value value to be escaped * @param epilog element end */ protected void printEscapedValue( String prolog, String value, String epilog ) { m_pw.print( prolog ); int l = value.length(); char[] text = new char[l]; value.getChars( 0, l, text, 0 ); for ( int i = 0; i < l; i++ ) { char c = text[i]; switch (c) { case '<' : m_pw.print( "<" ); break; case '&' : m_pw.print( "&" ); break; default : m_pw.print( c ); } } m_pw.print( epilog); m_pw.print( '\n' ); } protected void printString( String value ) { m_pw.print( value ); m_pw.print( '\n' ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIF.java0000664001003300100330000007110210602743267026376 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.client.*; import java.io.*; import java.net.*; /** * LDAP Data Interchange Format (LDIF) is a file format used to * import and export directory data from an LDAP server and to * describe a set of changes to be applied to data in a directory. * This format is described in the Internet draft * The LDAP Data Interchange Format (LDIF) - * Technical Specification. *

* * This class implements an LDIF file parser. You can construct * an object of this class to parse data in LDIF format and * manipulate the data as individual LDIFRecord objects. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord */ public class LDIF implements Serializable { /** * Internal constants */ private final static char COMMENT = '#'; static final long serialVersionUID = -2710382547996750924L; /** * Constructs an LDIF object to parse the * LDAP data read from stdin. * @exception IOException An I/O error has occurred. */ public LDIF() throws IOException { DataInputStream ds = new DataInputStream(System.in); BufferedReader d = new BufferedReader(new InputStreamReader(ds, "UTF8")); m_reader = new LineReader(d); m_source = "System.in"; m_decoder = new MimeBase64Decoder(); } /** * Constructs an LDIF object to parse the * LDIF data read from a specified file. * @param file the name of the LDIF file to parse * @exception IOException An I/O error has occurred. */ public LDIF(String file) throws IOException { FileInputStream fs = new FileInputStream(file); DataInputStream ds = new DataInputStream(fs); BufferedReader d = new BufferedReader(new InputStreamReader(ds, "UTF8")); m_reader = new LineReader(d); m_source = file; m_decoder = new MimeBase64Decoder(); } /** * Constructs an LDIF object to parse the * LDIF data read from an input stream. * @param dstThe input stream providing the LDIF data * @exception IOException An I/O error has occurred. */ public LDIF(DataInputStream ds) throws IOException { BufferedReader d = new BufferedReader(new InputStreamReader(ds, "UTF8")); m_reader = new LineReader(d); m_source = ds.toString(); m_decoder = new MimeBase64Decoder(); } /** * Returns the next record in the LDIF data. You can call this * method repeatedly to iterate through all records in the LDIF data. *

* * @return the next record as an LDIFRecord * object or null if there are no more records. * @exception IOException An I/O error has occurred. * @see org.ietf.ldap.util.LDIFRecord */ public LDIFRecord nextRecord() throws IOException { if ( m_done ) return null; else return parse_ldif_record( m_reader ); } /** * Parses ldif content. The list of attributes is * terminated by \r\n or '-'. This function is * also used to parse the attributes in modifications. * @param ds data input stream */ private LDIFRecord parse_ldif_record(LineReader d) throws IOException { String line = null; String dn = null; Vector attrs = new Vector(); LDIFRecord rec = null; // Skip past any blank lines while( ((line = d.readLine()) != null) && (line.length() < 1) ) { } if (line == null) { return null; } if (line.startsWith("version:")) { m_version = Integer.parseInt( line.substring("version:".length()).trim() ); if ( m_version != 1 ) { throwLDIFException( "Unexpected " + line ); } // Do the next record line = d.readLine(); if ( (line != null) && (line.length() == 0) ) { // Skip the newline line = d.readLine(); } if (line == null) { return null; } } if (!line.startsWith("dn:")) throwLDIFException("expecting dn:"); dn = line.substring(3).trim(); if (dn.startsWith(":") && (dn.length() > 1)) { String substr = dn.substring(1).trim(); dn = new String(getDecodedBytes(substr), "UTF8"); } LDIFContent content = parse_ldif_content(d); rec = new LDIFRecord(dn, content); return rec; } /** * Parses ldif content. The list of attributes is * terminated by \r\n or '-'. This function is * also used to parse the attributes in modifications. * @param ds data input stream */ private LDIFContent parse_ldif_content(LineReader d) throws IOException { String line = d.readLine(); if ((line == null) || (line.length() < 1) || (line.equals("-"))) { // if this is empty line, then we're finished reading all // the info for the current entry if ((line != null) && (line.length() < 1)) { m_currEntryDone = true; } return null; } if (line.startsWith("changetype:")) { /* handles (changerecord) */ LDIFContent lc = null; String changetype = line.substring(11).trim(); if (changetype.equals("modify")) { lc = parse_mod_spec(d); } else if (changetype.equals("add")) { lc = parse_add_spec(d); } else if (changetype.equals("delete")) { lc = parse_delete_spec(d); } else if (changetype.equals("moddn") || changetype.equals("modrdn")) { lc = parse_moddn_spec(d); } else { throwLDIFException("change type not supported"); } return lc; } /* handles 1*(attrval-spec) */ Hashtable ht = new Hashtable(); String newtype = null; Object val = null; LDAPAttribute newAttr = null; Vector controlVector = null; /* Read lines until we're past the record */ while( true ) { if (line.startsWith("control:")) { if ( controlVector == null ) { controlVector = new Vector(); } controlVector.addElement( parse_control_spec( line ) ); } else { /* An attribute */ int len = line.length(); if ( len < 1 ) { break; } int idx = line.indexOf(':'); /* Must have a colon */ if (idx == -1) throwLDIFException("no ':' found"); /* attribute type */ newtype = line.substring(0,idx).toLowerCase(); val = ""; /* Could be :: for binary */ idx++; if ( len > idx ) { if ( line.charAt(idx) == ':' ) { idx++; String substr = line.substring(idx).trim(); val = getDecodedBytes(substr); } else if (line.charAt(idx) == '<') { try { URL url = new URL(line.substring(idx+1).trim()); String filename = url.getFile(); val = getFileContent(filename); } catch (MalformedURLException ex) { throwLDIFException( ex + ": cannot construct url "+ line.substring(idx+1).trim()); } } else { val = line.substring(idx).trim(); } } /* Is there a previous value for this attribute? */ newAttr = (LDAPAttribute)ht.get( newtype ); if ( newAttr == null ) { newAttr = new LDAPAttribute( newtype ); } if ( val instanceof String ) { newAttr.addValue( (String)val ); } else { newAttr.addValue( (byte[])val ); } ht.put( newtype, newAttr ); } line = d.readLine(); if (line == null || (line.length() < 1) || (line.equals("-"))) { if ((line != null) && (line.length() < 1)) { m_currEntryDone = true; } break; } } LDIFAttributeContent ac = new LDIFAttributeContent(); // Copy over the attributes to the record Enumeration en = ht.elements(); while( en.hasMoreElements() ) { ac.addElement( (LDAPAttribute)en.nextElement() ); } ht.clear(); if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); ac.setControls( controls ); controlVector.removeAllElements(); } return ac; } private byte[] getDecodedBytes(String line) { ByteBuf inBuf = new ByteBuf(line); ByteBuf decodedBuf = new ByteBuf(); /* Translate from base 64 */ m_decoder.translate( inBuf, decodedBuf ); return decodedBuf.toBytes(); } private byte[] getFileContent(String url) throws IOException { StringTokenizer tokenizer = new StringTokenizer(url, "|"); String filename = url; int num = tokenizer.countTokens(); if (num == 2) { String token = (String)tokenizer.nextElement(); int index = token.lastIndexOf("/"); String drive = token.substring(index+1); token = (String)tokenizer.nextElement(); token = token.replace('/', '\\'); filename = drive+":"+token; } File file = new File(filename); byte[] b = new byte[(int)file.length()]; FileInputStream fi = new FileInputStream(filename); fi.read(b); return b; } /** * Parses add content * @param ds data input stream */ private LDIFAddContent parse_add_spec(LineReader d) throws IOException { LDIFAttributeContent ac = (LDIFAttributeContent)parse_ldif_content(d); if (m_currEntryDone) m_currEntryDone = false; LDAPAttribute attrs[] = ac.getAttributes(); LDIFAddContent rc = new LDIFAddContent(attrs); LDAPControl[] controls = ac.getControls(); if ( controls != null ) { rc.setControls( controls ); } return rc; } /** * Parses delete content * @param ds data input stream */ private LDIFDeleteContent parse_delete_spec(LineReader d) throws IOException { Vector controlVector = null; LDIFDeleteContent dc = new LDIFDeleteContent(); String line = d.readLine(); while( line != null && !line.equals("") ) { if (line.startsWith("control:")) { if ( controlVector == null ) { controlVector = new Vector(); } controlVector.addElement( parse_control_spec( line ) ); } else { throwLDIFException("invalid SEP" ); } line = d.readLine(); } if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); dc.setControls( controls ); controlVector.removeAllElements(); } return dc; } /** * Parses change modification. * @param ds data input stream */ private LDIFModifyContent parse_mod_spec(LineReader d) throws IOException { Vector controlVector = null; String line = null; line = d.readLine(); LDIFModifyContent mc = new LDIFModifyContent(); do { int oper = -1; if (line.startsWith("add:")) { oper = LDAPModification.ADD; } else if (line.startsWith("delete:")) { oper = LDAPModification.DELETE; } else if (line.startsWith("replace:")) { oper = LDAPModification.REPLACE; } else throwLDIFException("unknown modify type"); LDIFAttributeContent ac = (LDIFAttributeContent)parse_ldif_content(d); if (ac != null) { LDAPAttribute attrs[] = ac.getAttributes(); for (int i = 0; i < attrs.length; i++) { LDAPModification mod = new LDAPModification(oper, attrs[i]); mc.addElement( mod ); } LDAPControl[] controls = ac.getControls(); if ( controls != null ) { if ( controlVector == null ) { controlVector = new Vector(); } for( int i = 0; i < controls.length; i++ ) { controlVector.addElement( controls[i] ); } } // if there is no attrval-spec, go into the else statement } else { int index = line.indexOf(":"); if (index == -1) throwLDIFException("colon missing in "+line); String attrName = line.substring(index+1).trim(); if (oper == LDAPModification.ADD) throwLDIFException("add operation needs the value for attribute "+attrName); LDAPAttribute attr = new LDAPAttribute(attrName); LDAPModification mod = new LDAPModification(oper, attr); mc.addElement(mod); } if (m_currEntryDone) { m_currEntryDone = false; break; } line = d.readLine(); } while (line != null && !line.equals("")); if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); mc.setControls( controls ); controlVector.removeAllElements(); } return mc; } /** * Parses moddn/modrdn modification. * @param d data input stream */ private LDIFModDNContent parse_moddn_spec(LineReader d) throws IOException { Vector controlVector = null; String line = null; line = d.readLine(); LDIFModDNContent mc = new LDIFModDNContent(); String val = null; do { if (line.startsWith("newrdn:") && (line.length() > ("newrdn:".length()+1))) { mc.setRDN(line.substring("newrdn:".length()).trim()); } else if (line.startsWith("deleteoldrdn:") && (line.length() > ("deleteoldrdn:".length()+1))) { String str = line.substring("deleteoldrdn:".length()).trim(); if (str.equals("0")) mc.setDeleteOldRDN(false); else if (str.equals("1")) mc.setDeleteOldRDN(true); else throwLDIFException("Incorrect input for deleteOldRdn "); } else if (line.startsWith("newsuperior:") && (line.length() > ("newsuperior:".length()+1))) { mc.setNewParent(line.substring( "newsuperior:".length()).trim()); } else if (line.startsWith("newparent:") && (line.length() > ("newparent:".length()+1))) { mc.setNewParent(line.substring( "newparent:".length()).trim()); } else if (line.startsWith("control:")) { if ( controlVector == null ) { controlVector = new Vector(); } controlVector.addElement( parse_control_spec( line ) ); } line = d.readLine(); } while (line != null && !line.equals("")); if( controlVector != null ) { LDAPControl[] controls = new LDAPControl[controlVector.size()]; controlVector.copyInto( controls ); mc.setControls( controls ); controlVector.removeAllElements(); } return mc; } /** * Parses the specification of a control
* * A control looks line one of the following: *
* control: 1.2.3.4.10.210 *
* control: 1.2.3.4.10.210 true *
* control: 1.2.3.4.10.210 true: someASCIIvalue *
* control: 1.2.3.4.10.210: someASCIIvalue *
* control: 1.2.3.4.10.210 true:: 44GK44GM44GV44KP44KJ *
* control: 1.2.3.4.10.210:: 44GK44GM44GV44KP44KJ *
* control: 1.2.3.4.10.210 true:< file:///usr/local/directory/cont.dta *
* control: 1.2.3.4.10.210:< file:///usr/local/directory/cont.dta * * @param line a line containing a control spec * @return a parsed control. * @exception IOException if the line could not be parsed */ protected LDAPControl parse_control_spec( String line ) throws IOException { boolean criticality = true; String OID; byte[] val = null; int len = line.length(); int idx = line.indexOf(':') + 2; /* OID, must be present */ if ( idx >= len ) { throwLDIFException("OID required for control"); } line = line.substring(idx).trim(); idx = line.indexOf(' '); if ( idx < 0 ) { OID = line; } else { /* Optional criticality */ OID = line.substring(0, idx); line = line.substring(idx+1); idx = line.indexOf(':'); String criticalVal; if (idx > 0) { criticalVal = line.substring(0, idx); } else { criticalVal = line; } if ( criticalVal.compareTo("true") == 0 ) { criticality = true; } else if ( criticalVal.compareTo("false") == 0 ) { criticality = false; } else { throwLDIFException( "Criticality for control must be true" + " or false, not " + criticalVal); } /* Optional value */ if ( idx > 0 ) { /* Could be :: for binary */ idx++; if ( line.length() > idx ) { if ( line.charAt(idx) == ':' ) { idx++; line = line.substring(idx).trim(); val = getDecodedBytes(line); } else if (line.charAt(idx) == '<') { String urlString = line.substring(idx+1).trim(); try { URL url = new URL(urlString); String filename = url.getFile(); val = getFileContent(filename); } catch (MalformedURLException ex) { throwLDIFException( ex + ": cannot construct url "+ urlString); } } else { try { val = line.substring(idx).trim().getBytes("UTF8"); } catch(Exception x) { } } } } } return new LDAPControl( OID, criticality, val ); } /** * Returns true if all the bytes in the given array are valid for output as a * String according to the LDIF specification. If not, the array should * output base64-encoded. * @return true if all the bytes in the given array are valid for * output as a String according to the LDIF specification; otherwise, * false. */ public static boolean isPrintable(byte[] b) { for( int i = b.length - 1; i >= 0; i-- ) { if ( (b[i] < ' ') || (b[i] > 127) ) { if ( b[i] != '\t' ) return false; } } return true; } /** * Outputs the String in LDIF line-continuation format. No line will be longer * than the given max. A continuation line starts with a single blank space. * @param pw the printer writer * @param value the given string being printed out * @param max the maximum characters allowed in the line */ public static void breakString( PrintWriter pw, String value, int max) { int leftToGo = value.length(); int written = 0; int maxChars = max; /* Limit to 77 characters per line */ while( leftToGo > 0 ) { int toWrite = Math.min( maxChars, leftToGo ); String s = value.substring( written, written+toWrite); if ( written != 0 ) { pw.print( " " + s ); } else { pw.print( s ); maxChars -= 1; } written += toWrite; leftToGo -= toWrite; /* Don't use pw.println, because it outputs an extra CR in Win32 */ pw.print( '\n' ); } } /** * Gets the version of LDIF used in the data. * @return version of LDIF used in the data. */ public int getVersion() { return m_version; } /** * Gets the string representation of the * entire LDIF file. * @return the string representation of the entire LDIF data file. */ public String toString() { return "LDIF {" + m_source + "}"; } /** * Throws a LDIF file exception including the current line number. * @param msg Error message */ protected void throwLDIFException(String msg)throws IOException { throw new IOException ("line " + (m_currLineNum-m_continuationLength) + ": " + msg); } /** * Internal variables */ private int m_version = 1; private boolean m_done = false; private LineReader m_reader = null; private String m_source = null; private MimeBase64Decoder m_decoder = null; private boolean m_currEntryDone = false; private int m_currLineNum; private int m_continuationLength; /* Concatenate continuation lines, if present */ class LineReader { LineReader( BufferedReader d ) { _d = d; } /** * Reads a non-comment line. * @return a string or null. */ String readLine() throws IOException { String line = null; String result = null; int readCnt = 0, continuationLength = 0; do { /* Leftover line from last time? */ if ( _next != null ) { line = _next; _next = null; } else { line = _d.readLine(); } if (line != null) { readCnt++; /* Empty line means end of record */ if( line.length() < 1 ) { if ( result == null ) result = line; else { _next = line; break; } } else if( line.charAt(0) == COMMENT ) { /* Ignore comment lines */ } else if( line.charAt(0) != ' ' ) { /* Not a continuation line */ if( result == null ) { result = line; } else { _next = line; break; } } else { /* Continuation line */ if ( result == null ) { m_currLineNum += readCnt; throwLDIFException("continuation out of nowhere"); } result += line.substring(1); continuationLength++; } } else { /* End of file */ break; } } while ( true ); m_done = ( line == null ); m_currLineNum += readCnt; if (_next != null) { // read one line ahead m_currLineNum--; } m_continuationLength = continuationLength; return result; } private BufferedReader _d; String _next = null; } /** * Converts a byte array to a printable string following * the LDIF rules (encode in base64 if necessary) * * @param b the byte array to convert * @return a converted string which is printable. */ public static String toPrintableString( byte[] b ) { String s = ""; if (isPrintable(b)) { try { s = new String(b, "UTF8"); } catch ( java.io.UnsupportedEncodingException e ) { } } else { ByteBuf inBuf = new ByteBuf( b, 0, b.length ); ByteBuf encodedBuf = new ByteBuf(); // Translate to base 64 MimeBase64Encoder encoder = new MimeBase64Encoder(); encoder.translate( inBuf, encodedBuf ); int nBytes = encodedBuf.length(); if ( nBytes > 0 ) { s = new String(encodedBuf.toBytes(), 0, nBytes); } } return s; } /** * Test driver - just reads and parses an LDIF file, printing * each record as interpreted * * @param args name of the LDIF file to parse */ public static void main( String[] args ) { if ( args.length != 1 ) { System.out.println( "Usage: java LDIF " ); System.exit( 1 ); } LDIF ldif = null; try { ldif = new LDIF( args[0] ); } catch (Exception e) { System.err.println("Failed to read LDIF file " + args[0] + ", " + e.toString()); System.exit(1); } try { for( LDIFRecord rec = ldif.nextRecord(); rec != null; rec = ldif.nextRecord() ) { System.out.println( rec.toString() + '\n' ); } } catch ( IOException ex ) { System.out.println( ex ); System.exit( 1 ); } System.exit( 0 ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFContent.java0000664001003300100330000001135610602743267027736 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import org.ietf.ldap.LDAPControl; /** * This interface represents the content of an LDIF record. * An LDIF record can specify an entry or modifications to be * made to an entry. *

* * The following classes implement this interface: *

* *

    *
  • LDIFAttributeContent (represents the content * of an LDIF record that specifies an entry) *
  • LDIFAddContent (represents the content * of an LDIF record that adds a new entry) *
  • LDIFModifyContent (represents the content * of an LDIF record that modifies an entry) *
  • LDIFDeleteContent (represents the content * of an LDIF record that deletes an entry) *
  • LDIFModDNContent (represents the content * of an LDIF record that changes the RDN or DN of an entry) *
*

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord * @see org.ietf.ldap.util.LDIFAttributeContent * @see org.ietf.ldap.util.LDIFAddContent * @see org.ietf.ldap.util.LDIFModifyContent * @see org.ietf.ldap.util.LDIFDeleteContent * @see org.ietf.ldap.util.LDIFModDNContent */ public interface LDIFContent { /** * The LDIF record specifies an entry and its attributes. */ public final static int ATTRIBUTE_CONTENT = 0; /** * The LDIF record specifies a new entry to be added. */ public final static int ADD_CONTENT = 1; /** * The LDIF record specifies an entry to be deleted. */ public final static int DELETE_CONTENT = 2; /** * The LDIF record specifies modifications to an entry. */ public final static int MODIFICATION_CONTENT = 3; /** * The LDIF record specifies changes to the DN or RDN of an entry. */ public final static int MODDN_CONTENT = 4; /** * Determines the content type. * @return the content type, identified by one of the following values: *

    *
  • ATTRIBUTE_CONTENT (specifies an entry and its attributes) *
  • ADD_CONTENT (specifies a new entry to be added) *
  • DELETE_CONTENT (specifies an entry to be deleted) *
  • MODIFICATION_CONTENT (specifies an entry to be modified) *
  • MODDN_CONTENT (specifies a change to the RDN or DN of an entry) *
*/ public int getType(); /** * Retrieves the list of controls specified in the content * of the LDIF record, if any * @return an array of LDAPControl objects that * represent any controls specified in the the LDIF record, * or null if none were specified. */ public LDAPControl[] getControls(); /** * Sets the list of controls * @param controls an array of LDAPControl objects * or null if none are to be specified */ public void setControls( LDAPControl[] controls ); /** * Returns the string representation of the content of the LDIF record. * @return string representation of the content of the LDIF record. */ public String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFRecord.java0000664001003300100330000002010410602743267027531 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.io.Serializable; import org.ietf.ldap.LDAPControl; /** * An object of this class represents an LDIF record in an LDIF * file (or in LDIF data). A record can contain a list of attributes * (which describes an entry) or a list of modifications (which * decribes the changes that need to be made to an entry). * Each record also has a distinguished name. *

* * You can get an LDIFRecord object from LDIF data * by calling the nextRecord method of the * LDIF object holding the data. *

* * If you are constructing a new LDIFRecord object, * you can specify the content of the record in one of the * following ways: *

* *

    *
  • To create a record that specifies an entry, use an object of * the LDIFAttributeContent class. *
  • To create a record that specifies a modification to be made, * use an object of one of the following classes: *
      *
    • Use LDIFAddContent to add a new entry. *
    • Use LDIFModifyContent to modify an entry. *
    • Use LDIFDeleteContent to delete an entry. *
    *
*

* * @version 1.0 * @see org.ietf.ldap.util.LDIF * @see org.ietf.ldap.util.LDIFAddContent * @see org.ietf.ldap.util.LDIFModifyContent * @see org.ietf.ldap.util.LDIFDeleteContent * @see org.ietf.ldap.util.LDIFAttributeContent */ public class LDIFRecord implements Serializable { /** * Internal variables */ private String m_dn = null; private LDIFBaseContent m_content = null; static final long serialVersionUID = -6537481934870076178L; /** * Constructs a new LDIFRecord object with the * specified content. * @param dn distinguished name of the entry associated with * the record * @param content content of the LDIF record. You can specify * an object of the LDIFAttributeContent, * LDIFAddContent, LDIFModifyContent, * or LDIFDeleteContent classes. * @see org.ietf.ldap.util.LDIFAddContent * @see org.ietf.ldap.util.LDIFModifyContent * @see org.ietf.ldap.util.LDIFDeleteContent * @see org.ietf.ldap.util.LDIFAttributeContent */ public LDIFRecord(String dn, LDIFContent content) { m_dn = dn; m_content = (LDIFBaseContent)content; } /** * Retrieves the distinguished name of the LDIF record. * @return the distinguished name of the LDIF record. */ public String getDN() { return m_dn; } /** * Retrieves the content of the LDIF record. The content is * an object of the LDIFAttributeContent, * LDIFAddContent, LDIFModifyContent, * or LDIFDeleteContent classes. *

* * To determine the class of the object, use the getType * method of that object. getType returns one of * the following values: *

    *
  • LDIFContent.ATTRIBUTE_CONTENT (the object is an * LDIFAttributeContent object) *
  • LDIFContent.ADD_CONTENT (the object is an * LDIFAddContent object) *
  • LDIFContent.MODIFICATION_CONTENT (the object is an * LDIFModifyContent object) *
  • LDIFContent.DELETE_CONTENT (the object is an * LDIFDeleteContent object) *
*

* * For example: *

     * ...
     * import org.ietf.ldap.*;
     * import org.ietf.ldap.util.*;
     * import java.io.*;
     * import java.util.*;
     * ...
     *     try {
     *         // Parse the LDIF file test.ldif.
     *         LDIF parser = new LDIF( "test.ldif" );
     *         // Iterate through each LDIF record in the file.
     *         LDIFRecord nextRec = parser.nextRecord();
     *         while ( nextRec != null ) {
     *             // Based on the type of content in the record,
     *             // get the content and cast it as the appropriate
     *             // type.
     *             switch( nextRec.getContent().getType() ) {
     *                 case LDIFContent.ATTRIBUTE_CONTENT:
     *                     LDIFAttributeContent attrContent =
     *                         (LDIFAttributeContent)nextRec.getContent();
     *                     break;
     *                 case LDIFContent.ADD_CONTENT:
     *                     LDIFAddContent addContent =
     *                         (LDIFAddContent)nextRec.getContent();
     *                     break;
     *                 case LDIFContent.MODIFICATION_CONTENT:
     *                     LDIFModifyContent modifyContent =
     *                         (LDIFModifyContent)nextRec.getContent();
     *                     break;
     *                 case LDIFContent.DELETE_CONTENT:
     *                     LDIFDeleteContent deleteContent =
     *                         (LDIFDeleteContent)nextRec.getContent();
     *                     break;
     *             }
     *             ...
     *             // Iterate through each record.
     *             nextRec = parser.nextRecord();
     *         }
     *     } catch ( IOException e ) {
     *         System.out.println( "Error: " + e.toString() );
     *         System.exit(1);
     *     }
     * ...
     * 
* * @return the content of the LDIF record. * @see org.ietf.ldap.util.LDIFAddContent * @see org.ietf.ldap.util.LDIFModifyContent * @see org.ietf.ldap.util.LDIFDeleteContent * @see org.ietf.ldap.util.LDIFAttributeContent */ public LDIFContent getContent() { return m_content; } /** * Retrieves the list of controls specified in the content * of the LDIF record, if any. * @return an array of LDAPControl objects that * represent any controls specified in the LDIF record, * or null if none were specified. */ public LDAPControl[] getControls() { return (m_content == null) ? null : m_content.getControls(); } /** * Gets the string representation of the LDIFRecord * object. * @return the string representation of the LDIF record. */ public String toString() { return "LDIFRecord {dn=" + m_dn + ", content=" + m_content + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFDeleteContent.java0000664001003300100330000000653110602743267031060 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; /** * An object of this class represents the content of an LDIF record that * specifies the deletion of an entry. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFDeleteContent. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord#getContent */ public class LDIFDeleteContent extends LDIFBaseContent { static final long serialVersionUID = -6581979396116035503L; /** * Constructs an LDIFDeleteContent object * to specify that an entry should be deleted. (The DN * identifying the entry is part of the LDIFRecord * object. */ public LDIFDeleteContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.DELETE_CONTENT). * @see org.ietf.ldap.util.LDIFRecord#getContent */ public int getType() { return DELETE_CONTENT; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; if ( getControls() != null ) { s += getControlString(); } return "LDIFDeleteContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFAttributeContent.java0000664001003300100330000001061710602743267031621 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.Vector; import org.ietf.ldap.LDAPAttribute; /** * An object of this class represents the content of an LDIF record that * specifies an entry and its attributes. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFAttributeContent. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord#getContent */ public class LDIFAttributeContent extends LDIFBaseContent { /** * Internal variables */ private Vector m_attrs = new Vector(); static final long serialVersionUID = -2912294697848028220L; /** * Constructs an empty LDIFAttributeContent object with * no attributes specified. You can use the addElement * method to add attributes to this object. * @see org.ietf.ldap.util.LDIFAttributeContent#addElement */ public LDIFAttributeContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.ATTRIBUTE_CONTENT). * @see org.ietf.ldap.util.LDIFRecord#getContent */ public int getType() { return ATTRIBUTE_CONTENT; } /** * Adds an attribute to the content of the LDIF record. * @param attr the attribute to add */ public void addElement(LDAPAttribute attr) { m_attrs.addElement(attr); } /** * Retrieves the list of the attributes specified in the content * of the LDIF record. * @return an array of LDAPAttribute objects that * represent the attributes specified in the content of the LDIF record. */ public LDAPAttribute[] getAttributes() { LDAPAttribute attrs[] = new LDAPAttribute[m_attrs.size()]; for (int i = 0; i < m_attrs.size(); i++) { attrs[i] = (LDAPAttribute)m_attrs.elementAt(i); } return attrs; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; for (int i = 0; i < m_attrs.size(); i++) { s = s + ((LDAPAttribute)m_attrs.elementAt(i)).toString(); } if ( getControls() != null ) { s += getControlString(); } return "LDIFAttributeContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/DN.java0000664001003300100330000003473010602743267026167 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; import java.io.*; import java.util.StringTokenizer; /** * Objects of this class represent distinguished names (DN). A * distinguished name is used to identify an entry in a directory. *

* * The org.ietf.ldap.LDAPDN class uses this class * internally. In most cases, when working with DNs in the * LDAP Java classes, you should use the * org.ietf.ldap.LDAPDN class. *

* * The following DNs are examples of the different formats * for DNs that may appear: *

    *
  • uid=bjensen, ou=People, o=Airius.com * (RFC 1485 format) *
  • o=Airius.com/ou=People/uid=bjensen (OSF format) *
*

* * @version 1.0 * @see org.ietf.ldap.LDAPDN */ public final class DN implements Serializable { /** * List of RDNs. DN consists of one or more RDNs. * RDNs follow RFC1485 order. */ private Vector m_rdns = new Vector(); /** * Type specifying a DN in the RFC format. *

* * @see org.ietf.ldap.util.DN#getDNType * @see org.ietf.ldap.util.DN#setDNType */ public static int RFC = 0; /** * Type specifying a DN in the OSF format. *

* * @see org.ietf.ldap.util.DN#getDNType * @see org.ietf.ldap.util.DN#setDNType */ public static int OSF = 1; private int m_dnType = RFC; static final long serialVersionUID = -8867457218975952548L; /** * Constructs an empty DN object. */ public DN() { } /** * Constructs a DN object from the specified * distinguished name. The string representation of the DN * can be in RFC 1485 or OSF format. *

* * @param dn string representation of the distinguished name */ public DN(String dn) { String neutralDN = neutralizeEscapes(dn); if (neutralDN == null) { return; // malformed } // RFC1485 if (neutralDN.indexOf(',') != -1 || neutralDN.indexOf(';') != -1) { parseRDNs(neutralDN, dn, ",;"); } else if (dn.indexOf('/') != -1) { /* OSF */ m_dnType = OSF; StringTokenizer st = new StringTokenizer(dn, "/"); Vector rdns = new Vector(); while (st.hasMoreTokens()) { String rdn = st.nextToken(); if (RDN.isRDN(rdn)) rdns.addElement(new RDN(rdn)); else return; } /* reverse the RDNs order */ for (int i = rdns.size() - 1; i >= 0; i--) { m_rdns.addElement(rdns.elementAt(i)); } } else if (RDN.isRDN(dn)) { m_rdns.addElement(new RDN(dn)); } } /** * Neutralize backslash escapes and quoted sequences for easy parsing. * @return dn string with disabled escapes or null if malformed dn */ private String neutralizeEscapes(String dn) { String neutralDN = RDN.neutralizeEscapes(dn); if (neutralDN == null) { return null; // malformed } String dn2 = neutralDN.trim(); if (dn2.length() == 0) { return neutralDN; } if (dn2.charAt(0) == ';' || dn2.charAt(0) == ',') { return null; // malformed } int lastIdx = dn2.length() -1; if (dn2.charAt(lastIdx) == ';' || dn2.charAt(lastIdx) == ',') { return null; // malformed } return neutralDN; } /** * Parse RDNs in the DN */ private void parseRDNs(String neutralDN, String dn, String sep) { int startIdx=0, endIdx=0; RDN rdn = null; StringTokenizer tok = new StringTokenizer(neutralDN, sep); while (tok.hasMoreElements()) { String neutralRDN = tok.nextToken(); endIdx = startIdx + neutralRDN.length(); rdn = new RDN (dn.substring(startIdx, endIdx)); if (rdn.getTypes() != null) { m_rdns.addElement(rdn); } else { // malformed rdn m_rdns.removeAllElements(); return; } startIdx = endIdx + 1; } } /** * Adds the specified relative distinguished name (RDN) to the * beginning of the current DN. *

* * @param rdn the relative distinguished name to add to the * beginning of the current DN * @see org.ietf.ldap.util.RDN */ public void addRDNToFront(RDN rdn) { m_rdns.insertElementAt(rdn, 0); } /** * Adds the specified relative distinguished name (RDN) to the * end of the current DN. *

* * @param rdn the relative distinguished name to append to the current DN * @see org.ietf.ldap.util.RDN */ public void addRDNToBack(RDN rdn) { m_rdns.addElement(rdn); } /** * Adds the specified relative distinguished name (RDN) to the current DN. * If the DN is in RFC 1485 format, the RDN is added to the beginning * of the DN. If the DN is in OSF format, the RDN is appended to the * end of the DN. *

* * @param rdn the relative distinguished name to add to the current DN * @see org.ietf.ldap.util.RDN */ public void addRDN(RDN rdn) { if (m_dnType == RFC) { addRDNToFront(rdn); } else { addRDNToBack(rdn); } } /** * Sets the type of format used for the DN (RFC format or OSF format). *

* * @param type one of the following constants: DN.RFC * (to use the RFC format) or DN.OSF (to use the OSF format) * @see org.ietf.ldap.util.DN#getDNType * @see org.ietf.ldap.util.DN#RFC * @see org.ietf.ldap.util.DN#OSF */ public void setDNType(int type) { m_dnType = type; } /** * Gets the type of format used for the DN (RFC format or OSF format). *

* * @return one of the following constants: DN.RFC * (if the DN is in RFC format) or DN.OSF * (if the DN is in OSF format). * @see org.ietf.ldap.util.DN#setDNType * @see org.ietf.ldap.util.DN#RFC * @see org.ietf.ldap.util.DN#OSF */ public int getDNType() { return m_dnType; } /** * Returns the number of components that make up the current DN. * @return the number of components in this DN. */ public int countRDNs() { return m_rdns.size(); } /** * Returns a list of the components (RDN objects) * that make up the current DN. * @return a list of the components of this DN. * @see org.ietf.ldap.util.RDN */ public Vector getRDNs() { return m_rdns; } /** * Returns an array of the individual components that make up * the current distinguished name. * @param noTypes specify true to remove the attribute type * and equals sign (for example, "cn=") from each component */ public String[] explodeDN(boolean noTypes) { if (m_rdns.size() == 0) return null; String str[] = new String[m_rdns.size()]; for (int i = 0; i < m_rdns.size(); i++) { if (noTypes) str[i] = ((RDN)m_rdns.elementAt(i)).getValue(); else str[i] = ((RDN)m_rdns.elementAt(i)).toString(); } return str; } /** * Determines if the DN is in RFC 1485 format. * @return true if the DN is in RFC 1485 format. */ public boolean isRFC() { return (m_dnType == RFC); } /** * Returns the DN in RFC 1485 format. * @return the DN in RFC 1485 format. */ public String toRFCString() { String dn = ""; for (int i = 0; i < m_rdns.size(); i++) { if (i != 0) dn += ","; dn = dn + ((RDN)m_rdns.elementAt(i)).toString(); } return dn; } /** * Returns the DN in OSF format. * @return the DN in OSF format. */ public String toOSFString() { String dn = ""; for (int i = 0; i < m_rdns.size(); i++) { if (i != 0) { dn = "/" + dn; } RDN rdn = (RDN)m_rdns.elementAt(i); dn = rdn.toString() + dn; } return dn; } /** * Returns the string representation of the DN * in its original format. (For example, if the * DN object was constructed from a DN * in RFC 1485 format, this method returns the DN * in RFC 1485 format. * @return the string representation of the DN. */ public String toString() { if (m_dnType == RFC) return toRFCString(); else return toOSFString(); } /** * Determines if the given string is an distinguished name or * not. * @param dn distinguished name * @return true or false. */ public static boolean isDN(String dn) { if ( dn.equals( "" ) ) { return true; } DN newdn = new DN(dn); return (newdn.countRDNs() > 0); } /** * Determines if the current DN is equal to the specified DN. * @param dn DN to compare against the current DN * @return true if the two DNs are the same. */ public boolean equals(DN dn) { return (dn.toRFCString().toUpperCase().equals(toRFCString().toUpperCase())); } /** * Gets the parent DN for this DN. *

* * For example, the following section of code gets the * parent DN of "uid=bjensen, ou=People, o=Airius.com." *

     *    DN dn = new DN("uid=bjensen, ou=People, o=Airius.com");
     *    DN parent = dn.getParent();
     * 
* The parent DN in this example is "ou=People, o=Airius.com". *

* * @return DN of the parent of this DN. */ public DN getParent() { DN newdn = new DN(); for (int i = m_rdns.size() - 1; i > 0; i--) { newdn.addRDN((RDN)m_rdns.elementAt(i)); } return newdn; } /** * Determines if the given DN is under the subtree defined by this DN. *

* * For example, the following section of code determines if the * DN specified by dn1 is under the subtree specified * by dn2. *

     *    DN dn1 = new DN("uid=bjensen, ou=People, o=Airius.com");
     *    DN dn2 = new DN("ou=People, o=Airius.com");
     *
     *    boolean isContain = dn1.contains(dn2)
     * 
* In this case, since "uid=bjensen, ou=People, o=Airius.com" * is an entry under the subtree "ou=People, o=Airius.com", * the value of isContain is true. *

* * @param dn the DN of a subtree to check * @return true if the current DN belongs to the subtree * specified by dn. * @deprecated Please use isDescendantOf() instead. */ public boolean contains(DN dn) { return isDescendantOf(dn); } /** * Determines if this DN is a descendant of the given DN. *

* * For example, the following section of code determines if the * DN specified by dn1 is a descendant of the DN specified * by dn2. *

     *    DN dn1 = new DN("uid=bjensen, ou=People, o=Airius.com");
     *    DN dn2 = new DN("ou=People, o=Airius.com");
     *
     *    boolean isDescendant = dn1.isDescendantOf(dn2)
     * 
* In this case, since "uid=bjensen, ou=People, o=Airius.com" * is an entry under the subtree "ou=People, o=Airius.com", * the value of isDescendant is true. *

* * In the case where the given DN is equal to this DN * it returns false. * * @param dn the DN of a subtree to check * @return true if the current DN is a descendant of the DN * specified by dn. */ public boolean isDescendantOf(DN dn) { Vector rdns1 = dn.m_rdns; Vector rdns2 = this.m_rdns; int i = rdns1.size() - 1; int j = rdns2.size() - 1; if ((j < i) || (equals(dn) == true)) return false; for (; i>=0 && j>=0; i--, j--) { RDN rdn1 = (RDN)rdns1.elementAt(i); RDN rdn2 = (RDN)rdns2.elementAt(j); if (!rdn2.equals(rdn1)) { return false; } } return true; } /** * Array of the characters that may be escaped in a DN. */ public static final char[] ESCAPED_CHAR = {',', '+', '"', '\\', '<', '>', ';'}; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFModifyContent.java0000664001003300100330000001106510602743267031103 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.Vector; import org.ietf.ldap.LDAPModification; /** * An object of this class represents the content of an LDIF record that * specifies modifications to an entry. This class implements the * LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFModifyContent. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord#getContent */ public class LDIFModifyContent extends LDIFBaseContent { /** * Internal variables */ private Vector m_mods = new Vector(); static final long serialVersionUID = -710573832339780084L; /** * Constructs an empty LDIFModifyContent object. * To specify the modifications to be made to the entry, use * the addElement method. * @see org.ietf.ldap.util.LDIFModifyContent#addElement */ public LDIFModifyContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.MODIFICATION_CONTENT). * @see org.ietf.ldap.util.LDIFRecord#getContent */ public int getType() { return MODIFICATION_CONTENT; } /** * Specifies an additional modification that should be made to * the entry. * @param mod LDAPModification object representing * the change to make to the entry * @see org.ietf.ldap.LDAPModification */ public void addElement(LDAPModification mod) { m_mods.addElement(mod); } /** * Retrieves the list of the modifications specified in the content * of the LDIF record. * @return an array of LDAPModification objects that * represent the modifications specified in the content of the LDIF record. * @see org.ietf.ldap.LDAPModification */ public LDAPModification[] getModifications() { LDAPModification mods[] = new LDAPModification[m_mods.size()]; for (int i = 0; i < m_mods.size(); i++) { mods[i] = (LDAPModification)m_mods.elementAt(i); } return mods; } /** * Returns the string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; for (int i = 0; i < m_mods.size(); i++) { s = s + ((LDAPModification)m_mods.elementAt(i)).toString(); } if ( getControls() != null ) { s += getControlString(); } return "LDIFModifyContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/MimeBase64Encoder.java0000664001003300100330000001331510602743267031016 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; /** Implements a plaintext -> Base64 encoder. */ public final class MimeBase64Encoder extends MimeEncoder { static final long serialVersionUID = 8781620079813078315L; private int buf = 0; // a 24-bit quantity private int buf_bytes = 0; // how many octets are set in it private byte line[] = new byte[74]; // output buffer private int line_length = 0; // output buffer fill pointer static private final byte crlf[] = "\r\n".getBytes(); static private final char map[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0-7 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 8-15 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 16-23 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 24-31 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 32-39 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 40-47 'w', 'x', 'y', 'z', '0', '1', '2', '3', // 48-55 '4', '5', '6', '7', '8', '9', '+', '/', // 56-63 }; private final void encode_token() { int i = line_length; line[i] = (byte)map[0x3F & (buf >> 18)]; // sextet 1 (octet 1) line[i+1] = (byte)map[0x3F & (buf >> 12)]; // sextet 2 (octet 1 and 2) line[i+2] = (byte)map[0x3F & (buf >> 6)]; // sextet 3 (octet 2 and 3) line[i+3] = (byte)map[0x3F & buf]; // sextet 4 (octet 3) line_length += 4; buf = 0; buf_bytes = 0; } private final void encode_partial_token() { int i = line_length; line[i] = (byte)map[0x3F & (buf >> 18)]; // sextet 1 (octet 1) line[i+1] = (byte)map[0x3F & (buf >> 12)]; // sextet 2 (octet 1 and 2) if (buf_bytes == 1) line[i+2] = (byte)'='; else line[i+2] = (byte)map[0x3F & (buf >> 6)]; // sextet 3 (octet 2 and 3) if (buf_bytes <= 2) line[i+3] = (byte)'='; else line[i+3] = (byte)map[0x3F & buf]; // sextet 4 (octet 3) line_length += 4; buf = 0; buf_bytes = 0; } private final void flush_line(ByteBuf out) { out.append(line, 0, line_length); line_length = 0; } /** Given a sequence of input bytes, produces a sequence of output bytes using the base64 encoding. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ public final void translate(ByteBuf in, ByteBuf out) { byte inb[] = in.toBytes(); int in_length = in.length(); for (int i = 0; i < in_length; i++) { if (buf_bytes == 0) buf = (buf & 0x00FFFF) | (inb[i] << 16); else if (buf_bytes == 1) buf = (buf & 0xFF00FF) | ((inb[i] << 8) & 0x00FFFF); else buf = (buf & 0xFFFF00) | (inb[i] & 0x0000FF); if ((++buf_bytes) == 3) { encode_token(); if (line_length >= 72) { flush_line(out); } } if (i == (in_length-1)) { if ((buf_bytes > 0) && (buf_bytes < 3)) encode_partial_token(); if (line_length > 0) flush_line(out); } } for (int i=0; i * Call destroy() to release all connections. *

Example:
*

 * ConnectionPool pool = null;
 * try {
 *     pool = new ConnectionPool( 10, 30,
 *                                "foo.acme.com",389,
 *                                "uid=me, o=acme.com",
 *                                "password" );
 * } catch ( LDAPException e ) {
 *    System.err.println( "Unable to create connection pool" );
 *    System.exit( 1 );
 * }
 * while ( clientsKnocking ) {
 *     String filter = getSearchFilter();
 *     LDAPConnection ld = pool.getConnection();
 *     try {
 *         LDAPSearchResults res = ld.search( BASE, ld.SCOPE_SUB,
 *                                            filter, attrs,
 *                                            false );
 *         pool.close( ld );
 *         while( res.hasMoreElements() ) {
 *             ...
 *
*/ /** * Connection pool, typically used by a server to avoid creating * a new connection for each client * * @version 1.0 **/ public class ConnectionPool { /** * Constructor for specifying all parameters * * @param min initial number of connections * @param max maximum number of connections * @param host hostname of LDAP server * @param port port number of LDAP server * @param authdn DN to authenticate as * @param authpw password for authentication * @exception LDAPException on failure to create connections */ public ConnectionPool( int min, int max, String host, int port, String authdn, byte[] authpw ) throws LDAPException { this( min, max, host, port, authdn, authpw, null ); } /** * Constructor for specifying all parameters, anonymous * identity * * @param min initial number of connections * @param max maximum number of connections * @param host hostname of LDAP server * @param port port number of LDAP server * @exception LDAPException on failure to create connections */ public ConnectionPool( int min, int max, String host, int port ) throws LDAPException { this( min, max, host, port, "", new byte[0]); } /** * Constructor for using default parameters, anonymous identity * * @param host hostname of LDAP server * @param port port number of LDAP server * @exception LDAPException on failure to create connections */ public ConnectionPool( String host, int port ) throws LDAPException { // poolsize=10,max=20,host,port, // noauth,nopswd this( 10, 20, host, port, "", new byte[0] ); } /* * Constructor for using an existing connection to clone * from * * @param min initial number of connections * @param max maximum number of connections * @param ldc connection to clone * @param authpwd password * @exception LDAPException on failure to create connections */ public ConnectionPool( int min, int max, LDAPConnection ldc, byte[] authpwd ) throws LDAPException { this( min, max, ldc.getHost(), ldc.getPort(), ldc.getAuthenticationDN(), authpwd, ldc ); } /* * Constructor for using an existing connection to clone * from * * @param min initial number of connections * @param max maximum number of connections * @param host hostname of LDAP server * @param port port number of LDAP server * @param authdn DN to authenticate as * @param authpw password for authentication * @param ldc connection to clone * @exception LDAPException on failure to create connections */ private ConnectionPool( int min, int max, String host, int port, String authdn, byte[] authpw, LDAPConnection ldc ) throws LDAPException { this.poolSize = min; this.poolMax = max; this.host = host; this.port = port; this.authdn = authdn; this.authpw = authpw; this.ldc = ldc; this.debugMode = false; createPool(); } /** * Destroy the whole pool - called during a shutdown */ public void destroy() { for ( int i = 0; i < pool.size(); i++ ) { disconnect( (LDAPConnectionObject)pool.elementAt(i) ); } pool.removeAllElements(); } /** * Gets a connection from the pool * * If no connections are available, the pool will be * extended if the number of connections is less than * the maximum; if the pool cannot be extended, the method * blocks until a free connection becomes available. * * @return an active connection. */ public LDAPConnection getConnection() { LDAPConnection con; while( (con = getConnFromPool()) == null ) { synchronized( pool ) { try { pool.wait(); } catch ( InterruptedException e ) { } } } return con; } /** * Gets a connection from the pool within a time limit. * * If no connections are available, the pool will be * extended if the number of connections is less than * the maximum; if the pool cannot be extended, the method * blocks until a free connection becomes available or the * time limit is exceeded. * * @param timeout timeout in milliseconds * @return an active connection or null if timed out. */ public LDAPConnection getConnection(int timeout) { LDAPConnection con; while( (con = getConnFromPool()) == null ) { long t1, t0 = System.currentTimeMillis(); if (timeout <= 0) { return con; } synchronized( pool ) { try { pool.wait(timeout); } catch ( InterruptedException e ) { return null; } } t1 = System.currentTimeMillis(); timeout -= (t1 - t0); } return con; } /** * Gets a connection from the pool * * If no connections are available, the pool will be * extended if the number of connections is less than * the maximum; if the pool cannot be extended, the method * returns null. * * @return an active connection or null. */ protected synchronized LDAPConnection getConnFromPool() { LDAPConnection con = null; LDAPConnectionObject ldapconnobj = null; int pSize = pool.size(); // Get an available connection for ( int i = 0; i < pSize; i++ ) { // Get the ConnectionObject from the pool LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(i); if ( co.isAvailable() ) { // Conn available? ldapconnobj = co; break; } } if ( ldapconnobj == null ) { // If there there were no conns in pool, can we grow // the pool? if ( (poolMax < 0) || ( (poolMax > 0) && (pSize < poolMax)) ) { // Yes we can grow it int i = addConnection(); // If a new connection was created, use it if ( i >= 0 ) { ldapconnobj = (LDAPConnectionObject)pool.elementAt(i); } } else { debug("All pool connections in use"); } } if ( ldapconnobj != null ) { ldapconnobj.setInUse( true ); // Mark as in use con = ldapconnobj.getLDAPConn(); } return con; } /** * This is our soft close - all we do is mark * the connection as available for others to use. * * @param ld a connection to return to the pool */ public synchronized void close( LDAPConnection ld ) { int index = find( ld ); if ( index != -1 ) { LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(index); co.setInUse( false ); // Mark as available synchronized( pool ) { pool.notifyAll(); } } } /** * Debug method to print the contents of the pool */ public void printPool(){ System.out.println("--ConnectionPool--"); for ( int i = 0; i < pool.size(); i++ ) { LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(i); System.out.println( "" + i + "=" + co ); } } private void disconnect( LDAPConnectionObject ldapconnObject ) { if ( ldapconnObject != null ) { if (ldapconnObject.isAvailable()) { LDAPConnection ld = ldapconnObject.getLDAPConn(); if ( (ld != null) && (ld.isConnected()) ) { try { ld.disconnect(); } catch (LDAPException e) { debug("disconnect: "+e.toString()); } } ldapconnObject.setLDAPConn(null); // Clear conn } } } private void createPool() throws LDAPException { // Called by the constructors if ( poolSize <= 0 ) { throw new LDAPException("ConnectionPoolSize invalid"); } if ( poolMax < poolSize ) { debug("ConnectionPoolMax is invalid, set to " + poolSize); poolMax = poolSize; } debug("****Initializing LDAP Pool****"); debug("LDAP host = "+host+" on port "+port); debug("Number of connections="+poolSize); debug("Maximum number of connections="+poolMax); debug("******"); pool = new java.util.Vector(); // Create pool vector setUpPool( poolSize ); // Initialize it } private int addConnection() { int index = -1; debug("adding a connection to pool..."); try { int size = pool.size() + 1; // Add one connection setUpPool( size ); if ( size == pool.size() ) { // New size is size requested? index = size - 1; } } catch (Exception ex) { debug("Adding a connection: "+ex.toString()); } return index; } private synchronized void setUpPool( int size ) throws LDAPException { // Loop on creating connections while( pool.size() < size ) { LDAPConnectionObject co = new LDAPConnectionObject(); // Make LDAP connection, using template if available LDAPConnection newConn = (ldc != null) ? (LDAPConnection)ldc.clone() : new LDAPConnection(); co.setLDAPConn(newConn); try { if ( newConn.isConnected() ) { // If using a template, then reconnect // to create a separate physical connection newConn.reconnect(); } else { // Not using a template, so connect with // simple authentication newConn.connect( host, port ); newConn.bind( 3, authdn, authpw ); } } catch ( LDAPException le ) { debug("Creating pool:"+le.toString()); debug("aborting...."); throw le; } co.setInUse( false ); // Mark not in use pool.addElement( co ); } } private int find( LDAPConnection con ) { // Find the matching Connection in the pool if ( con != null ) { for ( int i = 0; i < pool.size(); i++ ) { LDAPConnectionObject co = (LDAPConnectionObject)pool.elementAt(i); if ( co.getLDAPConn() == con ) { return i; } } } return -1; } /** * Sets the debug printout mode. * * @param mode debug mode to use */ public synchronized void setDebug( boolean mode ) { debugMode = mode; } /** * Reports the debug printout mode. * * @return debug mode in use. */ public boolean getDebug() { return debugMode; } private void debug( String s ) { if ( debugMode ) System.out.println("ConnectionPool ("+ new Date()+") : " + s); } private void debug(String s, boolean severe) { if ( debugMode || severe ) { System.out.println("ConnectionPool ("+ new Date()+") : " + s); } } /** * Wrapper for LDAPConnection object in pool */ class LDAPConnectionObject{ /** * Returns the associated LDAPConnection. * * @return the LDAPConnection. * */ LDAPConnection getLDAPConn() { return this.ld; } /** * Sets the associated LDAPConnection * * @param ld the LDAPConnection * */ void setLDAPConn( LDAPConnection ld ) { this.ld = ld; } /** * Marks a connection in use or available * * @param inUse true to mark in use, false if available * */ void setInUse( boolean inUse ) { this.inUse = inUse; } /** * Returns whether the connection is available * for use by another user. * * @return true if available. */ boolean isAvailable() { return !inUse; } /** * Debug method * * @return s user-friendly rendering of the object. */ public String toString() { return "LDAPConnection=" + ld + ",inUse=" + inUse; } private LDAPConnection ld; // LDAP Connection private boolean inUse; // In use? (true = yes) } private int poolSize; // Min pool size private int poolMax; // Max pool size private String host; // LDAP host private int port; // Port to connect at private String authdn; // Identity of connections private byte[] authpw; // Password for authdn private LDAPConnection ldc = null; // Connection to clone private java.util.Vector pool; // the actual pool private boolean debugMode; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/ByteBuf.java0000664001003300100330000003753610602743267027235 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; import java.io.FileInputStream; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.io.RandomAccessFile; import java.io.Serializable; /** * This class is similar to the java.lang.StringBuffer * class. Instead of storing a string, an object of this class * stores an array of bytes. (This is referred to as a "byte buffer".) *

* * This class also differs from StringBuffer in the * following ways: *

    *
  • None of the methods are synchronized. You cannot share a * byte buffer among multiple threads. *
  • Converting to a String requires a copy of the character data. *
  • In order to speed up memory allocation, Alloc * and Recycle methods are provided. You can "recycle" * any ByteBuf objects you no longer need by using the * Recycle method. Calling the Alloc * method will reuse objects that have been "recycled." To * To clear out the cache of these "recycled" objects, use * the EmptyRecycler method. *
  • Additional "helper" methods are provided (for example, * functions for comparing data). *
*/ public final class ByteBuf implements Serializable { static final long serialVersionUID = -786393456618166871L; private byte value[]; private int count; /** * Constructs an empty byte buffer with the default length of 16. */ public ByteBuf() { this(16); } /** * Constructs an empty byte buffer with the specified initial length. * @param length initial number of bytes that this buffer should hold */ public ByteBuf(int length) { value = new byte[length]; } /** * Constructs a byte buffer with the specified initial value. * The new byte buffer is 16 bytes longer than the initial value. * @param str initial value that this buffer should hold */ public ByteBuf(String str) { this(str.length() + 16); append(str); } /** * Constructs a byte buffer with the specified length. * An initial value is stored in this buffer, starting * at the specified offset. * @param bytes array of bytes to initially store in the buffer * @param offset index where you want the initial value to start in the array * @param length length of the buffer to allocate */ public ByteBuf(byte bytes[], int offset, int length) { value = new byte[length]; System.arraycopy(bytes, offset, value, 0, length); count = length; } /** * Returns the length (character count) of the byte buffer. */ public int length() { return count; } /** * Returns the current capacity of the byte buffer. The capacity * is the amount of storage available for newly inserted bytes. * If the capacity is exceeded, more space will be allocated. */ public int capacity() { return value.length; } /** * Ensures that the capacity of the buffer is at least equal to the * specified minimum capacity. * @param minimumCapacity the minimum number of bytes that you want * the byte buffer to hold */ public void ensureCapacity(int minimumCapacity) { int maxCapacity = value.length; if (minimumCapacity > maxCapacity) { int newCapacity = (maxCapacity + 1) * 2; if (minimumCapacity > newCapacity) { newCapacity = minimumCapacity; } byte newValue[] = new byte[newCapacity]; System.arraycopy(value, 0, newValue, 0, count); value = newValue; } } /** * Sets the length of the byte buffer. If you set a length that is * shorter than the current length, bytes at the end of the buffer * are lost. If you increase the length of the buffer, the values * of the new bytes in the buffer are set to 0. * @param newLength the new length of the buffer * @exception StringIndexOutOfBoundsException You have specified * an invalid length. */ public void setLength(int newLength) { if (newLength < 0) { throw new StringIndexOutOfBoundsException(newLength); } if (count < newLength) { ensureCapacity(newLength); for (; count < newLength; count++) { value[count] = 0; } } count = newLength; } /** * Returns the byte at the specified index. The value of an index * can range from 0 to length - 1. * @param index index of the byte to find * @exception StringIndexOutOfBoundsException You have specified an * invalid index. */ public byte byteAt(int index) { if ((index < 0) || (index >= count)) { throw new StringIndexOutOfBoundsException(index); } return value[index]; } /** * Copies the bytes (from the section of the byte buffer from the index * srcBegin to the index srcEnd - 1 ) * into the specified byte array. The copied * bytes are inserted in the byte array at the index specified by * dstBegin. Both srcBegin and * srcEnd must be valid indexes in the buffer. * @param srcBegin index identifying the start of the section * of the byte buffer to copy * @param srcEnd index identifying the end of the section * of the byte buffer to copy. (Copy all bytes * before the byte identified by this index.) * @param dst the byte array to copy the data to * @param dstBegin index of the byte array identifying the * location to which the byte buffer is copied * @exception StringIndexOutOfBoundsException You specified an invalid index into the buffer. */ public void getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin) { if ((srcBegin < 0) || (srcBegin >= count)) { throw new StringIndexOutOfBoundsException(srcBegin); } if ((srcEnd < 0) || (srcEnd > count)) { throw new StringIndexOutOfBoundsException(srcEnd); } if (srcBegin < srcEnd) { System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin); } } /** * Sets the value of the byte at the specified index. * @param index the index of the byte to set * @param b the new value to set * @exception StringIndexOutOfBoundsException You have specified * an invalid index. */ public void setByteAt(int index, byte b) { if ((index < 0) || (index >= count)) { throw new StringIndexOutOfBoundsException(index); } value[index] = b; } /** * Appends an object to the end of this byte buffer. * @param obj the object to append to the buffer * @return the same ByteBuf object (not a new object) * with the string representation of the specified object appended. */ public ByteBuf append(Object obj) { return append(String.valueOf(obj)); } /** * Appends a string to the end of this byte buffer. * This method appends one byte for each character in the string. * The upper 8 bits of the character are stripped off. *

* * If you want to retain all bits in the character (not just * the lower 8 bits), use append(String.getBytes()) * instead. * @param str the string that you want appended to the buffer * @return the same ByteBuf object (not a new object) * with the specified string appended */ public ByteBuf append(String str) { if (str == null) { str = String.valueOf(str); } int len = str.length(); ensureCapacity(count + len); for (int i=0 ; iByteBuf object (not a new object) * with the specified bytes appended. */ public ByteBuf append(byte str[]) { int len = str.length; ensureCapacity(count + len); System.arraycopy(str, 0, value, count, len); count += len; return this; } /** * Appends a part of an array of bytes to the end of this byte buffer. * @param str the array of bytes to append to this buffer * @param offset the index in the array marking the start of the * section to copy * @param len the number of bytes to add * @return the same ByteBuf object (not a new object) * with the specified section of the byte array appended */ public ByteBuf append(byte str[], int offset, int len) { ensureCapacity(count + len); System.arraycopy(str, offset, value, count, len); count += len; return this; } /** * Appends a byte buffer to the end of this byte buffer. * @param buf the byte buffer to append to this buffer * @return the original ByteBuf object (not a new object) * with bytes from the specified byte buffer appended. */ public ByteBuf append(ByteBuf buf) { append(buf.toBytes(), 0, buf.length()); return this; } /** * Appends a boolean to the end of this byte buffer. * @param b the boolean value that you want appended to this buffer * @return the original ByteBuf object (not a new object) * with bytes from the string representation of the boolean value appended. */ public ByteBuf append(boolean b) { return append(String.valueOf(b)); } /** * Appends a byte to the end of this byte buffer. * @param ch the byte to append to this buffer * @return the original ByteBuf object (not a new object) * with the specified byte appended. */ public ByteBuf append(byte b) { ensureCapacity(count + 1); value[count++] = b; return this; } /** * Appends an integer to the end of this byte buffer. * @param i the integer to append to this byte buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified integer appended. */ public ByteBuf append(int i) { return append(String.valueOf(i)); } /** * Appends a long value to the end of this byte buffer. * @param l the long value to append to this buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified long * value appended. */ public ByteBuf append(long l) { return append(String.valueOf(l)); } /** * Appends a float to the end of this byte buffer. * @param f the float value to append to this buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified float * value appended. */ public ByteBuf append(float f) { return append(String.valueOf(f)); } /** * Appends a double to the end of this byte buffer. * @param d the double value to append to this buffer * @return the original ByteBuf object (not a new object) * with the string representation of the specified double * value appended. */ public ByteBuf append(double d) { return append(String.valueOf(d)); } /** * Returns the data in the byte buffer to a string. * @return the string representation of the data in the byte buffer. */ public String toString() { return new String(value, 0, count); } /** * Returns the data in the byte buffer as a byte array. * @return the byte array containing data in the byte buffer. */ public byte[] toBytes() { byte[] b = new byte[count]; System.arraycopy(value, 0, b, 0, count); return b; } /** * Invokes the InputStream.read method and appends the * the bytes read to this byte buffer. * @param file the input stream from which to read the bytes * @param max_bytes the maximum number of bytes to read into the * byte buffer * @return the number of bytes read, or -1 if there is no more data * to read. * @exception IOException An I/O error has occurred. */ public int read(InputStream file, int max_bytes) throws IOException { ensureCapacity(count + max_bytes); int i = file.read(value, count, max_bytes); if (i > 0) count += i; return i; } /** * Invokes the RandomAccessFile.read method, appending * the bytes read to this byte buffer. * @param file the RandomAccessFile object from which * to read the bytes * @param max_bytes the maximum number of bytes to read into the * byte buffer * @return the number of bytes read, or -1 if there is no more data * to read. * @exception IOException An I/O error has occurred. */ public int read(RandomAccessFile file, int max_bytes) throws IOException { ensureCapacity(count + max_bytes); int i = file.read(value, count, max_bytes); if (i > 0) count += i; return i; } /** * Writes the contents of the byte buffer to the specified output stream. * @param out the output stream * @exception IOException An I/O error has occurred. */ public void write(OutputStream out) throws IOException { out.write(value, 0, count); } /** * Writes the contents of the byte buffer to the specified * RandomAccessFile object. * @param out the RandomAccessFile object * dexception IOException An I/O error has occurred. */ public void write(RandomAccessFile out) throws IOException { out.write(value, 0, count); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFBaseContent.java0000664001003300100330000000727010602743267030531 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import org.ietf.ldap.LDAPControl; /** * * An object of this class represents the content of an LDIF record. * This class implements the LDIFContent interface, but * it is abstract and must be extended for the various record types. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord#getContent */ public abstract class LDIFBaseContent implements LDIFContent, java.io.Serializable { static final long serialVersionUID = -8542611537447295949L; /** * Internal variables */ private LDAPControl[] m_controls = null; /** * Blank constructor for deserialization */ public LDIFBaseContent() { } /** * Retrieves the list of controls specified in the content * of the LDIF record, if any * @return an array of LDAPControl objects that * represent any controls specified in the the LDIF record, * or null if none were specified. */ public LDAPControl[] getControls() { return m_controls; } /** * Sets the list of controls * @param controls an array of LDAPControl objects * or null if none are to be specified */ public void setControls( LDAPControl[] controls ) { m_controls = controls; } /** * Get the OIDs of all controls, if any, as a string * * @return the OIDs of all controls, if any, as a string, * or an empty string if there are no controls. */ protected String getControlString() { String s = ""; if ( getControls() != null ) { s += ' '; LDAPControl[] controls = getControls(); int len = controls.length; for( int i = 0; i < len; i++ ) { s += controls[i].toString(); if ( i < (len-1) ) { s += ' '; } } } return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/RDN.java0000664001003300100330000003747410602743267026321 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; /** * Objects of this class represent the components of a distinguished * name (DN). (In some situations, these components are referred to * as relative distinguished names, or RDNs.) For example, the * DN "uid=bjensen, ou=People, o=Airius.com" has three components: * "uid=bjensen", "ou=People", and "o=Airius.com". *

* * Each DN component consists of an attribute type and a value. * For example, in "o=Airius.com", the attribute type is "o" * and the value is "Airius.com". *

* * You can use objects of this class to add components to an * existing DN object. *

* * @version 1.0 * @see org.ietf.ldap.util.DN */ public final class RDN implements java.io.Serializable { static final long serialVersionUID = 7895454691174650321L; /** * List of RDNs. DN consists of one or more RDNs. */ private String[] m_type = null; private String[] m_value = null; private boolean m_ismultivalued = false; /** * Hash table of case sensitive attributes */ private static Hashtable m_attributehash = new Hashtable(); /** * Constructs a new RDN object from the specified * DN component. * @param rdn DN component */ public RDN( String rdn ) { String neutralRDN = neutralizeEscapes(rdn); if (neutralRDN == null) { return; // malformed RDN } int index = neutralRDN.indexOf( "=" ); int next_plus; // if the rdn doesnt have = or = positions right at the beginning of the rdn if (index <= 0) return; Vector values = new Vector(); Vector types = new Vector(); types.addElement( rdn.substring( 0, index ).trim() ); next_plus = neutralRDN.indexOf( '+', index ); while ( next_plus != -1 ) { m_ismultivalued = true; values.addElement( rdn.substring( index + 1, next_plus).trim() ); index = neutralRDN.indexOf( "=", next_plus + 1 ); if ( index == -1 ) { // malformed RDN? return; } types.addElement( rdn.substring( next_plus + 1, index ).trim() ); next_plus = neutralRDN.indexOf('+', index ); } values.addElement( rdn.substring( index + 1 ).trim() ); m_type = new String[types.size()]; m_value = new String[values.size()]; for( int i = 0; i < types.size(); i++ ) { m_type[i] = (String)types.elementAt( i ); if (!isValidType(m_type[i])) { m_type = m_value = null; return; // malformed } m_value[i] = (String)values.elementAt( i ); if (!isValidValue(m_value[i])) { m_type = m_value = null; return; // malformed } } } /** * Neutralize backslash escapes and quoted sequences for easy parsing. * @return rdn string with disabled escapes or null if malformed rdn */ static String neutralizeEscapes(String rdn) { if (rdn == null) { return null; } StringBuffer sb = new StringBuffer(rdn); boolean quoteOn = false; // first pass, disable backslash escapes for (int i=0; i < sb.length(); i++) { if (sb.charAt(i) =='\\') { sb.setCharAt(i, 'x'); if (i < sb.length()-1) { sb.setCharAt(i+1, 'x'); } else { return null; } } } // second pass, disable quoted sequences for (int i=0; i < sb.length(); i++) { if (sb.charAt(i) == '"') { quoteOn = !quoteOn; continue; } if (quoteOn) { sb.setCharAt(i, 'x'); } } return quoteOn ? null : sb.toString(); } /** * Type names can not contain any DN special characters */ private boolean isValidType(String type) { if (type == null || type.length() < 1) { return false; } for (int i=0; i< type.length(); i++) { for (int j=0; j < DN.ESCAPED_CHAR.length; j++) { if (type.charAt(i) == DN.ESCAPED_CHAR[j]) { return false; } } } return true; } /** * Values can contain only single quote sequence, where quotes are * at the beginning and the end of the sequence */ private boolean isValidValue(String val) { if (val == null || val.length() < 1) { return false; } // count unescaped '"' int cnt=0, i=0; while (i >=0 && i < val.length()) { i = val.indexOf('"', i); if (i >= 0) { if (i==0 || (val.charAt(i-1) != '\\')) { cnt++; } i++; } } if (cnt == 0) { return true; } else if (cnt != 2) { // can have only two of them surrounding the value return false; } else if (val.charAt(0) != '"' || val.charAt(val.length()-1) != '"') { return false; } return true; } /** * Returns the DN component as the first element in an * array of strings. * @param noType specify true to ignore the attribute type and * equals sign (for example, "cn=") and return only the value * @return an array of strings representing the DN component. * @deprecated use toString or getValues instead. */ public String[] explodeRDN(boolean noType) { if (m_type == null) return null; String str[] = new String[1]; if (noType) { str[0] = getValue(); } else { str[0] = toString(); } return str; } /** * Returns the attribute type of the DN component. * @return rdn the attribute type of the DN component. * @deprecated use getTypes() instead. */ public String getType() { if (m_type != null && m_type.length > 0) { return m_type[0]; } return null; } /** * Returns the attribute types of the DN component. * @return rdn the attribute types of the DN component. */ public String[] getTypes() { return m_type; } /** * Returns the value of the DN component. * @return rdn the value of the DN component. * @deprecated use getValues() instead. */ public String getValue() { if (m_value != null && m_value.length > 0) { return m_value[0]; } return null; } /** * Returns the values of the DN component. * @return rdn the values of the DN component. */ public String[] getValues() { return m_value; } /** * Returns true if the RDN is multi-valued. * @return true if the RDN is multi-valued. */ public boolean isMultivalued() { return m_ismultivalued; } /** * Returns the string representation of the DN component. * @return the string representation of the DN component. */ public String toString() { StringBuffer buf = new StringBuffer(); for ( int i = 0; m_type != null && i < m_type.length; i++ ) { if ( i != 0) { buf.append(" + "); } buf.append( m_type[i] + "=" + m_value[i]); } return buf.toString(); } /** * Determines if the specified string is a distinguished name component. * @param dn the string to check * @return true if the string is a distinguished name component. */ public static boolean isRDN(String rdn) { RDN newrdn = new RDN(rdn); return ((newrdn.getTypes() != null) && (newrdn.getValues() != null)); } /** * Determines if the current DN component is equal to the specified * DN component. Uses an internal table of ces (case exact string) * attributes to determine how the attributes should be compared. * @param rdn the DN component to compare against the * current DN component. * @return true if the two DN components are equal. * @see org.ietf.ldap.util.RDN#registerAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributeSyntax */ public boolean equals(RDN rdn) { String[] this_types = (String[])getTypes().clone(); String[] this_values = (String[])getValues().clone(); String[] rdn_types = (String[])rdn.getTypes().clone(); String[] rdn_values = (String[])rdn.getValues().clone(); if ( this_types.length != rdn_types.length ) { return false; } sortTypesAndValues( this_types, this_values ); sortTypesAndValues( rdn_types, rdn_values ); for (int i = 0; i < this_types.length; i++ ) { if ( !this_types[i].equalsIgnoreCase( rdn_types[i] ) ) { return false; } if ( CES_SYNTAX.equals( getAttributeSyntax( this_types[i] ) ) ) { if ( !this_values[i].equals( rdn_values[i] ) ) { return false; } } else { if ( !this_values[i].equalsIgnoreCase( rdn_values[i] ) ) { return false; } } } return true; } /* sorts the rdn components by attribute to make comparison easier */ void sortTypesAndValues( String[] types, String[] values ) { boolean no_changes; do { no_changes = true; for ( int i = 0; i < types.length - 1; i++ ) { if ( types[i].toLowerCase().compareTo( types[i + 1].toLowerCase() ) > 0 ) { String tmp_type = types[i]; String tmp_value = values[i]; types[i] = types[i + 1]; values[i] = values[i + 1]; types[i + 1] = tmp_type; values[i + 1] = tmp_value; no_changes = false; } } } while ( no_changes = false ); } /** * Registers the the given attribute for the given syntax in an * internal table. This table is used for attribute comparison in the * equals() method. * @param attr the attribute to register. * @param oid the syntax to register with the attribute. * @see org.ietf.ldap.util.RDN#equals * @see org.ietf.ldap.util.RDN#unregisterAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributesForSyntax */ public static void registerAttributeSyntax( String attr, String oid ) { m_attributehash.put( attr.toLowerCase(), oid ); } /** * Removes the the given attribute from the attribute syntax table. * @param attr the attribute to remove. * @see org.ietf.ldap.util.RDN#registerAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributesForSyntax */ public static void unregisterAttributeSyntax( String attr ) { m_attributehash.remove( attr.toLowerCase() ); } /** * Returns the syntax for the attribute if the given attribute is registered * in the internal attribute table. * @param attr the attribute to lookup in the table. * @return the syntax of the attribute if found, null otherwise. * @see org.ietf.ldap.util.RDN#unregisterAttributeSyntax * @see org.ietf.ldap.util.RDN#registerAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributesForSyntax */ public static String getAttributeSyntax( String attr ) { return (String)m_attributehash.get( attr.toLowerCase() ); } /** * Returns all attributes registered for the given syntax as a * String Array. * @param oid the syntax to look up in the table. * @return all attributes for the given syntax as a String[] * @see org.ietf.ldap.util.RDN#unregisterAttributeSyntax * @see org.ietf.ldap.util.RDN#registerAttributeSyntax * @see org.ietf.ldap.util.RDN#getAttributeSyntax */ public static String[] getAttributesForSyntax( String oid ) { Enumeration itr = m_attributehash.keys(); Vector key_v = new Vector(); String tmp_str = null; while ( itr.hasMoreElements() ) { tmp_str = (String)itr.nextElement(); if ( oid.equals( (String)m_attributehash.get( tmp_str ) ) ) { key_v.addElement( tmp_str ); } } String[] str = new String[key_v.size()]; for ( int i = 0; i < str.length; i++ ) { str[i] = new String( (String)key_v.elementAt( i ) ); } return str; } public static final String[] _cesAttributes = { "adminurl", "altserver", "automountinformation", "bootfile", "bootparameter", "cirbindcredentials", "generation", "homedirectory", "internationalisdnnumber", "labeleduri", "membercertificatedescription", "membernisnetgroup", "memberuid", "memberurl", "nismapentry", "nisnetgrouptriple", "nsaddressbooksyncurl", "presentationaddress", "ref", "replicaentryfilter", "searchguide", "subtreeaci", "vlvfilter", "vlvname", "x121address" }; public static final String CES_SYNTAX = "1.3.6.1.4.1.1466.115.121.1.26"; static { /* static initializer to fill the ces attribute hash * this list was generated from the slapd.at.conf that * ships with Netscape Directory Server 4.1 */ for ( int i = 0; i < _cesAttributes.length; i++ ) { registerAttributeSyntax( _cesAttributes[i], CES_SYNTAX ); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDAPWriter.java0000664001003300100330000001016210602743267027574 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; import java.util.*; import org.ietf.ldap.*; import java.io.*; /** * Abstract class for outputting LDAP entries to a stream. * * @version 1.0 */ public abstract class LDAPWriter implements Serializable { // static final long serialVersionUID = -2710382547996750924L; protected PrintWriter m_pw; private static MimeBase64Encoder m_encoder = new MimeBase64Encoder(); /** * Constructs an LDAPWriter object to output entries * to a stream. * * @param pw output stream */ public LDAPWriter( PrintWriter pw ) { m_pw = pw; } /** * The main method of LDAPWriter. It calls printEntryIntro, * printAttribute, and printEntryEnd of derived classes. * * @param entry an LDAPEntry to be formatted to the output * stream */ public void printEntry( LDAPEntry entry ) throws IOException { printEntryStart( entry.getDN() ); /* Get the attributes of the entry */ LDAPAttributeSet attrs = entry.getAttributeSet(); Iterator enumAttrs = attrs.iterator(); /* Loop on attributes */ while ( enumAttrs.hasNext() ) { LDAPAttribute anAttr = (LDAPAttribute)enumAttrs.next(); printAttribute( anAttr ); } printEntryEnd( entry.getDN() ); } /** * Default schema writer - assumes an ordinary entry * * @param entry an LDAPEntry containing schema to be formatted * to the output stream */ public void printSchema( LDAPEntry entry ) throws IOException { printEntry( entry ); } /** * Print an attribute of an entry * * @param attr the attribute to format to the output stream */ protected abstract void printAttribute( LDAPAttribute attr ); /** * Print prologue to entry * * @param dn the DN of the entry */ protected abstract void printEntryStart( String dn ); /** * Print epilogue to entry * * @param dn the DN of the entry */ protected abstract void printEntryEnd( String dn ); protected String getPrintableValue( byte[] b ) { String s = ""; ByteBuf inBuf = new ByteBuf( b, 0, b.length ); ByteBuf encodedBuf = new ByteBuf(); // Translate to base 64 m_encoder.translate( inBuf, encodedBuf ); int nBytes = encodedBuf.length(); if ( nBytes > 0 ) { s = new String(encodedBuf.toBytes(), 0, nBytes); } return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/MimeBase64Decoder.java0000664001003300100330000001763310602743267031013 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; /** Implements a plaintext -> Base64 encoder. */ public final class MimeBase64Decoder extends MimeEncoder { static final long serialVersionUID = 797397585345375903L; private byte token[] = new byte[4]; // input buffer private byte bytes[] = new byte[3]; // output buffer private int token_length = 0; // input buffer length static private final byte NUL = 127; // must be out of range 0-64 static private final byte EOF = 126; // must be out of range 0-64 static private final byte map[] = { NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 000-007 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 010-017 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 020-027 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 030-037 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 040-047 !"#$%&' NUL, NUL, NUL, 62, NUL, NUL, NUL, 63, // 050-057 ()*+,-./ 52, 53, 54, 55, 56, 57, 58, 59, // 060-067 01234567 60, 61, NUL, NUL, NUL, EOF, NUL, NUL, // 070-077 89:;<=>? NUL, 0, 1, 2, 3, 4, 5, 6, // 100-107 @ABCDEFG 7, 8, 9, 10, 11, 12, 13, 14, // 110-117 HIJKLMNO 15, 16, 17, 18, 19, 20, 21, 22, // 120-127 PQRSTUVW 23, 24, 25, NUL, NUL, NUL, NUL, NUL, // 130-137 XYZ[\]^_ NUL, 26, 27, 28, 29, 30, 31, 32, // 140-147 `abcdefg 33, 34, 35, 36, 37, 38, 39, 40, // 150-157 hijklmno 41, 42, 43, 44, 45, 46, 47, 48, // 160-167 pqrstuvw 49, 50, 51, NUL, NUL, NUL, NUL, NUL, // 170-177 xyz{|}~ NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 200-207 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 210-217 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 220-227 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 230-237 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 240-247 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 250-257 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 260-267 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 270-277 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 300-307 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 310-317 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 320-327 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 330-337 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 340-347 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 350-357 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 360-367 NUL, NUL, NUL, NUL, NUL, NUL, NUL, NUL, // 370-377 }; // Fast routine that assumes full 4-char tokens with no '=' in them. // private final void decode_token(ByteBuf out) { int num = ((map[token[0]] << 18) | (map[token[1]] << 12) | (map[token[2]] << 6) | (map[token[3]])); bytes[0] = (byte) (0xFF & (num >> 16)); bytes[1] = (byte) (0xFF & (num >> 8)); bytes[2] = (byte) (0xFF & num); out.append(bytes); } // Hairier routine that deals with the final token, which can have fewer // than four characters, and that might be padded with '='. // private final void decode_final_token(ByteBuf out) { byte b0 = map[token[0]]; byte b1 = map[token[1]]; byte b2 = map[token[2]]; byte b3 = map[token[3]]; int eq_count = 0; if (b0 == EOF) { b0 = 0; eq_count++; } if (b1 == EOF) { b1 = 0; eq_count++; } if (b2 == EOF) { b2 = 0; eq_count++; } if (b3 == EOF) { b3 = 0; eq_count++; } int num = ((b0 << 18) | (b1 << 12) | (b2 << 6) | (b3)); // eq_count will be 0, 1, or 2. // No "=" padding means 4 bytes mapped to 3, the normal case, // not handled in this routine. // "xxx=" means 3 bytes mapped to 2. // "xx==" means 2 bytes mapped to 1. // "x===" can't happen, because "x" would then be encoding // only 6 bits, not 8, the minimum possible. out.append((byte) (num >> 16)); // byte 1, count = 0 or 1 or 2 if (eq_count <= 1) { out.append((byte) ((num >> 8) & 0xFF)); // byte 2, count = 0 or 1 if (eq_count == 0) { out.append((byte) (num & 0xFF)); // byte 3, count = 0 } } } /** Given a sequence of input bytes using the Base64 encoding, produces a sequence of unencoded output bytes. Note that some (small) amount of buffering may be necessary, if the input byte stream didn't fall on an appropriate boundary. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ public final void translate(ByteBuf in, ByteBuf out) { if (token == null) // already saw eof marker? return; byte inb[] = in.toBytes(); int in_length = in.length(); for (int i = 0; i < in_length; i++) { byte b = inb[i]; int x=(b&0xff); byte t = map[x]; if (t != NUL) token[token_length++] = b; if (t == EOF) { eof(out); return; } else if (token_length == 4) { decode_token(out); token_length = 0; } } } /** Tell the Base64 decoder that no more input data will be forthcoming. This may result in output, as a result of flushing the internal buffer. This object must not be used again after calling eof(). If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ public final void eof(ByteBuf out) { if (token != null && token_length != 0) { while (token_length < 4) token[token_length++] = (byte)'='; decode_final_token(out); } token_length = 0; token = new byte[4]; bytes = new byte[3]; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/MimeEncoder.java0000664001003300100330000000567610602743267030064 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; /** This abstract class is the parent of those classes which implement MIME encoding and decoding: base64. @see org.ietf.ldap.util.MimeBase64Encoder @see org.ietf.ldap.util.MimeBase64Decoder */ public abstract class MimeEncoder implements java.io.Serializable { static final long serialVersionUID = 5179250095383961512L; /** Given a sequence of input bytes, produces a sequence of output bytes. Note that some (small) amount of buffering may be necessary, if the input byte stream didn't fall on an appropriate boundary. If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ abstract public void translate(ByteBuf in, ByteBuf out); /** Tell the decoder that no more input data will be forthcoming. This may result in output, as a result of flushing the internal buffer. This object must not be used again after calling eof(). If there are bytes in `out' already, the new bytes are appended, so the caller should do `out.setLength(0)' first if that's desired. */ abstract public void eof(ByteBuf out); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/util/LDIFModDNContent.java0000664001003300100330000001377610602743267030630 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.util; /** * An object of this class represents the content of an LDIF record that * specifies changes to an RDN or the DN of an entry. This class * implements the LDIFContent interface. *

* * To get this object from an LDIFRecord object, * use the getContent method and cast the return value as * LDIFModDNContent. *

* * @version 1.0 * @see org.ietf.ldap.util.LDIFRecord#getContent */ public class LDIFModDNContent extends LDIFBaseContent { /** * Internal variables */ private String m_newParent = null; private String m_rdn = null; private boolean m_deleteOldRDN = false; static final long serialVersionUID = 1352504898614557791L; /** * Constructs an empty LDIFModDNContent object. * To specify the modifications to be made to the entry, use * the setRDN, setNewParent, * and setDeleteOldRDN methods. * @see org.ietf.ldap.util.LDIFModDNContent#setRDN * @see org.ietf.ldap.util.LDIFModDNContent#setNewParent * @see org.ietf.ldap.util.LDIFModDNContent#setDeleteOldRDN */ public LDIFModDNContent() { } /** * Returns the content type. You can use this with the * getContent method of the LDIFRecord * object to determine the type of content specified in the record. * @return the content type (which is * LDIFContent.MODDN_CONTENT). * @see org.ietf.ldap.util.LDIFRecord#getContent */ public int getType() { return MODDN_CONTENT; } /** * Sets the new RDN that should be assigned to the entry. * @param rdn the new RDN * @see org.ietf.ldap.util.LDIFModDNContent#getRDN */ public void setRDN(String rdn) { m_rdn = rdn; } /** * Returns the new RDN specified in the content of the LDIF record. * @return the new RDN. * @see org.ietf.ldap.util.LDIFModDNContent#setRDN */ public String getRDN() { return m_rdn; } /** * Sets the new parent DN that should be assigned to the entry. * @param parent the new parent DN for the entry * @see org.ietf.ldap.util.LDIFModDNContent#getNewParent */ public void setNewParent(String parent) { m_newParent = parent; } /** * Returns the entry's new parent DN, if specified in the content * of the LDIF record. * @return the new parent of the entry. * @see org.ietf.ldap.util.LDIFModDNContent#setNewParent */ public String getNewParent() { return m_newParent; } /** * Sets whether or not the old RDN should be removed as an * attribute in the entry. * @param bool if true, remove the attribute representing * the RDN. If false, leave the attribute in the entry. * @see org.ietf.ldap.util.LDIFModDNContent#getDeleteOldRDN */ public void setDeleteOldRDN(boolean bool) { m_deleteOldRDN = bool; } /** * Determines if the content of the LDIF record specifies that * the old RDN should be removed as an attribute in the entry. * @return true if the change specifies that the * the attribute representing the RDN should be removed, * false if the change specifies that the attribute * should be left in the entry. * @see org.ietf.ldap.util.LDIFModDNContent#setDeleteOldRDN */ public boolean getDeleteOldRDN() { return m_deleteOldRDN; } /** * Returns string representation of the content of the LDIF record. * @return the string representation of the content of the LDIF record. */ public String toString() { String s = ""; if (m_newParent == null) s = s + "new parent() "; else s = s + "new parent( "+m_newParent+" ), "; if (m_deleteOldRDN) s = s + "deleteOldRDN( true ), "; else s = s + "deleteOldRDN( false ), "; if (m_rdn == null) s = s + "new rdn()"; else s = s + "new rdn( "+m_rdn+" )"; if ( getControls() != null ) { s += getControlString(); } return "LDIFModDNContent {" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPMatchingRuleSchema.java0000664001003300100330000002764410602743265031061 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * The definition of a matching rule in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of a matching rule. * According to the RFC, the description of a matching rule can * include the following information: *

* *

    *
  • an OID identifying the matching rule *
  • a name identifying the matching rule *
  • a description of the matching rule *
  • the syntax of the matching rule *
*

* * The LDAPMatchingRuleSchema class also specifies * the matching rule "use description", which describes the * attributes which can be used with the matching rule. *

* * When you construct an LDAPMatchingRuleSchema object, you can * specify these types of information as arguments to the constructor or * in the MatchingRuleDescription and MatchingRuleUseDescription formats * specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * You can get the name, OID, and description of this matching rule * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this matching rule definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines MatchingRuleDescription and MatchingRuleUseDescription * as follows: *

*

 *    MatchingRuleDescription = "(" whsp
 *        numericoid whsp  ; MatchingRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        "SYNTAX" numericoid
 *    whsp ")"
 *
 * Values of the matchingRuleUse list the attributes which are suitable
 * for use with an extensible matching rule.
 *
 *    MatchingRuleUseDescription = "(" whsp
 *        numericoid whsp  ; MatchingRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" ]
 *       "APPLIES" oids    ; AttributeType identifiers
 *    whsp ")"
 * 
*

* LDAPMatchingRuleSchema abstracts away from the two types and * manages their relationships transparently. * * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPMatchingRuleSchema extends LDAPAttributeSchema { static final long serialVersionUID = 6466155218986944131L; /** * Constructs a matching rule definition, using the specified * information. * @param names name of the matching rule * @param oid object identifier (OID) of the matching rule * in dotted-decimal format (for example, "1.2.3.4"). * @param description description of the matching rule. * @param attributes array of the OIDs of the attributes for which * the matching rule is applicable. * @param obsolete true if the element is obsolete * @param syntaxString syntax of this matching rule in dotted-decimal * format */ public LDAPMatchingRuleSchema( String[] names, String oid, String description, String[] attributes, boolean obsolete, String syntaxString ) { if ( (oid == null) || (oid.trim().length() < 1) ) { throw new IllegalArgumentException( "OID required" ); } this.names = names; this.oid = oid; this.description = description; attrName = "matchingrules"; syntaxElement.syntax = syntaxElement.syntaxCheck( syntaxString ); syntaxElement.syntaxString = syntaxString; setQualifier( SYNTAX, syntaxElement.syntaxString ); _attributes = new String[attributes.length]; for( int i = 0; i < attributes.length; i++ ) { this._attributes[i] = attributes[i]; } if ( obsolete ) { setQualifier( OBSOLETE, "" ); } } /** * Constructs a matching rule definition based on descriptions in * the MatchingRuleDescription format and MatchingRuleUseDescription * format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. For example, when * you search an LDAP server for its schema, the server returns an entry * with attributes that include "matchingrule" and "matchingruleuse". * The values of these attributes are matching rule descriptions * in this format. *

* * @param raw definition of the matching rule in the * MatchingRuleDescription format * @param use definition of the use of the matching rule in the * MatchingRuleUseDescription format */ public LDAPMatchingRuleSchema( String raw, String use ) { attrName = "matchingrules"; if ( raw != null ) { parseValue( raw ); } if ( use != null ) { parseValue( use ); } Vector v = (Vector)properties.get( "APPLIES" ); if ( v != null ) { _attributes = new String[v.size()]; v.copyInto( _attributes ); v.removeAllElements(); } String val = (String)properties.get( "SYNTAX" ); if ( val != null ) { syntaxElement.syntaxString = val; syntaxElement.syntax = syntaxElement.syntaxCheck( val ); } } /** * Gets the list of the OIDs of the attribute types which can be used * with the matching rule. * @return array of the OIDs of the attribute types which can be used * with the matching rule. */ public String[] getAttributes() { return _attributes; } /** * Prepare a value in RFC 2252 format for submitting to a server * * @param quotingBug true if SUP and SYNTAX values are to * be quoted; that is to satisfy bugs in certain LDAP servers. * @return a String ready to be submitted to an LDAP server */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); if ( syntaxElement.syntaxString != null ) { s += "SYNTAX "; if ( quotingBug ) { s += '\''; } s += syntaxElement.syntaxString; if ( quotingBug ) { s += '\''; } s += ' '; } String val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "matchingrules"; } /** * Gets the matching rule definition in the string representation * of the MatchingRuleDescription data type defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of these formats). * This is the format that LDAP servers and clients use to exchange * schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "matchingrules" and "matchingruleuse". The * values of these attributes are matching rule description and * matching rule use description in these formats.) *

* * @return a string in a format that can be used as the value of * the matchingrule attribute (which describes * a matching rule in the schema) of a subschema object */ String getValue() { return getValue( false ); } /** * Gets the matching rule use definition in the string representation * of the MatchingRuleUseDescription data type defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of these formats). * This is the format that LDAP servers and clients use to exchange * schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "matchingrules" and "matchingruleuse". The * values of these attributes are matching rule description and * matching rule use description in these formats.) *

* * @return a string in a format that can be used as the value of * the matchingruleuse attribute (which describes the use of * a matching rule in the schema) of a subschema object */ public String getUseValue() { String s = getValuePrefix(); if ( (_attributes != null) && (_attributes.length > 0) ) { s += "APPLIES ( "; for( int i = 0; i < _attributes.length; i++ ) { if ( i > 0 ) s += " $ "; s += _attributes[i]; } s += " ) "; } s += ')'; return s; } /** * Gets the definition of the matching rule in Directory format * * @return definition of the matching rule in Directory format */ public String toString() { return getValue( false ); } // Qualifiers tracked explicitly static final String[] EXPLICIT = { OBSOLETE, SYNTAX }; private String[] _attributes = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPReferralException.java0000664001003300100330000002070610602743265030767 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; //import org.ietf.ldap.client.*; //import org.ietf.ldap.client.opers.*; //import java.io.*; /** * Represents the situation in which the LDAP server refers the client to * another LDAP server. This exception constructs a list of referral URLs from * the LDAP error message returned by the server. You can get this list by * using the getURLs method. * * @version 1.0 * @see org.ietf.ldap.LDAPException */ public class LDAPReferralException extends LDAPException { static final long serialVersionUID = 1771536577344289897L; private String _referrals[] = null; /** * Constructs a default exception with no specific error information. */ public LDAPReferralException() { } /** * Constructs a default exception with a specified string as * additional information. This form is used for lower-level errors. * @param message the additional error information */ public LDAPReferralException( String message ) { super( message ); } /** * Constructs a default exception with a specified string as * additional information. This form is used for higher-level LDAP * operational errors. * @param message the additional error information * @param resultCode result code * @param serverErrorMessage error message */ public LDAPReferralException( String message, int resultCode, String serverErrorMessage ) { super(message, resultCode, serverErrorMessage); } /** * Constructs an exception with a list of LDAP URLs to other LDAP servers. * This list of referrals points the client to LDAP servers that may * contain the requested entries. * @param message the additional error information * @param resultCode result code * @param referrals array of LDAP URLs identifying other LDAP servers that * may contain the requested entries */ public LDAPReferralException( String message, int resultCode, String referrals[] ) { super(message, resultCode, (String)null); _referrals = referrals; } /** * Constructs an exception with a result code, a specified * string of additional information, a string containing * information passed back from the server, and a possible root * exception. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • This string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getLDAPResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

*

* * This form is used for higher-level LDAP operational errors. * @param message the additional error information * @param resultCode the result code returned * @param serverErrorMessage error message specifying additional information * returned from the server * @param rootException An exception which caused the failure, if any * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() * @see org.ietf.ldap.LDAPException#getLDAPErrorMessage() * @see org.ietf.ldap.LDAPException#getMatchedDN() */ public LDAPReferralException( String message, int resultCode, String serverErrorMessage, Throwable rootException ) { super( message, resultCode, serverErrorMessage, rootException ); } /** * Gets the list of referrals (LDAP URLs to other servers) returned by the LDAP server. * You can use this list to find the LDAP server that can fulfill your request. * * If you have set up your search constraints (or the LDAPConnection object) * to follow referrals automatically, any operation that results in a referral will use * this list to create new connections to the LDAP servers in this list. * * @return list of LDAP URLs to other LDAP servers. */ public String[] getReferrals() { if ( getLDAPErrorMessage() == null ) { return (_referrals != null) ? _referrals : new String[0]; } else { return extractReferrals( getLDAPErrorMessage() ); } } /** * Gets the referral URL that could not be followed. If multiple URLs * are in the list, and none could be followed, the method returns one * of them. * * @return the referral URL that could not be followed */ public String getFailedReferral() { String[] urls = getReferrals(); return (urls.length > 0) ? urls[0] : ""; } /** * Sets the referral URL that could not be followed * * @param referral the referral URL that could not be followed */ public void setFailedReferral( String referral ) { _referrals = new String[] { referral }; } /** * Extract referral string from the error message. The * error string is based on "Referrals Within the * LDAPConnection Protocol". * @param error string */ private String[] extractReferrals(String error) { if (error == null) return null; StringTokenizer st = new StringTokenizer(error, "\n"); Vector v = new Vector(); boolean referrals = false; while (st.hasMoreTokens()) { String token = st.nextToken(); if (referrals) { v.addElement(token); } else { if (token.startsWith("Referral:")) referrals = true; } } if (v.size() == 0) return null; String res[] = new String[v.size()]; for (int i = 0; i < v.size(); i++) { res[i] = (String)v.elementAt(i); } return res; } /** * Gets the string representation of the referral exception, * which includes the result code, the message sent back * from the LDAP server and the list of referrals. * * @return string representation of exception. * @see org.ietf.ldap.LDAPException#resultCodeToString(int) */ public String toString() { String str = super.toString(); for (int i=0; i < _referrals.length; i++) { str += "\n" + _referrals[i]; } return str; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/0000775001003300100330000000000010667357311025317 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterAnd.java0000664001003300100330000000452510602743266030474 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter And. *

 *   and [0] SET OF Filter
 * 
* * @version 1.0 */ public class JDAPFilterAnd extends JDAPFilterSet { /** * Constructs the filter. */ public JDAPFilterAnd() { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|0); } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterAnd {" + super.getParamString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterSet.java0000664001003300100330000000651610602743266030527 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the base class of filter "and" and filter "or". * * @version 1.0 */ public abstract class JDAPFilterSet extends JDAPFilter { /** * Internal variables */ private int m_tag; private Vector m_set = new Vector(); /** * Constructs the filter set. * @param tag tag */ public JDAPFilterSet(int tag) { super(); m_tag = tag; } /** * Adds filter into the filter set. * @param filter adding filter */ public void addElement(JDAPFilter filter) { m_set.addElement(filter); } /** * Gets the ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { try { BERSet filters = new BERSet(); for (int i = 0; i < m_set.size(); i++) { JDAPFilter f = (JDAPFilter)m_set.elementAt(i); filters.addElement(f.getBERElement()); } BERTag element = new BERTag(m_tag, filters, true); return element; } catch (IOException e) { return null; } } /** * Gets the filter set parameters. * @return set parameters */ public String getParamString() { String s = ""; for (int i = 0; i < m_set.size(); i++) { if (i != 0) s = s + ","; JDAPFilter f = (JDAPFilter)m_set.elementAt(i); s = s + f.toString(); } return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterLessOrEqual.java0000664001003300100330000000474310602743266032173 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the less or equal filter. *
 * lessOrEqual [6] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterLessOrEqual extends JDAPFilterAVA { /** * Constructs less or equal filter. * @param ava attribute value assertion */ public JDAPFilterLessOrEqual(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|6, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterLessOrEqual {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterApproxMatch.java0000664001003300100330000000476010602743266032221 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the approximate match filter. *
 * approxMatch [8] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterApproxMatch extends JDAPFilterAVA { /** * Constructs approximate match filter. * @param ava attribute value assertion */ public JDAPFilterApproxMatch(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|8, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterApproximateMatch {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterPresent.java0000664001003300100330000000537110602743266031412 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter present. *

See RFC 1777. * *

 *   present [7] AttributeType
 * 
* * @version 1.0 */ public class JDAPFilterPresent extends JDAPFilter { /** * Internal variables */ private String m_type = null; /** * Constructs the filter. * @param type attribute type */ public JDAPFilterPresent(String type) { super(); m_type = type; } /** * Gets ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BEROctetString s = new BEROctetString(m_type); BERTag element = new BERTag(BERTag.CONTEXT|7, s, true); return element; } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterPresent {" + m_type + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterEqualityMatch.java0000664001003300100330000000500010602743266032531 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the equality match filter. *

See RFC 1777. *

 * equalityMatch [3] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterEqualityMatch extends JDAPFilterAVA { /** * Constructs less or equal filter. * @param ava attribute value assertion */ public JDAPFilterEqualityMatch(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|3, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterEqualityMatch {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterSubString.java0000664001003300100330000001237510602743266031714 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter substring. *

See RFC 1777. * *

 * [4] SEQUENCE {
 *   type AttributeType,
 *   SEQUENCE OF CHOICE {
 *     initial [0] LDAPString,
 *     any [1] LDAPString,
 *     final [2] LDAPString
 *   }
 *     }
 * 
* * @version 1.0 */ public class JDAPFilterSubString extends JDAPFilter { /** * Internal variables */ private String m_type = null; private Vector m_initial = new Vector(); private Vector m_any = new Vector(); private Vector m_final = new Vector(); /** * Constructs the filter. * @param type attribute type */ public JDAPFilterSubString(String type) { super(); m_type = type; } /** * Adds initial substring. * @param s initial substring */ public void addInitial(String s) { m_initial.addElement(s); } /** * Adds any substring. * @param s any substring */ public void addAny(String s) { m_any.addElement(s); } /** * Adds final substring. * @param s final substring */ public void addFinal(String s) { m_final.addElement(s); } /** * Gets ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_type)); BERSequence str_seq = new BERSequence(); for (int i = 0; i < m_initial.size(); i++) { String val = (String)m_initial.elementAt(i); if (val == null) continue; BERTag str = new BERTag(BERTag.CONTEXT|0, JDAPFilterOpers.getOctetString(val), true); str_seq.addElement(str); } for (int i = 0; i < m_any.size(); i++) { String val = (String)m_any.elementAt(i); if (val == null) continue; BERTag str = new BERTag(BERTag.CONTEXT|1, JDAPFilterOpers.getOctetString(val), true); str_seq.addElement(str); } for (int i = 0; i < m_final.size(); i++) { String val = (String)m_final.elementAt(i); if (val == null) continue; BERTag str = new BERTag(BERTag.CONTEXT|2, JDAPFilterOpers.getOctetString(val), true); str_seq.addElement(str); } seq.addElement(str_seq); BERTag element = new BERTag(BERTag.CONSTRUCTED|BERTag.CONTEXT|4, seq, true); return element; } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { String initial = ""; for (int i = 0; i < m_initial.size(); i++) { if (i != 0) initial = initial + ","; initial = initial + (String)m_initial.elementAt(i); } String any = ""; for (int i = 0; i < m_any.size(); i++) { if (i != 0) any = any + ","; any = any + (String)m_any.elementAt(i); } String s_final = ""; for (int i = 0; i < m_final.size(); i++) { if (i != 0) s_final = s_final + ","; s_final = s_final + (String)m_final.elementAt(i); } return "JDAPFilterSubString {type=" + m_type + ", initial=" + initial + ", any=" + any + ", final=" + s_final + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterAVA.java0000664001003300100330000000534110602743266030376 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the attribute value assertion filter. * * @version 1.0 */ public abstract class JDAPFilterAVA extends JDAPFilter { /** * Internal variables */ private int m_tag; private JDAPAVA m_ava = null; /** * Constructs base filter for other attribute value assertion. * @param tag attribute tag * @param ava attribute value assertion */ public JDAPFilterAVA(int tag, JDAPAVA ava) { m_tag = tag; m_ava = ava; } /** * Get attribute value assertion. * @return value assertion */ public JDAPAVA getAVA() { return m_ava; } /** * Gets the ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BERTag element = new BERTag(m_tag, m_ava.getBERElement(), true); return element; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterGreaterOrEqual.java0000664001003300100330000000501410602743266032646 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the greater or equal filter. *

See RFC 1777. * *

 * greaterOrEqual [5] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterGreaterOrEqual extends JDAPFilterAVA { /** * Constructs greater or equal filter. * @param ava attribute value assertion */ public JDAPFilterGreaterOrEqual(JDAPAVA ava) { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|5, ava); } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterGreaterOrEqual {" + super.getAVA().toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPBERTagDecoder.java0000664001003300100330000001370510602743266031156 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class is to help BER libraries to make decision * on how to decode an implicit object. */ public class JDAPBERTagDecoder extends BERTagDecoder { /** * Gets an application specific ber element from the stream. * @param buffer ber encoding buffer * @param stream input stream * @param bytes_read number of bytes read * @param implicit to indicate a tag implicit or not */ public BERElement getElement(BERTagDecoder decoder, int tag, InputStream stream, int[] bytes_read, boolean[] implicit) throws IOException { BERElement element = null; switch (tag) { case 0x60: /* [APPLICATION 0] For Bind Request */ case 0x61: /* [APPLICATION 1] Bind Response */ case 0x63: /* [APPLICATION 3] Search Request * If doing search without bind first, * x500.arc.nasa.gov returns tag [APPLICATION 3] * in Search Response. Gee. */ case 0x64: /* [APPLICATION 4] Search Response */ case 0x65: /* [APPLICATION 5] Search Result */ case 0x67: /* [APPLICATION 7] Modify Response */ case 0x69: /* [APPLICATION 9] Add Response */ case 0x6a: /* [APPLICATION 10] Del Request */ case 0x6b: /* [APPLICATION 11] Del Response */ case 0x6d: /* [APPLICATION 13] ModifyRDN Response */ case 0x6f: /* [APPLICATION 15] Compare Response */ case 0x78: /* [APPLICATION 23] Extended Response */ case 0x73: /* [APPLICATION 19] SearchResultReference */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; case 0x80: /* [APPLICATION 16] 64+16 */ element = new BERInteger(stream, bytes_read); implicit[0] = true; break; /* 16/02/97 MS specific */ case 0x85: /* Context Specific [5]: * (a) Handle Microsoft v3 referral bugs! (Response) * (b) Handle Microsoft v3 supportedVersion in Bind * response */ element = new BERInteger(stream, bytes_read); implicit[0] = true; break; case 0x87: /* Context Specific [7]: * Handle Microsoft Filter "present" in * search request. */ element = new BEROctetString(decoder, stream, bytes_read); implicit[0] = true; break; case 0x8a: /* Context Specific [10]: * Handle extended response */ element = new BEROctetString(decoder, stream, bytes_read); implicit[0] = true; break; case 0x8b: /* Context Specific [11]: * Handle extended response */ element = new BEROctetString(decoder, stream, bytes_read); implicit[0] = true; break; case 0xa3: /* Context Specific [3]: * Handle Microsoft v3 sasl bind request */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; case 0xa7: /* Context Specific [7]: * Handle Microsoft v3 serverCred in * bind response. MS encodes it as SEQUENCE OF * while it should be CHOICE OF. */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; case 0xa0: /* Context Specific [0]: * v3 Server Control. * SEQUENCE of SEQUENCE of {OID [critical] [value]} */ element = new BERSequence(decoder, stream, bytes_read); implicit[0] = true; break; default: throw new IOException(); } return element; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilter.java0000664001003300100330000002160010602743266030042 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter. *
 *   Filter ::= CHOICE {
 *     and [0] SET OF Filter,
 *     or [1] SET OF Filter,
 *     not [2] Filter,
 *     equalityMatch [3] AttributeValueAssertion,
 *     substrings [4] SubstringFilter,
 *     greaterOrEqual [5] AttributeValueAssertion,
 *     lessOrEqual [6] AttributeValueAssertion,
 *     present [7] AttributeType,
 *     approxMatch [8] AttributeValueAssertion
 *   }
 * 
* * @version 1.0 */ public abstract class JDAPFilter { /** * Constructs a empty filter. */ public JDAPFilter() { } /** * Constructs filter from filter string specified in RFC1558. *
     *  ::= '('  ')'
     *  ::=  |  |  | 
     *  ::= '&' 
     *  ::= '|' 
     *  ::= '!' 
     *  ::=  |  
     *  ::=  |  | 
     *  ::=   
     *  ::=  |  |  | 
     *  ::= '='
     *  ::= '~='
     *  ::= '>='
     *  ::= '<='
     *  ::=  '=*'
     *  ::=  '='   
     *  ::= NULL | 
     *  ::= '*' 
     *  ::= NULL |  '*' 
     *  ::= NULL | 
     * 
* @param dn distinguished name of adding entry * @param attrs list of attribute associated with entry * @return filter */ public static JDAPFilter getFilter(String filter) { String f = new String(filter); f.trim(); if (f.startsWith("(") && f.endsWith(")")) { return getFilterComp(f.substring(1,f.length()-1)); } return getFilterComp(filter); } /** * Constructs the filter computation. * @param f filter string within brackets * @return filter */ public static JDAPFilter getFilterComp(String f) { f.trim(); if (f.startsWith("&")) { /* and */ JDAPFilter filters[] = getFilterList(f.substring(1, f.length())); if (filters == null) { throw new IllegalArgumentException("Bad search filter"); } JDAPFilterAnd and = new JDAPFilterAnd(); for (int i = 0; i < filters.length; i++) { and.addElement(filters[i]); } return and; } else if (f.startsWith("|")) { /* or */ JDAPFilter filters[] = getFilterList(f.substring(1, f.length())); if (filters == null) { throw new IllegalArgumentException("Bad search filter"); } JDAPFilterOr or = new JDAPFilterOr(); for (int i = 0; i < filters.length; i++) { or.addElement(filters[i]); } return or; } else if (f.startsWith("!")) { /* not */ JDAPFilter filter = getFilter(f.substring(1, f.length())); if (filter == null) { throw new IllegalArgumentException("Bad search filter"); } return new JDAPFilterNot(filter); } else { /* item */ return getFilterItem(f.substring(0, f.length())); } } /** * Parses a list of filters * @param list filter list (i.e. (filter)(filter)...) * @return list of filters */ public static JDAPFilter[] getFilterList(String list) { list.trim(); int level = 0; int start = 0; int end = 0; Vector v = new Vector(); for (int i = 0; i < list.length(); i++) { if (list.charAt(i) == '(') { if (level == 0) { start = i; } level++; } if (list.charAt(i) == ')') { level--; if (level == 0) { end = i; v.addElement(JDAPFilter.getFilter(list.substring(start, end+1))); } } } if (v.size() == 0) return null; JDAPFilter f[] = new JDAPFilter[v.size()]; for (int i = 0; i < v.size(); i++) { f[i] = (JDAPFilter)v.elementAt(i); } return f; } /** * Gets filter item. * @param item filter item string * @return filter */ public static JDAPFilter getFilterItem(String item) { item.trim(); int idx = item.indexOf('='); if (idx == -1) return null; String type = item.substring(0, idx).trim(); String value = item.substring(idx+1).trim(); /* skip = */ // Only values can contain escape sequences if (type.indexOf('\\') >= 0) { throw new IllegalArgumentException("Bad search filter"); } /* make decision by looking at the type */ type.trim(); if (type.endsWith("~")) { JDAPAVA ava = new JDAPAVA(type.substring(0, type.length()-1), value); return new JDAPFilterApproxMatch(ava); } else if (type.endsWith(">")) { JDAPAVA ava = new JDAPAVA(type.substring(0, type.length()-1), value); return new JDAPFilterGreaterOrEqual(ava); } else if (type.endsWith("<")) { JDAPAVA ava = new JDAPAVA(type.substring(0, type.length()-1), value); return new JDAPFilterLessOrEqual(ava); } else if (type.endsWith(":")) { return new JDAPFilterExtensible(type.substring(0, type.length()-1), value); } /* for those that are not simple */ if (value.startsWith("*") && value.length() == 1) { return new JDAPFilterPresent(type); } /* if value contains no '*', then it is equality */ if (value.indexOf('*') == -1) { JDAPAVA ava = new JDAPAVA(type, value); return new JDAPFilterEqualityMatch(ava); } /* must be substring at this point */ StringTokenizer st = new StringTokenizer(value, "*"); JDAPFilterSubString sub = new JDAPFilterSubString(type); String initial = null; if (!value.startsWith("*")) { initial = st.nextToken(); initial.trim(); } sub.addInitial(initial); while (st.hasMoreTokens()) { String any = st.nextToken(); any.trim(); if (st.hasMoreTokens()) { sub.addAny(any); } else { if (value.endsWith("*")) { sub.addAny(any); sub.addFinal(null); } else { sub.addFinal(any); } } } return sub; } /** * Gets the ber representation of filter. * @return ber representation of filter */ public abstract BERElement getBERElement(); /** * Retrieves the string representation of filter. * @return string representation of filter */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterOr.java0000664001003300100330000000455010602743266030350 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter And. *

See RFC 1777. * *

 *   or [1] SET OF Filter
 * 
* * @version 1.0 */ public class JDAPFilterOr extends JDAPFilterSet { /** * Constructs the filter. */ public JDAPFilterOr() { super(BERTag.CONSTRUCTED|BERTag.CONTEXT|1); } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterOr {" + super.getParamString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterNot.java0000664001003300100330000000534310602743266030531 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the filter not. *

See RFC 1777. * *

 *   not [2] Filter
 * 
* * @version 1.0 */ public class JDAPFilterNot extends JDAPFilter { /** * Internal variables */ private JDAPFilter m_filter = null; /** * Constructs the filter. */ public JDAPFilterNot(JDAPFilter filter) { super(); m_filter = filter; } /** * Gets ber representation of the filter. * @return ber representation */ public BERElement getBERElement() { BERTag element = new BERTag(BERTag.CONSTRUCTED|BERTag.CONTEXT|2, m_filter.getBERElement(), false /* true */); return element; } /** * Gets string reprensetation of the filter. * @return string representation */ public String toString() { return "JDAPFilterNot {" + m_filter.toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/0000775001003300100330000000000010667357312026450 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPSearchResult.java0000664001003300100330000000571210602743266032357 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search result. This object * is sent from the ldap server to the interface. Note * that search response is separated into search response * and search result. The search response contains the * result from the server, while the research result indicates * the end of the search response sequence. *
 * resultCode [APPLICATION 5] LDAPResult
 * 
* * @version 1.0 */ public class JDAPSearchResult extends JDAPResult implements JDAPProtocolOp { /** * Constructs search result. * @param element ber element of search result */ public JDAPSearchResult(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.SEARCH_RESULT; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "SearchResult " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPSearchResponse.java0000664001003300100330000001144310602743266032675 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search response. This object * is sent from the ldap server to the interface. *
 * entry [APPLICATION 4] SEQUENCE {
 *   objectName LDAPDN,
 *   attributes SEQUENCE OF SEQUENCE {
 *     AttributeType,
 *     SET OF AttributeValue
 *   }
 * }
 * 
* * Note that the following is the LDAPv3 definition: *
 * SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
 *   objectName LDAPDN,
 *   attributes PartialAttributeList
 * }
 * PartialAttributeList ::= SEQUENCE OF SEQUENCE {
 *   type AttributeDescription,
 *   vals SET OF AttributeValue
 * }
 * 
* * @version 1.0 */ public class JDAPSearchResponse implements JDAPProtocolOp { /** * Internal variables */ protected String m_object_name = null; protected BERElement m_element = null; protected LDAPAttribute m_attributes[] = null; /** * Constructs search response. * @param element ber element of search response */ public JDAPSearchResponse(BERElement element) throws IOException { m_element = element; BERTag tag = (BERTag)element; BERSequence seq = (BERSequence)tag.getValue(); BEROctetString name = (BEROctetString)seq.elementAt(0); byte buf[] = null; buf = name.getValue(); if (buf == null) m_object_name = null; else { try{ m_object_name = new String(buf, "UTF8"); } catch(Throwable x) {} } BERSequence attrs = (BERSequence)seq.elementAt(1); if (attrs.size() > 0) { m_attributes = new LDAPAttribute[attrs.size()]; for (int i = 0; i < attrs.size(); i++) { m_attributes[i] = new LDAPAttribute(attrs.elementAt(i)); } } } /** * Retrieves ber representation of the result. * @return ber representation */ public BERElement getBERElement() { return m_element; } /** * Retrieves object name * @return object name */ public String getObjectName() { return m_object_name; } /** * Retrieves attributes * @return attributes */ public LDAPAttribute[] getAttributes() { return m_attributes; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.SEARCH_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { String s = ""; if (m_attributes != null) { for (int i = 0; i < m_attributes.length; i++) { if (i != 0) s = s + ","; s = s + m_attributes[i].toString(); } } return "SearchResponse {entry='" + m_object_name + "', attributes='" + s + "'}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPAddRequest.java0000664001003300100330000001216710602743266032016 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the add request. This object * is sent to the ldap server. *

See RFC 1777. * *

 * AddRequest ::= [APPLICATION 8] SEQUENCE {
 *   entry LDAPDN,
 *   attrs SEQUENCE OF SEQUENCE {
 *     type AttributeType,
 *     values SET OF AttributeValue
 *   }
 * }
 * 
* * @version 1.0 */ public class JDAPAddRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; protected LDAPAttribute m_attrs[] = null; /** * Constructs add request. * @param dn distinguished name of adding entry * @param attrs list of attribute associated with entry */ public JDAPAddRequest(String dn, LDAPAttribute attrs[]) { m_dn = dn; m_attrs = attrs; } /** * Retrieves protocol operation type. * @return protcol type */ public int getType() { return JDAPProtocolOp.ADD_REQUEST; } /** * Sets the base dn component. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Gets the ber representation of add request. * @return ber representation of request */ public BERElement getBERElement() { /* Assumed that adding cn=patrick,o=ncware,c=ca with * following attributes: * cn: patrick * title: programmer * [*] umich-ldap-v3.3: * 0x68 0x46 ([APPLICATION8]) * 0x04 0x1a c n = p a t r i c k , 0x20 * o = n c w a r e , 0x20 c = * c a (entry - OctetString) * 0x30 0x28 (SEQUENCE) * 0x30 0x0f (SEQUENCE) * 0x04 0x02 c n (attribute type - OctetString) * 0x31 0x09 (SET OF) * 0x04 0x07 p a t r i c k (attribute value - OctetString) * 0x30 0x15 * 0x04 0x05 t i t l e * 0x31 0x0c (SET OF) * 0x04 0x0a p r o g r a m m e r */ BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString (m_dn)); BERSequence attrs_list = new BERSequence(); for (int i = 0; i < m_attrs.length; i++) { attrs_list.addElement(m_attrs[i].getBERElement()); } seq.addElement(attrs_list); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|8, seq, true); return element; } /** * Retrieves the string representation of add request parameters. * @return string representation of add request parameters */ public String getParamString() { String s = ""; for (int i = 0; i < m_attrs.length; i++) { if (i != 0) s = s + " "; s = s + m_attrs[i].toString(); } return "{entry='" + m_dn + "', attrs='" + s + "'}"; } /** * Retrieves the string representation of add request. * @return string representation of add request */ public String toString() { return "AddRequest " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPModifyRequest.java0000664001003300100330000001036110602743266032547 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modify request. *
 *   ModifyRequest ::= [APPLICATION 6] SEQUENCE {
 *     object LDAPDN,
 *     modification SEQUENCE OF SEQUENCE {
 *       operation ENUMERATED {
 *         add (0),
 *         delete (1),
 *         replace (2)
 *       },
 *       modification SEQUENCE {
 *         type AttributeType,
 *         values SET OF AttributeValue
 *       }
 *     }
 *   }
 * 
* * @version 1.0 */ public class JDAPModifyRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; protected LDAPModification m_mod[] = null; /** * Constructs the modify request * @param dn distinguished name of modifying * @param mod list of modifications */ public JDAPModifyRequest(String dn, LDAPModification mod[]) { m_dn = dn; m_mod = mod; } /** * Retrieves protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_REQUEST; } /** * Sets the base dn component. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Gets the ber representation of modify request. * @return ber representation of modify request */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_dn)); BERSequence mod_list = new BERSequence(); for (int i = 0; i < m_mod.length; i++) { mod_list.addElement(m_mod[i].getBERElement()); } seq.addElement(mod_list); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|6, seq, true); return element; } /** * Retrieves string representation of modify request. * @return string representation of request */ public String toString() { String s = ""; for (int i = 0; i < m_mod.length; i++) { if (i != 0) s = s + "+"; s = s + m_mod[i].toString(); } return "ModifyRequest {object=" + m_dn + ", modification=" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPBindResponse.java0000664001003300100330000001071010602743266032340 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the bind response. This object * is sent from the ldap server to the interface. *
 * BindResponse = [APPLICATION 1] LDAPResult
 * 
* * Note that LDAPv3.0 Bind Response is structured as follows: *
 * BindResponse ::= [APPLICATION 1] SEQUENCE {
 *   COMPONENTS OF LDAPResult,
 *   serverCreds [7] SaslCredentials OPTIONAL
 * }
 * 
* */ public class JDAPBindResponse extends JDAPResult implements JDAPProtocolOp { /** * Internal variables */ protected byte[] m_credentials = null; /** * Constructs bind response. * @param element ber element of bind response */ public JDAPBindResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); /* LDAPv3 Sasl Credentials support */ BERSequence s = (BERSequence)((BERTag)element).getValue(); if (s.size() <= 3) { return; } BERElement e = s.elementAt(3); if (e.getType() == BERElement.TAG) { BERElement el = ((BERTag)e).getValue(); if (el instanceof BERSequence) { el = ((BERSequence)el).elementAt(0); } BEROctetString str = (BEROctetString)el; try{ m_credentials = str.getValue(); } catch(Exception ex) {} } } /** * Retrieves Sasl Credentials. LDAPv3 support. * @return credentials */ public byte[] getCredentials() { return m_credentials; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.BIND_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { StringBuffer sb = new StringBuffer("BindResponse {resultCode="); sb.append(m_result_code); sb.append(", serverSaslCreds=" + ((m_credentials == null) ? "null" : /*"********"*/new String(m_credentials))); if (m_matched_dn != null) { sb.append(", matchedDN="); sb.append(m_matched_dn); } if (m_error_message != null) { sb.append(", errorMessage="); sb.append(m_error_message); } if (m_referrals != null && m_referrals.length > 0) { sb.append(", referrals="); for (int i=0; i < m_referrals.length; i++) { sb.append((i==0 ? "" : " ")); sb.append(m_referrals[i]); } } sb.append("}"); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPBaseDNRequest.java0000664001003300100330000000460010602743266032413 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This is the base class for all the request that * has a base dn component. The existence of this * class is due to the JDAPReferralThread. * * @version 1.0 */ public abstract class JDAPBaseDNRequest { /** * Sets the base dn component in the request. * @param basedn base DN */ public abstract void setBaseDN(String basedn); /** * Gets the base dn component in the request. * @return base dn */ public abstract String getBaseDN(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPAbandonRequest.java0000664001003300100330000000645210602743266032670 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the abandon request. This object * is sent to the ldap server. *

See RFC 1777. * *

 * AbandonRequest ::= [APPLICATION 16] MessageID
 * 
* * @version 1.0 */ public class JDAPAbandonRequest implements JDAPProtocolOp { /** * Internal variables */ protected int m_msgid; /** * Constructs abandon request. * @param msgid message identifier */ public JDAPAbandonRequest(int msgid) { m_msgid = msgid; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.ABANDON_REQUEST; } /** * Gets the ber representation of abandon request. * @return ber representation of request */ public BERElement getBERElement() { /* Assumed m_msgid = 1. The BER encoding output * should be * * [*] umich-ldap-v3.3: * 0x50 (implicit tagged integer) * 0x01 (length) * 0x01 (message id) */ BERInteger i = new BERInteger(m_msgid); BERTag element = new BERTag(BERTag.APPLICATION|16, i, true); return element; } /** * Retrieves the string representation of abandon request. * @return string representation */ public String toString() { return "AbandonRequest {msgid=" + m_msgid + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPModifyResponse.java0000664001003300100330000000542410602743266032721 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modify response. This object * is sent from the ldap server to the interface. *

See RFC 1777. * *

 * ModifyResponse ::= [APPLICATION 7] LDAPResult
 * 
* * @version 1.0 */ public class JDAPModifyResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs modify response. * @param element ber element of bind response */ public JDAPModifyResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "ModifyResponse " + super.getParamString(); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPModifyRDNRequest.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPModifyRDNRequest.jav0000664001003300100330000001202310602743266032747 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modify rdn request. This * object is sent to the ldap server. *
 * ModifyRDNRequest ::= [APPLICATION 12] SEQUENCE {
 *   entry LDAPDN,
 *   newrdn RelativeLDAPDN,
 *   deleteoldrdn BOOLEAN
 * }
 * 
* * Note that LDAPv3 rename this object to JDAPModifyDNRequest * and has the following defintion: *
 * ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
 *   entry LDAPDN,
 *   newrdn RelativeLDAPDN,
 *   deleteoldrdn BOOLEAN,
 *   newSuperior [0] LDAPDN OPTIONAL
 * }
 * 
* * @version 1.0 */ public class JDAPModifyRDNRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_old_dn = null; protected String m_new_rdn = null; protected boolean m_delete_old_dn; protected String m_new_superior; /** * Constructs modify RDN request. * @param old_dn old distinguished name * @param new_dn new distinguished name * @param delete_old_dn delete the old distinguished name */ public JDAPModifyRDNRequest(String old_dn, String new_rdn, boolean delete_old_dn) { m_old_dn = old_dn; m_new_rdn = new_rdn; m_delete_old_dn = delete_old_dn; m_new_superior = null; } /** * Constructs modify DN request. * @param old_dn old distinguished name * @param new_dn new distinguished name * @param delete_old_dn delete the old distinguished name * @param new_superior parent dn */ public JDAPModifyRDNRequest(String old_dn, String new_rdn, boolean delete_old_dn, String new_superior) { m_old_dn = old_dn; m_new_rdn = new_rdn; m_delete_old_dn = delete_old_dn; m_new_superior = new_superior; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_RDN_REQUEST; } /** * Sets the base dn. * @param basedn base dn */ public void setBaseDN(String basedn) { m_old_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_old_dn; } /** * Gets the ber representation of the request. * @return ber representation */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_old_dn)); seq.addElement(new BEROctetString(m_new_rdn)); seq.addElement(new BERBoolean(m_delete_old_dn)); /* LDAPv3 new parent dn feature support */ if (m_new_superior != null) seq.addElement(new BERTag(BERTag.CONTEXT|0, new BEROctetString (m_new_superior), true)); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|12, seq, true); return element; } /** * Gets the string representation of the request. * @return string representation */ public String toString() { return "ModifyRDNRequest {entry=" + m_old_dn + ", newrdn=" + m_new_rdn + ", deleteoldrdn=" + m_delete_old_dn + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPDeleteResponse.java0000664001003300100330000000537510602743266032701 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the delete response. This object * is sent from the ldap server to the interface. *
 * DeleteResponse ::= [APPLICATION 11] LDAPResult
 * 
* * @version 1.0 */ public class JDAPDeleteResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs delete response. * @param element ber element of delete response */ public JDAPDeleteResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.DEL_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "DeleteResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPDeleteRequest.java0000664001003300100330000000705010602743266032523 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the delete request. This object * is sent to the ldap server. *
 * DelRequest ::= [APPLICATION 10] LDAPDN
 * 
* * @version 1.0 */ public class JDAPDeleteRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; /** * Constructs the delete request. * @param dn Distinguished name to delete */ public JDAPDeleteRequest(String dn) { m_dn = dn; } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.DEL_REQUEST; } /** * Sets the base dn. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Gets the ber representation of the delete request. * @return ber representation */ public BERElement getBERElement() { /* Assumed that deleteing "cn=patrick,o=ncware,c=ca" * [*] umich-ldap-v3.3 * 0x4a 0x18 (implicit OctetString) * c n = p a t r i c k , o = n c w a r e , c = c a */ BEROctetString s = new BEROctetString(m_dn); BERTag element = new BERTag(BERTag.APPLICATION|10, s, true); return element; } /** * Retrieves the string representation of the delete request. * @return string representation */ public String toString() { return "DeleteRequest {entry=" + m_dn + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPCompareResponse.java0000664001003300100330000000540710602743266033061 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the compare response. This object * is sent from the ldap server to the interface. *
 * CompareResponse ::= [APPLICATION 15] LDAPResult
 * 
* * @version 1.0 */ public class JDAPCompareResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs compare response. * @param element ber element of delete response */ public JDAPCompareResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.COMPARE_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "CompareResponse " + super.getParamString(); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPSearchResultReference.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPSearchResultReferenc0000664001003300100330000000721210602743266033106 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search result reference. *

See RFC 1777. * *

 * SearchResultReference :: [APPLICATION 19] SEQUENCE OF LDAPURL
 * 
* * @version 1.0 */ public class JDAPSearchResultReference implements JDAPProtocolOp { /** * Internal variables */ protected String m_urls[] = null; protected BERElement m_element = null; /** * Constructs extended response. * @param element ber element of add response */ public JDAPSearchResultReference(BERElement element) throws IOException { m_element = element; BERSequence seq = (BERSequence)((BERTag)element).getValue(); if (seq.size() < 0) return; m_urls = new String[seq.size()]; for (int i=0; i < seq.size(); i++) { BEROctetString o = (BEROctetString)seq.elementAt(i); m_urls[i] = new String(o.getValue(), "UTF8"); } } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.SEARCH_RESULT_REFERENCE; } /** * Retrieves the BER representation of this object. */ public BERElement getBERElement() { return m_element; } /** * Retrieves a list of urls. */ public String[] getUrls() { return m_urls; } /** * Retrieve the string representation. * @return string representation */ public String toString() { String urls = ""; if (m_urls != null) { for (int i = 0; i < m_urls.length; i++) { if (i != 0) urls += ","; urls += m_urls[i]; } } return "SearchResultReference " + urls; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPBindRequest.java0000664001003300100330000001546310602743266032204 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the bind request. This object is * sent to the ldap server. *
 * BindRequest ::= [APPLICATION 0] SEQUENCE {
 *   version INTEGER(1..127) ,
 *   name LDAPDN,
 *   authentication CHOICE {
 *     simple [0] OCTET STRING,
 *     krbv42LDAP [1] OCTET STRING,
 *     krbv42DSA [2] OCTET STRING
 *   }
 * }
 * 
* * Note that LDAPv3 bind reuqest is structured as follows: *
 * BindRequest ::= [APPLICATION 0] SEQUENCE {
 *   version INTEGER (1..127)
 *   name LDAPDN,
 *   authentication AuthenticationChoice
 * }
 * AuthenticationChoice ::= CHOICE {
 *   simple [0] OCTET STRING,
 *          -- 1 and 2 reserved
 *   sasl [3] SaslCredentials
 * }
 * SaslCredentials ::= SEQUENCE {
 *   mechanism LDAPString,
 *   credentials OCTET STRING
 * }
 * 
* * @version 1.0 */ public class JDAPBindRequest implements JDAPProtocolOp { /** * Internal variables */ protected int m_version; protected String m_name = null; protected byte[] m_password = null; protected String m_mechanism = null; /** * Constructs anonymous or simple bind request. * @param version version * @param name distinguished name * @param password password */ public JDAPBindRequest(int version, String name, String password) { m_version = version; m_name = name; try { m_password = password.getBytes("UTF8"); } catch ( UnsupportedEncodingException e ) { } } /** * Constructs anonymous or simple bind request. * @param version version * @param name distinguished name * @param password password */ public JDAPBindRequest(int version, String name, byte[] password) { m_version = version; m_name = name; m_password = password; } /** * Constructs a LDAP v3.0 SaslCredentials bind request. * @param version version * @param name distinguished name * @param mechanism mechanism (must not be null) * @param credentials credientials */ public JDAPBindRequest(int version, String name, String mechanism, byte credentials[]) { m_version = version; m_name = name; m_mechanism = mechanism; m_password = credentials; } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.BIND_REQUEST; } /** * Retrieves the ber representation of the request. * @return ber representation */ public BERElement getBERElement() { /* anonymous bind * [*] umich-ldap-v3.3: * 0x60 0x07 (implicit [Application 0] Sequence) * 0x02 0x01 0x02 (Integer) * 0x04 0x00 (OctetString) * 0x80 0x00 (implicit OctetString) * [*] zoomit server v1.0: * 0x60 0x0b * 0x30 0x09 (sequece) * 0x02 0x01 0x02 * 0x04 0x00 * 0xa0 0x02 (explicit tag) * 0x04 0x00 * simple bind with "cn=root,o=ncware,c=ca", "password" * [*] umich-ldap-v3.3: * 0x60 0x24 ([APPLICATION 0]) * 0x02 0x01 0x02 (version - Integer) * 0x04 0x15 c n = r o o t , o = n c w a r e , * c = c a * 0x80 0x08 p a s s w o r d */ BERSequence seq = new BERSequence(); seq.addElement(new BERInteger(m_version)); seq.addElement(new BEROctetString(m_name)); BERTag auth = null; if (m_mechanism == null) { auth = new BERTag(BERTag.CONTEXT, new BEROctetString(m_password), true); } else { BERSequence sasl = new BERSequence(); sasl.addElement(new BEROctetString(m_mechanism)); if (m_password == null) { sasl.addElement(new BEROctetString((byte[])null)); } else { sasl.addElement(new BEROctetString(m_password, 0, m_password.length)); } auth = new BERTag(BERTag.SASLCONTEXT|3, /* SaslCredentials */ sasl, true); } seq.addElement(auth); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|0, seq, true); return element; } /** * Retrieves the string representation of the request parameters. * @return string representation parameters */ public String getParamString() { return "{version=" + m_version + ", name=" + m_name + ", mechanism=" + m_mechanism + ", authentication=" + ((m_password == null) ? "null" : /*"********"*/new String(m_password)) + "}"; } /** * Retrieves the string representation of the request. * @return string representation */ public String toString() { return "BindRequest " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPCompareRequest.java0000664001003300100330000000725310602743266032714 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the compare request. This object * is sent to the ldap server. *
 *   CompareRequest ::= [APPLICATION 14] SEQUENCE {
 *     entry LDAPDN,
 *     ava AttributeValueAssertion
 *   }
 * 
* * @version 1.0 */ public class JDAPCompareRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_dn = null; protected JDAPAVA m_ava = null; /** * Constructs the compare request. * @param dn distinguished name of the entry to be compared * @param ava attribut value assertion */ public JDAPCompareRequest(String dn, JDAPAVA ava) { m_dn = dn; m_ava = ava; } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.COMPARE_REQUEST; } /** * Sets the base dn. * @param basedn base dn */ public void setBaseDN(String basedn) { m_dn = basedn; } /** * Gets the base dn. * @return base dn */ public String getBaseDN() { return m_dn; } /** * Retrieves the ber representation of the request. * @return ber request */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_dn)); seq.addElement(m_ava.getBERElement()); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|14, seq, true); return element; } /** * Retrieves the string representation of the request. * @return string representation */ public String toString() { return "CompareRequest {entry=" + m_dn + ", ava=" + m_ava.toString() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPExtendedRequest.java0000664001003300100330000000772510602743266033072 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the ExtendedRequest request. This object * is sent to the ldap server and is a v3 request. *

See RFC 1777. * *

 * ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
 *   requestName  [0] LDAPOID,
 *   requestValue [1] OCTET STRING OPTIONAL
 * }
 * 
* * @version 1.0 */ public class JDAPExtendedRequest implements JDAPProtocolOp { /** * Internal variables */ protected String m_oid = null; protected byte m_value[] = null; /** * Constructs extended request. * @param oid object identifier * @param value request value */ public JDAPExtendedRequest(String oid, byte value[]) { m_oid = oid; m_value = value; } /** * Retrieves protocol operation type. * @return protcol type */ public int getType() { return JDAPProtocolOp.EXTENDED_REQUEST; } /** * Gets the ber representation of extended request. * @return ber representation of request */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BERTag(BERTag.CONTEXT|0, new BEROctetString (m_oid), true)); if (m_value != null) { seq.addElement(new BERTag(BERTag.CONTEXT|1, new BEROctetString (m_value, 0, m_value.length), true)); } BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|23, seq, true); return element; } /** * Retrieves the string representation of add request parameters. * @return string representation of add request parameters */ public String getParamString() { String s = ""; if (m_value != null) { try{ s = new String(m_value, "UTF8"); } catch(Throwable x) {} } return "{OID='" + m_oid + "', value='" + s + "'}"; } /** * Retrieves the string representation of add request. * @return string representation of add request */ public String toString() { return "ExtendedRequest " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPAddResponse.java0000664001003300100330000000537610602743266032170 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the add response. This object * is sent from the ldap server to the interface. *

See RFC 1777. * *

 * AddResponse ::= [APPLICATION 9] LDAPResult
 * 
* * @version 1.0 */ public class JDAPAddResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs add response. * @param element ber element of add response */ public JDAPAddResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.ADD_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "AddResponse " + super.getParamString(); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPExtendedResponse.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPExtendedResponse.jav0000664001003300100330000001046110602743266033066 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the extended response. This object * is sent from the ldap server to the interface and is * a v3 response. *

See RFC 1777. * *

 * ExtendedResponse :: [APPLICATION 23] SEQUENCE {
 *   COMPONENTS OF LDAPResult,
 *   responseName [10] LDAPOID OPTIONAL,
 *   response     [11] OCTET STRING OPTIONAL
 * }
 * 
* * @version 1.0 */ public class JDAPExtendedResponse extends JDAPResult implements JDAPProtocolOp { /** * Internal variables */ protected String m_oid = null; protected byte[] m_value = null; /** * Constructs extended response. * @param element ber element of add response */ public JDAPExtendedResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); BERSequence seq = (BERSequence)((BERTag)element).getValue(); for (int i = 0; i < seq.size(); i++) { try { BERElement el = seq.elementAt(i); if (el.getType() != BERElement.TAG) continue; BERTag t = (BERTag)el; switch (t.getTag()&0x0f) { case 10: BEROctetString oid = (BEROctetString)t.getValue(); try{ m_oid = new String(oid.getValue(), "UTF8"); } catch(Throwable x) {} break; case 11: BEROctetString value = (BEROctetString)t.getValue(); m_value = value.getValue(); break; } } catch (ClassCastException e) { } } } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.EXTENDED_RESPONSE; } /** * Retrieves the results of the extended operation. * @return extended operation results as byte array */ public byte[] getValue() { return m_value; } /** * Retrieves the oid of the extended operation. * @return extended operation oid. */ public String getID() { return m_oid; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "ExtendedResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPProtocolOp.java0000664001003300100330000000717010602743266032053 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This is the base interface for all protocol operation * that is embedded in a JDAPMessage (LDAP Message in RCF1777). * Each protocol operation must implement this interface. *

See RFC 1777. * * @version 1.0 */ public interface JDAPProtocolOp { /** * Protocol operation types */ public final static int BIND_REQUEST = 0; public final static int BIND_RESPONSE = 1; public final static int UNBIND_REQUEST = 2; public final static int SEARCH_REQUEST = 3; public final static int SEARCH_RESPONSE = 4; public final static int SEARCH_RESULT = 5; public final static int MODIFY_REQUEST = 6; public final static int MODIFY_RESPONSE = 7; public final static int ADD_REQUEST = 8; public final static int ADD_RESPONSE = 9; public final static int DEL_REQUEST = 10; public final static int DEL_RESPONSE = 11; public final static int MODIFY_RDN_REQUEST = 12; public final static int MODIFY_RDN_RESPONSE = 13; public final static int COMPARE_REQUEST = 14; public final static int COMPARE_RESPONSE = 15; public final static int ABANDON_REQUEST = 16; public final static int SEARCH_RESULT_REFERENCE = 19; public final static int EXTENDED_REQUEST = 23; public final static int EXTENDED_RESPONSE = 24; /** * Retrieves the protocol operation type. * @return protocol type */ public int getType(); /** * Retrieves the ber representation of the operation. * @return ber representation */ public BERElement getBERElement(); /** * Retrieves the string representation of the operation. * @return string representation */ public String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPSearchRequest.java0000664001003300100330000002046410602743266032532 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the search request. This object is * sent to the ldap server. *

 * SearchRequest ::= [APPLICATION 3] SEQUENCE {
 *   baseObject LDAPDN,
 *   scope ENUMERATED {
 *     baseObject (0),
 *     singleLevel (1),
 *     wholeSubtree (2)
 *   },
 *   derefAliases ENUMERATED {
 *     neverDerefAliases (0),
 *     derefInSearching (1),
 *     DerefFindingBaseObj (2),
 *     DerefAlways (3)
 *   },
 *   sizeLimit INTEGER(0..maxInt),
 *   timeLimit INTEGER(0..maxInt),
 *   attrsOnly BOOLEAN,
 *   filter Filter,
 *   attributes SEQUENCE OF AttributeType
 * }
 * 
* * @version 1.0 */ public class JDAPSearchRequest extends JDAPBaseDNRequest implements JDAPProtocolOp { /** * search scope */ public final static int BASE_OBJECT = 0; public final static int SINGLE_LEVEL = 1; public final static int WHOLE_SUBTREE = 2; /** * alias dereference */ public final static int NEVER_DEREF_ALIASES = 0; public final static int DEREF_IN_SEARCHING = 1; public final static int DEREF_FINDING_BASE_OBJ = 2; public final static int DEREF_ALWAYS = 3; public final static String DEFAULT_FILTER = "(objectclass=*)"; /** * Private variables */ protected String m_base_dn = null; protected int m_scope; protected int m_deref; protected int m_size_limit; protected int m_time_limit; protected boolean m_attrs_only; protected String m_filter = null; protected JDAPFilter m_parsedFilter = null; protected String m_attrs[] = null; /** * Constructs search request. * @param base_dn base object entry relative to the search * @param scope scope of the search * @param deref how alias objects should be handled * @param size_limit maximum number of entries * @param time_limit maximum time (in time) allowed * @param attrs_only should return type only * @param filter string filter based on RFC1558 * @param attrs list of attribute types * @exception IllegalArgumentException if the filter has bad syntax * */ public JDAPSearchRequest(String base_dn, int scope, int deref, int size_limit, int time_limit, boolean attrs_only, String filter, String attrs[]) throws IllegalArgumentException { m_base_dn = base_dn; m_scope = scope; m_deref = deref; m_size_limit = size_limit; m_time_limit = time_limit; m_attrs_only = attrs_only; m_filter = (filter == null) ? DEFAULT_FILTER : filter; m_parsedFilter = JDAPFilter.getFilter( JDAPFilterOpers.convertLDAPv2Escape(m_filter)); if (m_parsedFilter == null){ throw new IllegalArgumentException("Bad search filter"); } m_attrs = attrs; } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.SEARCH_REQUEST; } /** * Sets the base dn component. * @param basedn base dn */ public void setBaseDN(String basedn) { m_base_dn = basedn; } /** * Gets the base dn component. * @return base dn */ public String getBaseDN() { return m_base_dn; } /** * Gets the ber representation of search request. * @return ber representation of request. */ public BERElement getBERElement() { /* Assumed that searching with the following criteria: * base object = "c=ca" * filter = FilterPresent(objectClass) * [*] zoomit server v1.0 (search on c=ca) * 0x63 0x81 0x8d ([APPLICATION 3]) * 0x30 0x81 0x8a 0x04 0x00 (seq of) * 0x0a 0x01 0x02 * 0x0a 0x01 0x00 * 0x02 0x01 0x65 * 0x02 0x01 0x1e * 0x01 0x01 0x00 * 0xa0 0x3b * 0x30 0x39 0xa5 0x0d * 0x30 0x0b 0x04 0x07 P A G E _ D N * 0x04 0x00 * 0xa3 0x0e * 0x30 0x0c 0x04 0x08 P A G E _ K E Y * 0x04 0x00 0xa3 0x18 * 0x30 0x16 0x04 0x0e z c A n y A t t r i b u t e * 0x04 0x04 c = c a * 0x30 0x3a 0x04 0x0b O b j e c t C l a s s * 0x04 0x11 a l i a s e d O b j e c t N a m e * 0x04 0x07 d s e T y p e * 0x04 0x0f t e l e p h o n e N u m b e r * [*] umich-ldap-v3.3: * 0x63 0x24 ([APPLICATION 3]) * 0x04 0x04 c = c a (base object - OctetString) * 0x0a 0x01 0x00 (scope - Enumerated) * 0x0a 0x01 0x00 (derefAlias - Enumerated) * 0x02 0x01 0x00 (size limit - Integer) * 0x02 0x01 0x00 (time limit - Integer) * 0x01 0x01 0x00 (attr only - Boolean) * 0x87 0x0b o b j e c t C l a s s (filter) * 0x30 0x00 (attrs - Sequence of OctetString) */ BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_base_dn)); seq.addElement(new BEREnumerated(m_scope)); seq.addElement(new BEREnumerated(m_deref)); seq.addElement(new BERInteger(m_size_limit)); seq.addElement(new BERInteger(m_time_limit)); seq.addElement(new BERBoolean(m_attrs_only)); seq.addElement(m_parsedFilter.getBERElement()); BERSequence attr_type_list = new BERSequence(); if (m_attrs != null) { for (int i = 0; i < m_attrs.length; i++) { attr_type_list.addElement(new BEROctetString(m_attrs[i])); } } seq.addElement(attr_type_list); BERTag element = new BERTag(BERTag.APPLICATION|BERTag.CONSTRUCTED|3, seq, true); return element; } /** * Retrieves the string representation of the request. * @return string representation */ public String toString() { String s = null; if (m_attrs != null) { s = ""; for (int i = 0; i < m_attrs.length; i++) { if (i != 0) s = s + "+"; s = s + m_attrs[i]; } } return "SearchRequest {baseObject=" + m_base_dn + ", scope=" + m_scope + ", derefAliases=" + m_deref + ",sizeLimit=" + m_size_limit + ", timeLimit=" + m_time_limit + ", attrsOnly=" + m_attrs_only + ", filter=" + m_filter + ", attributes=" + s + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPUnbindRequest.java0000664001003300100330000000610710602743266032542 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the unbind request and is a protocol operation. * A protocol operation is embedded within JDAPMessage which is sent * between client and server. This object is sent to the ldap server. *
 * UnbindRequest ::= [APPLICATION 2] NULL
 * 
* * @version 1.0 */ public class JDAPUnbindRequest implements JDAPProtocolOp { /** * Constructs bind request. */ public JDAPUnbindRequest() { } /** * Retrieves the protocol operation type. * @return operation type */ public int getType() { return JDAPProtocolOp.UNBIND_REQUEST; } /** * Gets the ber representation of the unbind rquest. * @return ber representation */ public BERElement getBERElement() { /* * [*] umich-ldap-v3.3: * 0x42 0x00 * [*] umich-ldap-v3.0: */ BERNull n = new BERNull(); BERTag element = new BERTag(BERTag.APPLICATION|2, n, true); return element; } /** * Retrieves the string representation of unbind operation. * @return string representation */ public String toString() { return "UnbindRequest {}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPResult.java0000664001003300100330000002472310602743266031234 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the ldap result where stores * the request status. It is the base class for all * the response except search response. This object is * sent from the server to the client interface. *
 * LDAPResult ::= SEQUENCE {
 *   resultCode ENUMERATED {
 *     success (0),
 *     ...
 *   },
 *   matchedDN LDAPDN,
 *   errorMessage LDAPString
 * }
 * 
* * Note that LDAPv3 supports referral within the LDAP * Result. The added component is: * *
 * LDAPResult ::= SEQUENCE {
 *   ...
 *   errorMessage LDAPString,
 *   referral [3] Referral OPTIONAL
 * }
 * 
* */ public class JDAPResult { /** * Result code based on RFC1777 */ public final static int SUCCESS = 0; public final static int OPERATION_ERROR = 1; public final static int PROTOCOL_ERROR = 2; public final static int TIME_LIMIT_EXCEEDED = 3; public final static int SIZE_LIMIT_EXCEEDED = 4; public final static int COMPARE_FALSE = 5; public final static int COMPARE_TRUE = 6; public final static int AUTH_METHOD_NOT_SUPPORTED = 7; public final static int STRONG_AUTH_REQUIRED = 8; /* Referrals Within the LDAPv2 Protocol */ public final static int LDAP_PARTIAL_RESULTS = 9; /* Added for LDAPv3 - BEGIN */ public final static int REFERRAL = 10; public final static int ADMIN_LIMIT_EXCEEDED = 11; public final static int UNAVAILABLE_CRITICAL_EXTENSION = 12; public final static int CONFIDENTIALITY_REQUIRED = 13; public final static int SASL_BIND_IN_PROGRESS = 14; /* Added for LDAPv3 - END */ public final static int NO_SUCH_ATTRIBUTE = 16; public final static int UNDEFINED_ATTRIBUTE_TYPE = 17; public final static int INAPPROPRIATE_MATCHING = 18; public final static int CONSTRAINT_VIOLATION = 19; public final static int ATTRIBUTE_OR_VALUE_EXISTS = 20; public final static int INVALID_ATTRIBUTE_SYNTAX = 21; public final static int NO_SUCH_OBJECT = 32; public final static int ALIAS_PROBLEM = 33; public final static int INVALID_DN_SYNTAX = 34; public final static int IS_LEAF = 35; public final static int ALIAS_DEREFERENCING_PROBLEM = 36; public final static int INAPPROPRIATE_AUTHENTICATION = 48; public final static int INVALID_CREDENTIALS = 49; public final static int INSUFFICIENT_ACCESS_RIGHTS = 50; public final static int BUSY = 51; public final static int UNAVAILABLE = 52; public final static int UNWILLING_TO_PERFORM = 53; public final static int LOOP_DETECT = 54; public final static int NAMING_VIOLATION = 64; public final static int OBJECT_CLASS_VIOLATION = 65; public final static int NOT_ALLOWED_ON_NONLEAF = 66; public final static int NOT_ALLOWED_ON_RDN = 67; public final static int ENTRY_ALREADY_EXISTS = 68; public final static int OBJECT_CLASS_MODS_PROHIBITED = 69; public final static int AFFECTS_MULTIPLE_DSAS = 71; public final static int OTHER = 80; public final static int SERVER_DOWN = 81; public final static int PARAM_ERROR = 89; public final static int CONNECT_ERROR = 91; public final static int LDAP_NOT_SUPPORTED = 92; public final static int CONTROL_NOT_FOUND = 93; public final static int NO_RESULTS_RETURNED = 94; public final static int MORE_RESULTS_TO_RETURN = 95; public final static int CLIENT_LOOP = 96; public final static int REFERRAL_LIMIT_EXCEEDED = 97; /** * Private variable */ protected BERElement m_element = null; protected int m_result_code; protected String m_matched_dn = null; protected String m_error_message = null; protected String m_referrals[] = null; /** * Constructs ldap result. * @param element ber element */ public JDAPResult(BERElement element) throws IOException { /* Result from a successful bind request. * [*] umich-ldap-v3.3 * 0x0a 0x07 (implicit [APPLICATION 1] OctetString) * 0x0a 0x01 0x00 (result code) * 0x04 0x00 (matched dn) * 0x04 0x00 (error message) * Referrals in ldap-v2.0 * [*] umich-ldap-v3.3 * 0x65 0x2a * 0x0a 0x01 0x09 * 0x04 0x00 * 0x04 0x23 R e f e r r a l : 0x0a * l d a p : / / l d a p . * i t d . u m i c h . e d u */ m_element = element; BERSequence seq = (BERSequence)element; /* * Possible return from [x500.arc.nasa.gov]: * SEQUENCE {SEQUENCE {Enumerated{2} ... }} */ BERElement e = seq.elementAt(0); if (e.getType() == BERElement.SEQUENCE) seq = (BERSequence)e; m_result_code = ((BEREnumerated)seq.elementAt(0)).getValue(); byte buf[] = null; buf = ((BEROctetString)seq.elementAt(1)).getValue(); if (buf == null) m_matched_dn = null; else { try{ m_matched_dn = new String(buf, "UTF8"); } catch(Throwable x) {} } buf = ((BEROctetString)seq.elementAt(2)).getValue(); if (buf == null) m_error_message = null; else { try { m_error_message = new String(buf, "UTF8"); } catch(Throwable x) {} } /* 12/05/97 extract LDAPv3 referrals */ if (seq.size() >= 4) { BERTag t = (BERTag)seq.elementAt(3); BERElement v = t.getValue(); if (v.getType() == BERElement.INTEGER) { /* MS - [CONTEXT-5] Integer {3} */ /* TBD */ // else if this element is BERSequence which contains referral information } else if (v instanceof BERSequence) { /* Netscape */ BERSequence rseq = (BERSequence)v; if (rseq.size() > 0) { m_referrals = new String[rseq.size()]; for (int i = 0; i < rseq.size(); i++) { try{ m_referrals[i] = new String(((BEROctetString)rseq.elementAt(i)).getValue(), "UTF8"); } catch(Throwable x) {} } } } } } /** * Gets the result code. * @return result code */ public int getResultCode() { return m_result_code; } /** * Gets the matched dn. * @return matched dn */ public String getMatchedDN() { return m_matched_dn; } /** * Gets the error message. * @return error message */ public String getErrorMessage() { return m_error_message; } /** * Retrieves referrals from the LDAP Result. * @return list of referrals in URL format */ public String[] getReferrals() { return m_referrals; } /** * Retrieves the ber representation of the result. * @return ber representation of the result */ public BERElement getBERElement() { return m_element; } /** * Retrieves string representation of the result. Usually, * the inherited class calls this to retrieve the parameter * string. * @return string representation */ public String getParamString() { StringBuffer sb = new StringBuffer("{resultCode="); sb.append(m_result_code); if (m_matched_dn != null) { sb.append(", matchedDN="); sb.append(m_matched_dn); } if (m_error_message != null) { sb.append(", errorMessage="); sb.append(m_error_message); } if (m_referrals != null && m_referrals.length > 0) { sb.append(", referrals="); for (int i=0; i < m_referrals.length; i++) { sb.append((i==0 ? "" : " ")); sb.append(m_referrals[i]); } } sb.append("}"); return sb.toString(); } /** * Retrieves string representation of the result. * @return string representation */ public String toString() { return "Result " + getParamString(); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPModifyRDNResponse.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/opers/JDAPModifyRDNResponse.ja0000664001003300100330000000543610602743266032741 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client.opers; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * This class implements the modifyRDN response. This object * is sent from the ldap server to the interface. *
 * ModifyRDNResponse ::= [APPLICATION 13] LDAPResult
 * 
* * @version 1.0 */ public class JDAPModifyRDNResponse extends JDAPResult implements JDAPProtocolOp { /** * Constructs modifyRDN response. * @param element ber element of modifyRDN response */ public JDAPModifyRDNResponse(BERElement element) throws IOException { super(((BERTag)element).getValue()); } /** * Retrieves the protocol operation type. * @return protocol type */ public int getType() { return JDAPProtocolOp.MODIFY_RDN_RESPONSE; } /** * Retrieve the string representation. * @return string representation */ public String toString() { return "ModifyRDNResponse " + super.getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterExtensible.java0000664001003300100330000001201210602743266032062 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import org.ietf.ldap.ber.stream.*; import java.io.*; /** * This class implements the extended match filter. *
 * extensibleMatch [9] AttributeValueAssertion
 * 
* * @version 1.0 */ public class JDAPFilterExtensible extends JDAPFilter { /** * Constructs extensible match filter. * @param match Matching rule assertion */ public JDAPFilterExtensible(String type, String match) { m_tag = BERTag.CONSTRUCTED|BERTag.CONTEXT|9; m_type = type; m_value = match; } /** * Gets ber representation of the filter. *
     * Extended filter:   [type] [':dn'][':'oid]':='value
     *
     * BER:   extensibleMatch    [9] MatchingRuleAssertion
     *        MatchingRuleAssertion ::= SEQUENCE {
     *             matchingRule    [1] MatchingRuleID OPTIONAL,
     *             type            [2] AttributeDescription OPTIONAL,
     *             matchValue      [3] AssertionValue,
     *             dnAttributes    [4] BOOLEAN DEFAULT FALSE
     *        }
     * 
* @return ber representation */ public BERElement getBERElement() { String value = m_value; String defs = m_type; /* Need either ':dn' or ':'oid */ int colonIndex = defs.lastIndexOf(':'); if ( colonIndex == -1 ) { return null; } /* Is it dn or oid? */ boolean isDN = false; String oid = null; if ( defs.regionMatches( true, colonIndex+1, "dn", 0, 2 ) ) isDN = true; else oid = defs.substring( colonIndex+1 ); /* Any more? */ defs = defs.substring( 0, colonIndex ); colonIndex = defs.lastIndexOf(':'); if ( colonIndex >= 0 ) { /* Is it dn or oid? */ if ( defs.regionMatches( true, colonIndex+1, "dn", 0, 2 ) ) isDN = true; else oid = defs.substring( colonIndex+1 ); } BERSequence seq = new BERSequence(); BERTag tag; /* Was there an oid? */ if ( oid != null ) { tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_OID, new BEROctetString(oid), true ); seq.addElement( tag ); } /* Was there an attribute description? */ if ( defs.length() > 0 ) { tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_TYPE, new BEROctetString(defs), true ); seq.addElement( tag ); } /* Got to have a value */ tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_VALUE, new BEROctetString(value), true ); seq.addElement( tag ); /* Was ':dn' specified? */ tag = new BERTag( BERTag.CONTEXT|BERTag.MRA_DNATTRS, new BERBoolean(isDN), true ); seq.addElement( tag ); BERTag element = new BERTag( m_tag, seq, true ); return element; } /** * Retrieves the string representation of the filter. * @return string representation */ public String toString() { return "JDAPFilterExtensible {" + m_value + "}"; } private int m_tag; private String m_type = null; private String m_value = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPAVA.java0000664001003300100330000000664610602743266027241 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.*; import java.io.*; import org.ietf.ldap.ber.stream.*; /** * This class implements the attribute value assertion. * This object is used with filters. *
 * AttributeValueAssertion ::= SEQUENCE {
 *   attributType AttributeType,
 *   attributValue AttributeValue
 * }
 * 
* * @version 1.0 */ public class JDAPAVA { /** * Internal variables */ protected String m_type = null; protected String m_val = null; /** * Constructs the attribute value assertion. * @param type attribute type * @param val attribute value */ public JDAPAVA(String type, String val) { m_type = type; m_val = val; } /** * Retrieves the AVA type. * @return AVA type */ public String getType() { return m_type; } /** * Retrieves the AVA value. * @return AVA value */ public String getValue() { return m_val; } /** * Retrieves the ber representation. * @return ber representation */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString(m_type)); seq.addElement(JDAPFilterOpers.getOctetString(m_val)); return seq; } /** * Retrieves the string representation parameters. * @return string representation parameters */ public String getParamString() { return "{type=" + m_type + ", value=" + m_val + "}"; } /** * Retrieves the string representation. * @return string representation */ public String toString() { return "JDAPAVA " + getParamString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/client/JDAPFilterOpers.java0000664001003300100330000001527410602743266031065 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.client; import java.util.Vector; import java.io.*; import org.ietf.ldap.ber.stream.*; /** * This class provides miscellaneous operations for JDAPFilter object. * It converts string with escape characters to the byte array. It also * returns the ber octet string for the specified string with escape * characters. */ public class JDAPFilterOpers { private static final String escapeKey = "\\"; private static final boolean m_debug = false; /** * Returns the octetString for the given string * @return The octetString for the given string */ static BEROctetString getOctetString(String str) { if (str.indexOf(escapeKey) >= 0) { byte[] byteVal = JDAPFilterOpers.getByteValues(str); return new BEROctetString(byteVal); } else return new BEROctetString(str); } /** * Preprocess the LDAPv2 RFC1960 style filter escape sequences (precede * a character with a a backslash) and convert them into the * LDAPv3 style RFC2254 escape sequences (encode a character as a backslash * followed by the two hex digits representing the character ASCII value). * * LDAPv3 style unescaping is done from the getByteValues()method. We must * process LDAPv2 escaped characters earlier to get rid of possible "\(" \)" * sequences which would make filter parsing in the JDAPFilter operate incorrectly. */ public static String convertLDAPv2Escape(String filter) { if (filter.indexOf('\\') < 0) { return filter; } StringBuffer sb = new StringBuffer(); int i=0, start=0, len=filter.length(); while(start < len && (i = filter.indexOf('\\', start)) >= 0 ) { sb.append(filter.substring(start, i+1)); // include also '\' try { char c = filter.charAt(i+1); if ((c >= ' ' && c < 127) && !isHexDigit(c)) { sb.append(Integer.toHexString(c)); } else { sb.append(c); } start = i + 2; } catch (IndexOutOfBoundsException e) { throw new IllegalArgumentException("Bad search filter"); } } if (start < len) { sb.append(filter.substring(start)); } return sb.toString(); } private static boolean isHexDigit(char c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } /** * This method converts the given string into bytes. It also handles * the escape characters embedded in the given string. * @param str The given string being converted into a byte array * @return A byte array */ static byte[] getByteValues(String str) { int pos = 0; Vector v = new Vector(); String val = new String(str); int totalSize = 0; // check if any escape character in the string while ((pos = val.indexOf(escapeKey)) >= 0) { String s1 = val.substring(0, pos); try { byte[] b = s1.getBytes("UTF8"); totalSize += b.length; v.addElement(b); } catch (UnsupportedEncodingException e) { printDebug(e.toString()); return null; } Integer num = null; // decode this number to integer, exception thrown when this is not the // hex try { String hex = "0x"+val.substring(pos+1, pos+3); num = Integer.decode(hex); } catch (IndexOutOfBoundsException e) { printDebug(e.toString()); throw new IllegalArgumentException("Bad search filter"); } catch (NumberFormatException e) { printDebug(e.toString()); throw new IllegalArgumentException("Bad search filter"); } byte[] b = {(byte)num.intValue()}; totalSize += b.length; v.addElement(b); // skip an escape and two chars after escape val = val.substring(pos+3); } if (val.length() > 0) { try { byte[] b = val.getBytes("UTF8"); totalSize += b.length; v.addElement(b); } catch (UnsupportedEncodingException e) { printDebug(e.toString()); return null; } } byte[] result = new byte[totalSize]; pos = 0; for (int i=0; iRFC 2252, Lightweight Directory Access Protocol (v3): * LDAP Subschema Attribute covers the types of information * to specify when defining a syntax. * The description of a syntax can include the following: *

* *

    *
  • an OID identifying the syntax *
  • a description of the attribute type *
*

* * When you construct an LDAPSyntaxSchema object, you can * specify these types of information as arguments to the constructor or * in the ldapSyntaxes format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* RFC 2252 defines SyntaxDescription as follows: *

*

 *     SyntaxDescription = "(" whsp
 *        numericoid whsp
 *        [ "DESC" qdstring ]
 *        whsp ")"
 * 
*

* Syntax definitions do not have a name, so the getName * method inherited from LDAPSchemaElement returns "". * To get the OID and description of this syntax type * definition, use the getOID and * getDescription methods inherited from the abstract class * LDAPSchemaElement. *

* * To add or remove this syntax type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. * * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPSyntaxSchema extends LDAPSchemaElement { static final long serialVersionUID = 3590667117475688132L; /** * Constructs a blank element. */ protected LDAPSyntaxSchema() { super(); } /** * Constructs a syntax type definition, using the specified * information. * @param oid object identifier (OID) of the syntax type * in dotted-string format (for example, "1.2.3.4") * @param description description of syntax type */ public LDAPSyntaxSchema( String oid, String description ) { super( new String[] { "" }, oid, description ); attrName = "ldapSyntaxes"; syntaxElement.syntax = syntaxElement.syntaxCheck( oid ); syntaxElement.syntaxString = oid; } /** * Constructs a syntax type definition based on a description in * the ldapSyntaxes format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * LDAP Subschema Attribute. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the syntaxs "objectclasses" and "ldapSyntaxes". The * values of "ldapSyntaxes" are syntax type descriptions * in this format.) *

* * @param raw definition of the syntax type in the * ldapSyntaxes format */ public LDAPSyntaxSchema( String raw ) { attrName = "ldapSyntaxes"; parseValue( raw ); } /** * Gets the syntax of the schema element * @return one of the following values: *

    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
  • unknown (not a known syntax) *
*/ public int getSyntax() { return syntaxElement.syntax; } /** * Gets the syntax of the syntax type in dotted-decimal format, * for example "1.2.3.4.5" * @return The syntax syntax in dotted-decimal format. */ public String getSyntaxString() { return syntaxElement.syntaxString; } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "ldapsyntaxes"; } /** * Prepares a value in RFC 2252 format for submission to a server * * @return a String ready for submission to an LDAP server. */ String getValue() { String s = getValuePrefix(); String val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the syntax in Directory format * * @return definition of the syntax in Directory format */ public String toString() { return getValue(); } protected LDAPSyntaxSchemaElement syntaxElement = new LDAPSyntaxSchemaElement(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPMessageQueueImpl.java0000664001003300100330000005376110602743265030570 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.ArrayList; /** * A queue of response messsages from the server. Multiple requests * can be multiplexed on the same queue. For synchronous LDAPConnection * requests, there will be only one request per queue. For asynchronous * LDAPConnection requests, the user can add multiple request to the * same queue. * * Used as a delegate by LDAResponseListener and LDAPSearchListener * */ class LDAPMessageQueueImpl implements Serializable, LDAPMessageQueue { static final long serialVersionUID = -7163312406176592277L; /** * Request entry encapsulates request parameters */ private static class RequestEntry { int id; LDAPConnection connection; LDAPConnThread connThread; long timeToComplete; RequestEntry( int id, LDAPConnection connection, LDAPConnThread connThread, int timeLimit ) { this.id = id; this.connection = connection; this.connThread = connThread; this.timeToComplete = (timeLimit == 0) ? Long.MAX_VALUE : (System.currentTimeMillis() + timeLimit); } } /** * Internal variables */ protected /*LDAPMessage */ ArrayList _messageQueue = new ArrayList(1); private /*RequestEntry*/ ArrayList _requestList = new ArrayList(1); private LDAPException _exception; /* For network errors */ private boolean _asynchOp; // A flag to indicate if there are time constrained requests private boolean _timeConstrained; /** * Constructor * * @param asynchOp true if the object is used * for asynchronous LDAP operations * @see org.ietf.ldap.LDAPAsynchronousConnection */ LDAPMessageQueueImpl( boolean asynchOp ) { _asynchOp = asynchOp; } /** * Returns the count of queued messages * * @return message count */ public int getMessageCount() { return _messageQueue.size(); } /** * Returns a list of message IDs for all outstanding requests * * @return message ID array */ synchronized public int[] getMessageIDs() { int[] ids = new int[_requestList.size()]; for ( int i = 0; i < ids.length; i++ ) { RequestEntry entry = (RequestEntry)_requestList.get(i); ids[i] = entry.id; } return ids; } /** * Blocks until a message is available or until all operations * associated with the object have completed or been canceled * * @return LDAP message or null if there are no more outstanding requests * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ public synchronized LDAPMessage getResponse() throws LDAPException { while( true ) { if ( !waitForSomething() ) { return null; // No outstanding requests } // Dequeue the first entry LDAPMessage msg = (LDAPMessage)_messageQueue.get( 0 ); _messageQueue.remove( 0 ); // Has the operation completed? if ( msg instanceof LDAPResponse ) { removeRequest( msg.getMessageID() ); } return msg; } } /** * Blocks until a message is available for a particular message ID, or * until all operations associated with the message ID have completed or * been canceled, and returns the response. If there is no outstanding * operation for the message ID (or if it is zero or a negative number), * IllegalArgumentException is thrown. * * @param msgid A particular message to query for responses available * @return a response for an LDAP operation or null if there are no * more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ public synchronized LDAPMessage getResponse( int msgid ) throws LDAPException { if ( !isValidMessageID( msgid ) ) { throw new IllegalArgumentException( "Invalid msg ID: " + msgid ); } LDAPMessage msg = null; while( ( _requestList.size() != 0 ) && ( _exception == null ) && ( (msg = getMessageForID( msgid, true )) == null ) ) { waitForMessage(); } // Network exception occurred? if ( _exception != null ) { LDAPException ex = _exception; _exception = null; throw ex; } // Are there any outstanding requests left? if ( _requestList.size() == 0 ) { return null; // No outstanding requests } // Has the operation completed? if ( msg instanceof LDAPResponse ) { removeRequest( msg.getMessageID() ); } return msg; } /** * Checks if a response message has been received * * @return true or false */ public boolean isResponseReceived() { return ( _messageQueue.size() != 0 ); } /** * Reports true if a response has been received from the server for a * particular message ID. If there is no outstanding operation for the * message ID (or if it is zero or a negative number), * IllegalArgumentException is thrown. * * @param msgid A particular message to query for responses available * @return a flag indicating whether the response message queue is empty */ public boolean isResponseReceived( int msgid ) { if ( !isValidMessageID( msgid ) ) { throw new IllegalArgumentException( "Invalid msg ID: " + msgid ); } return ( getMessageForID( msgid, false ) != null ); } /** * Merge two message queues. * Move/append the content from another message queue to this one. * * To be used for synchronization of asynchronous LDAP operations where * requests are sent by one thread but processed by another one * * A client may be implemented in such a way that one thread makes LDAP * requests and calls l.getMessageIDs(), while another thread is * responsible for * processing of responses (call l.getResponse()). Both threads are using * the same listener objects. In such a case, a race * condition may occur, where a LDAP response message is retrieved and * the request terminated (request ID removed) before the first thread * has a chance to execute l.getMessageIDs(). * The proper way to handle this scenario is to create a separate listener * for each new request, and after l.getMessageIDs() has been invoked, * merge the * new request with the existing one. * @param mq2 message queue to merge with this one */ public void merge( LDAPMessageQueue mq2 ) { // Yield just in case the LDAPConnThread is in the process of // dispatching a message Thread.yield(); synchronized( this ) { LDAPMessageQueueImpl mq = (LDAPMessageQueueImpl)mq2; synchronized( mq ) { ArrayList queue2 = mq.getAllMessages(); for( int i = 0; i < queue2.size(); i++ ) { _messageQueue.add( queue2.get( i ) ); } if ( mq.getException() != null ) { _exception = mq.getException(); } ArrayList list2 = mq.getAllRequests(); for( int i = 0; i < list2.size(); i++ ) { RequestEntry entry = (RequestEntry)list2.get( i ); _requestList.add( entry ); // Notify LDAPConnThread to redirect mq2 designated // responses to this mq entry.connThread.changeQueue( entry.id, this ); } mq.reset(); notifyAll(); // notify for mq2 } notifyAll(); // notify this mq } } /** * Gets String representation of the object * * @return String representation of the object */ synchronized public String toString() { StringBuffer sb = new StringBuffer( "LDAPMessageQueueImpl:" ); sb.append(" requestIDs={"); for ( int i = 0; i < _requestList.size(); i++ ) { if ( i > 0 ) { sb.append( "," ); } sb.append( ((RequestEntry)_requestList.get(i)).id ); } sb.append( "} messageCount=" + _messageQueue.size() ); return sb.toString(); } /** * Retrieves the next response for a particular message ID, or null * if there is none * * @param msgid A particular message to query for responses available * @param remove true if the retrieved message is to be * removed from the queue * @return a flag indicating whether the response message queue is empty */ synchronized LDAPMessage getMessageForID( int msgid, boolean remove ) { LDAPMessage msg = null; for ( int i = 0; i < _messageQueue.size(); i++ ) { msg = (LDAPMessage)_messageQueue.get(i); if ( msg.getMessageID() == msgid ) { if ( remove ) { _messageQueue.remove( i ); } break; } } return msg; } /** * Reports if the listener is used for asynchronous LDAP * operations * * @return asynchronous operation flag. * @see org.ietf.ldap.LDAPAsynchronousConnection */ boolean isAsynchOp() { return _asynchOp; } /** * Waits for request to complete. This method blocks until a message of * type LDAPResponse has been received. Used by synchronous search * with batch size of zero (block until all results are received). * * @return LDAPResponse message or null if there are no more outstanding * requests * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ synchronized LDAPResponse completeRequest() throws LDAPException { while ( true ) { if ( !waitForSomething() ) { return null; // No outstanding requests } // Search for an instance of LDAPResponse for ( int i = _messageQueue.size()-1; i >= 0; i-- ) { Object msg = _messageQueue.get(i); if ( msg instanceof LDAPResponse ) { // Dequeue the entry and return _messageQueue.remove( i ); return (LDAPResponse)msg; } } // Not found, wait for the next message } } /** * Waits for any message. Processes interrupts and honors * time limit if set for any request. */ synchronized private void waitForMessage() throws LDAPException { if ( !_timeConstrained ) { try { wait(); return; } catch (InterruptedException e) { throw new LDAPInterruptedException( "Interrupted LDAP operation" ); } } /** * Perform time constrained wait */ long minTimeToComplete = Long.MAX_VALUE; long now = System.currentTimeMillis(); for ( int i = 0; i < _requestList.size(); i++ ) { RequestEntry entry = (RequestEntry)_requestList.get( i ); // time limit exceeded ? if ( entry.timeToComplete <= now ) { entry.connection.abandon( entry.id ); throw new LDAPException( "Time to complete operation exceeded", LDAPException.LDAP_TIMEOUT ); } if ( entry.timeToComplete < minTimeToComplete ) { minTimeToComplete = entry.timeToComplete; } } long timeLimit = ( minTimeToComplete == Long.MAX_VALUE ) ? 0 : ( minTimeToComplete - now ); try { _timeConstrained = ( timeLimit != 0 ); wait( timeLimit ); } catch ( InterruptedException e ) { throw new LDAPInterruptedException( "Interrupted LDAP operation" ); } } /** * Waits for a message, for the request list to be empty, or for * an exception * * @return true if the request list is not empty * @exception LDAPException Network error */ boolean waitForSomething() throws LDAPException { while( (_requestList.size() != 0) && (_exception == null) && (_messageQueue.size() == 0) ) { waitForMessage(); } // Network exception occurred ? if ( _exception != null ) { LDAPException ex = _exception; _exception = null; throw ex; } // Are there any outstanding requests left if ( _requestList.size() == 0 ) { return false; // No outstanding requests } return true; } /** * Retrieves all messages currently in the queue without blocking. * The messages are removed from the queue. * * @return vector of messages */ synchronized ArrayList getAllMessages() { ArrayList result = _messageQueue; _messageQueue = new ArrayList(1); return result; } /** * Retrieves all requests currently in the queue. * The requests are removed from the queue. * * @return vector of requests */ synchronized ArrayList getAllRequests() { ArrayList result = _requestList; _requestList = new ArrayList(1); return result; } /** * Queues the LDAP server's response. This causes anyone waiting * in getResponse() to unblock. * * @param msg response message */ synchronized void addMessage( LDAPMessage msg ) { _messageQueue.add(msg); // Mark conn as bound for asych bind operations if ( isAsynchOp() && (msg.getType() == msg.BIND_RESPONSE) ) { if ( ((LDAPResponse)msg).getResultCode() == 0 ) { getConnection( msg.getMessageID() ).markConnAsBound(); } } notifyAll(); } /** * Gets a possible exception from the queue * * @return a possibly null exception */ LDAPException getException() { return _exception; } /** * Reports if the message ID is in the request list * * @param msgid The message ID to validate * @return true if the message ID is in the request list */ synchronized boolean isValidMessageID( int msgid ) { return ( getRequestEntry( msgid ) != null ); } /** * Signals that a network exception occured while servicing the * request. This exception will be throwm to any thread waiting * in getResponse(). * * @param connThread LDAPConnThread on which the exception occurred * @param e exception */ synchronized void setException( LDAPConnThread connThread, LDAPException e ) { _exception = e; removeAllRequests( connThread ); notifyAll(); } /** * Remove all queued messages associated with the request ID. * Called when an LDAP operation is abandoned. * * Not synchronized as it is private and can be called only by * abandon() and removeAllRequests(). * * @return count of removed messages */ private int removeAllMessages( int id ) { int removeCount = 0; for ( int i = (_messageQueue.size()-1); i >= 0; i-- ) { LDAPMessage msg = (LDAPMessage)_messageQueue.get( i ); if ( msg.getMessageID() == id ) { _messageQueue.remove( i ); removeCount++; } } return removeCount; } /** * Resets the state of this object so it can be recycled. * Used by LDAPConnection synchronous operations. * * @see org.ietf.ldap.LDAPConnection#getResponseListener * @see org.ietf.ldap.LDAPConnection#getSearchListener */ void reset() { _exception = null; _messageQueue.clear(); _requestList.clear(); _timeConstrained = false; } /** * Returns the connection associated with the specified request id * * @param id request id * @return connection */ synchronized LDAPConnection getConnection( int id ) { RequestEntry entry = getRequestEntry( id ); if ( entry != null ) { return entry.connection; } return null; } /** * Returns the connection thread associated with the specified request id * * @param id request id * @return connection thread */ synchronized LDAPConnThread getConnThread( int id ) { RequestEntry entry = getRequestEntry( id ); if ( entry != null ) { return entry.connThread; } return null; } /** * Returns the request entry associated with the specified request id * * @param id request id * @return request entry or null */ synchronized RequestEntry getRequestEntry( int id ) { for ( int i = 0; i < _requestList.size(); i++ ) { RequestEntry entry = (RequestEntry)_requestList.get( i ); if ( id == entry.id ) { return entry; } } return null; } /** * Returns message ID of the last request * * @return message ID */ synchronized int getMessageID() { int reqCnt = _requestList.size(); if ( reqCnt == 0 ) { return -1; } else { RequestEntry entry = (RequestEntry)_requestList.get( reqCnt-1 ); return entry.id; } } /** * Registers an LDAP request * * @param id LDAP request message ID * @param connection LDAP Connection for the message ID * @param connThread a physical connection to the server * @param timeLimit the maximum number of milliseconds to wait for * the request to complete */ synchronized void addRequest( int id, LDAPConnection connection, LDAPConnThread connThread, int timeLimit ) { _requestList.add( new RequestEntry( id, connection, connThread, timeLimit ) ); if ( timeLimit != 0 ) { _timeConstrained = true; } notifyAll(); } /** * Returns the number of outstanding requests. * @return outstanding request count. */ public int getRequestCount() { return _requestList.size(); } /** * Removes the request with the specified ID. * Called when a LDAP operation is abandoned (called from * LDAPConnThread), or terminated (called by getResponse() when * LDAPResponse message is received). * * @return flag indicating if the request was removed */ synchronized boolean removeRequest( int id ) { for ( int i = 0; i < _requestList.size(); i++ ) { RequestEntry entry = (RequestEntry)_requestList.get( i ); if ( id == entry.id ) { _requestList.remove( i ); removeAllMessages( id ); notifyAll(); return true; } } return false; } /** * Removes all requests associated with the specified connThread. * Called when a connThread has a network error. * * @return number of removed requests */ synchronized int removeAllRequests( LDAPConnThread connThread ) { int removeCount = 0; for ( int i = (_requestList.size()-1); i >= 0; i-- ) { RequestEntry entry = (RequestEntry)_requestList.get( i ); if ( connThread == entry.connThread ) { _requestList.remove( i ); removeCount++; // remove all queued messages as well removeAllMessages( entry.id ); } } notifyAll(); return removeCount; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSearchResults.java0000664001003300100330000004735210602743265030143 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.client.opers.*; import java.io.*; /** * The results of an LDAP search operation, represented as an enumeration. * Note that you can only iterate through this enumeration once: if you * need to use these results more than once, make sure to save the * results in a separate location. *

* * You can also use the results of a search in progress to abandon that search * operation. *

* * @version 1.0 * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchResults) */ public class LDAPSearchResults implements Serializable { static final long serialVersionUID = -501692208613904825L; private Vector entries = null; private LDAPSearchQueue resultSource; private boolean searchComplete = false; private LDAPConnection connectionToClose; private LDAPConnection currConn; private boolean persistentSearch = false; private LDAPSearchConstraints currCons; private String currBase; private int currScope; private String currFilter; private String[] currAttrs; private boolean currAttrsOnly; private Vector referralResults = new Vector(); private Vector exceptions; private int msgID = -1; // only used for the persistent search private boolean firstResult = false; /** * Constructs an enumeration of search results. * Note that this does not actually generate the results; * you need to call LDAPConnection.search to * perform the search and get the results. * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) */ public LDAPSearchResults() { entries = new Vector(); connectionToClose = null; searchComplete = true; currCons = new LDAPSearchConstraints(); } LDAPSearchResults( LDAPConnection conn, LDAPSearchConstraints cons, String base, int scope, String filter, String[] attrs, boolean attrsOnly ) { this(); currConn = conn; currCons = cons; currBase = base; currScope = scope; currFilter = filter; currAttrs = attrs; currAttrsOnly = attrsOnly; } /** * Constructs an enumeration of search results. Used when returning results * from a cache. * @param v the vector containing LDAPEntries * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) */ LDAPSearchResults( Vector v ) { this(); entries = (Vector)v.clone(); if ((entries != null) && (entries.size() >= 1)) { // Each cache value is represented by a vector. The first element // represents the size of all the LDAPEntries. This needs to be // removed before we iterate through each LDAPEntry. entries.removeElementAt(0); } } LDAPSearchResults( Vector v, LDAPConnection conn, LDAPSearchConstraints cons, String base, int scope, String filter, String[] attrs, boolean attrsOnly ) { this( v ); currConn = conn; currCons = cons; currBase = base; currScope = scope; currFilter = filter; currAttrs = attrs; currAttrsOnly = attrsOnly; } /** * Returns a count of queued search results immediately available for * processing. * A search result is either a search entry or an exception. If the * search is asynchronous (batch size not 0), this reports the number * of results received so far. * @return count of search results immediatly available for processing */ public int getCount() { while (resultSource != null && resultSource.getMessageCount() > 0) { fetchResult(); } int count = entries.size(); for ( int i = 0; i < referralResults.size(); i++ ) { LDAPSearchResults res = (LDAPSearchResults)referralResults.elementAt(i); count += res.getCount(); } if ( exceptions != null ) { count += exceptions.size(); } return count; } /** * Returns the controls returned with this search result. If any control * is registered with LDAPControl, an attempt is made to * instantiate the control. If the instantiation fails, the control is * returned as a basic LDAPControl. * @return an array of type LDAPControl. * @see org.ietf.ldap.LDAPControl#register */ public LDAPControl[] getResponseControls() { return currConn.getResponseControls(msgID); } /** * Returns true if there are more search results * to be returned. You can use this method in conjunction with the * next or next methods to iterate * through each entry in the results. For example: *

     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *                         LDAPConnection.SCOPE_BASE, MY_FILTER,
     *                         null, false );
     * while ( res.hasMore() ) {
     *   LDAPEntry findEntry = res.next();
     *   ...
     * }
     * 
* @return true if there are more search results. * @see org.ietf.ldap.LDAPSearchResults#next() */ public boolean hasMore() { while ((entries.size() == 0) && (!searchComplete)) { fetchResult(); } if ((entries.size() == 0) && ((exceptions == null) || (exceptions.size() == 0))) { while (referralResults.size() > 0) { LDAPSearchResults res = (LDAPSearchResults)referralResults.elementAt(0); if (res.hasMore()) return true; else referralResults.removeElementAt(0); } } return ((entries.size() > 0) || ((exceptions != null) && (exceptions.size() > 0))); } /** * Returns the next LDAP entry from the search results * and throws an exception if the next result is a referral, or * if a sizelimit or timelimit error occurred. *

* * You can use this method in conjunction with the * hasMore method to iterate through * each entry in the search results. For example: *

     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *                         LDAPConnection.SCOPE_BASE, MY_FILTER,
     *                         null, false );
     * while ( res.has() ) {
     *   try {
     *     LDAPEntry findEntry = res.next();
     *   } catch ( LDAPReferralException e ) {
     *     String refUrls[] = e.getReferrals();
     *     for ( int i = 0; i < refUrls.length; i++ ) {
     *     // Your code for handling referrals
     *     }
     *     continue;
     *   } catch ( LDAPException e ) {
     *     // Your code for handling errors on limits exceeded 
     *     continue; 
     *   } 
     *   ...
     * }
     * 
* @return the next LDAP entry in the search results. * @exception LDAPReferralException A referral (thrown * if the next result is a referral), or LDAPException * if a limit on the number of entries or the time was * exceeded. * @see org.ietf.ldap.LDAPSearchResults#hasMore() */ public LDAPEntry next() throws LDAPException { Object o = nextElement(); if ((o instanceof LDAPReferralException) || (o instanceof LDAPException)) { throw (LDAPException)o; } if (o instanceof LDAPEntry) { return (LDAPEntry)o; } return null; } /** * Sorts the search results. *

* * The comparator determines the sort order used. For example, if the * comparator uses the uid * attribute for comparison, the search results are sorted according to * uid. *

* * The following section of code sorts results in ascending order, * first by surname and then by common name. * *

     * String[]  sortAttrs = {"sn", "cn"};
     * boolean[] ascending = {true, true};
     *
     * LDAPConnection ld = new LDAPConnection();
     * ld.connect( ... );
     * LDAPSearchResults res = ld.search( ... );
     * res.sort( new LDAPCompareAttrNames(sortAttrs, ascending) );
     * 
* NOTE: If the search results arrive asynchronously, the sort * method blocks until all the results are returned. *

* * If some of the elements of the Enumeration have already been fetched, * the cursor is reset to the (new) first element. *

* * @param compare comparator used to determine the sort order of the results * @see LDAPCompareAttrNames */ public synchronized void sort(Comparator compare) { // if automatic referral, then add to the entries, otherwise, dont do it // since the elements in referralResults are LDAPReferralException. if (currCons.getReferralFollowing()) { while (referralResults.size() > 0) { Object obj = null; if ((obj=nextReferralElement()) != null) { if (obj instanceof LDAPException) { add((LDAPException)obj); // put it back } else { entries.addElement(obj); } } } } int numEntries = entries.size(); if (numEntries <= 0) { return; } LDAPEntry[] toSort = new LDAPEntry[numEntries]; entries.copyInto (toSort); if (toSort.length > 1) { quicksort (toSort, compare, 0, numEntries-1); } entries.removeAllElements(); for (int i = 0; i < numEntries; i++) { entries.addElement (toSort[i]); } } /** * Adds a search entry or referral * * @param msg LDAPSearchResult or LDAPsearchResultReference */ void add( LDAPMessage msg ) { if ( msg instanceof LDAPSearchResult ) { entries.addElement( ((LDAPSearchResult)msg).getEntry()); } else if ( msg instanceof LDAPSearchResultReference ) { /* convert to LDAPReferralException */ String urls[] = ((LDAPSearchResultReference)msg).getReferrals(); if ( urls != null ) { if (exceptions == null) { exceptions = new Vector(); } exceptions.addElement( new LDAPReferralException(null, 0, urls) ); } } } /** * Adds and exception * @param e exception */ void add( LDAPException e ) { if ( exceptions == null ) { exceptions = new Vector(); } exceptions.addElement( e ); } /** * Prepares to return asynchronous results from a search * * @param l Listener which will provide results */ void associate( LDAPSearchQueue l ) { resultSource = l; searchComplete = false; } void associatePersistentSearch( LDAPSearchQueue l) { resultSource = l; persistentSearch = true; searchComplete = false; firstResult = true; } void addReferralEntries( LDAPSearchResults res ) { referralResults.addElement( res ); } /** * For asynchronous search, this mechanism allows the programmer to * close a connection whenever the search completes. * @param toClose connection to close when the search terminates */ void closeOnCompletion( LDAPConnection toClose ) { if ( searchComplete ) { try { toClose.disconnect(); } catch( LDAPException e ) { } } else { connectionToClose = toClose; } } /** * Basic quicksort algorithm. */ void quicksort ( LDAPEntry[] toSort, Comparator compare, int low, int high ) { if (low >= high) { return; } LDAPEntry pivot = toSort[low]; int slow = low-1, shigh = high+1; while (true) { do { shigh--; } while ( compare.compare(toSort[shigh], pivot) > 0 ); do { slow++; } while ( compare.compare(pivot, toSort[slow]) > 0 ); if (slow >= shigh) { break; } LDAPEntry temp = toSort[slow]; toSort[slow] = toSort[shigh]; toSort[shigh] = temp; } quicksort (toSort, compare, low, shigh); quicksort (toSort, compare, shigh+1, high); } /** * Sets the message ID for this search request. msgID is used * to retrieve response controls. * @param msgID Message ID for this search request */ void setMsgID( int msgID ) { this.msgID = msgID; } /** * Returns the next result from a search. You can use this method * in conjunction with the hasMore method to * iterate through all elements in the search results. *

* * Make sure to cast the * returned element as the correct type. For example: *

     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *                         LDAPConnection.SCOPE_BASE, MY_FILTER,
     *                         null, false );
     * while ( res.hasMore() ) {
     *   Object o = res.next(); 
     *   if ( o instanceof LDAPEntry ) { 
     *     LDAPEntry findEntry = (LDAPEntry)o; 
     *     ... 
     *   } else if ( o instanceof LDAPReferralException ) { 
     *     LDAPReferralException e = (LDAPReferralException)o; 
     *     String refUrls[] = e.getReferrals(); 
     *     ... 
     *   } else if ( o instanceof LDAPException ) { 
     *     LDAPException e = (LDAPException)o; 
     *     ... 
     *   } 
     * } 
     * 
* @return the next element in the search results. * @see org.ietf.ldap.LDAPSearchResults#hasMore() */ Object nextElement() { if ( entries.size() > 0 ) { Object obj = entries.elementAt(0); entries.removeElementAt(0); return obj; } if (referralResults.size() > 0) { return nextReferralElement(); } if ((exceptions != null) && (exceptions.size() > 0)) { Object obj = exceptions.elementAt(0); exceptions.removeElementAt(0); return obj; } return null; } Object nextReferralElement() { LDAPSearchResults res = (LDAPSearchResults)referralResults.elementAt(0); if ((!res.persistentSearch && res.hasMore()) || (res.persistentSearch)) { Object obj = res.nextElement(); if (obj != null) { return obj; } if ((obj == null) || (!res.hasMore())) { referralResults.removeElementAt(0); } } else { referralResults.removeElementAt(0); } return null; } /** * Returns message ID. * @return Message ID. */ int getMessageID() { if ( resultSource == null ) { return -1; } return resultSource.getMessageID(); } /** * Fetchs the next result, for asynchronous searches. */ private synchronized void fetchResult() { /* Asynchronous case */ if ( resultSource != null ) { synchronized( this ) { if (searchComplete || firstResult) { firstResult = false; return; } LDAPMessage msg = null; try { msg = resultSource.getResponse(); } catch (LDAPException e) { add(e); currConn.releaseSearchListener(resultSource); searchComplete = true; return; } if (msg == null) { // Request abandoned searchComplete = true; currConn.releaseSearchListener(resultSource); return; } else if (msg instanceof LDAPResponse) { try { // check response and see if we need to do referral // v2: referral stored in the JDAPResult currConn.checkSearchMsg(this, msg, currCons, currBase, currScope, currFilter, currAttrs, currAttrsOnly); } catch (LDAPException e) { System.err.println("LDAPSearchResults.fetchResult: "+e); } finally { currConn.releaseSearchListener(resultSource); } searchComplete = true; if (connectionToClose != null) { try { connectionToClose.disconnect (); } catch (LDAPException e) { } connectionToClose = null; } return; } else { try { currConn.checkSearchMsg(this, msg, currCons, currBase, currScope, currFilter, currAttrs, currAttrsOnly); } catch (LDAPException e) { System.err.println("Exception: "+e); } } } } } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPMessageQueue.java0000664001003300100330000001243110602743265027733 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.Vector; /** * A queue of response messsages from the server. Multiple requests * can be multiplexed on the same queue. For synchronous LDAPConnection * requests, there will be only one request per queue. For asynchronous * LDAPConnection requests, the user can add multiple request to the * same queue. * */ public interface LDAPMessageQueue { /** * Returns the count of queued messages * @return message count */ public int getMessageCount(); /** * Returns a list of message IDs for all outstanding requests * @return message ID array. */ public int[] getMessageIDs(); /** * Blocks until a response is available or until all operations * associated with the object have completed or been canceled * * @return LDAP message or null if there are no more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ public LDAPMessage getResponse() throws LDAPException; /** * Blocks until a response is available for a particular message ID, or * until all operations associated with the message ID have completed or * been canceled, and returns the response. If there is no outstanding * operation for the message ID (or if it is zero or a negative number), * IllegalArgumentException is thrown. * * @param msgid A particular message to query for responses available * @return a response for an LDAP operation or null if there are no * more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ public LDAPMessage getResponse( int msgid ) throws LDAPException; /** * Checks if a response message has been received * * @return true or false. */ public boolean isResponseReceived(); /** * Reports true if a response has been received from the server for a * particular message ID. If there is no outstanding operation for the * message ID (or if it is zero or a negative number), * IllegalArgumentException is thrown. * * @param msgid A particular message to query for responses available * @return a flag indicating whether the response message queue is empty */ public boolean isResponseReceived( int msgid ); /** * Merge two message queues. * Move/append the content from another message queue to this one. * * To be used for synchronization of asynchronous LDAP operations where * requests are sent by one thread but processed by another one * * A client may be implemented in such a way that one thread makes LDAP * requests and calls l.getMessageIDs(), while another thread is * responsible for * processing of responses (call l.getResponse()). Both threads are using * the same queue objects. In such a case, a race * condition may occur, where a LDAP response message is retrieved and * the request terminated (request ID removed) before the first thread * has a chance to execute l.getMessageIDs(). * The proper way to handle this scenario is to create a separate queue * for each new request, and after l.getMessageIDs() has been invoked, * merge the * new request with the existing one. * @param mq2 message queue to merge with this one */ public void merge( LDAPMessageQueue mq2 ); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/factory/0000775001003300100330000000000010667357313025512 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/factory/JSSESocketFactory.java0000664001003300100330000001201610602743266031615 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.factory; import java.io.IOException; import java.io.Serializable; import java.net.Socket; import java.net.UnknownHostException; import javax.net.SocketFactory; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import org.ietf.ldap.*; /** * Creates an SSL socket connection to a server, using the JSSE package * from Sun. This class implements the LDAPSocketFactory * interface. *

* * @version 1.0 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(org.ietf.ldap.LDAPSocketFactory) */ public class JSSESocketFactory implements LDAPSocketFactory, Serializable { static final long serialVersionUID = 6834205777733266609L; protected SSLSocketFactory factory = null; // Optional explicit cipher suites to use protected String[] suites = null; /** * Default factory constructor */ public JSSESocketFactory() { this.factory = (SSLSocketFactory) SSLSocketFactory.getDefault(); } /** * Factory constructor that uses the default JSSE SSLSocketFactory * * @param suites Cipher suites to attempt to use with the server; * if null, use any cipher suites available in the * JSSE package */ public JSSESocketFactory( String[] suites ) { this.suites = suites; this.factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); } /** * Factory constructor * @param sf the SSL socketfactory to use */ public JSSESocketFactory( SSLSocketFactory factory) { this.factory = factory; } /** * Factory constructor * * @param suites Cipher suites to attempt to use with the server; * if null, use any cipher suites available in the * JSSE package * @param sf the SSL socketfactory to use */ public JSSESocketFactory( String[] suites, SSLSocketFactory factory ) { this.suites = suites; this.factory = factory; } /** * Creates an SSL socket * * @param host Host name or IP address of SSL server * @param port Port numbers of SSL server * @return A socket for an encrypted session * @exception LDAPException on error creating socket */ public Socket createSocket(String host, int port) throws LDAPException { SSLSocket sock = null; try { sock = (SSLSocket)factory.createSocket(host, port); if (suites != null) { sock.setEnabledCipherSuites(suites); } // Start handshake manually to immediately expose potential // SSL errors as exceptions. Otherwise, handshake will take // place first time the data are written to the socket. sock.startHandshake(); } catch (UnknownHostException e) { throw new LDAPException("SSL connection to " + host + ":" + port + ", " + e.getMessage(), LDAPException.CONNECT_ERROR); } catch (IOException f) { throw new LDAPException("SSL connection to " + host + ":" + port + ", " + f.getMessage(), LDAPException.CONNECT_ERROR); } return sock; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPCompareAttrNames.java0000664001003300100330000003130210602743265030545 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.*; import java.text.*; /** * Compares LDAP entries based on one or more attribute values. *

* * To use this comparison for sorting search results, pass * an object of this class to the sort method in * LDAPSearchResults. *

* * @version 1.0 * @see LDAPSearchResults#sort */ public class LDAPCompareAttrNames implements Comparator, Serializable { static final long serialVersionUID = -2567450425231175944L; private String _attrs[]; private boolean _ascending[]; private Locale _locale = null; private Collator _collator = null; private boolean _sensitive = true; /** * Constructs a comparator that compares the string values of * a named attribute in LDAP entries and sorts the entries in * ascending order. *

* * @param attribute name of attribute for comparisons */ public LDAPCompareAttrNames (String attribute) { _attrs = new String[1]; _attrs[0] = attribute; _ascending = new boolean[1]; _ascending[0] = true; } /** * Constructs a comparator that compares the string values of * a named attribute in LDAP entries and that allows you to sort * entries either in ascending or descending order. *

* * @param attribute name of attribute for comparisons * @param ascendingFlag if true, sort in ascending order */ public LDAPCompareAttrNames (String attribute, boolean ascendingFlag) { _attrs = new String[1]; _attrs[0] = attribute; _ascending = new boolean[1]; _ascending[0] = ascendingFlag; } /** * Constructs a comparator that compares the string values of * a set of named attributes in LDAP entries and that sort * the entries in ascending order. *

* * Use an array of strings to specify the set of attributes * to use for sorting. If the values of the first attribute * (the name specified in attribute[0]) are equal, * then the values of the next attribute are compared. *

* * For example, if attributes[0] = "cn" and * attributes[1]="uid", results are first sorted * by the cn attribute. If two entries have the * same value for cn, then the uid * attribute is used to sort the entries. *

* * @param attributes array of the attribute names used for comparisons */ public LDAPCompareAttrNames (String[] attributes) { _attrs = attributes; _ascending = new boolean[attributes.length]; for( int i = 0; i < attributes.length; i++ ) _ascending[i] = true; } /** * Constructs a comparator that compares the string values of * a set of named attributes in LDAP entries and allows you * to sort the entries in ascending or descending order. *

* * Use an array of strings to specify the set of attributes * to use for sorting. If the values of the first attribute * (the name specified in attribute[0]) * are equal, then the values of the next attribute are compared. *

* * For example, if attributes[0] = "cn" and * attributes[1]="uid", results are first sorted * by the cn attribute. If two entries have the * same value for cn, then the uid * attribute is used to sort the entries. *

* * Use an array of boolean values to specify whether each attribute * should be sorted in ascending or descending order. For example, * suppose that attributes[0] = "cn" and * attributes[1]="roomNumber". If * ascendingFlags[0]=true and * ascendingFlags[1]=false, attributes are sorted first by * cn in ascending order, then by roomNumber * in descending order. *

* * If the size of the array of attribute names is not the same as * the size of the array of boolean values, an * LDAPException is thrown. *

* * @param attribute array of the attribute names to use for comparisons * @param ascendingFlags array of boolean values specifying ascending * or descending order to use for each attribute name. If * true, the attributes are sorted in ascending order. */ public LDAPCompareAttrNames (String[] attributes, boolean[] ascendingFlags) { _attrs = attributes; _ascending = ascendingFlags; if ( _ascending == null ) { _ascending = new boolean[attributes.length]; for( int i = 0; i < attributes.length; i++ ) _ascending[i] = true; } } /** * Indicates if some other object is "equal to" this Comparator * * @param obj the object to compare * @return true if the object equals this object */ public boolean equals( Object obj ) { return super.equals( obj ); } /** * Gets the locale, if any, used for collation. If the locale is null, * an ordinary string comparison is used for sorting. * * @return the locale used for collation, or null. */ public Locale getLocale() { return _locale; } /** * Set the locale, if any, used for collation. If the locale is null, * an ordinary string comparison is used for sorting. If sorting * has been set to case-insensitive, the collation strength is set * to Collator.PRIMARY, otherwise to Collator.IDENTICAL. If a * different collation strength setting is required, use the signature * that takes a collation strength parameter. * * @param locale the locale used for collation, or null. */ public void setLocale( Locale locale ) { if ( _sensitive ) { setLocale( locale, Collator.IDENTICAL ); } else { setLocale( locale, Collator.PRIMARY ); } } /** * Sets the locale, if any, used for collation. If the locale is null, * an ordinary string comparison is used for sorting. * * @param locale the locale used for collation, or null. * @param strength collation strength: Collator.PRIMARY, * Collator.SECONDARY, Collator.TERTIARY, or Collator.IDENTICAL */ public void setLocale( Locale locale, int strength ) { _locale = locale; if ( _locale == null ) { _collator = null; } else { _collator = Collator.getInstance( _locale ); _collator.setStrength(strength); } } /** * Gets the state of the case-sensitivity flag. This only applies to * Unicode sort order; for locale-specific sorting, case-sensitivity * is controlled by the collation strength. * * @return true for case-sensitive sorting; this is * the default */ public boolean getCaseSensitive() { return _sensitive; } /** * Sets the state of the case-sensitivity flag. This only applies to * Unicode sort order; for locale-specific sorting, case-sensitivity * is controlled by the collation strength. * * @param sensitive true for case-sensitive sorting; * this is the default */ public void setCaseSensitive( boolean sensitive ) { _sensitive = sensitive; } /** * Compares its two arguments for order * * @param entry1 the first entry to be compared * @param entry2 the second entry to be compared * @return a negative integer, zero, or a positive integer if the first * argument is less than, equal to, or greater than the second * @exception ClassCastException if either of the arguments is not * an LDAPEntry */ public int compare( Object entry1, Object entry2 ) { if ( !(entry1 instanceof LDAPEntry) || !(entry2 instanceof LDAPEntry) ) { throw new ClassCastException( "Must compare LDAPEntry objects" ); } return attrGreater( (LDAPEntry)entry1, (LDAPEntry)entry2, 0 ); } /** * Compares a particular attribute in both entries. If equal, * moves on to the next. * @param entry1 the first entry to be compared * @param entry2 the second entry to be compared * @return a negative integer, zero, or a positive integer if the first * argument is less than, equal to, or greater than the second */ int attrGreater( LDAPEntry entry1, LDAPEntry entry2, int attrPos ) { Iterator attrSet1 = entry1.getAttributeSet().iterator(); Iterator attrSet2 = entry2.getAttributeSet().iterator(); String value1 = null; String value2 = null; String attrName = _attrs[attrPos]; boolean ascending = _ascending[attrPos]; while ( attrSet2.hasNext() ) { LDAPAttribute currAttr = (LDAPAttribute)(attrSet2.next()); if ( !attrName.equalsIgnoreCase (currAttr.getName()) ) { continue; } value2 = (String)(currAttr.getStringValues().nextElement()); break; } while ( attrSet1.hasNext() ) { LDAPAttribute currAttr = (LDAPAttribute)(attrSet1.next()); if ( !attrName.equalsIgnoreCase(currAttr.getName()) ) { continue; } value1 = (String)(currAttr.getStringValues().nextElement()); break; } if ( (value2 == null) ^ (value1 == null) ) { return (value1 != null) ? 1 : -1; } // Check for equality if ( (value2 == null) || ((_collator != null) && (_collator.compare( value1, value2 ) == 0) ) || ((_collator == null) && _sensitive && value2.equals(value1)) || ((_collator == null) && !_sensitive && value2.equalsIgnoreCase(value1)) ) { if ( attrPos == _attrs.length - 1 ) { return -1; } else { return attrGreater ( entry1, entry2, attrPos+1 ); } } // Not equal, check for order if ( ascending ) { if ( _collator != null ) { return _collator.compare( value1, value2 ); } else if ( _sensitive ) { return value1.compareTo( value2 ); } else { return value1.toLowerCase().compareTo( value2.toLowerCase() ); } } else { if ( _collator != null ) { return _collator.compare( value1, value2 ); } else if ( _sensitive ) { return value1.compareTo( value2 ); } else { return value1.toLowerCase().compareTo( value2.toLowerCase() ); } } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPUnsolicitedNotificationListener.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPUnsolicitedNotificationListener.j0000664001003300100330000000451210602743265033212 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * An object that implements this interface can be notified when * unsolicited messages arrive from the server. A client registers the * object with LDAPConnection.addUnsolicitedNotificationListener. */ public interface LDAPUnsolicitedNotificationListener { /** * The method is called when an unsolicited message arrives from a * server, if the object has registered with * LDAPConnection.addUnsolicitedNotificationListener. * * @param msg An unsolicited message received from the server */ public void messageReceived( LDAPExtendedResponse msg ); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPDITStructureRuleSchema.java0000664001003300100330000002406310602743265031660 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * The definition of a DIT structure rule in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Structure Rule Description covers the types of information * to specify when defining a DIT structure rule. According to the RFC, * the description of a DIT structure rule can include the following: *

* *

    *
  • an OID identifying the attribute type *
  • a name identifying the attribute type *
  • a description of the attribute type *
  • the name of the parent attribute type *
  • the syntax used by the attribute (for example, * cis or int) *
  • an indication of whether the attribute type is single-valued * or multi-valued *
*

* * When you construct an LDAPDITStructureRuleSchema object, you can * specify these types of information as arguments to the constructor or * in the AttributeTypeDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * There are a number of additional optional description fields which * are not explicitly accessible through LDAPDITStructureRuleSchema, but which * can be managed with setQualifier, getQualifier, and getQualifierNames: *

* *

    *
  • OBSOLETE *
*

* * To get the name, OID, and description of this DIT structure rule * , use the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this attribute type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines DITStructureRuleDescription as follows: *

*

 *      DITStructureRuleDescription = "(" whsp
 *        ruleidentifier whsp            ; DITStructureRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        "FORM" woid whsp               ; NameForm
 *        [ "SUP" ruleidentifiers whsp ] ; superior DITStructureRules
 *    ")"
 * 
* * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPDITStructureRuleSchema extends LDAPSchemaElement { static final long serialVersionUID = -2823317246039655811L; /** * Constructs a blank element. */ protected LDAPDITStructureRuleSchema() { super(); } /** * Constructs a DIT structure rule definition, using the specified * information. * @param names names of the element * @param ruleID unique identifier of the structure rule.
* NOTE: this is an integer, not a dotted numerical identifier. * Structure rules aren't identified by OID. * @param description description of attribute type * @param obsolete true if the rule is obsolete * @param nameForm either the identifier or name of a name form. * This is used to indirectly refer to the object class that this * structure rule applies to. * @param superiors list of superior structure rules - specified * by their integer ID. The object class specified by this structure * rule (via the nameForm parameter) may only be subordinate in * the DIT to object classes of those represented by the structure * rules here. */ public LDAPDITStructureRuleSchema( String[] names, int ruleID, String description, boolean obsolete, String nameForm, String[] superiors ) { super( names, "", description ); this.nameForm = nameForm; this.ruleID = ruleID; if ( obsolete ) { setQualifier( OBSOLETE, "" ); } if ( (superiors != null) && (superiors.length > 0) ) { setQualifier( SUPERIOR, superiors ); } } /** * Constructs a DIT structure rule definition based on a description in * the DITStructureRuleDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Structure Rule Description. This is the format that * LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of "attributetypes" are attribute type descriptions * in this format.) *

* * @param raw definition of the DIT structure rule in the * DITStructureRuleDescription format */ public LDAPDITStructureRuleSchema( String raw ) { attrName = "ditStructureRules"; parseValue( raw ); Object o = properties.get( FORM ); if ( o != null ) { nameForm = (String)o; } try { ruleID = Integer.parseInt( oid ); } catch ( Exception e ) { } } /** * Returns the NameForm that this structure rule controls. You can get * the actual object class that this structure rule controls by calling * getNameForm().getObjectClass(). * * @return the NameForm that this structure rule controls. */ public String getNameForm() { return nameForm; } /** * Returns the rule ID for this structure rule. Note that this returns * an integer rather than a dotted decimal OID. Objects of this class do * not have an OID, thus getID will return null. * * @return the rule ID for this structure rule. */ public int getRuleID() { return ruleID; } /** * Returns a list of all structure rules that are superior to this * structure rule. To resolve to an object class, you need to first * resolve the superior id to another structure rule, then call * getNameForm().getObjectClass() on that structure rule. * @return the structure rules that are superior to this * structure rule. */ public String[] getSuperiors() { return getQualifier( SUPERIOR ); } /** * Prepares a value in RFC 2252 format for submission to a server * * @return a String ready for submission to an LDAP server. */ String getValue() { String s = "( " + ruleID + ' '; s += getNameField(); if ( description != null ) { s += "DESC \'" + description + "\' "; } if ( isObsolete() ) { s += OBSOLETE + ' '; } s += FORM + " " + nameForm + ' '; String val = getValue( SUPERIOR, false ); if ( (val != null) && (val.length() > 1) ) { s += val + ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the rule in Directory format * * @return definition of the rule in Directory format */ public String toString() { return getValue(); } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "ldapditstructurerules"; } public final static String FORM = "FORM"; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { OBSOLETE, FORM, "SUP" }; private String nameForm = null; private int ruleID = 0; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPMessage.java0000664001003300100330000002455410602743265026737 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import org.ietf.ldap.client.opers.*; import org.ietf.ldap.ber.stream.*; import java.io.*; import java.net.*; /** * Base class for LDAP request and response messages. * This class represents the LDAPMessage in RFC2251. The * message is the entity that got transferred back and * fro between the server and the client interface. Each * message has a protocol operation. The protocol operation * indicates if it is a request or response. *

 * LDAPMessage ::= SEQUENCE {
 *   messageID MessageID,
 *   protocolOp CHOICE {
 *     bindRequest BindRequest,
 *     ...
 *   }
 *   controls [0] Controls OPTIONAL
 * }
 * 
* * @version 1.0 */ public class LDAPMessage implements Serializable { static final long serialVersionUID = -1364094245850026720L; public final static int BIND_REQUEST = 0; public final static int BIND_RESPONSE = 1; public final static int UNBIND_REQUEST = 2; public final static int SEARCH_REQUEST = 3; public final static int SEARCH_RESPONSE = 4; public final static int SEARCH_RESULT = 5; public final static int MODIFY_REQUEST = 6; public final static int MODIFY_RESPONSE = 7; public final static int ADD_REQUEST = 8; public final static int ADD_RESPONSE = 9; public final static int DEL_REQUEST = 10; public final static int DEL_RESPONSE = 11; public final static int MODIFY_RDN_REQUEST = 12; public final static int MODIFY_RDN_RESPONSE = 13; public final static int COMPARE_REQUEST = 14; public final static int COMPARE_RESPONSE = 15; public final static int ABANDON_REQUEST = 16; public final static int SEARCH_RESULT_REFERENCE = 19; public final static int EXTENDED_REQUEST = 23; public final static int EXTENDED_RESPONSE = 24; /** * Internal variables */ private int _msgid; private JDAPProtocolOp _protocolOp = null; private LDAPControl _controls[] = null; /** * Constructs a ldap message. * @param msgid message identifier * @param op operation protocol */ LDAPMessage(int msgid, JDAPProtocolOp op) { _msgid = msgid; _protocolOp = op; } LDAPMessage(int msgid, JDAPProtocolOp op, LDAPControl controls[]) { _msgid = msgid; _protocolOp = op; _controls = controls; /* LDAPv3 additions */ } /** * Creates a ldap message from a BERElement. This method is used * to parse LDAP response messages * * @param element ber element constructed from incoming byte stream */ static LDAPMessage parseMessage(BERElement element) throws IOException { int l_msgid; JDAPProtocolOp l_protocolOp = null; LDAPControl l_controls[] = null; if (element.getType() != BERElement.SEQUENCE) throw new IOException("SEQUENCE in jdap message expected"); BERSequence seq = (BERSequence)element; BERInteger msgid = (BERInteger)seq.elementAt(0); l_msgid = msgid.getValue(); BERElement protocolOp = (BERElement)seq.elementAt(1); if (protocolOp.getType() != BERElement.TAG) { throw new IOException("TAG in protocol operation is expected"); } BERTag tag = (BERTag)protocolOp; switch (tag.getTag()&0x1f) { case JDAPProtocolOp.BIND_RESPONSE: l_protocolOp = new JDAPBindResponse(protocolOp); break; case JDAPProtocolOp.SEARCH_RESPONSE: l_protocolOp = new JDAPSearchResponse(protocolOp); break; /* * If doing search without bind, * x500.arc.nasa.gov returns tag SEARCH_REQUEST tag * in SEARCH_RESULT. */ case JDAPProtocolOp.SEARCH_REQUEST: case JDAPProtocolOp.SEARCH_RESULT: l_protocolOp = new JDAPSearchResult(protocolOp); break; case JDAPProtocolOp.MODIFY_RESPONSE: l_protocolOp = new JDAPModifyResponse(protocolOp); break; case JDAPProtocolOp.ADD_RESPONSE: l_protocolOp = new JDAPAddResponse(protocolOp); break; case JDAPProtocolOp.DEL_RESPONSE: l_protocolOp = new JDAPDeleteResponse(protocolOp); break; case JDAPProtocolOp.MODIFY_RDN_RESPONSE: l_protocolOp = new JDAPModifyRDNResponse(protocolOp); break; case JDAPProtocolOp.COMPARE_RESPONSE: l_protocolOp = new JDAPCompareResponse(protocolOp); break; case JDAPProtocolOp.SEARCH_RESULT_REFERENCE: l_protocolOp = new JDAPSearchResultReference(protocolOp); break; case JDAPProtocolOp.EXTENDED_RESPONSE: l_protocolOp = new JDAPExtendedResponse(protocolOp); break; default: throw new IOException("Unknown protocol operation"); } /* parse control */ if (seq.size() >= 3) { tag = (BERTag)seq.elementAt(2); if ( tag.getTag() == (BERTag.CONSTRUCTED|BERTag.CONTEXT|0) ) { BERSequence controls = (BERSequence)tag.getValue(); l_controls = new LDAPControl[controls.size()]; for (int i = 0; i < controls.size(); i++) { l_controls[i] = LDAPControl.parseControl(controls.elementAt(i)); } } } if (l_protocolOp instanceof JDAPSearchResponse) { return new LDAPSearchResult(l_msgid, (JDAPSearchResponse) l_protocolOp, l_controls); } else if (l_protocolOp instanceof JDAPSearchResultReference) { return new LDAPSearchResultReference(l_msgid, (JDAPSearchResultReference) l_protocolOp, l_controls); } else if (l_protocolOp instanceof JDAPExtendedResponse) { return new LDAPExtendedResponse(l_msgid, (JDAPExtendedResponse) l_protocolOp, l_controls); } else { return new LDAPResponse(l_msgid, l_protocolOp, l_controls); } } /** * Retrieves list of controls. * @return controls. */ public LDAPControl[] getControls() { return (_controls != null) ? _controls : new LDAPControl[0]; } /** * Returns the message identifer. * @return message identifer. */ public int getMessageID(){ return _msgid; } /** * Returns the LDAP operation type of the message * @return message type. */ public int getType(){ return _protocolOp.getType(); } /** * Retrieves the protocol operation. * @return protocol operation. */ JDAPProtocolOp getProtocolOp() { return _protocolOp; } /** * Writes the ber encoding to stream. * @param s output stream */ void write(OutputStream s) throws IOException { BERSequence seq = new BERSequence(); BERInteger i = new BERInteger(_msgid); seq.addElement(i); BERElement e = _protocolOp.getBERElement(); if (e == null) { throw new IOException("Bad BER element"); } seq.addElement(e); if (_controls != null) { /* LDAPv3 additions */ BERSequence c = new BERSequence(); for (int j = 0; j < _controls.length; j++) { c.addElement(_controls[j].getBERElement()); } BERTag t = new BERTag(BERTag.CONTEXT|BERTag.CONSTRUCTED|0, c, true); seq.addElement(t); } seq.write(s); } /** * Returns string representation of an LDAP message. * @return LDAP message. */ public String toString() { StringBuffer sb = new StringBuffer("[LDAPMessage] "); sb.append(_msgid); sb.append(" "); sb.append(_protocolOp.toString()); for (int i =0; _controls != null && i < _controls.length; i++) { sb.append(" "); sb.append(_controls[i].toString()); } return sb.toString(); } /** * Returns string representation of a ldap message with * the time stamp. Used for message trace * @return ldap message with the time stamp */ StringBuffer toTraceString() { StringBuffer sb = new StringBuffer(" op="); sb.append(_msgid); sb.append(" "); sb.append(_protocolOp.toString()); for (int i =0; _controls != null && i < _controls.length; i++) { sb.append(" "); sb.append(_controls[i].toString()); } return sb; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPDITContentRuleSchema.java0000664001003300100330000003161110602743265031267 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * The definition of a DIT content rule in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Content Rule Description covers the types of information * to specify when defining a DIT content rule. According to the RFC, * the description of a DIT content rule can include the following: *

* *

    *
  • an OID identifying the attribute type *
  • a name identifying the attribute type *
  • a description of the attribute type *
  • the name of the parent attribute type *
  • the syntax used by the attribute (for example, * cis or int) *
  • an indication of whether the attribute type is single-valued * or multi-valued *
*

* * When you construct an LDAPDITContentRuleSchema object, you can * specify these types of information as arguments to the constructor or * in the AttributeTypeDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * There are a number of additional optional description fields which * are not explicitly accessible through LDAPDITContentRuleSchema, but which * can be managed with setQualifier, getQualifier, and getQualifierNames: *

* *

    *
  • OBSOLETE *
*

* * To get the name, OID, and description of this DIT content rule * , use the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this attribute type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines DITContentRuleDescription as follows: *

*

 *    DITContentRuleDescription = "("
 *        numericoid   ; Structural ObjectClass identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" ]
 *        [ "AUX" oids ]    ; Auxiliary ObjectClasses
 *        [ "MUST" oids ]   ; AttributeType identifiers
 *        [ "MAY" oids ]    ; AttributeType identifiers
 *        [ "NOT" oids ]    ; AttributeType identifiers
 *       ")"
 * 
* * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPDITContentRuleSchema extends LDAPSchemaElement { static final long serialVersionUID = -8588488481097270056L; /** * Constructs a blank element. */ protected LDAPDITContentRuleSchema() { super(); } /** * Constructs a DIT content rule definition, using the specified * information. * @param names names of the attribute type * @param oid object identifier (OID) of the attribute type * in dotted-string format (for example, "1.2.3.4") * @param description description of attribute type * @param obsolete true if the rule is obsolete * @param auxiliary a list of auxiliary object classes * allowed for an entry to which this content rule applies. * These may either be specified by name or numeric oid. * @param required a list of user attribute types that an entry * to which this content rule applies must contain in addition to * its normal set of mandatory attributes. These may either be * specified by name or numeric oid. * @param optional a list of user attribute types that an entry * to which this content rule applies may contain in addition to * its normal set of optional attributes. These may either be * specified by name or numeric oid. * @param precluded a list consisting of a subset of the optional * user attribute types of the structural and auxiliary object * classes which are precluded from an entry to which this content rule * applies. These may either be specified by name or numeric oid. */ public LDAPDITContentRuleSchema( String[] names, String oid, String description, boolean obsolete, String[] auxiliary, String[] required, String[] optional, String[] precluded ) { super( names, oid, description ); if ( required != null ) { for( int i = 0; i < required.length; i++ ) { must.addElement( required[i] ); } } if ( optional != null ) { for( int i = 0; i < optional.length; i++ ) { may.addElement( optional[i] ); } } if ( auxiliary != null ) { for( int i = 0; i < auxiliary.length; i++ ) { aux.addElement( auxiliary[i] ); } } if ( precluded != null ) { for( int i = 0; i < precluded.length; i++ ) { not.addElement( precluded[i] ); } } if ( obsolete ) { setQualifier( OBSOLETE, "" ); } } /** * Constructs a DIT content rule definition based on a description in * the DITContentRuleDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * DIT Content Rule Description. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of "attributetypes" are attribute type descriptions * in this format.) *

* * @param raw definition of the DIT content rule in the * DITContentRuleDescription format */ public LDAPDITContentRuleSchema( String raw ) { attrName = "ditContentRules"; parseValue( raw ); Object o = properties.get( MAY ); if ( o != null ) { if ( o instanceof Vector ) { may = (Vector)o; } else { may.addElement( o ); } } o = properties.get( MUST ); if ( o != null ) { if ( o instanceof Vector ) { must = (Vector)o; } else { must.addElement( o ); } } o = properties.get( NOT ); if ( o != null ) { if ( o instanceof Vector ) { not = (Vector)o; } else { not.addElement( o ); } } o = properties.get( AUX ); if ( o != null ) { if ( o instanceof Vector ) { aux = (Vector)o; } else { aux.addElement( o ); } } } /** * Gets the names of the auxiliary object classes allowed * in this content rule. * @return the names of auxiliary object classes * allowed in this content rule. */ public String[] getAuxiliaryClasses() { String[] vals = new String[aux.size()]; aux.copyInto( vals ); return vals; } /** * Gets the names of optional attributes allowed * in this content rule. * @return the names of optional attributes * allowed in this content rule. */ public String[] getOptionalAttributes() { String[] vals = new String[may.size()]; may.copyInto( vals ); return vals; } /** * Gets the names of the precluded attributes for * this content rule. * @return the names of the precluded attributes * for this content rule. */ public String[] getPrecludedAttributes() { String[] vals = new String[not.size()]; not.copyInto( vals ); return vals; } /** * Gets the names of the required attributes for * this content rule. * @return the names of the required attributes * for this content rule. */ public String[] getRequiredAttributes() { String[] vals = new String[must.size()]; must.copyInto( vals ); return vals; } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "ldapditcontentrules"; } /** * Prepares a value in RFC 2252 format for submission to a server * * @return a String ready for submission to an LDAP server. */ String getValue() { String s = getValuePrefix(); String val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } if ( aux.size() > 0 ) { s += AUX + " " + vectorToList( aux ); s += ' '; } if ( must.size() > 0 ) { s += MUST + " " + vectorToList( must ); s += ' '; } if ( may.size() > 0 ) { s += MAY + " " + vectorToList( may ); s += ' '; } if ( not.size() > 0 ) { s += NOT + " " + vectorToList( not ); s += ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Creates a list within parentheses, with $ as delimiter * * @param vals values for list * @return a String with a list of values. */ protected String vectorToList( Vector vals ) { String val = "( "; for( int i = 0; i < vals.size(); i++ ) { val += (String)vals.elementAt(i) + ' '; if ( i < (vals.size() - 1) ) { val += "$ "; } } val += ')'; return val; } /** * Gets the definition of the rule in Directory format * * @return definition of the rule in Directory format */ public String toString() { return getValue(); } public final static String AUX = "AUX"; public final static String MUST = "MUST"; public final static String MAY = "MAY"; public final static String NOT = "NOT"; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { OBSOLETE, AUX, MUST, MAY, NOT }; private Vector must = new Vector(); private Vector may = new Vector(); private Vector aux = new Vector(); private Vector not = new Vector(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPDN.java0000664001003300100330000001540410602743265025646 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import org.ietf.ldap.util.*; import java.io.*; /** * Represents a distinguished name in LDAP. *

* * You can use objects of this class to split a distinguished name * (DN) into its individual components. You can also escape the * characters in a DN. *

* * @version 1.0 */ public class LDAPDN { /** * Returns the individual components of a relative distinguished name (RDN). * @param rdn relative distinguished name of which you want to get the components. * @param noTypes if true, returns only the values of the * components and not the names (such as 'cn=') * @return an array of strings representing the components of the RDN. * @see org.ietf.ldap.LDAPDN#explodeDN(java.lang.String, boolean) */ public static String[] explodeRDN (String rdn, boolean noTypes) { RDN name = new RDN(rdn); if ( noTypes ) { return name.getValues(); } else { String[] str = new String[1]; str[0] = name.toString(); return str; } } /** * Compares two dn's for equality. * @param dn1 the first dn to compare * @param dn2 the second dn to compare * @return true if the two dn's are equal */ public static boolean equals(String dn1, String dn2) { return normalize(dn1).equals(normalize(dn2)); } /** * Returns the RDN after escaping the characters specified * by org.ietf.ldap.util.DN.ESCAPED_CHAR. *

* * @param rdn the RDN to escape * @return the RDN with the characters escaped. * @see org.ietf.ldap.util.DN#ESCAPED_CHAR * @see org.ietf.ldap.LDAPDN#unEscapeRDN(java.lang.String) */ public static String escapeRDN(String rdn) { RDN name = new RDN(rdn); String[] val = name.getValues(); if (val == null) return rdn; StringBuffer[] buffer = new StringBuffer[val.length]; StringBuffer retbuf = new StringBuffer(); String[] types = name.getTypes(); for (int j = 0; j < val.length; j++ ) { buffer[j] = new StringBuffer(val[j]); int i=0; while (i 0) ? " + " : "") + types[j] + "=" + ( new String( buffer[j] ) ) ); } return new String( retbuf ); } /** * Returns the individual components of a distinguished name (DN). * @param dn distinguished name of which you want to get the components. * @param noTypes if true, returns only the values of the * components and not the names (such as 'cn=') * @return an array of strings representing the components of the DN. * @see org.ietf.ldap.LDAPDN#explodeRDN(java.lang.String, boolean) */ public static String[] explodeDN (String dn, boolean noTypes) { DN name = new DN(dn); return name.explodeDN(noTypes); } /** * Returns true if the string conforms to distinguished name syntax; * NOT IMPLEMENTED YET * * @param dn string to evaluate for distinguished name syntax * @return true if the string conforms to distinguished name syntax */ public boolean isValid( String dn ) { return true; } /** * Normalizes the dn. * @param dn the DN to normalize * @return the normalized DN */ public static String normalize(String dn) { return (new DN(dn)).toString(); } /** * Returns the RDN after unescaping any escaped characters. * For a list of characters that are typically escaped in a * DN, see org.ietf.ldap.LDAPDN.ESCAPED_CHAR. *

* * @param rdn the RDN to unescape * @return the unescaped RDN. * @see org.ietf.ldap.util.DN#ESCAPED_CHAR * @see org.ietf.ldap.LDAPDN#escapeRDN(java.lang.String) */ public static String unEscapeRDN(String rdn) { RDN name = new RDN(rdn); String[] vals = name.getValues(); if ( (vals == null) || (vals.length < 1) ) return rdn; StringBuffer buffer = new StringBuffer(vals[0]); StringBuffer copy = new StringBuffer(); int i=0; while (iRFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of a name form. * According to the RFC, the description of a name form can * include the following information: *

* *

    *
  • an OID identifying the name form *
  • a name identifying the name form *
  • a description of the name form *
  • the structural object class of this name form *
  • the list of attribute types that are required in this name form *
  • the list of attribute types that are allowed (optional) in this * name form *
*

* * When you construct an LDAPNameFormSchema object, * you can specify * these types of information as arguments to the constructor or in the * NameFormDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * You can get the name, OID, and description of this name form * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this name form definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines NameFormDescription as follows: *

*

 *    NameFormDescription = "(" whsp
 *        numericoid whsp      ; NameForm identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        "OC" woid            ; Structural ObjectClass
 *        [ "MUST" oids ]      ; AttributeTypes
 *        [ "MAY" oids ]       ; AttributeTypes
 *    whsp ")"
 * 
* * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPNameFormSchema extends LDAPSchemaElement { static final long serialVersionUID = 1665316286199590403L; /** * Constructs a name form definition, using the specified * information. * @param names name of the name form * @param oid object identifier (OID) of the name form * in dotted-string format (for example, "1.2.3.4") * @param description description of the name form * @param obsolete true if the rule is obsolete * @param objectClass the object to which this name form applies. * This may either be specified by name or numeric oid. * @param required array of names of attributes required * in this name form * @param optional array of names of optional attributes * allowed in this name form */ public LDAPNameFormSchema( String[] names, String oid, String description, boolean obsolete, String objectClass, String[] required, String[] optional ) { super( names, oid, description ); attrName = "nameforms"; if ( obsolete ) { setQualifier( OBSOLETE, "" ); } this.objectClass = objectClass; if ( required != null ) { for( int i = 0; i < required.length; i++ ) { must.addElement( required[i] ); } } if ( optional != null ) { for( int i = 0; i < optional.length; i++ ) { may.addElement( optional[i] ); } } } /** * Constructs a name form definition based on a description in * the NameFormDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of the "objectclasses" attribute are name form descriptions * in this format.) *

* * @param raw definition of the object in the NameFormDescription * format */ public LDAPNameFormSchema( String raw ) { attrName = "objectclasses"; parseValue( raw ); Object o = properties.get( "MAY" ); if ( o != null ) { if ( o instanceof Vector ) { may = (Vector)o; } else { may.addElement( o ); } } o = properties.get( "MUST" ); if ( o != null ) { if ( o instanceof Vector ) { must = (Vector)o; } else { must.addElement( o ); } } o = properties.get( "OC" ); if ( o != null ) { objectClass = (String)o; } } /** * Returns the name of the object class that this name form applies to. * * @return the name of the object class that this name form applies to. */ public String getObjectClass() { return objectClass; } /** * Gets the names of optional attributes allowed * in this name form. * @return the names of optional attributes * allowed in this name form. */ public String[] getOptionalNamingAttributes() { String[] vals = new String[may.size()]; may.copyInto( vals ); return vals; } /** * Gets the names of the required attributes for * this name form. * @return the names of the required attributes * for this name form. */ public String[] getRequiredNamingAttributes() { String[] vals = new String[must.size()]; must.copyInto( vals ); return vals; } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "nameforms"; } /** * Prepares a value in RFC 2252 format for submitting to a server. * * @param quotingBug true if SUP and SYNTAX values are to * be quoted. That is to satisfy bugs in certain LDAP servers. * @return a String ready for submission to an LDAP server. */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); String val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } s += "OC " + objectClass + ' '; if ( must.size() > 0 ) { s += "MUST " + vectorToList( must ); s += ' '; } if ( may.size() > 0 ) { s += "MAY " + vectorToList( may ); s += ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the name form in Directory format * * @return definition of the name form in Directory format */ public String toString() { return getValue( false ); } /** * Creates a list within parentheses, with $ as delimiter * * @param vals values for list * @return a String with a list of values. */ protected String vectorToList( Vector vals ) { String val = "( "; for( int i = 0; i < vals.size(); i++ ) { val += (String)vals.elementAt(i) + ' '; if ( i < (vals.size() - 1) ) { val += "$ "; } } val += ')'; return val; } private Vector must = new Vector(); private Vector may = new Vector(); private String objectClass = null; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { "MUST", "MAY", "OBJECTCLASS", "OBSOLETE"}; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPModification.java0000664001003300100330000001340310602743265027747 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import org.ietf.ldap.ber.stream.*; /** * Specifies changes to be made to the values of an attribute. The change is * specified in terms of the following aspects: *

* *

    *
  • the type of modification (add, replace, or delete the value of an attribute) *
  • the type of value being modified (string or binary) *
  • the name of the attribute being modified *
  • the actual value *
*

* * After you specify a change to an attribute, you can execute the change * by calling the LDAPConnection.modify method and specifying * the DN of the entry that you want to modify. *

* * @version 1.0 * @see org.ietf.ldap.LDAPConnection#modify(java.lang.String, org.ietf.ldap.LDAPModification) */ public class LDAPModification implements Serializable { static final long serialVersionUID = 4836472112866826595L; /** * Specifies that a value should be added to an attribute. */ public static final int ADD = 0; /** * Specifies that a value should be removed from an attribute. */ public static final int DELETE = 1; /** * Specifies that a value should replace the existing value in an attribute. */ public static final int REPLACE = 2; /** * Internal variables */ private int operation; private LDAPAttribute attribute; /** * Specifies a modification to be made to an attribute. * @param op the type of modification to make. This can be one of the following: *

*

    *
  • LDAPModification.ADD (the value should be added to the attribute) *
  • LDAPModification.DELETE (the value should be removed from the attribute) *
  • LDAPModification.REPLACE (the value should replace the existing value of the attribute) *

* @param attr the attribute (possibly with values) to modify * @see org.ietf.ldap.LDAPAttribute */ public LDAPModification( int op, LDAPAttribute attr ) { operation = op; attribute = attr; } /** * Returns the attribute (possibly with values) to be modified. * @return the attribute to be modified. * @see org.ietf.ldap.LDAPAttribute */ public LDAPAttribute getAttribute() { return attribute; } /** * Returns the type of modification specified by this object. * @return one of the following types of modifications: *

*

    *
  • LDAPModification.ADD (the value should be added to the attribute) *
  • LDAPModification.DELETE (the value should be removed from the attribute) *
  • LDAPModification.REPLACE (the value should replace the existing value of the attribute) *

*/ public int getOp() { return operation; } /** * Retrieves the BER (Basic Encoding Rules) representation * of the current modification. * @return BER representation of the modification. */ public BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEREnumerated(operation)); seq.addElement(attribute.getBERElement()); return seq; } /** * Retrieves the string representation of the current * modification. For example: * *

     * LDAPModification: REPLACE, LDAPAttribute {type='mail', values='babs@ace.com'}
     * LDAPModification: ADD, LDAPAttribute {type='description', values='This entry was modified with the modattrs program'}
     * 
* * @return string representation of the current modification. */ public String toString() { String s = "LDAPModification: "; if ( operation == ADD ) s += "ADD, "; else if ( operation == DELETE ) s += "DELETE, "; else if ( operation == REPLACE ) s += "REPLACE, "; else s += "INVALID OP, "; s += attribute; return s; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPControl.java0000664001003300100330000004536210602743265026773 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.*; import java.util.*; import java.lang.reflect.*; import org.ietf.ldap.ber.stream.*; import org.ietf.ldap.client.*; import org.ietf.ldap.util.*; import org.ietf.ldap.controls.*; /** * Represents arbitrary control data that can be used with a * a particular LDAP operation. LDAP controls are part of version 3 * of the LDAP protocol. *

* * LDAP controls allow you to extend the functionality of * an LDAP operation. For example, you can use an LDAP control * for the search operation to sort search results on an LDAP server. *

* * An LDAP control can be either a server control or * a client control: *

*

    *
  • Server controls can be sent to the LDAP server or returned * by the server on any operation. *
  • Client controls are intended to affect only the client side * of the operation. *
*

* * An LDAP control consists of the following information: *

*

    *
  • A unique object ID (OID) that identifies the control.

    *

  • A "criticality" field, which indicates whether or * not the control is critical to the operation. (If the control is * critical to the operation and the server does not support the control, * the server should not execute the operation.)

    *

  • Data pertaining to the control.

    *

*

* * To determine which server controls are supported by a particular server, * you need to search for the root DSE (DSA-specific entry, where DSA is * another term for "LDAP server") and find the values of the * supportedControl attribute. This attribute contains the * object IDs (OIDs) of the controls supported by this server. *

* * The following section of code demonstrates how to get the list * of the server controls supported by an LDAP server. *

* *

 * public static void main( String[] args )
 * {
 *   LDAPConnection ld = new LDAPConnection();
 *   try {
 *     String MY_HOST = "localhost";
 *     int MY_PORT = 389;
 *     ld.connect( MY_HOST, MY_PORT );
 *     try {
 *       ld.authenticate( 3, "cn=Directory Manager", "23skidoo" );
 *     } catch( LDAPException e ) {
 *       System.out.println( "LDAP server does not support v3." );
 *       ld.disconnect();
 *       System.exit(1);
 *     }
 *
 *     String MY_FILT = "(objectclass=*)";
 *     String MY_BASE = "";
 *     String getAttrs[] = { "supportedControl" };
 *     LDAPSearchResults res = ld.search( MY_BASE,
 *       LDAPConnection.SCOPE_BASE, MY_FILT, getAttrs, false );
 *
 *     while ( res.hasMoreElements() ) {
 *       LDAPEntry findEntry = (LDAPEntry)res.nextElement();
 *       LDAPAttributeSet findAttrs = findEntry.getAttributeSet();
 *       Enumeration enumAttrs = findAttrs.getAttributes();
 *
 *         while ( enumAttrs.hasMoreElements() ) {
 *           LDAPAttribute anAttr = (LDAPAttribute)enumAttrs.nextElement();
 *           String attrName = anAttr.getName();
 *           System.out.println( attrName );
 *           Enumeration enumVals = anAttr.getStringValues();
 *
 *           while ( enumVals.hasMoreElements() ) {
 *             String aVal = ( String )enumVals.nextElement();
 *             System.out.println( "\t" + aVal );
 *           }
 *         }
 *      }
 *   }
 *   catch( LDAPException e ) {
 *     System.out.println( "Error: " + e.toString() );
 *   }
 *   try {
 *     ld.disconnect();
 *   }
 *   catch( LDAPException e ) {
 *     System.exit(1);
 *   }
 *   System.exit(0);
 * }
 * 
*

* * If you compile and run this example against an LDAP server that * supports v3 of the protocol, you might receive the following results: *

* *

 * supportedcontrol
 *   2.16.840.1.113730.3.4.2
 *   2.16.840.1.113730.3.4.3
 *   2.16.840.1.113730.3.4.4
 *   2.16.840.1.113730.3.4.5
 *   1.2.840.113556.1.4.473
 * 
*

* * For more information on LDAP controls, see the Internet-Draft on * the LDAP v3 protocol. (Note that this internet draft is still a * work in progress. You can find the latest draft at the ASID home page. *

* * @version 1.0 * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPConnection#getResponseControls * @see org.ietf.ldap.LDAPConstraints#getControls * @see org.ietf.ldap.LDAPConstraints#setControls */ public class LDAPControl implements Cloneable, Serializable { static final long serialVersionUID = 5149887553272603753L; public final static String MANAGEDSAIT = "2.16.840.1.113730.3.4.2"; /* Password information sent back to client */ public final static String PWEXPIRED = "2.16.840.1.113730.3.4.4"; public final static String PWEXPIRING = "2.16.840.1.113730.3.4.5"; /** * Default constructor for the LDAPControl class. */ public LDAPControl() { } /** * Constructs a new LDAPControl object using the * specified object ID (OID), "criticality" field, and * data to be used by the control. *

* * @param id the object ID (OID) identifying the control * @param critical true if the LDAP operation should be * cancelled when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @param vals control-specific data * @see org.ietf.ldap.LDAPConstraints#setControls */ public LDAPControl( String id, boolean critical, byte vals[] ) { _oid = id; _critical = critical; _value = vals; } /** * Gets the object ID (OID) of the control. * @return object ID (OID) of the control. */ public String getID() { return _oid; } /** * Specifies whether or not the control is critical to the LDAP operation. * @return true if the LDAP operation should be cancelled when * the server does not support this control. */ public boolean isCritical() { return _critical; } /** * Gets the data in the control. * @return the data in the control as a byte array. */ public byte[] getValue() { return _value; } /** * Gets the ber representation of control. * @return ber representation of control. */ BERElement getBERElement() { BERSequence seq = new BERSequence(); seq.addElement(new BEROctetString (_oid)); seq.addElement(new BERBoolean (_critical)); if ( (_value == null) || (_value.length < 1) ) seq.addElement(new BEROctetString ((byte[])null)); else { seq.addElement(new BEROctetString (_value, 0, _value.length)); } return seq; } /** * Associates a class with an oid. This class must be an extension of * LDAPControl, and should implement the LDAPControl( * String oid, boolean critical, byte[] value) constructor to * instantiate the control. * @param oid the string representation of the oid * @param controlClass the class that instantatiates the control associated * with oid * @exception org.ietf.ldap.LDAPException If the class parameter is not * a subclass of LDAPControl or the class parameter does not * implement the LDAPControl(String oid, boolean critical, byte[] value) * constructor. */ public static void register( String oid, Class controlClass ) throws LDAPException { if (controlClass == null) { return; } // 1. make sure controlClass is a subclass of LDAPControl Class superClass = controlClass; while (superClass != LDAPControl.class && superClass != null) { superClass = superClass.getSuperclass(); } if (superClass == null) throw new LDAPException("controlClass must be a subclass of " + "LDAPControl", LDAPException.PARAM_ERROR); // 2. make sure controlClass has the proper constructor Class[] cparams = { String.class, boolean.class, byte[].class }; try { controlClass.getConstructor(cparams); } catch (NoSuchMethodException e) { throw new LDAPException("controlClass does not implement the " + "correct contstructor", LDAPException.PARAM_ERROR); } // 3. check if the hash table exists if (_controlClassHash == null) { _controlClassHash = new Hashtable(); } // 4. add the controlClass _controlClassHash.put(oid, controlClass); } /** * Returns the Class that has been registered to oid. * @param oid a String that associates the control class to a control * @return a Class that can instantiate a control of the * type specified by oid. * @see org.ietf.ldap.LDAPControl#register * */ protected static Class lookupControlClass( String oid ) { if ( _controlClassHash == null ) { return null; } return (Class)_controlClassHash.get(oid); } /** * Returns a LDAPControl object instantiated by the Class * associated by LDAPControl.register to the oid. If * no Class is found for the given control, or an exception occurs when * attempting to instantiate the control, a basic LDAPControl * is instantiated using the parameters. * @param oid the oid of the control to instantiate * @param critical true if this is a critical control * @param value the byte value for the control * @return a newly instantiated LDAPControl. * @see org.ietf.ldap.LDAPControl#register */ protected static LDAPControl createControl( String oid, boolean critical, byte[] value ) { Class controlClass = lookupControlClass(oid); if ( controlClass == null ) { return new LDAPControl(oid, critical, value); } Class[] cparams = { String.class, boolean.class, byte[].class }; Constructor creator = null; try { creator = controlClass.getConstructor(cparams); } catch (NoSuchMethodException e) { //shouldn't happen, but... System.err.println("Caught java.lang.NoSuchMethodException while" + " attempting to instantiate a control of type " + oid); return new LDAPControl(oid, critical, value); } Object[] oparams = { oid, new Boolean(critical), value } ; LDAPControl returnControl = null; try { returnControl = (LDAPControl)creator.newInstance(oparams); } catch (Exception e) { String eString = null; if (e instanceof InvocationTargetException) { eString = ((InvocationTargetException) e).getTargetException().toString(); } else { eString = e.toString(); } System.err.println("Caught " + eString + " while attempting to" + " instantiate a control of type " + oid); returnControl = new LDAPControl(oid, critical, value); } return returnControl; } /** * Returns a LDAPControl object instantiated by the Class * associated by LDAPControl.register to the oid. If * no Class is found for the given control, or an exception occurs when * attempting to instantiate the control, a basic LDAPControl * is instantiated using the parameters. * @param el the BERElement containing the control * @return a newly instantiated LDAPControl. * @see org.ietf.ldap.LPAPControl#register * * Note: * This code was extracted from JDAPControl(BERElement el) * constructor. */ static LDAPControl parseControl( BERElement el ) { BERSequence s = (BERSequence)el; String oid = null; boolean critical = false; byte[] value = null; try{ oid = new String(((BEROctetString)s.elementAt(0)).getValue(), "UTF8"); } catch(Throwable x) {} Object obj = s.elementAt(1); if (obj instanceof BERBoolean) { critical = ((BERBoolean)obj).getValue(); } else { value = ((BEROctetString)obj).getValue(); } if (s.size() >= 3) { value = ((BEROctetString)s.elementAt(2)).getValue(); } return createControl(oid, critical, value); } /** * Instantiates all of the controls contained within the LDAP message * fragment specified by data and returns them in an LDAPControl * array. This fragment can be either the entire LDAP message or just the * control section of the message. *

* If an exception occurs when instantiating a control, that control is * returned as a basic LDAPControl. * @param data the LDAP message fragment in raw BER format * @return an LDAPControl array containing all of the controls * from the message fragment. * @exception java.lang.IOException If the data passed to this method * is not a valid LDAP message fragment. * @see org.ietf.ldap.LDAPControl#register */ public static LDAPControl[] newInstance(byte[] data) throws IOException { int[] bread = { 0 }; BERElement el = BERElement.getElement(new JDAPBERTagDecoder(), new ByteArrayInputStream(data), bread); LDAPControl[] jc = null; try { // see if data is a LDAP message LDAPMessage msg = LDAPMessage.parseMessage(el); return msg.getControls(); } catch (IOException e) { // that didn't work; let's see if its just the controls BERTag tag = (BERTag)el; if ( tag.getTag() == (BERTag.CONSTRUCTED|BERTag.CONTEXT|0) ) { BERSequence controls = (BERSequence)tag.getValue(); jc = new LDAPControl[controls.size()]; for (int i = 0; i < controls.size(); i++) { jc[i] = parseControl(controls.elementAt(i)); } } } return jc; } /** * Creates a copy of the control * * @return copy of the control */ public Object clone() { byte[] vals = null; if ( _value != null ) { vals = new byte[_value.length]; for( int i = 0; i < _value.length; i++ ) vals[i] = _value[i]; } LDAPControl control = new LDAPControl( _oid, _critical, vals ); return control; } /** * Create a "flattened" BER encoding from a BER, * and return it as a byte array. * @param ber a BER encoded sequence * @return the byte array of encoded data. */ protected byte[] flattenBER( BERSequence ber ) { /* Suck out the data and return it */ ByteArrayOutputStream outStream = new ByteArrayOutputStream(); try { ber.write( outStream ); } catch ( IOException e ) { return null; } return outStream.toByteArray(); } /** * Return a string representation of the control for debugging * * @return a string representation of the control. */ public String toString() { String s = getID() + ' ' + isCritical(); if ( _value != null ) { s += ' ' + LDIF.toPrintableString( _value ); } return "LDAPControl {" + s + '}'; } private String _oid; protected boolean _critical = false; protected byte[] _value = null; static private Hashtable _controlClassHash = null; static { try { LDAPControl.register( LDAPPasswordExpiringControl.EXPIRING, LDAPPasswordExpiringControl.class ); LDAPControl.register( LDAPPasswordExpiredControl.EXPIRED, LDAPPasswordExpiredControl.class ); LDAPControl.register( LDAPEntryChangeControl.ENTRYCHANGED, LDAPEntryChangeControl.class ); LDAPControl.register( LDAPSortControl.SORTRESPONSE, LDAPSortControl.class ); LDAPControl.register( LDAPVirtualListResponse.VIRTUALLISTRESPONSE, LDAPVirtualListResponse.class ); } catch (LDAPException e) { } } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSchemaElement.java0000664001003300100330000005113510602743265030060 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.*; /** * * Abstract class representing an element (such as an object class * definition, an attribute type definition, or a matching rule * definition) in the schema. The specific types of elements are * represented by the LDAPObjectClassSchema, * LDAPAttributeSchema, and LDAPMatchingRuleSchema * subclasses. *

* * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of an object class, * attribute type, or matching rule. All of these schema elements * can specify the following information: *

* *

    *
  • a name identifying the element *
  • an OID identifying the element *
  • a description of the element *
  • a qualifier "OBSOLETE" *
*

* * In addition, there are optional standard qualifiers for attribute * types (see LDAPAttributeSchema), and implementation-specific * qualifiers may be added. Non-standard qualifiers must have names * starting with X-, e.g. "X-OWNER 'John Jacobson'". Optional and * non-standard qualifiers can be accessed with getQualifier and * setQualifier, and enumerated with * getQualifierNames. *

* * The LDAPSchemaElement class implements methods that * you can use with different types of schema elements (object class * definitions, attribute type definitions, and matching rule definitions). * You can do the following: *

    *
  • get the name of a schema element *
  • get the OID of a schema element *
  • get the description of a schema element *
  • add an element to the schema *
  • remove an element from the schema *
*

* * @see org.ietf.ldap.LDAPObjectClassSchema * @see org.ietf.ldap.LDAPAttributeSchema * @see org.ietf.ldap.LDAPMatchingRuleSchema * @version 1.0 **/ public abstract class LDAPSchemaElement implements Serializable { static final long serialVersionUID = -3972153461950418863L; /** * Constructs a blank element. */ protected LDAPSchemaElement() { } /** * Constructs a definition explicitly * * @param names names of element * @param oid dotted-string object identifier * @param description description of element */ protected LDAPSchemaElement( String[] names, String oid, String description ) { if ( oid == null ) { throw new IllegalArgumentException( "OID required" ); } this.names = names; this.oid = oid; this.description = description; } /** * Gets the description of the object class, attribute type, * or matching rule. * @return the description of the object class, attribute type, * or matching rule. */ public String getDescription() { return description; } /** * Gets the object ID (OID) of the object class, attribute type, * or matching rule in dotted-string format (for example, "1.2.3.4"). * @return the OID of the object class, attribute type, * or matching rule. */ public String getID() { return oid; } /** * Gets the names of the schema element * * @return the names of the schema element */ public String[] getNames() { return names; } /** * Gets the value of a qualifier which is not predefined. * @param name name of qualifier * @return value or values of qualifier; null if not * present, a zero-length array if present but with no value. */ public String[] getQualifier( String name ) { if ( properties == null ) { return null; } Object o = properties.get( name ); if ( o == null ) { return null; } if ( o instanceof Vector ) { Vector v = (Vector)o; String[] vals = new String[v.size()]; v.copyInto( vals ); return vals; } String s = (String)o; if ( s.length() < 1 ) { return new String[0]; } else { return new String[] { s }; } } /** * Gets an enumeration of all qualifiers which are not predefined. * @return enumeration of qualifiers. */ public Enumeration getQualifierNames() { return properties.keys(); } /** * Reports if the element is marked as obsolete. * @return true if the element is defined as obsolete. */ public boolean isObsolete() { return (properties == null) ? false : properties.containsKey(OBSOLETE); } /** * Keeps track of qualifiers which are not predefined. * @param name name of qualifier * @param value value of qualifier. "" for no value, null * to remove the qualifier */ public void setQualifier( String name, String value ) { if ( properties == null ) { properties = new Hashtable(); } if ( value != null ) { properties.put( name, value ); } else { properties.remove( name ); } } /** * Keeps track of qualifiers which are not predefined. * @param name name of qualifier * @param values array of values */ public void setQualifier( String name, String[] values ) { if ( values == null ) { return; } if ( properties == null ) { properties = new Hashtable(); } Vector v = new Vector(); for( int i = 0; i < values.length; i++ ) { v.addElement( values[i] ); } properties.put( name, v ); } /** * Returns a String in a format suitable for directly adding to a * Directory, as a value of the particular schema * element attribute. See the format definition for each derived class * * @return Directory format of the schema element as a String */ public abstract String toString(); /** * Parses a raw schema value into OID, name, description, and * a Hashtable of other qualifiers and values. * * @param raw a raw schema definition */ protected void parseValue( String raw ) { names = null; if ( properties == null ) { properties = new Hashtable(); } int l = raw.length(); // Processing is faster in char array than in String char[] ch = new char[l]; raw.getChars( 0, l, ch, 0 ); // Trim leading and trailing space l--; while( ch[l] == ' ' ) { l--; } int start = 0; while( ch[start] == ' ' ) { start++; } // Skip past "( " and ")" to start of OID start += 2; // Find end of OID int ind = start + 1; while( ch[ind] != ' ' ) { ind++; } oid = new String( ch, start, ind - start ); ind = ind + 1; String s; String val; while ( ind < l ) { // Skip past blanks to start of next token while( ch[ind] == ' ' ) { ind++; } // Find end of token int last = ind + 1; while( (last < l) && (ch[last] != ' ') ) last++; if ( last < l ) { // Found a token s = new String( ch, ind, last-ind ); ind = last; if ( novalsTable.containsKey( s ) ) { properties.put( s, "" ); continue; } } else { // Reached end of string with no end of token s = ""; ind = l; break; } // Find the start of the value of the token while( (ind < l) && (ch[ind] == ' ') ) { ind++; } last = ind + 1; if ( ind >= l ) { break; } boolean quoted = false; boolean list = false; if ( ch[ind] == '\'' ) { // The value is quoted quoted = true; ind++; while( (last < l) && (ch[last] != '\'') ) { last++; } } else if ( ch[ind] == '(' ) { // The value is a list list = true; ind++; while( (last < l) && (ch[last] != ')') ) { last++; } } else { // The value is not quoted while( (last < l) && (ch[last] != ' ') ) { last++; } } if ( (ind < last) && (last <= l) ) { if ( list ) { Vector v = new Vector(); if ( ch[ind] == ' ' ) { ind++; } val = new String( ch, ind, last-ind-1 ); // Is this a quoted list? If so, use ' as delimiter, // otherwise use ' '. The space between quoted // values will be returned as tokens containing only // white space. White space is not valid in a list // value, so we just remove all tokens containing // only white space. String delim = (val.indexOf( '\'' ) >= 0) ? "'" : " "; StringTokenizer st = new StringTokenizer( val, delim ); while ( st.hasMoreTokens() ) { String tok = st.nextToken().trim(); if ( (tok.length() > 0) && !tok.equals( "$" ) ) { v.addElement( tok ); } } properties.put( s, v ); } else { val = new String( ch, ind, last-ind ); if ( s.equals( "NAME" ) ) { names = new String[] { val }; } else if ( s.equals( "DESC" ) ) { description = val; } else { properties.put( s, val ); } if ( quoted ) { last++; } } } ind = last + 1; } if ( names == null ) { names = getQualifier( "NAME" ); if ( names == null ) { names = new String[0]; } } } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return null; } /** * Formats a String in the format defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of this format). * This is the format that LDAP servers and clients use to exchange * schema information. For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of the "attributetypes" attribute are attribute type * descriptions in this format. *

* @param quotingBug true if single quotes are to be * supplied around the SYNTAX and SUP value * @return a formatted String for defining a schema element. */ String getValue() { return getValue( false ); } String getValue( boolean quotingBug ) { return null; } /** * Prepares the initial common part of a schema element value in * RFC 2252 format for submitting to a server * * @return the OID, name, description, and possibly OBSOLETE * fields of a schema element definition. */ String getValuePrefix() { String s = "( " + oid + ' '; s += getNameField(); if ( description != null ) { s += "DESC \'" + description + "\' "; } if ( isObsolete() ) { s += OBSOLETE + ' '; } return s; } String getNameField() { String s = ""; if ( (names != null) && (names.length > 0) ) { s += "NAME "; if ( names.length > 1 ) { s += "( "; } for( int i = 0; i < names.length; i++ ) { s += '\'' + names[i] + "\' "; } if ( names.length > 1 ) { s += ") "; } } return s; } /** * Gets qualifiers which may or may not be present * * @param names list of qualifiers to look up * @return String in RFC 2252 format containing any values * found, not terminated with ' '. */ protected String getOptionalValues( String[] names ) { String s = ""; for( int i = 0; i < names.length; i++ ) { String[] vals = getQualifier( names[i] ); if ( (vals != null) && (vals.length > 0) ) { s += names[i] + ' ' + vals[0]; } } return s; } /** * Gets any qualifiers marked as custom (starting with "X-") * * @return string in RFC 2252 format, without a terminating * ' '. */ protected String getCustomValues() { String s = ""; Enumeration en = properties.keys(); while( en.hasMoreElements() ) { String key = (String)en.nextElement(); if ( !key.startsWith( "X-" ) ) { continue; } s += getValue( key, true, false ) + ' '; } // Strip trailing ' ' if ( (s.length() > 0) && (s.charAt( s.length() - 1 ) == ' ') ) { s = s.substring( 0, s.length() - 1 ); } return s; } /** * Gets a qualifier's value or values, if present, and formats * the String according to RFC 2252 * * @param key the qualifier to get * @param doQuote true if values should be enveloped * with single quotes * @param doDollar true if a list of values should use * " $ " as separator; that is true for object class attribute lists * @return String in RFC 2252 format, without a terminating * ' '. */ String getValue( String key, boolean doQuote, boolean doDollar ) { String s = ""; Object o = properties.get( key ); if ( o == null ) { return s; } if ( o instanceof String ) { if ( ((String)o).length() > 0 ) { s += key + ' '; if ( doQuote ) { s += '\''; } s += (String)o; if ( doQuote ) { s += '\''; } } } else { s += key + " ( "; Vector v = (Vector)o; for( int i = 0; i < v.size(); i++ ) { if ( doQuote ) { s += '\''; } s += (String)v.elementAt(i); if ( doQuote ) { s += '\''; } s += ' '; if ( doDollar && (i < (v.size() - 1)) ) { s += "$ "; } } s += ')'; } return s; } /** * Gets a qualifier's value or values, if present, and format * the String according to RFC 2252. * * @param key the qualifier to get * @param doQuote true if values should be enveloped * with single quotes * @return String in RFC 2252 format, without a terminating * ' '. */ String getValue( String key, boolean doQuote ) { return getValue( key, doQuote, true ); } /** * Creates a string for use in toString with any qualifiers of the element. * * @param ignore any qualifiers to NOT include * @return a String with any known qualifiers. */ String getQualifierString( String[] ignore ) { Hashtable toIgnore = null; if ( ignore != null ) { toIgnore = new Hashtable(); for( int i = 0; i < ignore.length; i++ ) { toIgnore.put( ignore[i], ignore[i] ); } } String s = ""; Enumeration en = getQualifierNames(); while( en.hasMoreElements() ) { String qualifier = (String)en.nextElement(); if ( (toIgnore != null) && toIgnore.containsKey( qualifier ) ) { continue; } s += "; " + qualifier; String[] vals = getQualifier( qualifier ); if ( vals == null ) { s += ' '; continue; } s += ": "; for( int i = 0; i < vals.length; i++ ) { s += vals[i] + ' '; } } // Strip trailing ' ' if ( (s.length() > 0) && (s.charAt( s.length() - 1 ) == ' ') ) { s = s.substring( 0, s.length() - 1 ); } return s; } // Constants for known syntax types public static final int unknown = 0; public static final int cis = 1; public static final int binary = 2; public static final int telephone = 3; public static final int ces = 4; public static final int dn = 5; public static final int integer = 6; protected static final String cisString = "1.3.6.1.4.1.1466.115.121.1.15"; protected static final String binaryString = "1.3.6.1.4.1.1466.115.121.1.5"; protected static final String telephoneString = "1.3.6.1.4.1.1466.115.121.1.50"; protected static final String cesString = "1.3.6.1.4.1.1466.115.121.1.26"; protected static final String intString = "1.3.6.1.4.1.1466.115.121.1.27"; protected static final String dnString = "1.3.6.1.4.1.1466.115.121.1.12"; // Predefined qualifiers which apply to any schema element type public static final String OBSOLETE = "OBSOLETE"; public static final String SUPERIOR = "SUP"; // Predefined qualifiers public static final String SYNTAX = "SYNTAX"; // Properties which are common to all schema elements protected String oid = null; protected String description = ""; protected String attrName = null; protected String rawValue = null; protected String[] names = new String[0]; // Additional qualifiers protected Hashtable properties = null; // Qualifiers known to not have values static protected Hashtable novalsTable = new Hashtable(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPAuthProvider.java0000664001003300100330000001046710602743265027765 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; /** * Represents information used to authenticate the client in cases where * the client follows referrals automatically. If you are defining a class * that implements the LDAPRebind interface, your implementation * of the LDAPRebind.getRebindAuthentication method needs to * construct and return an object of this class. *

* * For example, the following method sets up authentication information based * on the LDAP server identified in the referral. Ideally, this method would be * defined as part of a class implementing the LDAPRebind interface. * *

 * private String myDN = "cn=Directory Manager,o=Ace Industry,c=US";
 * private String myPW = "alway4444";
 * private LDAPAuthProvider myRebindInfo;
 * ...
 * public LDAPAuthProvider getRebindAuthentication( String host, int port ) {
 *  if ( host.equalsIgnoreCase( "alway.mcom.com" ) && ( port == 389 ) ) {
 *      myRebindInfo = new LDAPAuthProvider( myDN, myPW );
 *  } else {
 *      myRebindInfo = new LDAPAuthProvider( "", "" );
 *  }
 *  return myRebindInfo;
 * } 
* * @version 1.0 * @see org.ietf.ldap.LDAPAuthHandler */ public class LDAPAuthProvider implements Serializable { static final long serialVersionUID = 7161655313564756294L; private String _dn; private byte[] _password; /** * Constructs information that is used by the client * for authentication when following referrals automatically. * @param dn distinguished name to use for authenticating to * the LDAP server during an automatic referral (if the client * is set up to follow referrals automatically) * @param password password to use for authenticating to * the LDAP server during an automatic referral (if the client * is set up to follow referrals automatically) */ public LDAPAuthProvider( String dn, byte[] password ) { _dn = dn; _password = password; } /** * Returns the distinguished name to be used for reauthentication, * if the client is set up to follow referrals automatically. * @return distinguished name to use when authenticating to * other LDAP servers during referrals. */ public String getDN() { return _dn; } /** * Returns the password to be used for reauthentication, * if the client is set up to follow referrals automatically. * @return password to use when authenticating to other * LDAP servers during referrals. */ public byte[] getPassword() { return _password; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSortKey.java0000664001003300100330000001500710602743265026744 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * Represents sorting instructions for a particular attribute. * * @version 1.0 */ public class LDAPSortKey implements java.io.Serializable { static final long serialVersionUID = -7044232342344864405L; public final static int REVERSE = 0x81; /** * Constructs a new LDAPSortKey object that will * sort based on the specified instructions. * @param keyDescription a single attribute specification by which to sort * If preceded by a hyphen ("-"), the attribute is sorted in reverse order. * You can also specify the object ID (OID) of a matching rule after * a colon (":"). For example: *

*

    *
  • "cn" (sort by the cn attribute)

    *

  • "-cn" (sort by the cn attribute in * reverse order)

    *

  • "-cn:1.2.3.4" (sort by the cn * attribute in reverse order and use the matching rule identified * by the OID 1.2.3.4)

    *

* @see org.ietf.ldap.controls.LDAPSortControl * @see org.ietf.ldap.controls.LDAPVirtualListControl */ public LDAPSortKey( String keyDescription ) { if ( (keyDescription != null) && (keyDescription.length() > 0) ) { if ( keyDescription.charAt( 0 ) == '-' ) { m_reverse = true; m_key = keyDescription.substring( 1 ); } else { m_reverse = false; m_key = keyDescription; } int colonIndex = m_key.indexOf( ':' ); if ( colonIndex == 0 ) m_key = null; else if ( colonIndex > 0 ) { m_matchRule = m_key.substring( colonIndex+1 ); m_key = m_key.substring( 0, colonIndex ); } } } /** * Constructs a new LDAPSortKey object that will * sort based on the specified attribute and sort order. * @param key a single attribute by which to sort. For example: *

*

    *
  • "cn" (sort by the cn attribute) *
  • "givenname" (sort by the givenname * attribute) *
* @param reverse if true, the sorting is done in * descending order * @see org.ietf.ldap.controls.LDAPSortControl * @see org.ietf.ldap.controls.LDAPVirtualListControl */ public LDAPSortKey( String key, boolean reverse) { m_key = key; m_reverse = reverse; m_matchRule = null; } /** * Constructs a new LDAPSortKey object that will * sort based on the specified attribute, sort order, and matching * rule. * @param key a single attribute by which to sort. For example: *

*

    *
  • "cn" (sort by the cn attribute) *
  • "givenname" (sort by the givenname * attribute) *
* @param reverse if true, the sorting is done in * descending order * @param matchRule object ID (OID) of the matching rule for * the attribute (for example, 1.2.3.4) * @see org.ietf.ldap.controls.LDAPSortControl * @see org.ietf.ldap.controls.LDAPVirtualListControl */ public LDAPSortKey( String key, boolean reverse, String matchRule) { m_key = key; m_reverse = reverse; m_matchRule = matchRule; } /** * Returns the attribute by which to sort. * @return a single attribute by which to sort. */ public String getKey() { return m_key; } /** * Returns true if sorting is to be done in descending order. * @return true if sorting is to be done in descending order. */ public boolean getReverse() { return m_reverse; } /** * Returns the object ID (OID) of the matching rule used for sorting. * If no matching rule is specified, null is returned. * @return the object ID (OID) of the matching rule, or null * if the sorting instructions specify no matching rule. */ public String getMatchRule() { return m_matchRule; } public String toString() { StringBuffer sb = new StringBuffer("{SortKey:"); sb.append(" key="); sb.append(m_key); sb.append(" reverse="); sb.append(m_reverse); if (m_matchRule != null) { sb.append(" matchRule="); sb.append(m_matchRule); } sb.append("}"); return sb.toString(); } private String m_key; private boolean m_reverse; private String m_matchRule; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPObjectClassSchema.java0000664001003300100330000003223710602743265030665 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * The definition of an object class in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of an object class. * According to the RFC, the description of an object class can * include the following information: *

* *

    *
  • an OID identifying the object class *
  • a name identifying the object class *
  • a description of the object class *
  • the name of the parent object class *
  • the list of attribute types that are required in this object class *
  • the list of attribute types that are allowed (optional) in this * object class *
*

* * When you construct an LDAPObjectSchema object, you can specify * these types of information as arguments to the constructor or in the * ObjectClassDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * RFC 2252 also notes that you can specify whether or not an object class * is abstract, structural, or auxiliary in the object description. * Abstract object classes are used only to derive other object classes. * Entries cannot belong to an abstract object class. top * is an abstract object class. Entries must belong to a structural * object class, so most object classes are structural object classes. * Objects of the LDAPObjectClassSchema class are structural * object classes by default. Auxiliary object classes can be used to * add attributes to entries of different types. For example, an * auxiliary object class might be used to specify personal preference * attributes. An entry can not contain just that object class, but may * include it along with a structural object class, for example * inetOrgPerson. * If the definition of an object (in ObjectClassDescription format) * specifies the AUXILIARY keyword, an LDAPObjectClassSchema * object created from that description represents an auxiliary object class. *

* * You can get the name, OID, and description of this object class * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this object class definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines ObjectClassDescription as follows: *

*

 *    ObjectClassDescription = "(" whsp
 *        numericoid whsp      ; ObjectClass identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" whsp ]
 *        [ "SUP" oids ]       ; Superior ObjectClasses
 *        [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
 *                             ; default structural
 *        [ "MUST" oids ]      ; AttributeTypes
 *        [ "MAY" oids ]       ; AttributeTypes
 *    whsp ")"
 * 
* * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPObjectClassSchema extends LDAPSchemaElement { static final long serialVersionUID = -1732784695071118656L; /** * Constructs an object class definition, using the specified * information. * @param names names of the object class * @param oid object identifier (OID) of the object class * in dotted-string format (for example, "1.2.3.4") * @param description description of the object class * @param superiors names of parent object classes * (the object classes that this object class inherits from) * @param required array of names of attributes required * in this object class * @param optional array of names of optional attributes * allowed in this object class * @param type either ABSTRACT, STRUCTURAL, or AUXILIARY * @param obsolete true if the rule is obsolete */ public LDAPObjectClassSchema( String[] names, String oid, String[] superiors, String description, String[] required, String[] optional, int type, boolean obsolete ) { super( names, oid, description ); attrName = "objectclasses"; setQualifier( SUPERIOR, superiors ); if ( required != null ) { for( int i = 0; i < required.length; i++ ) { must.addElement( required[i] ); } } if ( optional != null ) { for( int i = 0; i < optional.length; i++ ) { may.addElement( optional[i] ); } } if ( (superiors != null) && (superiors.length > 1) ) { setQualifier( SUPERIOR, superiors ); } if ( obsolete ) { setQualifier( OBSOLETE, "" ); } } /** * Constructs an object class definition based on a description in * the ObjectClassDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of the "objectclasses" attribute are object class descriptions * in this format.) *

* * @param raw definition of the object in the ObjectClassDescription * format */ public LDAPObjectClassSchema( String raw ) { attrName = "objectclasses"; parseValue( raw ); setQualifier( TYPE, typeToString( getType() ) ); Object o = properties.get( "MAY" ); if ( o != null ) { if ( o instanceof Vector ) { may = (Vector)o; } else { may.addElement( o ); } } o = properties.get( "MUST" ); if ( o != null ) { if ( o instanceof Vector ) { must = (Vector)o; } else { must.addElement( o ); } } } /** * Gets an enumeration of names of optional attributes allowed * in this object class. * @return an enumeration of the names of optional attributes * allowed in this object class. */ public Enumeration getOptionalAttributes() { return may.elements(); } /** * Gets an enumeration of the names of the required attributes for * this object class. * @return an enumeration of the names of the required attributes * for this object class. */ public Enumeration getRequiredAttributes() { return must.elements(); } /** * Gets the names of all object classes that this class inherits * from. Typically only one, but RFC 2252 allows multiple * inheritance. * @return the names of the object classes from which this class * inherits. */ public String[] getSuperiors() { return getQualifier( SUPERIOR ); } /** * Gets the type of the object class. * @return STRUCTURAL, ABSTRACT, or AUXILIARY. */ public int getType() { int type = STRUCTURAL; if ( properties.containsKey( "AUXILIARY" ) ) { type = AUXILIARY; } else if ( properties.containsKey( "ABSTRACT" ) ) { type = ABSTRACT; } return type; } /** * Prepares a value in RFC 2252 format for submitting to a server. * * @param quotingBug true if SUP and SYNTAX values are to * be quoted. That is to satisfy bugs in certain LDAP servers. * @return a String ready for submission to an LDAP server. */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); String val = getValue( SUPERIOR, quotingBug ); if ( (val != null) && (val.length() > 0) ) { s += val + ' '; } String[] vals = getQualifier( TYPE ); if ( (vals != null) && (vals.length > 0) ) { s += vals[0] + ' '; } val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } if ( must.size() > 0 ) { s += "MUST " + vectorToList( must ); s += ' '; } if ( may.size() > 0 ) { s += "MAY " + vectorToList( may ); s += ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Gets the definition of the object class in Directory format * * @return definition of the object class in Directory format */ public String toString() { return getValue(); } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "objectclasses"; } /** * Creates a list within parentheses, with $ as delimiter * * @param vals values for list * @return a String with a list of values. */ protected String vectorToList( Vector vals ) { String val = "( "; for( int i = 0; i < vals.size(); i++ ) { val += (String)vals.elementAt(i) + ' '; if ( i < (vals.size() - 1) ) { val += "$ "; } } val += ')'; return val; } /** * Returns the object class type as a String * * @param type one of STRUCTURAL, ABSTRACT, or AUXILIARY * @return one of "STRUCTURAL", "ABSTRACT", "AUXILIARY", or null */ protected String typeToString( int type ) { switch( type ) { case STRUCTURAL: return "STRUCTURAL"; case ABSTRACT: return "ABSTRACT"; case AUXILIARY: return "AUXILIARY"; default: return null; } } public static final int STRUCTURAL = 0; public static final int ABSTRACT = 1; public static final int AUXILIARY = 2; private Vector must = new Vector(); private Vector may = new Vector(); private int type = STRUCTURAL; // Qualifiers known to not have values; prepare a Hashtable static final String[] NOVALS = { "ABSTRACT", "STRUCTURAL", "AUXILIARY", "OBSOLETE" }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { "ABSTRACT", "STRUCTURAL", "AUXILIARY", "MUST", "MAY", "SUP", "OBSOLETE"}; // Key for type in the properties Hashtable static final String TYPE = "TYPE"; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPResponseControl.java0000664001003300100330000000534210602743265030504 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /* * This object represents the value of the LDAPConnection.m_responseControlTable hashtable. * It stores the response controls and its corresponding LDAPConnection and * the message ID for its corresponding LDAPMessage. */ class LDAPResponseControl implements java.io.Serializable { static final long serialVersionUID = 389472019686058593L; private LDAPConnection m_connection; private int m_messageID; private LDAPControl[] m_controls; public LDAPResponseControl(LDAPConnection conn, int msgID, LDAPControl[] controls) { m_connection = conn; m_messageID = msgID; m_controls = new LDAPControl[controls.length]; for (int i=0; iLDAPSSLSocketFactoryExt interface. *

* * To construct an object of this class, you need to specify the * name of a class that implements the javax.net.ssl.SSLSocket * interface. If you do not specify a class name, the class * netscape.net.SSLSocket is used by default. This * class is included with Netscape Communicator 4.05 and up. *

* * If you are using a Java VM that provides certificate database * management (such as Netscape Communicator), you can authenticate * your client to a secure LDAP server by using certificates. *

* * @version 1.0 * @see LDAPSSLSocketFactoryExt * @see LDAPConnection#LDAPConnection(org.ietf.ldap.LDAPSocketFactory) */ public class LDAPSSLSocketFactory implements LDAPSSLSocketFactoryExt, Serializable { static final long serialVersionUID = -3331456736649381427L; /** * Indicates if client authentication is on. */ private boolean _clientAuth = false; /** * Name of class implementing SSLSocket. */ private String _packageName = "netscape.net.SSLSocket"; /** * The cipher suites */ private Object _cipherSuites = null; /** * Constructs an LDAPSSLSocketFactory object using * the default SSL socket implementation, * netscape.net.SSLSocket. (This class is provided * with Netscape Communicator 4.05 and higher.) */ public LDAPSSLSocketFactory() { } /** * Constructs an LDAPSSLSocketFactory object using * the default SSL socket implementation, * netscape.net.SSLSocket. (This class is provided * with Netscape Communicator 4.05 and up.) * @param clientAuth true if certificate-based client * authentication is desired. By default, client authentication is * not used. */ public LDAPSSLSocketFactory(boolean clientAuth) { _clientAuth = clientAuth; } /** * Constructs an LDAPSSLSocketFactory object using * the specified class. The class must implement the interface * javax.net.ssl.SSLSocket. * @param className the name of a class implementing * the javax.net.ssl.SSLSocket interface. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. */ public LDAPSSLSocketFactory(String className) { _packageName = new String(className); } /** * Constructs an LDAPSSLSocketFactory object using * the specified class. The class must implement the interface * javax.net.ssl.SSLSocket. * @param className the name of a class implementing * the javax.net.ssl.SSLSocket interface. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. * @param clientAuth true if certificate-based client * authentication is desired. By default, client authentication is * not used. */ public LDAPSSLSocketFactory(String className, boolean clientAuth) { _packageName = new String(className); _clientAuth = clientAuth; } /** * The constructor with the specified package for security and the specified * cipher suites. * @param className the name of a class implementing the interface * javax.net.ssl.SSLSocket. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. * @param cipherSuites the cipher suites to use for SSL connections */ public LDAPSSLSocketFactory(String className, Object cipherSuites) { _packageName = new String(className); _cipherSuites = cipherSuites; } /** * The constructor with the specified package for security and the specified * cipher suites. * @param className the name of a class implementing the interface * javax.net.ssl.SSLSocket. * Pass null for this parameter to use the * default SSL socket implementation, * netscape.net.SSLSocket, which is included with * Netscape Communicator 4.05 and higher. * @param cipherSuites the cipher suites to use for SSL connections * @param clientAuth true if certificate-based client * authentication is desired. By default, client authentication is * not used. */ public LDAPSSLSocketFactory(String className, Object cipherSuites, boolean clientAuth) { _packageName = new String(className); _cipherSuites = cipherSuites; _clientAuth = clientAuth; } /** * Enables certificate-based client authentication for an * application. The application must be running in a Java VM * that provides transparent certificate database management * (for example, Netscape Communicator's Java VM). * Call this method before you call createSocket. * @see org.ietf.ldap.LDAPSSLSocketFactory#isClientAuth * @see org.ietf.ldap.LDAPSSLSocketFactory#createSocket * Note: enableClientAuth() is deprecated. This method is replaced * by any one of the following constructors: *

* LDAPSSLSocketFactory(boolean) * LDAPSSLSocketFactory(java.lang.String, boolean) * LDAPSSLSocketFactory(java.lang.String, java.lang.Object, boolean) */ public void enableClientAuth() { _clientAuth = true; } /** * Enables client authentication for an application that uses * an external (file-based) certificate database. * This method is currently not implemented. * Call this method before you call createSocket. * @param certdb the pathname for the certificate database * @param keydb the pathname for the private key database * @param keypwd the password for the private key database * @param certnickname the alias for the certificate * @param keynickname the alias for the key * @see org.ietf.ldap.LDAPSSLSocketFactory#isClientAuth * @see org.ietf.ldap.LDAPSSLSocketFactory#createSocket * @exception LDAPException Since this method is not yet implemented, * calling this method throws an exception. * Note: enableClientAuth(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) is deprecated. * This method is replaced by any one of the following constructors: *

* LDAPSSLSocketFactory(boolean) * LDAPSSLSocketFactory(java.lang.String, boolean) * LDAPSSLSocketFactory(java.lang.String, java.lang.Object, boolean) */ public void enableClientAuth(String certdb, String keydb, String keypwd, String certnickname, String keynickname) throws LDAPException { throw new LDAPException("Client auth not supported now"); } /** * Returns true if client authentication is enabled. * @see org.ietf.ldap.LDAPSSLSocketFactory */ public boolean isClientAuth() { return _clientAuth; } /** * Returns the name of the class that implements SSL sockets for this factory. * * @return the name of the class that implements SSL sockets for this factory. */ public String getSSLSocketImpl() { return _packageName; } /** * Returns the suite of ciphers used for SSL connections made through * sockets created by this factory. * * @return the suite of ciphers used. */ public Object getCipherSuites() { return _cipherSuites; } /** * Returns a socket to the LDAP server with the specified * host name and port number. * @param host the host to connect to * @param port the port number * @return the socket to the host name and port number. * @exception LDAPException A socket to the specified host and port * could not be created. * @see org.ietf.ldap.LDAPSSLSocketFactory */ public Socket createSocket(String host, int port) throws LDAPException { Socket s = null; if (_clientAuth) { try { /* Check if running in Communicator; if so, enable client auth */ String[] types = { "java.lang.String" }; java.lang.reflect.Method m = DynamicInvoker.getMethod( "netscape.security.PrivilegeManager", "enablePrivilege", types ); if (m != null) { Object[] args = new Object[1]; args[0] = new String("ClientAuth"); m.invoke( null, args); } } catch (Exception e) { String msg = "LDAPSSLSocketFactory.createSocket: invoking " + "enablePrivilege: " + e.toString(); throw new LDAPException(msg, LDAPException.PARAM_ERROR); } } try { String cipherClassName = null; if (_cipherSuites != null) cipherClassName = _cipherSuites.getClass().getName(); /* Instantiate the SSLSocketFactory implementation, and find the right constructor */ Class c = Class.forName(_packageName); java.lang.reflect.Constructor[] m = c.getConstructors(); for (int i = 0; i < m.length; i++) { /* Check if the signature is right: String, int */ Class[] params = m[i].getParameterTypes(); if ( (_cipherSuites == null) && (params.length == 2) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int")) ) { Object[] args = new Object[2]; args[0] = host; args[1] = new Integer(port); s = (Socket)(m[i].newInstance(args)); return s; } else if ( (_cipherSuites != null) && (params.length == 3) && (params[0].getName().equals("java.lang.String")) && (params[1].getName().equals("int")) && (params[2].getName().equals(cipherClassName)) ) { Object[] args = new Object[3]; args[0] = host; args[1] = new Integer(port); args[2] = _cipherSuites; s = (Socket)(m[i].newInstance(args)); return s; } } throw new LDAPException("No appropriate constructor in " + _packageName, LDAPException.PARAM_ERROR); } catch (ClassNotFoundException e) { throw new LDAPException("Class " + _packageName + " not found", LDAPException.PARAM_ERROR); } catch (Exception e) { throw new LDAPException("Failed to create SSL socket", LDAPException.CONNECT_ERROR); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSSLSocketFactoryExt.java0000664001003300100330000000511510602743265031166 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * Represents an SSL socket connection that you can use to connect to an * LDAP server. This interface extends the base interface LDAPSocketFactory * and provides SSL-specific methods. *

* * @version 1.0 * @see LDAPSocketFactory * @see LDAPConnection#LDAPConnection(org.ietf.ldap.LDAPSocketFactory) */ public interface LDAPSSLSocketFactoryExt extends LDAPSocketFactory { /** * Returns the suite of ciphers used for SSL connections. These connections * are made through sockets created by the LDAPSSLSocketFactory. * * @return the suite of ciphers used. */ public Object getCipherSuites(); /** * Returns true if client authentication is enabled. * @see org.ietf.ldap.LDAPSSLSocketFactory#enableClientAuth */ public boolean isClientAuth(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/errors/0000775001003300100330000000000010667357313025357 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/errors/ErrorCodes.properties0000664001003300100330000000243707372631367031555 0ustar viveklvivekl0=Success 1=Operations error 2=Protocol error 3=Timelimit exceeded 4=Sizelimit exceeded 5=Compare false 6=Compare true 7=Strong authentication not supported 8=Strong authentication required 9=Partial results and referral received 10=Referral received 11=Administrative limit exceeded 12=Critical extension unavailable 13=Confidentiality required 14=SASL bind in progress 16=No such attribute 17=Undefined attribute type 18=Inappropriate matching 19=Constraint violation 20=Type or value exists 21=Invalid syntax 32=No such object 33=Alias problem 34=Invalid DN syntax 35=Object is a leaf 36=Alias dereferencing problem 48=Inappropriate authentication 49=Invalid credentials 50=Insufficient access 51=DSA is busy 52=DSA is unavailable 53=DSA is unwilling to perform 54=Loop detected 64=Naming violation 65=Object class violation 66=Operation not allowed on nonleaf 67=Operation not allowed on RDN 68=Already exists 69=Cannot modify object class 71=Affects multiple DSAs 80=Unknown error 81=Cannot contact LDAP server 85=Client Timelimit exceeded 89=Bad parameter to an LDAP method 91=Cannot connect to the LDAP server 92=Not supported by this version of the LDAP protocol 93=Requested LDAP control not found 94=No results returned 95=More results to return 96=Client detected loop 97=Referral hop limit exceeded ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPException.java0000664001003300100330000012673410602743265027314 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.client.opers.*; import java.io.*; /** * Indicates that an error has occurred. An LDAPException * can result from physical problems (such as network errors) as well as * problems with LDAP operations (for example, if the LDAP add operation * fails because of duplicate entry). *

* * Most errors that occur throw this type of exception. In order to determine * the cause of the error, you can call the getResultCode() * method to get the specific result code and compare this code against * the result codes defined as fields in this class. (For example, if * the result code matches the value of the field * LDAPException.TIME_LIMIT_EXCEEDED, the time limit passed * before the search operation could be completed.) *

* * This exception includes methods for getting an error message that * corresponds to the LDAP result code (for example, "Timelimit exceeded" * for LDAPException.TIME_LIMIT_EXCEEDED). These error * messages are specified in the following files: *

netscape/ldap/errors/ErrorCodes_locale_string.props
* where locale_string is the name of the locale that includes * the language and country, but not the variant. *

* * For example: *

netscape/ldap/errors/ErrorCodes_en_US.props
* * The LDAP Java classes get this locale name by calling the * java.util.Locale.toString method for the specified * locale and ignoring the variant. If no locale is specified, the * LDAP Java classes use the java.util.Locale.getDefault * method to get the locale of the local host system. *

* * In order to get error messages for different locales, you need to * provide files containing the error messages for those locales. * The files should be located in the netscape/ldap/errors * directory and should use the naming convention specified above. *

* * The following is a list of LDAP result codes: *

 * Result
 *  Code   Defined Value
 * ======  =============
 *   0     SUCCESS
 *   1     OPERATION_ERROR
 *   2     PROTOCOL_ERROR
 *   3     TIME_LIMIT_EXCEEDED
 *   4     SIZE_LIMIT_EXCEEDED
 *   5     COMPARE_FALSE
 *   6     COMPARE_TRUE
 *   7     AUTH_METHOD_NOT_SUPPORTED
 *   8     STRONG_AUTH_REQUIRED
 *   9     LDAP_PARTIAL_RESULTS
 *  10     REFERRAL (LDAP v3)
 *  11     ADMIN_LIMIT_EXCEEDED (LDAP v3)
 *  12     UNAVAILABLE_CRITICAL_EXTENSION (LDAP v3)
 *  13     CONFIDENTIALITY_REQUIRED (LDAP v3)
 *  14     SASL_BIND_IN_PROGRESS (LDAP v3)
 *  16     NO_SUCH_ATTRIBUTE
 *  17     UNDEFINED_ATTRIBUTE_TYPE
 *  18     INAPPROPRIATE_MATCHING
 *  19     CONSTRAINT_VIOLATION
 *  20     ATTRIBUTE_OR_VALUE_EXISTS
 *  21     INVALID_ATTRIBUTE_SYNTAX
 *  32     NO_SUCH_OBJECT
 *  33     ALIAS_PROBLEM
 *  34     INVALID_DN_SYNTAX
 *  35     IS_LEAF
 *  36     ALIAS_DEREFERENCING_PROBLEM
 *  48     INAPPROPRIATE_AUTHENTICATION
 *  49     INVALID_CREDENTIALS
 *  50     INSUFFICIENT_ACCESS_RIGHTS
 *  51     BUSY
 *  52     UNAVAILABLE
 *  53     UNWILLING_TO_PERFORM
 *  54     LOOP_DETECT
 *  64     NAMING_VIOLATION
 *  65     OBJECT_CLASS_VIOLATION
 *  66     NOT_ALLOWED_ON_NONLEAF
 *  67     NOT_ALLOWED_ON_RDN
 *  68     ENTRY_ALREADY_EXISTS
 *  69     OBJECT_CLASS_MODS_PROHIBITED
 *  71     AFFECTS_MULTIPLE_DSAS (LDAP v3)
 *  80     OTHER
 *  81     SERVER_DOWN
 *  85     LDAP_TIMEOUT
 *  89     PARAM_ERROR
 *  91     CONNECT_ERROR
 *  92     LDAP_NOT_SUPPORTED
 *  93     CONTROL_NOT_FOUND
 *  94     NO_RESULTS_RETURNED
 *  95     MORE_RESULTS_TO_RETURN
 *  96     CLIENT_LOOP
 *  97     REFERRAL_LIMIT_EXCEEDED
 *  100    INVALID_RESPONSE
 *  101    AMBIGUOUS_RESPONSE
 *  112    TLS_NOT_SUPPORTED
 * 
*

* * @version 1.0 * @see org.ietf.ldap.LDAPReferralException */ public class LDAPException extends Exception implements Serializable { static final long serialVersionUID = -9215007872184847924L; /** * (0) The operation completed successfully. */ public final static int SUCCESS = 0; /** * (1) An internal error occurred in the LDAP server. */ public final static int OPERATION_ERROR = 1; /** * (2) A LDAP server could not correctly interpret the request * sent by your client because the request does not strictly * comply with the LDAP protocol. (For example, the data * was not correctly BER-encoded, or a specified value -- such * as the search scope or modification type -- does not * comply with the LDAP protocol. If you invent your own * search scope, for instance, this result code might be returned.

*/ public final static int PROTOCOL_ERROR = 2; /** * (3) The search operation could not be completed within * the maximum time limit. You can specify the maximum time * limit by calling the LDAPConnection.setOption * method or the LDAPSearchConstraints.setServerTimeLimit * method.

* * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPSearchConstraints#setServerTimeLimit */ public final static int TIME_LIMIT_EXCEEDED = 3; /** * (4) The search found more than the maximum number of results. * You can specify the maximum number of results by calling the * LDAPConnection.setOption method or the * LDAPSearchConstraints.setSizeLimit method.

* * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPSearchConstraints#setMaxResults */ public final static int SIZE_LIMIT_EXCEEDED = 4; /** * (5) Value returned by an LDAP compare operation if the * specified attribute and value is not found in the entry * (no matching value found). * * @see org.ietf.ldap.LDAPConnection#compare */ public final static int COMPARE_FALSE = 5; /** * (6) Value returned by an LDAP compare operation if the * specified attribute and value is found in the entry * (matching value found). * * @see org.ietf.ldap.LDAPConnection#compare */ public final static int COMPARE_TRUE = 6; /** * (7) The specified authentication method is not supported * by the LDAP server that you are connecting to. The * LDAPConnection class is implemented so that * LDAPConnection.authenticate always * uses the LDAP_AUTH_SIMPLE method of authentication. * (LDAPConnection.authenticate does not * allow you to select the method of authentication.)

*/ public final static int AUTH_METHOD_NOT_SUPPORTED = 7; /** * (8) A stronger authentication method (more than LDAP_AUTH_SIMPLE) * is required by the LDAP server that you are connecting to. * The LDAPConnection class is implemented so that * LDAPConnection.authenticate always * uses the LDAP_AUTH_SIMPLE method of authentication. * (LDAPConnection.authenticate does not * allow you to select the method of authentication.)

*/ public final static int STRONG_AUTH_REQUIRED = 8; /** * (9) The LDAP server is referring your client to another * LDAP server. If you set up the LDAPConnection * options or the LDAPConstraints options * for automatic referral, your client will automatically * connect and authenticate to the other LDAP server. * (This LDAPException will not be raised.) *

* * (To set up automatic referrals in an LDAPConnection * object, set the LDAPConnection.REFERRALS option * to true and the LDAPConnection.REFERRALS_REBIND_PROC * option to the object containing the method for retrieving * authentication information (in other words, the distinguished * name and password to use when authenticating to other LDAP servers). *

* * If instead you set LDAPConnection.REFERRALS * to false (or if you set * LDAPConstraints.setReferrals to false, * an LDAPReferralException is raised. *

* * If an error occurs during the referral process, an * LDAPException with this result code * (LDAP_PARTIAL_RESULTS) is raised. *

* * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPConstraints#setReferralFollowing * @see org.ietf.ldap.LDAPConstraints#setReferralHandler * @see org.ietf.ldap.LDAPReferralHandler * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPAuthProvider * @see org.ietf.ldap.LDAPReferralException */ public final static int LDAP_PARTIAL_RESULTS = 9; /** * (10) [LDAP v3] The server does not hold the requested entry. * The referral field of the server's response contains a * reference to another server (or set of servers), which * your client can access through LDAP or other protocols. * Typically, these references are LDAP URLs that identify * the server that may contain the requested entry. *

* * When this occurs, a LDAPReferralException * is thrown. You can catch this exception and call the * getURLs method to get the list of LDAP * URLs from the exception. *

* * @see org.ietf.ldap.LDAPReferralException */ public final static int REFERRAL = 10; /** * (11) [LDAP v3] The adminstrative limit on the * maximum number of entries to return was exceeded. * In the Netscape Directory Server 3.0, this * corresponds to the "look through limit" for * the server. This is the maximum number of * entries that the server will check through * when determining which entries match the * search filter and scope. *

*/ public final static int ADMIN_LIMIT_EXCEEDED = 11; /** * (12) [LDAP v3] The server received an LDAP v3 control * that is marked critical and either (1) is not * recognized or supported by the server, or * (2) is inappropriate for the operation requested. * The Netscape Directory Server 3.0 also returns * this result code if the client specifies a * matching rule that is not supported by the server. *

* * @see org.ietf.ldap.LDAPControl */ public final static int UNAVAILABLE_CRITICAL_EXTENSION = 12; /** * (13) [LDAP v3] A secure connection is required for * this operation. */ public final static int CONFIDENTIALITY_REQUIRED = 13; /** * (14) [LDAP v3] While authenticating your client * by using a SASL (Simple Authentication Security Layer) * mechanism, the server requires the client to send * a new SASL bind request (specifying the same SASL * mechanism) to continue the authentication process. */ public final static int SASL_BIND_IN_PROGRESS = 14; /** * (16) The specified attribute could not be found. */ public final static int NO_SUCH_ATTRIBUTE = 16; /** * (17) The specified attribute is not defined. */ public final static int UNDEFINED_ATTRIBUTE_TYPE = 17; /** * (18) An inappropriate type of matching was used. */ public final static int INAPPROPRIATE_MATCHING = 18; /** * (19) An internal error occurred in the LDAP server. */ public final static int CONSTRAINT_VIOLATION = 19; /** * (20) The value that you are adding to an attribute * already exists in the attribute. */ public final static int ATTRIBUTE_OR_VALUE_EXISTS = 20; /** * (21) The request contains invalid syntax. */ public final static int INVALID_ATTRIBUTE_SYNTAX = 21; /** * (32) The entry specified in the request does not exist. */ public final static int NO_SUCH_OBJECT = 32; /** * (33) An problem occurred with an alias. */ public final static int ALIAS_PROBLEM = 33; /** * (34) The specified distinguished name (DN) uses invalid syntax. */ public final static int INVALID_DN_SYNTAX = 34; /** * (35) The specified entry is a "leaf" entry (it has no entries * beneath it in the directory tree). */ public final static int IS_LEAF = 35; /** * (36) An error occurred when dereferencing an alias. */ public final static int ALIAS_DEREFERENCING_PROBLEM = 36; /** * (48) The authentication presented to the server is inappropriate. * This result code might occur, for example, if your client * presents a password and the corresponding entry has no * userpassword attribute. */ public final static int INAPPROPRIATE_AUTHENTICATION = 48; /** * (49) The credentials presented to the server for authentication * are not valid. (For example, the password sent to the server * does not match the user's password in the directory.) */ public final static int INVALID_CREDENTIALS = 49; /** * (50) The client is authenticated as a user who does not have the * access privileges to perform this operation. */ public final static int INSUFFICIENT_ACCESS_RIGHTS = 50; /** * (51) The LDAP server is busy. */ public final static int BUSY = 51; /** * (52) The LDAP server is unavailable. */ public final static int UNAVAILABLE = 52; /** * (53) The LDAP server is unable to perform the specified operation. */ public final static int UNWILLING_TO_PERFORM = 53; /** * (54) A loop has been detected. */ public final static int LOOP_DETECT = 54; /** * (60) The "server-side sorting" control * was not included with the "virtual list view" * control in the search request. */ public final static int SORT_CONTROL_MISSING = 60; /** * (61) An index range error occurred. */ public final static int INDEX_RANGE_ERROR = 61; /** * (64) A naming violation has occurred. */ public final static int NAMING_VIOLATION = 64; /** * (65) The requested operation will add or change * data so that the data no longer complies with * the schema. */ public final static int OBJECT_CLASS_VIOLATION = 65; /** * (66) The requested operation can only be performed * on an entry that has no entries beneath it in the * directory tree (in other words, a "leaf" entry). *

* * For example, you cannot delete or rename an entry * if the entry has subentries beneath it. *

*/ public final static int NOT_ALLOWED_ON_NONLEAF = 66; /** * (67) The specified operation cannot be performed on * a relative distinguished name (RDN). */ public final static int NOT_ALLOWED_ON_RDN = 67; /** * (68) The specified entry already exists. You might receive * this error if, for example, you attempt to add an entry * that already exists or if you attempt to change the name * of an entry to the name of an entry that already exists. */ public final static int ENTRY_ALREADY_EXISTS = 68; /** * (69) You cannot modify the specified object class. */ public final static int OBJECT_CLASS_MODS_PROHIBITED = 69; /** * (71) [LDAP v3] The client attempted to move an entry * from one LDAP server to another by requesting a "modify * DN" operation. In general, clients should not be able * to arbitrarily move entries and subtrees between servers. *

* * @see org.ietf.ldap.LDAPConnection#rename(java.lang.String, java.lang.String, java.lang.String, boolean) * @see org.ietf.ldap.LDAPConnection#rename(java.lang.String, java.lang.String, java.lang.String, boolean, LDAPConstraints) */ public final static int AFFECTS_MULTIPLE_DSAS = 71; /** * (80) General result code for other types of errors * that may occur. */ public final static int OTHER = 80; /** * (81) The LDAP server cannot be contacted. */ public final static int SERVER_DOWN = 0x51; /** * (85) The operation could not be completed within the * maximum time limit. You can specify the maximum time limit * by calling the LDAPConstraints.setTimeLimit * method.

* * @see org.ietf.ldap.LDAPConstraints#setTimeLimit */ public final static int LDAP_TIMEOUT = 0x55; /** * (89) When calling a constructor or method from your client, * one or more parameters were incorrectly specified. */ public final static int PARAM_ERROR = 0x59; /** * (91) Your LDAP client failed to connect to the LDAP server. */ public final static int CONNECT_ERROR = 0x5b; /** * (92) The request is not supported by this version of the LDAP protocol. */ public final static int LDAP_NOT_SUPPORTED = 0x5c; /** * (93) The requested control is not found. *

* * @see org.ietf.ldap.LDAPControl */ public final static int CONTROL_NOT_FOUND = 0x5d; /** * (94) No results have been returned from the server. */ public final static int NO_RESULTS_RETURNED = 0x5e; /** * (95) More results are being returned from the server. */ public final static int MORE_RESULTS_TO_RETURN = 0x5f; /** * (96) Your LDAP client detected a loop in the referral. */ public final static int CLIENT_LOOP = 0x60; /** * (97) The number of sequential referrals (for example, * the client may be referred first from LDAP server A to * LDAP server B, then from LDAP server B to LDAP server C, * and so on) has exceeded the maximum number of referrals * (the LDAPConnection.REFERRALS_HOP_LIMIT option). *

* * @see org.ietf.ldap.LDAPConnection#REFERRALS_HOP_LIMIT * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public final static int REFERRAL_LIMIT_EXCEEDED = 0x61; /** * (100) Invalid response */ public final static int INVALID_RESPONSE = 0x64; /** * (101) Ambiguous response */ public final static int AMBIGUOUS_RESPONSE = 0x65; /** * (112) This implementation does not support TLS */ public final static int TLS_NOT_SUPPORTED = 0x70; /** * Internal variables */ private int resultCode = -1; private String errorMessage = null; private String matchedDN = null; private Throwable rootException = null; private Locale m_locale = Locale.getDefault(); private static Hashtable cacheResource = new Hashtable(); private static final String baseName = "org/ietf/ldap/errors/ErrorCodes"; /** * Constructs a default exception with no specific error information. */ public LDAPException() { } /** * Constructs an exception with a specified string of * additional information. This string appears if you call * the toString() method. *

* * This form is used for lower-level errors. * It is recommended that you always use one of the constructors * that takes a result code as a parameter. (If your exception is * thrown, any code that catches the exception may need to extract * the result code from the exception.) *

* @param message the additional error information * @see org.ietf.ldap.LDAPException#toString() */ public LDAPException( String message ) { super( message ); } /** * Constructs an exception with a result code and * a specified string of additional information. This string * appears if you call the toString() method. * The result code that you set is accessible through the * getResultCode() method. *

* * @param message the additional error information to specify * @param resultCode the result code returned from the * operation that caused this exception * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() */ public LDAPException( String message, int resultCode ) { super( message ); this.resultCode = resultCode; } /** * Constructs an exception with a result code, a specified * string of additional information, and a string containing * information passed back from the server. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • The first string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

*

* * Use this form of the constructor * for higher-level LDAP operational errors. * @param message the additional error information to specify * @param resultCode the result code returned from the * operation that caused this exception * @param serverErrorMessage error message specifying additional * information returned from the server * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() * @see org.ietf.ldap.LDAPException#getLDAPErrorMessage() */ public LDAPException( String message, int resultCode, String serverErrorMessage ) { super( message ); this.resultCode = resultCode; this.errorMessage = serverErrorMessage; } /** * Constructs an exception with a result code, a specified * string of additional information, and a root cause exception. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • The first string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getResultCode() method.

    *

*

* * Use this form of the constructor * for higher-level LDAP operational errors. * @param message the additional error information to specify * @param resultCode the result code returned from the * operation that caused this exception * @param rootException An exception which caused the failure, if any * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() * @see org.ietf.ldap.LDAPException#getLDAPErrorMessage() */ public LDAPException( String message, int resultCode, Throwable rootException ) { super( message ); this.resultCode = resultCode; this.rootException = rootException; } /** * Constructs an exception with a result code, a specified * string of additional information, and the DN of the * closest matching entry. The latter only if the exception was thrown * because an entry could not be found (for example, if * cn=Babs Jensen,ou=People,c=Airius.com could not be found * but ou=People,c=Airius.com is a valid directory entry, * the "matched DN" is ou=People,c=Airius.com. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • This string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

  • The matched DN that you set is accessible through the * getMatchedDN method.

    *

*

* * This form is used for higher-level LDAP operational errors. * @param message the additional error information * @param resultCode the result code returned * @param matchedDN maximal subset of a specified DN which could be * matched by the server * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() * @see org.ietf.ldap.LDAPException#getLDAPErrorMessage() * @see org.ietf.ldap.LDAPException#getMatchedDN() */ public LDAPException( String message, String serverErrorMessage, String matchedDN ) { super( message ); this.resultCode = resultCode; this.matchedDN = matchedDN; } /** * Constructs an exception with a result code, a specified * string of additional information, a string containing * information passed back from the server, and the DN of the * closest matching entry. The latter only if the exception was thrown * because an entry could not be found (for example, if * cn=Babs Jensen,ou=People,c=Airius.com could not be found * but ou=People,c=Airius.com is a valid directory entry, * the "matched DN" is ou=People,c=Airius.com. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • This string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

  • The matched DN that you set is accessible through the * getMatchedDN method.

    *

*

* * This form is used for higher-level LDAP operational errors. * @param message the additional error information * @param resultCode the result code returned * @param serverErrorMessage error message specifying additional information * returned from the server * @param matchedDN maximal subset of a specified DN which could be * matched by the server * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() * @see org.ietf.ldap.LDAPException#getLDAPErrorMessage() * @see org.ietf.ldap.LDAPException#getMatchedDN() */ public LDAPException( String message, int resultCode, String serverErrorMessage, String matchedDN ) { super( message ); this.resultCode = resultCode; this.errorMessage = serverErrorMessage; this.matchedDN = matchedDN; } /** * Constructs an exception with a result code, a specified * string of additional information, a string containing * information passed back from the server, and a possible root * exception. *

* * After you construct the LDAPException object, * the result code and messages will be accessible through the * following ways: *

*

    *
  • This string of additional information appears if you * call the toString() method.

    *

  • The result code that you set is accessible through the * getResultCode() method.

    *

  • The string of server error information that you set * is accessible through the getLDAPErrorMessage * method.

    *

*

* * This form is used for higher-level LDAP operational errors. * @param message the additional error information * @param resultCode the result code returned * @param serverErrorMessage error message specifying additional information * returned from the server * @param rootException An exception which caused the failure, if any * @see org.ietf.ldap.LDAPException#toString() * @see org.ietf.ldap.LDAPException#getResultCode() * @see org.ietf.ldap.LDAPException#getLDAPErrorMessage() * @see org.ietf.ldap.LDAPException#getMatchedDN() */ public LDAPException( String message, int resultCode, String serverErrorMessage, Throwable rootException ) { super( message ); this.resultCode = resultCode; this.errorMessage = serverErrorMessage; this.rootException = rootException; } /** * Returns the root exception that caused this exception. * @return The possibly null root exception that caused this exception. */ public Throwable getCause() { return rootException; } /** * Returns the error message from the last error, if this message * is available (that is, if this message was set). If the message * was not set, this method returns null. *

* * Note that this message is rarely set. (In order to set this message, * the code constructing this exception must have called the constructor * LDAPException(String, int, String). The last argument, * which is additional error information returned from the server, * is the string returned by getLDAPErrorMessage. *

* * In most cases, if you want information about * the error generated, you should call the toString() * method instead. *

* * @return the error message of the last error (or null * if no message was set). * @see org.ietf.ldap.LDAPException#toString() */ public String getLDAPErrorMessage () { return errorMessage; } /** * Returns the maximal subset of a DN which could be matched by the * server. This only the case if the server returned one of the following * errors: *

    *
  • NO_SUCH_OBJECT *
  • ALIAS_PROBLEM *
  • INVALID_DN_SYNTAX *
  • ALIAS_DEREFERENCING_PROBLEM *
*
* For example, if the DN cn=Babs Jensen, o=People, c=Airius.com * could not be found by the DN o=People, c=Airius.com * could be found, the matched DN is * o=People, c=Airius.com. *

* * If the exception does not specify a matching DN, * this method returns null. * @return the maximal subset of a DN which could be matched, * or null if the error is not one of the above. */ public String getMatchedDN () { return matchedDN; } /** * Returns the result code from the last error that occurred. * This result code is defined as a public final static int member * of this class. Note that this value is not always valid. * -1 indicates that the result code is invalid. * @return the LDAP result code of the last operation. */ public int getResultCode () { return resultCode; } /** * Prints this exception's stack trace to System.err. * If this exception has a root exception; the stack trace of the * root exception is printed to System.err instead. */ public void printStackTrace() { printStackTrace( System.err ); } /** * Prints this exception's stack trace to a print stream. * If this exception has a root exception; the stack trace of the * root exception is printed to the print stream instead. * @param ps The non-null print stream to which to print. */ public void printStackTrace(java.io.PrintStream ps) { if ( rootException != null ) { String superString = super.toString(); synchronized ( ps ) { ps.print(superString + (superString.endsWith(".") ? "" : ".") + " Root exception is "); rootException.printStackTrace( ps ); } } else { super.printStackTrace( ps ); } } /** * Prints this exception's stack trace to a print writer. * If this exception has a root exception; the stack trace of the * root exception is printed to the print writer instead. * @param ps The non-null print writer to which to print. */ public void printStackTrace( java.io.PrintWriter pw ) { if ( rootException != null ) { String superString = super.toString(); synchronized (pw) { pw.print(superString + (superString.endsWith(".") ? "" : ".") + " Root exception is "); rootException.printStackTrace( pw ); } } else { super.printStackTrace( pw ); } } /** * Returns the error message describing the error code (for this * exception). The error message is specific to the default locale * for this system. (The LDAP Java classes determine the default * locale by calling the java.util.Locale.getDefault * method and retrieve the error messages from the following file: *

netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @return the error message describing the error code for this * exception in the default locale. */ public String resultCodeToString() { return resultCodeToString( resultCode, m_locale ); } /** * Returns the error message describing the error code for this * exception. The error message for the specified locale is retrieved * from the following file: *
netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @param l the java.util.Locale object representing the * locale of the error message to retrieve * @return the error message describing the current error code * in the specified locale. */ public String resultCodeToString( Locale l ) { return resultCodeToString( resultCode, l ); } /** * Returns the error message describing the specified error code. * The error message is specific to the default locale * for this system. (The LDAP Java classes determine the default * locale by calling the java.util.Locale.getDefault * method and retrieve the error messages from the following file: *
netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @param code the error code for which to get the * corresponding error message * @return error message describing the specified error code for * the default locale. */ public static String resultCodeToString( int code ) { return resultCodeToString( code, Locale.getDefault() ); } /** * Returns the error message describing the specified error code. * The error message for the specified locale is retrieved from * the following file: *
netscape/ldap/error/ErrorCodes_locale_name.props
* where locale_name is the language and country (concatenated * and delimited by an underscore) of the default locale. For example: *
netscape/ldap/error/ErrorCodes_en_US.props
* * @param code the error code for which to get the * corresponding error * @param locale the java.util.Locale object representing the * locale of the error message that you want to retrieve * @return error message describing the specified error code for * the specified locale. */ public synchronized static String resultCodeToString( int code, Locale locale ) { try { String localeStr = locale.toString(); PropertyResourceBundle p = (PropertyResourceBundle)cacheResource.get(localeStr); if (p == null) { p = LDAPResourceBundle.getBundle(baseName); if (p != null) cacheResource.put(localeStr, p); } if (p != null) { return (String)p.handleGetObject(Integer.toString(code)); } } catch (IOException e) { System.out.println("Cannot open resource file for LDAPException "+ baseName); } return null; } /** * Gets the string representation of the exception, which * includes the result code, the message sent back from * the LDAP server, the portion of the DN that the server * could find in the directory (if applicable), and the * error message corresponding to this result code. *

* * For example: * *

org.ietf.ldap.LDAPException: error result (32); server error message; matchedDN = ou=people,o=airius.com; No such object
* * In this example, error result is the string of * additional information specified in the exception, 32 is * the result code, server error message is the additional * information from the server specified in the exception, the * matched DN is ou=people,o=airius.com, and the error message * corresponding to the result code 32 is No such * object. *

* * The error message corresponding to the error code can also be * retrieved by using the resultCodeToString method. * Note that this method can generate error messages specific to * a current locale. *

* * @return string representation of exception. * @see org.ietf.ldap.LDAPException#resultCodeToString(int) */ public String toString() { String str = super.toString() + " (" + resultCode + ")" ; if ( (errorMessage != null) && (errorMessage.length() > 0) ) { str += "; " + errorMessage; } if ( (matchedDN != null) && (matchedDN.length() > 0) ) { str += "; matchedDN = " + matchedDN; } String errorStr = null; if ( ((errorStr = resultCodeToString(m_locale)) != null) && (errorStr.length() > 0) ) { str += "; " + errorStr; } if ( (rootException != null) && (rootException != this) ) { str += " [Root exception is " + rootException.toString() + "]"; } return str; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/0000775001003300100330000000000010667357313025706 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPSortControl.java0000664001003300100330000005132610602743266031504 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import java.io.*; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.LDAPSortKey; import org.ietf.ldap.client.JDAPBERTagDecoder; import org.ietf.ldap.LDAPException; import org.ietf.ldap.ber.stream.*; /** * Represents an LDAP v3 server control that specifies that you want * the server to return sorted search results. (The OID for this * control is 1.2.840.113556.1.4.473.) *

* * When constructing an LDAPSortControl object, you can * specify the order in which you want the results sorted. * You can also specify whether or not this control is critical * to the search operation. *

* * To specify the sort order, you construct an LDAPSortKey * object and pass it to the LDAPSortControl constructor. * The LDAPSortKey object represents a list of the attribute * types used for sorting (a "sort key list"). *

* * You can include the control in a search request by constructing * an LDAPSearchConstraints object and calling the * setServerControls method. You can then pass this * LDAPSearchConstraints object to the search * method of an LDAPConnection object. *

* * For example: *

 * ...
 * LDAPConnection ld = new LDAPConnection();
 * try {
 *     // Connect to server.
 *     ld.connect( 3, hostname, portnumber, "", "" );
 *
 *     // Create a sort key that specifies the sort order.
 *     LDAPSortKey sortOrder = new LDAPSortKey( attrname );
 *
 *     // Create a "critical" server control using that sort key.
 *     LDAPSortControl sortCtrl = new LDAPSortControl(sortOrder,true);
 *
 *     // Create search constraints to use that control.
 *     LDAPSearchConstraints cons = new LDAPSearchConstraints();
 *     cons.setServerControls( sortCtrl );
 *
 *     // Send the search request.
 *     LDAPSearchResults res = ld.search( "o=Airius.com",
 *        LDAPConnection.SCOPE_SUB, "(cn=Barbara*)", null, false, cons );
 *
 *     ...
 *
 * 
* * The LDAP server sends back a sort response control to indicate * the result of the sorting operation. (The OID for this control * is 1.2.840.113556.1.4.474.) *

* * This control contains: *

* *

    *
  • the result code from the sorting operation *
  • optionally, the first attribute type in the sort key list * that resulted in an error (for example, if the attribute does * not exist) *
*

* * To retrieve the data from this control, use the getResultCode * and getFailedAttribute methods. *

* * The following table lists what kinds of results to expect from the * LDAP server under different situations: *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Does the Server Support the Sorting Control?Is the Sorting Control Marked As Critical?Other ConditionsResults from LDAP Server
* No * * Yes * * None * *
    *
  • The server does not send back any entries. *
  • An LDAPException.UNAVAILABLE_CRITICAL_EXTENSION * exception is thrown. *
*
* No * * None * *
    *
  • The server ignores the sorting control and * returns the entries unsorted. *
*

*

* Yes * * Yes * * The server cannot sort the results using the specified * sort key list. * *
    *
  • The server does not send back any entries. *
  • An LDAPException.UNAVAILABLE_CRITICAL_EXTENSION * exception is thrown. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt and (optionally) * the attribute type that caused the error. *
*
* No * *
    *
  • The server returns the entries unsorted. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt and (optionally) * the attribute type that caused the error. *
*
* N/A (could either be marked as critical or not) * * The server successfully sorted the entries. * *
    *
  • The server sends back the sorted entries. *
  • The server sends back the sorting response control, which * specifies the result code of the sort attempt * (LDAPException.SUCCESS). *
*
* The search itself failed (for any reason). * *
    *
  • The server sends back a result code for the search * operation. *
  • The server does not send back the sorting response control. *
*
*

* * @version 1.0 * @see org.ietf.ldap.LDAPSortKey * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPConstraints * @see org.ietf.ldap.LDAPSearchConstraints * @see org.ietf.ldap.LDAPConstraints#setControls(LDAPControl) */ public class LDAPSortControl extends LDAPControl { public final static String SORTREQUEST = "1.2.840.113556.1.4.473"; public final static String SORTRESPONSE = "1.2.840.113556.1.4.474"; // Response varibales private String _failedAttribute = null; private int _resultCode = 0; // Request variables private LDAPSortKey[] _keys; /** * Constructs a sort response LDAPSortControl object. * This constructor is used by LDAPControl.register to * instantiate sort response controls. *

* To retrieve the result code of the sort operation, call * getResultCode. *

* To retrieve the attribute that caused the sort operation to fail, call * getFailedAttribute. * @param oid the oid for this control. This must be * LDAPSortControl.SORTRESPONSE or an LDAPException * is thrown. * @param critical true if this control is critical to the operation * @param value the value associated with this control * @exception org.ietf.ldap.LDAPException If oid is not * LDAPSortControl.SORTRESPONSE. * @exception java.io.IOException If value contains an invalid BER sequence. * @see org.ietf.ldap.LDAPControl#register */ public LDAPSortControl( String oid, boolean critical, byte[] value ) throws LDAPException, IOException { super( oid, critical, value ); if ( !oid.equals( SORTRESPONSE )) { throw new LDAPException( "oid must be LDAPSortControl.SORTRESPONSE", LDAPException.PARAM_ERROR); } ByteArrayInputStream inStream = new ByteArrayInputStream( value ); BERSequence ber = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nRead = { 0 }; /* A sequence */ BERSequence seq = (BERSequence)BERElement.getElement(decoder, inStream, nRead ); /* First is result code */ _resultCode = ((BEREnumerated)seq.elementAt( 0 )).getValue(); /* Then, possibly an attribute that failed sorting */ if(seq.size() == 1) { return; } /* If this is not an octet string, let there be an exception */ BEROctetString t = (BEROctetString)seq.elementAt(1); try { _failedAttribute = new String(t.getValue(), "UTF8"); } catch (UnsupportedEncodingException e) { } } /** * @return the attribute that caused the sort operation to fail. */ public String getFailedAttribute() { return _failedAttribute; } /** * @return the result code from the search operation. */ public int getResultCode() { return _resultCode; } /** * Constructs an LDAPSortControl object with a single * sorting key. * @param key a single attribute by which to sort * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPSortKey */ public LDAPSortControl(LDAPSortKey key, boolean critical) { super( SORTREQUEST, critical, null ); LDAPSortKey[] keys = new LDAPSortKey[1]; keys[0] = key; _value = createSortSpecification( _keys = keys ); } /** * Constructs an LDAPSortControl object with an array of * sorting keys. * @param keys the attributes by which to sort * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPSortKey */ public LDAPSortControl(LDAPSortKey[] keys, boolean critical) { super( SORTREQUEST, critical, null ); _value = createSortSpecification( _keys = keys ); } /** * Parses the sorting response control sent by the server and * retrieves the result code from the sorting operation and * the attribute that caused sorting to fail (if specified by * the server). *

* * You can get the controls returned by the server by using the * getResponseControls method of the * LDAPConnection class. *

* * This method returns the attribute that caused the sort operation * to fail (or null, if the server did not specify any attribute). * The result code of the sorting operation is returned in the * results argument. This argument is an array of * integers; the result code is specified in the first element of * this array. *

* * For example: *

     * ...
     * LDAPConnection ld = new LDAPConnection();
     * try {
     *     // Connect to the server, set up the sorting control,
     *     // and set up the search constraints.
     *     ...
     *
     *     // Search the directory.
     *     LDAPSearchResults res = ld.search( "o=Airius.com",
     *         LDAPConnection.SCOPE_SUB, "(cn=Barbara*)", attrs, false, cons );
     *
     *     // Determine if the server sent a control back to you.
     *     LDAPControl[] returnedControls = ld.getResponseControls();
     *     if ( returnedControls != null ) {
     *         int[] resultCodes = new int[1];
     *         String failedAttr = LDAPSortControl.parseResponse(
     *             returnedControls, resultCodes );
     *
     *         // Check if the result code indicated an error occurred.
     *         if ( resultCodes[0] != 0 ) {
     *             System.out.println( "Result code: " + resultCodes[0] );
     *             if ( failedAttr != null ) {
     *                 System.out.println( "Sorting operation failed on " +
     *                     failedAttr );
     *             } else {
     *                 System.out.println( "Server did not indicate which " +
     *                     "attribute caused sorting to fail." );
     *             }
     *         }
     *     }
     *     ...
     * }
     * ...
     *
     * 
* * The following table lists some of the possible result codes * for the sorting operation. *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* LDAPException.SUCCESS * * The server successfully sorted the results. *
* LDAPException.OPERATION_ERROR * * An internal server error occurred. *
* LDAPException.TIME_LIMIT_EXCEEDED * * The maximum time allowed for a search was exceeded * before the server finished sorting the results. *
* LDAPException.STRONG_AUTH_REQUIRED * * The server refused to send back the sorted search * results because it requires you to use a stronger * authentication method. *
* LDAPException.ADMIN_LIMIT_EXCEEDED * * There are too many entries for the server to sort. *
* LDAPException.NO_SUCH_ATTRIBUTE * * The sort key list specifies an attribute that does not exist. *
* LDAPException.INAPPROPRIATE_MATCHING * * The sort key list specifies a matching rule that is * not recognized or appropriate *
* LDAPException.INSUFFICIENT_ACCESS_RIGHTS * * The server did not send the sorted results because the * client has insufficient access rights. *
* LDAPException.BUSY * * The server is too busy to sort the results. *
* LDAPException.UNWILLING_TO_PERFORM * * The server is unable to sort the results. *
* LDAPException.OTHER * * This general result code indicates that the server * failed to sort the results for a reason other than * the ones listed above. *
*

* * @param controls an array of LDAPControl objects, * representing the controls returned by the server * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @param results an array of integers. The first element of this array * specifies the result code of the sorting operation. * @return the attribute that caused the error, or null if the server did * not specify which attribute caused the error. * @see org.ietf.ldap.LDAPConnection#getResponseControls * @deprecated LDAPSortControl response controls are now automatically * instantiated. */ public static String parseResponse( LDAPControl[] controls, int[] results ) { String attr = null; LDAPControl sort = null; /* See if there is a sort control in the array */ for( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i].getID().equals( SORTRESPONSE ) ) { sort = controls[i]; break; } } if ( sort != null ) { /* Suck out the data and return it */ ByteArrayInputStream inStream = new ByteArrayInputStream( sort.getValue() ); BERSequence ber = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nRead = new int[1]; nRead[0] = 0; try { /* A sequence */ BERSequence seq = (BERSequence)BERElement.getElement( decoder, inStream, nRead ); /* First is result code */ int result = ((BEREnumerated)seq.elementAt( 0 )).getValue(); if ( (results != null) && (results.length > 0) ) results[0] = result; /* Then, possibly an attribute that failed sorting */ /* If this is not an octet string, let there be an exception */ BEROctetString t = (BEROctetString)seq.elementAt(1); attr = new String(t.getValue(), "UTF8"); } catch(Exception x) { } } return attr; } /** * Create a "flattened" BER encoding of the requested sort keys, * and return it as a byte array. * @param keys the attributes by which to sort * @return the byte array of encoded data. */ private byte[] createSortSpecification( LDAPSortKey[] keys ) { /* A sequence of sequences */ BERSequence ber = new BERSequence(); /* Add each sort key as a sequence */ for( int i = 0; i < keys.length; i++ ) { BERSequence seq = new BERSequence(); /* The attribute name */ seq.addElement(new BEROctetString(keys[i].getKey())); /* Optional matching rule */ if ( keys[i].getMatchRule() != null ) seq.addElement(new BERTag( BERTag.CONTEXT|0, new BEROctetString(keys[i].getMatchRule()), true)); /* Optional reverse-order sort */ if ( keys[i].getReverse() ) seq.addElement(new BERTag( BERTag.CONTEXT|1, new BEREnumerated(LDAPSortKey.REVERSE), true)); ber.addElement( seq ); } /* Suck out the data and return it */ return flattenBER( ber ); } public String toString() { return (getID() == SORTREQUEST) ? reqToString() : rspToString(); } String reqToString() { StringBuffer sb = new StringBuffer("{SortCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" "); for (int i=0; i < _keys.length; i++) { sb.append(_keys[i]); } sb.append("}"); return sb.toString(); } String rspToString() { StringBuffer sb = new StringBuffer("{SortResponseCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); if (_failedAttribute != null) { sb.append(" failedAttr="); sb.append(_failedAttribute); } sb.append(" resultCode="); sb.append(_resultCode); sb.append("}"); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPStringControl.java0000664001003300100330000001022510602743266032014 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import org.ietf.ldap.LDAPControl; /** * Represents an LDAP v3 server control that contains a string as its * only value. This is to be used as a base class by real such controls. */ abstract class LDAPStringControl extends LDAPControl { protected String m_msg = null; LDAPStringControl() { super(); } /** * Constructs an LDAPStringControl object, and stores the * value as a string. To retrieve this string value, use * getMsg(). * @param oid the oid of this control * @param critical true if this control is critical to the search * @param value the value associated with this control * @see org.ietf.ldap.LDAPcontrol */ public LDAPStringControl( String oid, boolean critical, byte[] value ) { super( oid, critical, value ); if ( value != null ) { try { m_msg = new String( value, "UTF8" ); } catch ( java.io.IOException e ) { } } } /** * Parses a response control sent by the server and * retrieves a string. *

* * You can get the controls returned by the server by using the * getResponseControls method of the * LDAPConnection class. *

* * @param controls an array of LDAPControl objects, * representing the controls returned by the server * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @param type the OID of the control to look for * @return a message string, or null if the server did * not return a string. * @see org.ietf.ldap.LDAPConnection#getResponseControls */ public static String parseResponse( LDAPControl[] controls, String type ) { String msg = null; LDAPControl cont = null; /* See if there is a password control in the array */ for( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i].getID().equals( type ) ) { cont = controls[i]; break; } } if ( cont != null ) { /* Suck out the data and return it */ try { msg = new String( cont.getValue(), "UTF8" ); } catch ( Exception e ) { } } return msg; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPPersistSearchControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPPersistSearchControl.jav0000664001003300100330000005026110602743266033170 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import java.io.*; import org.ietf.ldap.client.JDAPBERTagDecoder; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.ber.stream.*; /** * Represents an LDAP v3 server control that specifies a persistent * search (an ongoing search operation), which allows your LDAP client * to get notification of changes to the directory. (The OID for this * control is 2.16.840.1.113730.3.4.3.) You can use this control in * conjunction with an "entry change notification" control (represented * by LDAPEntryChangeControl object. *

* * To use persistent searching for change notification, you create a * "persistent search" control that specifies the types of changes that * you want to track. You include the control in a search request. * If an entry in the directory is changed, the server determines if * the entry matches the search criteria in your request and if the * change is the type of change that you are tracking. If both of * these are true, the server sends the entry to your client. *

* * The server can also include an "entry change notification" control * with the entry. (The OID for this control is 2.16.840.1.113730.3.4.7.) * This control contains additional information about the * change made to the entry, including the type of change made, * the change number (which corresponds to an item in the server's * change log, if the server supports a change log), and, if the * entry was renamed, the old DN of the entry. *

* * When constructing an LDAPPersistSearchControl object, * you can specify the following information: *

* *

    *
  • the type of change you want to track (added, modified, deleted, * or renamed entries) *
  • a preference indicating whether or not you want the server to * return all entries that initially matched the search criteria * (rather than only the entries that change) *
  • a preference indicating whether or not you want entry change * notification controls included with every entry returned by the * server *
*

* * For example: *

 * ...
 * LDAPConnection ld = new LDAPConnection();
 *
 * try {
 *     // Connect to server.
 *     ld.connect( 3, hostname, portnumber, "", "" );
 *
 *     // Create a persistent search control.
 *     int op = LDAPPersistSearchControl.ADD |
 *         LDAPPersistSearchControl.MODIFY |
 *         LDAPPersistSearchControl.DELETE |
 *         LDAPPersistSearchControl.MODDN;
 *     boolean changesOnly = true;
 *     boolean returnControls = true;
 *     boolean isCritical = true;
 *     LDAPPersistSearchControl persistCtrl = new
 *         LDAPPersistSearchControl( op, changesOnly,
 *         returnControls, isCritical );
 *
 *     // Set the search constraints to use that control.
 *     LDAPSearchConstraints cons = ld.getSearchConstraints();
 *     cons.setBatchSize( 1 );
 *     cons.setServerControls( persistCtrl );
 *
 *     // Start the persistent search.
 *     LDAPSearchResults res = ld.search( "o=Airius.com",
 *               LDAPConnection.SCOPE_SUB, "(cn=Barbara*)", null, false, cons );
 *
 *     // Loop through the incoming results.
 *     while ( res.hasMore() ) {
 *     ...
 *     }
 * ...
 * }
 * 
* * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.controls.LDAPEntryChangeControl */ public class LDAPPersistSearchControl extends LDAPControl { /** * Default constructor */ public LDAPPersistSearchControl() { super(PERSISTENTSEARCH, true, null); } /** * Constructs an LDAPPersistSearchControl object * that specifies a persistent search. * * @param changeTypes the change types to monitor. You can perform * a bitwise OR on any of the following values and specify the result as * the change types: *
    *
  • LDAPPersistSearchControl.ADD (to track new entries * added to the directory) *
  • LDAPPersistSearchControl.DELETE (to track entries * removed from the directory) *
  • LDAPPersistSearchControl.MODIFY (to track entries * that have been modified) *
  • LDAPPersistSearchControl.MODDN (to track entries * that have been renamed) *
* @param changesOnly true if you do not want the server * to return all existing entries in the directory that match the * search criteria. (Use this if you just want the changed entries * to be returned.) * @param returnControls true if you want the server to return * entry change controls with each entry in the search results * @param isCritical true if this control is critical to * the search operation. (If the server does not support * this control, you may not want the server to perform the search * at all.) * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.controls.LDAPEntryChangeControl */ public LDAPPersistSearchControl(int changeTypes, boolean changesOnly, boolean returnControls, boolean isCritical) { super(PERSISTENTSEARCH, isCritical, null); _value = createPersistSearchSpecification(changeTypes, changesOnly, returnControls); _changeTypes = changeTypes; _changesOnly = changesOnly; _returnECs = returnControls; } /** * Gets the change types monitored by this control. * @return integer representing the change types to monitor. * This value can be the bitwise OR of ADD, DELETE, MODIFY, * and/or MODDN. If the change type is unknown, * this method returns -1. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public int getChangeTypes() { return _changeTypes; } /** * Indicates whether you want the server to send any existing * entries that already match the search criteria or only the * entries that have changed. * @return if true, the server returns only the * entries that have changed. If false, the server * also returns any existing entries that match the search criteria * but have not changed. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setChangesOnly */ public boolean getChangesOnly() { return _changesOnly; } /** * Indicates whether or not the server includes an "entry change * notification" control with each entry it sends back to the client * during the persistent search. * @return true if the server includes "entry change * notification" controls with the entries it sends during the * persistent search. * @see org.ietf.ldap.controls.LDAPEntryChangeControl * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setReturnControls */ public boolean getReturnControls() { return _returnECs; } /** * Sets the change types that you want monitored by this control. * @param types integer representing the change types to monitor * This value can be the bitwise OR of ADD, DELETE, MODIFY, * and/or MODDN. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#getChangeTypes */ public void setChangeTypes(int types) { _changeTypes = types; } /** * Specifies whether you want the server to send any existing * entries that already match the search criteria or only the * entries that have changed. * @param changesOnly if true, the server returns only the * entries that have changed. If false, the server * also returns any existing entries that match the search criteria * but have not changed. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#getChangesOnly */ public void setChangesOnly(boolean changesOnly) { _changesOnly = changesOnly; } /** * Specifies whether you want the server to include an "entry change * notification" control with each entry it sends back to the client * during the persistent search. * @param returnControls if true, the server includes * "entry change notification" controls with the entries it sends * during the persistent search * @see org.ietf.ldap.controls.LDAPEntryChangeControl * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setReturnControls */ public void setReturnControls(boolean returnControls) { _returnECs = returnControls; } /** * Takes an input byte array and extracts the ber elements, assigning * them to appropriate fields in the entry change control. * * @param c byte array that contains BER elements * @return the entry change control. * @deprecated LDAPEntryChangeControl controls are now automatically * instantiated. */ public LDAPEntryChangeControl parseResponse(byte[] c) { LDAPEntryChangeControl con = new LDAPEntryChangeControl(); ByteArrayInputStream inStream = new ByteArrayInputStream(c); BERSequence seq = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] numRead = new int[1]; numRead[0] = 0; try { /* a sequence */ BERSequence s = (BERSequence)BERElement.getElement(decoder, inStream, numRead); BEREnumerated itr = (BEREnumerated)s.elementAt(0); con.setChangeType(itr.getValue()); if (s.size() > 1) { if (s.elementAt(1) instanceof BEROctetString) { BEROctetString str = (BEROctetString)s.elementAt(1); con.setPreviousDN(new String(str.getValue(), "UTF8")); } else if (s.elementAt(1) instanceof BERInteger) { BERInteger num = (BERInteger)s.elementAt(1); con.setChangeNumber(num.getValue()); } } if (s.size() > 2) { BERInteger num = (BERInteger)s.elementAt(2); con.setChangeNumber(num.getValue()); } } catch (Exception e) { return null; } return con; } /** * Returns an "entry change notification" control if the control is in * the specified array of controls. Use this method to retrieve an "entry * change notification" control included with an entry sent by the server. *

* * You can get the controls returned by the server by using the * getResponseControls method of the * LDAPConnection class. *

* * For example: *

     * ...
     * LDAPConnection ld = new LDAPConnection();
     * try {
     *     // Connect to the server, set up the persistent search control,
     *     // and set up the search constraints.
     *     ...
     *
     *     // Search the directory.
     *     LDAPSearchResults res = ld.search( "o=Airius.com",
     *         LDAPConnection.SCOPE_SUB, "(cn=Barbara*)", attrs, false, cons );
     *
     *     // Determine if the server sent a control back to you.
     *     LDAPControl[] returnedControls = ld.getResponseControls();
     *     if ( returnedControls != null ) {
     *
     *         // Get the entry change control.
     *         LDAPEntryChangeControl entryCtrl = null;
     *         for ( int i = 0; i < returnedControls.length; i++ ) {
     *             if ( returnedControls[i] instanceof LDAPEntryChangeControl ) {
     *                 entryCtrl = (LDAPEntryChangeControl)returnedControls[i];
     *                 break;
     *             }
     *         }
     *         if ( entryCtrl != null ) {
     *
     *             // Get and print the type of change made to the entry.
     *             int changeType = entryCtrl.getChangeType();
     *             if ( changeType != -1 ) {
     *                 System.out.print( "Change made: " );
     *                 switch ( changeType ) {
     *                 case LDAPPersistSearchControl.ADD:
     *                     System.out.println( "Added new entry." );
     *             break;
     *                 case LDAPPersistSearchControl.MODIFY:
     *                     System.out.println( "Modified entry." );
     *             break;
     *                 case LDAPPersistSearchControl.DELETE:
     *                     System.out.println( "Deleted entry." );
     *             break;
     *                 case LDAPPersistSearchControl.MODDN:
     *                     System.out.println( "Renamed entry." );
     *             break;
     *                 }
     *             }
     *
     *             // Get and print the change number corresponding
     *             // to the change.
     *             int changeNumber = entryCtrl.getChangeNumber();
     *             if ( changeNumber != -1 )
     *                 System.out.println( "Change log number: " + changeNumber);
     *
     *             // Get and print the previous DN of the entry,
     *             // if the entry was renamed.
     *             LDAPDN oldDN = entryCtrl.getPreviousDN();
     *             if ( oldDN != null )
     *                     System.out.println( "Previous DN: " + oldDN );
     *
     *         } else {
     *
     *             System.out.println( "No entry change control." );
     *         }
     *     }
     *     ...
     * }
     * ...
     *
     * 
* * @param controls an array of LDAPControl objects, * representing the controls returned by the server * with an entry. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @return an LDAPEntryChangeControl object representing * the entry change control sent by the server. If no entry change * control was sent, this method returns null. * @see org.ietf.ldap.controls.LDAPEntryChangeControl * @see org.ietf.ldap.LDAPConnection#getResponseControls * @deprecated LDAPEntryChangeControl controls are now automatically * instantiated. */ public static LDAPEntryChangeControl parseResponse(LDAPControl[] controls) { LDAPPersistSearchControl con = new LDAPPersistSearchControl(); for (int i=0; (controls != null) && (i < controls.length); i++) { // get the entry change control if (controls[i].getID().equals(LDAPEntryChangeControl.ENTRYCHANGED)) { return con.parseResponse(controls[i].getValue()); } } return null; } /** * Creates a "flattened" BER encoding of the persistent search * specifications and returns it as a byte array. * @param changeTypes the change types to monitor on the server * @param changesOnly true to skip the initial search * @param returnECs true if entry change controls are to be * returned with the search results * @return the BER-encoded data. */ private byte[] createPersistSearchSpecification(int changeTypes, boolean changesOnly, boolean returnECs) { /* A sequence */ BERSequence seq = new BERSequence(); seq.addElement(new BERInteger(changeTypes)); seq.addElement(new BERBoolean(changesOnly)); seq.addElement(new BERBoolean(returnECs)); /* return a byte array */ return flattenBER( seq ); } public String toString() { StringBuffer sb = new StringBuffer("{PersistSearchCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" returnEntryChangeCtrls="); sb.append(_returnECs); sb.append(" changesOnly="); sb.append(_changesOnly); sb.append(" changeTypes="); sb.append(typesToString(_changeTypes)); sb.append("}"); return sb.toString(); } /** * This method is also used by LDAPentryChangeControl.toString() */ static String typesToString(int changeTypes) { String types = ""; if ((changeTypes & ADD) != 0) { types += (types.length() > 0) ? "+ADD" : "ADD"; } if ((changeTypes & DELETE) != 0) { types += (types.length() > 0) ? "+DEL" : "DEL"; } if ((changeTypes & MODIFY) != 0) { types += (types.length() > 0) ? "+MOD" : "MOD"; } if ((changeTypes & MODDN) != 0) { types += (types.length() > 0) ? "+MODDN" : "MODDN"; } return types; } private int _changeTypes = 1; private boolean _changesOnly = false; private boolean _returnECs = false; /** * Change type specifying that you want to track additions of new * entries to the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int ADD = 1; /** * Change type specifying that you want to track removals of * entries from the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int DELETE = 2; /** * Change type specifying that you want to track modifications of * entries in the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int MODIFY = 4; /** * Change type specifying that you want to track modifications of the * DNs of entries in the directory. You can either specify this change type * when constructing an LDAPPersistSearchControl or * by using the setChangeTypes method. * @see org.ietf.ldap.controls.LDAPPersistSearchControl#getChangeTypes * @see org.ietf.ldap.controls.LDAPPersistSearchControl#setChangeTypes */ public static final int MODDN = 8; public final static String PERSISTENTSEARCH = "2.16.840.1.113730.3.4.3"; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPEntryChangeControl.java0000664001003300100330000002226510602743266032764 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import java.io.*; import org.ietf.ldap.ber.stream.*; import org.ietf.ldap.client.JDAPBERTagDecoder; import org.ietf.ldap.*; /** * Represents an LDAP v3 server control that specifies information * about a change to an entry in the directory. (The OID for this * control is 2.16.840.1.113730.3.4.7.) You need to use this control in * conjunction with a "persistent search" control (represented * by LDAPPersistentSearchControl object. *

* * To use persistent searching for change notification, you create a * "persistent search" control that specifies the types of changes that * you want to track. When an entry is changed, the server sends that * entry back to your client and may include an "entry change notification" * control that specifies additional information about the change. *

* * Typically, you use the getResponseControls method of * the LDAPConnection object to get any * LDAPEntryChangeControl objects returned by the server. *

* * Once you retrieve an LDAPEntryChangeControl object from * the server, you can get the following additional information about * the change made to the entry: *

* *

    *
  • The type of change made (add, modify, delete, or modify DN) *
  • The change number identifying the record of the change in the * change log (if the server supports change logs) *
  • If the entry was renamed, the old DN of the entry *
*

* * @see org.ietf.ldap.controls.LDAPPersistSearchControl * @see org.ietf.ldap.LDAPConnection#getResponseControls */ public class LDAPEntryChangeControl extends LDAPControl { /** * Constructs a new LDAPEntryChangeControl object. * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.controls.LDAPPersistSearchControl */ public LDAPEntryChangeControl() { super(ENTRYCHANGED, false, null); } /** * Contructs an LDAPEntryChangedControl object. * This constructor is used by LDAPControl.register to * instantiate entry change controls. * @param oid this parameter must be * LDAPEntryChangeControl.ENTRYCHANGED * or an LDAPException is thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception org.ietf.ldap.LDAPException If oid is not * LDAPEntryChangeControl.ENTRYCHANGED. * @exception java.io.IOException If value is not a valid BER sequence. * @see org.ietf.ldap.LDAPControl#register */ public LDAPEntryChangeControl(String oid, boolean critical, byte[] value) throws LDAPException, IOException { super(ENTRYCHANGED, false, value); if (!oid.equals( ENTRYCHANGED )) { throw new LDAPException("oid must be LDAPEntryChangeControl." + "ENTRYCHANGED", LDAPException.PARAM_ERROR); } ByteArrayInputStream inStream = new ByteArrayInputStream(_value); BERSequence seq = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] numRead = new int[1]; numRead[0] = 0; BERSequence s = (BERSequence)BERElement.getElement(decoder, inStream, numRead); BEREnumerated itr = (BEREnumerated)s.elementAt(0); _changeTypes = itr.getValue(); if (s.size() > 1) { if (s.elementAt(1) instanceof BEROctetString) { BEROctetString str = (BEROctetString)s.elementAt(1); try { _previousDN = new String(str.getValue(), "UTF8"); } catch (UnsupportedEncodingException e) { } } else if (s.elementAt(1) instanceof BERInteger) { BERInteger num = (BERInteger)s.elementAt(1); _changeNumber = num.getValue(); } } if (s.size() > 2) { BERInteger num = (BERInteger)s.elementAt(2); _changeNumber = num.getValue(); } } /** * Sets the change number (which identifies the record of the change * in the server's change log) in this "entry change notification" * control. * @param num change number to set * @see org.ietf.ldap.controls.LDAPEntryChangeControl#getChangeNumber */ public void setChangeNumber(int num) { _changeNumber = num; } /** * Sets the change type (which identifies the type of change * that occurred) in this "entry change notification" control. * @param num change type to set. This can be one of * the following values: *

* *

    *
  • LDAPPersistSearchControl.ADD (a new entry was * added to the directory) *
  • LDAPPersistSearchControl.DELETE (an entry was * removed from the directory) *
  • LDAPPersistSearchControl.MODIFY (an entry was * modified) *
  • LDAPPersistSearchControl.MODDN (an entry was * renamed) *
*

* * @see org.ietf.ldap.controls.LDAPEntryChangeControl#getChangeType */ public void setChangeType(int num) { _changeTypes = num; } /** * Sets the previous DN of the entry (if the entry was renamed) * in the "entry change notification control". * @param dn the previous distinguished name of the entry * @see org.ietf.ldap.controls.LDAPEntryChangeControl#getPreviousDN */ public void setPreviousDN(String dn) { _previousDN = dn; } /** * Gets the change number, which identifies the record of the change * in the server's change log. * @return change number identifying the change made. * @see org.ietf.ldap.controls.LDAPEntryChangeControl#setChangeNumber */ public int getChangeNumber() { return _changeNumber; } /** * Gets the change type, which identifies the type of change * that occurred. * @return change type identifying the type of change that * occurred. This can be one of the following values: *

* *

    *
  • LDAPPersistSearchControl.ADD (a new entry was * added to the directory) *
  • LDAPPersistSearchControl.DELETE (an entry was * removed from the directory) *
  • LDAPPersistSearchControl.MODIFY (an entry was * modified) *
  • LDAPPersistSearchControl.MODDN (an entry was * renamed) *
*

* * @see org.ietf.ldap.controls.LDAPEntryChangeControl#setChangeType */ public int getChangeType() { return _changeTypes; } /** * Gets the previous DN of the entry (if the entry was renamed). * @return the previous distinguished name of the entry. * @see org.ietf.ldap.controls.LDAPEntryChangeControl#setPreviousDN */ public String getPreviousDN() { return _previousDN; } public String toString() { StringBuffer sb = new StringBuffer("{EntryChangedCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" changeTypes="); sb.append(LDAPPersistSearchControl.typesToString(_changeTypes)); sb.append(" previousDN="); sb.append(_previousDN); sb.append(" changeNumber="); sb.append(_changeNumber); sb.append("}"); return sb.toString(); } private int _changeNumber = -1; private int _changeTypes = -1; private String _previousDN = null; public final static String ENTRYCHANGED = "2.16.840.1.113730.3.4.7"; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPProxiedAuthControl.java0000664001003300100330000001215510602743266033006 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import java.io.*; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.LDAPSortKey; import org.ietf.ldap.client.JDAPBERTagDecoder; import org.ietf.ldap.ber.stream.*; /** * Represents an LDAP v3 server control that specifies that you want * the server to use the specified DN's identity for this operation. * (The OID for this control is 2.16.840.1.113730.3.4.12.) *

* * You can include the control in any request by constructing * an LDAPSearchConstraints object and calling the * setControls method. You can then pass this * LDAPSearchConstraints object to the search * or other request method of an LDAPConnection object. *

* * For example: *

 * ...
 * LDAPConnection ld = new LDAPConnection();
 * try {
 *     // Connect to server.
 *     ld.connect( 3, hostname, portnumber, "", "" );
 *
 *     // Create a "critical" proxied auth server control using
 *     // the DN "uid=charlie,ou=people,o=acme.com".
 *     LDAPProxiedAuthControl ctrl =
 *         new LDAPProxiedAuthControl( "uid=charlie,ou=people,o=acme.com",
 *                                     true );
 *
 *     // Create search constraints to use that control.
 *     LDAPSearchConstraints cons = new LDAPSearchConstraints();
 *     cons.setControls( sortCtrl );
 *
 *     // Send the search request.
 *     LDAPSearchResults res = ld.search( "o=Airius.com",
 *        LDAPConnection.SCOPE_SUB, "(cn=Barbara*)", null, false, cons );
 *
 *     ...
 *
 * 
* *

* * @version 1.0 * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPConstraints * @see org.ietf.ldap.LDAPSearchConstraints * @see org.ietf.ldap.LDAPConstraints#setControls(LDAPControl) */ public class LDAPProxiedAuthControl extends LDAPControl { public final static String PROXIEDAUTHREQUEST = "2.16.840.1.113730.3.4.12"; private String _dn; /** * Constructs an LDAPProxiedAuthControl object with a * DN to use as identity. * @param dn DN to use as identity for execution of a request * @param critical true if the LDAP operation should be * discarded when the server does not support this control (in other * words, this control is critical to the LDAP operation) * @see org.ietf.ldap.LDAPControl */ public LDAPProxiedAuthControl( String dn, boolean critical) { super( PROXIEDAUTHREQUEST, critical, null ); _value = createSpecification( _dn = dn ); } /** * Create a "flattened" BER encoding of the requested contents, * and return it as a byte array. * @param dn the DN to use as an identity * @return the byte array of encoded data. */ private byte[] createSpecification( String dn ) { /* A sequence */ BERSequence ber = new BERSequence(); /* Add the DN as a string value */ ber.addElement( new BEROctetString( dn ) ); /* Suck out the data and return it */ return flattenBER( ber ); } public String toString() { StringBuffer sb = new StringBuffer("{ProxiedAuthCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" dn="); sb.append(_dn); sb.append("}"); return sb.toString(); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPPasswordExpiringControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPPasswordExpiringControl.0000664001003300100330000001176510602743266033226 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.LDAPException; /** * Represents an LDAP v3 server control that may be returned if a * password is about to expire, and password policy is enabled on the server. * The OID for this control is 2.16.840.1.113730.3.4.5. *

* * @version 1.0 * @see org.ietf.ldap.LDAPControl */ public class LDAPPasswordExpiringControl extends LDAPStringControl { public final static String EXPIRING = "2.16.840.1.113730.3.4.5"; /** * Contructs an LDAPPasswordExpiringControl object. * This constructor is used by LDAPControl.register to * instantiate password expiring controls. *

* To retrieve the number of seconds until this password expires, * call getSecondsToExpiration. * @param oid this parameter must be * LDAPPasswordExpiringControl.EXPIRING * or an LDAPException is thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception org.ietf.ldap.LDAPException If oid is not * LDAPPasswordExpiringControl.EXPIRING. * @see org.ietf.ldap.LDAPControl#register */ public LDAPPasswordExpiringControl( String oid, boolean critical, byte[] value ) throws LDAPException { super( EXPIRING, critical, value ); if ( !oid.equals( EXPIRING )) { throw new LDAPException( "oid must be LDAPPasswordExpiringControl" + ".EXPIRING", LDAPException.PARAM_ERROR ); } } /** * Gets the number of seconds until the password expires returned by the * server. * @return int the number of seconds until the password expires. * @exception java.lang.NumberFormatException If the server returned an * undecipherable message. In this case, use getMessage to * retrieve the message as a string. */ public int getSecondsToExpiration() { return Integer.parseInt( m_msg ); } /** * Gets the value associated with this control parsed as a string. * @return the value associated with this control parsed as a string. */ public String getMessage() { return m_msg; } /** * @param controls an array of LDAPControl objects, * representing the controls returned by the server. * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @return an error message string, or null if none is in the control. * @see org.ietf.ldap.LDAPConnection#getResponseControls * @deprecated LDAPPasswordExpiringControl controls are now automatically * instantiated. */ public static String parseResponse( LDAPControl[] controls ) { return LDAPStringControl.parseResponse( controls, EXPIRING ); } public String toString() { StringBuffer sb = new StringBuffer("{PasswordExpiringCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" msg="); sb.append(m_msg); sb.append("}"); return sb.toString(); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPPasswordExpiredControl.javaldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPPasswordExpiredControl.j0000664001003300100330000001073110602743266033203 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.LDAPException; /** * Represents an LDAP v3 server control that may be returned if a * password has expired, and password policy is enabled on the server. * The OID for this control is 2.16.840.1.113730.3.4.4. *

* * @version 1.0 * @see org.ietf.ldap.LDAPControl */ public class LDAPPasswordExpiredControl extends LDAPStringControl { public final static String EXPIRED = "2.16.840.1.113730.3.4.4"; /** * Contructs an LDAPPasswordExpiredControl object. * This constructor is used by LDAPControl.register to * instantiate password expired controls. *

* To retrieve the message from the server, call getMessage. * @param oid this parameter must be equal to * LDAPPasswordExpiredControl.EXPIRED * or an LDAPException is thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception org.ietf.ldap.LDAPException If oid is not * LDAPPasswordExpiredControl.EXPIRED. * @see org.ietf.ldap.LDAPControl#register */ public LDAPPasswordExpiredControl( String oid, boolean critical, byte[] value ) throws LDAPException { super( EXPIRED, critical, value ); if ( !oid.equals( EXPIRED )) { throw new LDAPException( "oid must be LDAPPasswordExpiredControl." + "PWEXPIRED", LDAPException.PARAM_ERROR); } } /** * @param controls an array of LDAPControl objects, * representing the controls returned by the server * after a search. To get these controls, use the * getResponseControls method of the * LDAPConnection class. * @return an error message string, or null if none is in the control. * @see org.ietf.ldap.LDAPConnection#getResponseControls * @deprecated LDAPPasswordExpiredControl controls are now automatically * instantiated. */ public static String parseResponse( LDAPControl[] controls ) { return LDAPStringControl.parseResponse( controls, EXPIRED ); } /** * Gets the message returned by the server with this control. * @return the message returned by the server. */ public String getMessage() { return m_msg; } public String toString() { StringBuffer sb = new StringBuffer("{PasswordExpiredCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" msg="); sb.append(m_msg); sb.append("}"); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPVirtualListControl.java0000664001003300100330000004173510602743266033042 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import java.io.*; import org.ietf.ldap.client.JDAPBERTagDecoder; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.ber.stream.*; /** * Represents control data for returning paged results from a search. * * Example of usage, with JFC: *


 *  // Call this to initialize the list box, whenever the search
 *  // conditions change.
 *  // "filter" may be "objectclass=person", for example
 *  void initListBox( String host, int port, String base, String filter ) {
 *
 *  // Create list box if not already done
 *   if ( _dataList == null ) {
 *       _dataList = new JList();
 *       JScrollPane scrollPane = new JScrollPane(_dataList);
 *       add( scrollPane );
 *   }
 *
 *   // Create a virtual data model
 *   vlistModel model = new vlistModel( host, port, base, filter );
 *   // Keep a buffer of one page before and one after
 *   model.setPageSize( getScrollVisibleSize() );
 *   _dataList.setModel( model );
 *  }
 *

* // Data model to supply buffer list data *class vlistModel extends AbstractListModel { * vlistModel( String host, int port, String base, String filter ) { * _base = base; * _filter = filter; * * // Connect to the server * try { * _ldc = new LDAPConnection(); * System.out.println( "Connecting to " + host + * ":" + port ); * _ldc.connect( host, port ); * } catch ( LDAPException e ) { * System.out.println( e ); * _ldc = null; * } * } * * // Called by JList to get virtual list size * public int getSize() { * if ( !_initialized ) { * _initialized = true; * _pageControls = new LDAPControl[2]; * // Paged results also require a sort control * _pageControls[0] = * new LDAPSortControl( new LDAPSortKey("cn"), * true ); * // Do an initial search to get the virtual list size * // Keep one page before and one page after the start * _beforeCount = _pageSize; * _afterCount = _pageSize; * // Create the initial paged results control * LDAPVirtualListControl cont = * new LDAPVirtualListControl( "A", * _beforeCount, * _afterCount ); * _pageControls[1] = cont; * _vlc = (LDAPVirtualListControl)_pageControls[1]; * getPage( 0 ); * } * return _size; * } * * // Get a page starting at first (although we may also fetch * // some preceding entries) * boolean getPage( int first ) { * _vlc.setRange( first, _beforeCount, _afterCount ); * return getPage(); * } * * boolean getEntries() { * // Specify necessary controls for vlv * if ( _pageControls != null ) { * try { * _ldc.setOption( _ldc.SERVERCONTROLS, _pageControls ); * } catch ( LDAPException e ) { * System.out.println( e + ", setting vlv control" ); * } * } * // Empty the buffer * _entries.removeAllElements(); * // Do a search * try { * String[] attrs = { "cn" }; * LDAPSearchResults result = * _ldc.search( _base, * LDAPConnection.SCOPE_SUB, * _filter, * attrs, false ); * while ( result.hasMoreElements() ) { * LDAPEntry entry = (LDAPEntry)result.nextElement(); * LDAPAttribute attr = entry.getAttribute( attrs[0] ); * if ( attr != null ) { * Enumeration en = attr.getStringValues(); * while( en.hasMoreElements() ) { * String name = (String)en.nextElement(); * _entries.addElement( name ); * } * } * } * } catch ( LDAPException e ) { * System.out.println( e + ", searching" ); * return false; * } * return true; * } * * // Fetch a buffer * boolean getPage() { * // Get the actual entries * if ( !getEntries() ) * return false; * * // Check if we have a control returned * LDAPControl[] c = _ldc.getResponseControls(); * LDAPVirtualListResponse nextCont = null; * for ( int i = 0; i < c.length; i++ ) { * if ( c[i] instanceof LDAPVirtualListResponse ) { * nextCont = (LDAPVirtualListResponse)c[i]; * break; * } * } * if ( nextCont != null ) { * _selectedIndex = nextCont.getFirstPosition() - 1; * _top = Math.max( 0, _selectedIndex - _beforeCount ); * // Now we know the total size of the virtual list box * _size = nextCont.getContentCount(); * _vlc.setListSize( _size ); * } else { * System.out.println( "Null response control" ); * } * return true; * } * * // Called by JList to fetch data to paint a single list item * public Object getElementAt(int index) { * if ( (index < _top) || (index >= _top + _entries.size()) ) { * getPage( index ); * } * int offset = index - _top; * if ( (offset < 0) || (offset >= _entries.size()) ) * return new String( "No entry at " + index ); * else * return _entries.elementAt( offset ); * } * * // Called by application to find out the virutal selected index * public int getSelectedIndex() { * return _selectedIndex; * } * * // Called by application to find out the top of the buffer * public int getFirstIndex() { * return _top; * } * * public void setPageSize( int size ) { * _pageSize = size; * } * * Vector _entries = new Vector(); * protected boolean _initialized = false; * private int _top = 0; * protected int _beforeCount; * protected int _afterCount; * private int _pageSize = 10; * private int _selectedIndex = 0; * protected LDAPControl[] _pageControls = null; * protected LDAPVirtualListControl _vlc = null; * protected int _size = -1; * private String _base; * private String _filter; * private LDAPConnection _ldc; *} *

*
 *   VirtualListViewRequest ::= SEQUENCE {
 *            beforeCount    INTEGER (0 .. maxInt),
 *            afterCount     INTEGER (0 .. maxInt),
 *            CHOICE {
 *                byIndex [0] SEQUENCE {
 *                    index           INTEGER,
 *                    contentCount    INTEGER
 *                }
 *                byFilter [1] jumpTo    Substring
 *            },
 *            contextID     OCTET STRING OPTIONAL
 *  }
 * 
* * @version 1.0 */ public class LDAPVirtualListControl extends LDAPControl { public final static String VIRTUALLIST = "2.16.840.1.113730.3.4.9"; /** * Blank constructor for internal use in LDAPVirtualListControl. * @see org.ietf.ldap.LDAPControl */ LDAPVirtualListControl() { super( VIRTUALLIST, true, null ); } /** * Constructs a new LDAPVirtualListControl object. Use this * constructor on an initial search operation, specifying the first * entry to be matched, or the initial part of it. * @param jumpTo an LDAP search expression defining the result set * @param beforeCount the number of results before the top/center to * return per page * @param afterCount the number of results after the top/center to * return per page * @see org.ietf.ldap.LDAPControl */ public LDAPVirtualListControl( String jumpTo, int beforeCount, int afterCount ) { super( VIRTUALLIST, true, null ); setRange( jumpTo, beforeCount, afterCount ); } public LDAPVirtualListControl( String jumpTo, int beforeCount, int afterCount, String context ) { this( jumpTo, beforeCount, afterCount ); _context = context; } /** * Constructs a new LDAPVirtualListControl object. Use this * constructor on a subsquent search operation, after we know the * size of the virtual list, to fetch a subset. * @param startIndex the index into the virtual list of an entry to * return * @param beforeCount the number of results before the top/center to * return per page * @param afterCount the number of results after the top/center to * return per page * @see org.ietf.ldap.LDAPControl */ public LDAPVirtualListControl( int startIndex, int beforeCount, int afterCount, int contentCount ) { super( VIRTUALLIST, true, null ); _listSize = contentCount; setRange( startIndex, beforeCount, afterCount ); } public LDAPVirtualListControl( int startIndex, int beforeCount, int afterCount, int contentCount, String context ) { this( startIndex, beforeCount, afterCount, contentCount ); _context = context; } /** * Sets the starting index, and the number of entries before and after * to return. Apply this method to a control returned from a previous * search, to specify what result range to return on the next search. * @param startIndex the index into the virtual list of an entry to * return * @param beforeCount the number of results before startIndex to * return per page * @param afterCount the number of results after startIndex to * return per page * @see org.ietf.ldap.LDAPControl */ public void setRange( int startIndex, int beforeCount, int afterCount ) { _beforeCount = beforeCount; _afterCount = afterCount; _listIndex = startIndex; _value = createPageSpecification( _listIndex, _listSize, _beforeCount, _afterCount ); } /** * Sets the search expression, and the number of entries before and after * to return. * @param jumpTo an LDAP search expression defining the result set * return. * @param beforeCount the number of results before startIndex to * return per page * @param afterCount the number of results after startIndex to * return per page * @see org.ietf.ldap.LDAPControl */ public void setRange( String jumpTo, int beforeCount, int afterCount ) { _beforeCount = beforeCount; _afterCount = afterCount; _value = createPageSpecification( jumpTo, _beforeCount, _afterCount ); } /** * Gets the size of the virtual result set. * @return the size of the virtual result set, or -1 if not known. */ public int getIndex() { return _listIndex; } /** * Gets the size of the virtual result set. * @return the size of the virtual result set, or -1 if not known. */ public int getListSize() { return _listSize; } /** * Sets the size of the virtual result set. * @param listSize the virtual result set size */ public void setListSize( int listSize ) { _listSize = listSize; } /** * Gets the number of results before the top/center to return per page. * @return the number of results before the top/center to return per page. */ public int getBeforeCount() { return _beforeCount; } /** * Gets the number of results after the top/center to return per page. * @return the number of results after the top/center to return per page. */ public int getAfterCount() { return _afterCount; } /** * Gets the optional context cookie. * @return the optional context cookie. */ public String getContext() { return _context; } /** * Sets the optional context cookie. * @param context the optional context cookie */ public void setContext( String context ) { _context = context; } /** * Creates a "flattened" BER encoding of the requested page * specifications and return it as a byte array. * @param subFilter filter expression for generating the results * @param beforeCount number of entries before first match to return * @param afterCount number of entries after first match to return * @return the byte array of encoded data. */ private byte[] createPageSpecification( String subFilter, int beforeCount, int afterCount ) { /* A sequence */ BERSequence seq = new BERSequence(); seq.addElement( new BERInteger( beforeCount ) ); seq.addElement( new BERInteger( afterCount ) ); seq.addElement( new BERTag(BERTag.CONTEXT|TAG_BYFILTER, new BEROctetString(subFilter), true) ); if ( _context != null ) { seq.addElement( new BEROctetString(_context) ); } /* Suck out the data and return it */ return flattenBER( seq ); } /** * Creates a "flattened" BER encoding of the requested page * specifications and return it as a byte array. * @param listIndex the center or starting entry to return * @param listSize the virtual list size * @param beforeCount number of entries before the first match to return * @param afterCount number of entries after the first match to return * @return the byte array of encoded data. */ private byte[] createPageSpecification( int listIndex, int listSize, int beforeCount, int afterCount ) { /* A sequence */ BERSequence seq = new BERSequence(); seq.addElement( new BERInteger( beforeCount ) ); seq.addElement( new BERInteger( afterCount ) ); /* A sequence of list index and list size */ BERSequence indexSeq = new BERSequence(); indexSeq.addElement( new BERInteger(listIndex) ); indexSeq.addElement( new BERInteger(listSize) ); seq.addElement( new BERTag(BERTag.CONTEXT|BERTag.CONSTRUCTED|TAG_BYINDEX, indexSeq,true) ); if ( _context != null ) { seq.addElement( new BEROctetString(_context) ); } /* Suck out the data and return it */ return flattenBER( seq ); } public String toString() { StringBuffer sb = new StringBuffer("{VirtListCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" beforeCount="); sb.append(_beforeCount); sb.append(" afterCount="); sb.append(_afterCount); sb.append(" listIndex="); sb.append(_listIndex); sb.append(" listSize="); sb.append(_listSize); if (_context != null) { sb.append(" conext="); sb.append(_context); } sb.append("}"); return sb.toString(); } private final static int TAG_BYINDEX = 0; private final static int TAG_BYFILTER = 1; private int _beforeCount = 0; private int _afterCount = 0; private int _listIndex = -1; private int _listSize = 0; private String _context = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/controls/LDAPVirtualListResponse.java0000664001003300100330000002025710602743266033214 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.controls; import java.io.*; import org.ietf.ldap.client.JDAPBERTagDecoder; import org.ietf.ldap.LDAPControl; import org.ietf.ldap.ber.stream.*; import org.ietf.ldap.LDAPException; /** * Represents control data for returning paged results from a search. * * @version 1.0 * *
 *   VirtualListViewResponse ::= SEQUENCE {
 *       targetPosition   INTEGER (0 .. maxInt),
 *       contentCount     INTEGER (0 .. maxInt),
 *       virtualListViewResult ENUMERATED {
 *           success                  (0),
 *           operatonsError           (1),
 *           timeLimitExceeded        (3),
 *           adminLimitExceeded       (11),
 *           insufficientAccessRights (50),
 *           busy                     (51),
 *           unwillingToPerform       (53),
 *           sortControlMissing       (60),
 *           offsetRangeError         (61),
 *           other                    (80)
 *       },
 *       contextID     OCTET STRING OPTIONAL 
 *  }
 *
*/ public class LDAPVirtualListResponse extends LDAPControl { public final static String VIRTUALLISTRESPONSE = "2.16.840.1.113730.3.4.10"; /** * Blank constructor for internal use in LDAPVirtualListResponse. * @see org.ietf.ldap.LDAPControl */ LDAPVirtualListResponse() { super( VIRTUALLISTRESPONSE, true, null ); } /** * Contructs an LDAPVirtualListResponse object. * @param oid this parameter must be equal to * LDAPVirtualListResponse.VIRTUALLISTRESPONSE or an * LDAPExceptionis thrown * @param critical true if this control is critical * @param value the value associated with this control * @exception org.ietf.ldap.LDAPException If oid is not * LDAPVirtualListResponse.VIRTUALLISTRESPONSE. * @see org.ietf.ldap.LDAPControl#register */ public LDAPVirtualListResponse( String oid, boolean critical, byte[] value ) throws LDAPException { super( VIRTUALLISTRESPONSE, critical, value ); if ( !oid.equals( VIRTUALLISTRESPONSE ) ) { throw new LDAPException( "oid must be LDAPVirtualListResponse." + "VIRTUALLISTRESPONSE", LDAPException.PARAM_ERROR); } parseResponse(); } /** * Constructs a new LDAPVirtualListResponse object. * @param value a BER encoded byte array * @see org.ietf.ldap.LDAPControl */ public LDAPVirtualListResponse( byte[] value ) { super( VIRTUALLISTRESPONSE, true, null ); _value = value; parseResponse(); } /** * Gets the size of the virtual result set. * @return the size of the virtual result set, or -1 if not known. */ public int getContentCount() { return _contentCount; } /** * Gets the index of the first entry returned. * @return the index of the first entry returned. */ public int getFirstPosition() { return _firstPosition; } /** * Gets the result code. * @return the result code. */ public int getResultCode() { return _resultCode; } /** * Gets the context cookie, if any. * @return the result context cookie. */ public String getContext() { return _context; } /** * Returns a control useful for subsequent paged results searches. * "this" should be a control returned on a previous paged results * search, so it contains information on the virtual result set * size. * @return a control useful for subsequent paged results searches. */ private void parseResponse() { /* Suck out the data and parse it */ ByteArrayInputStream inStream = new ByteArrayInputStream( getValue() ); BERSequence ber = new BERSequence(); JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); int[] nRead = new int[1]; nRead[0] = 0; try { /* A sequence */ BERSequence seq = (BERSequence)BERElement.getElement( decoder, inStream, nRead ); /* First is firstPosition */ _firstPosition = ((BERInteger)seq.elementAt( 0 )).getValue(); _contentCount = ((BERInteger)seq.elementAt( 1 )).getValue(); _resultCode = ((BEREnumerated)seq.elementAt( 2 )).getValue(); if( seq.size() > 3 ) { BEROctetString str = (BEROctetString)seq.elementAt( 3 ); _context = new String(str.getValue(), "UTF8"); } } catch(Exception x) { _firstPosition = _contentCount = _resultCode = -1; _context = null; } } /** * Returns a control returned on a VLV search. * @param controls an array of controls that may include a VLV * results control * @return the control, if any; otherwise null. * @deprecated LDAPVirtualListResponse controls are now automatically * instantiated. */ public static LDAPVirtualListResponse parseResponse( LDAPControl[] controls ) { LDAPVirtualListResponse con = null; /* See if there is a VLV response control in the array */ for( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i].getID().equals( VIRTUALLISTRESPONSE ) ) { con = new LDAPVirtualListResponse( controls[i].getValue() ); con.parseResponse(); break; } } if ( con != null ) { con.parseResponse(); } return con; } public String toString() { StringBuffer sb = new StringBuffer("{VirtListResponseCtrl:"); sb.append(" isCritical="); sb.append(isCritical()); sb.append(" firstPosition="); sb.append(_firstPosition); sb.append(" contentCount="); sb.append(_contentCount); sb.append(" resultCode="); sb.append(_resultCode); if (_context != null) { sb.append(" conext="); sb.append(_context); } sb.append("}"); return sb.toString(); } private int _firstPosition = 0; private int _contentCount = 0; private int _resultCode = -1; private String _context = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSyntaxSchemaElement.java0000664001003300100330000001300610602743265031262 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * Helper class supporting schema elements that include syntax * definitions - attributes and matching rules * * @version 1.0 * @see org.ietf.ldap.LDAPAttributeSchema * @see org.ietf.ldap.LDAPMatchingRuleSchema **/ class LDAPSyntaxSchemaElement extends LDAPSchemaElement { static final long serialVersionUID = 6086340702503710702L; /** * Construct a blank element. */ LDAPSyntaxSchemaElement() { super(); } /** * Gets the syntax of the schema element * @return One of the following values: *
    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
  • unknown (not a known syntax) *
*/ int getSyntax() { return syntax; } /** * Gets the syntax of the attribute type in dotted-decimal format, * for example "1.2.3.4.5" * @return The attribute syntax in dotted-decimal format. */ String getSyntaxString() { return syntaxString; } /** * Convert from enumerated syntax types to an OID * @param syntax One of the enumerated syntax types * @return The OID corresponding to the internal type */ static String internalSyntaxToString( int syntax ) { String s; if ( syntax == cis ) { s = cisString; } else if ( syntax == binary ) { s = binaryString; } else if ( syntax == ces ) { s = cesString; } else if ( syntax == telephone ) { s = telephoneString; } else if ( syntax == dn ) { s = dnString; } else if ( syntax == integer ) { s = intString; } else { s = null; } return s; } /** * Convert from enumerated syntax type to a user-friendly * string * @param syntax One of the enumerated syntax types * @return A user-friendly syntax description */ String syntaxToString() { String s; if ( syntax == cis ) { s = "case-insensitive string"; } else if ( syntax == binary ) { s = "binary"; } else if ( syntax == integer ) { s = "integer"; } else if ( syntax == ces ) { s = "case-exact string"; } else if ( syntax == telephone ) { s = "telephone"; } else if ( syntax == dn ) { s = "distinguished name"; } else { s = syntaxString; } return s; } /** * Convert from an OID to one of the enumerated syntax types * @param syntax A dotted-decimal OID * @return The internal enumerated type corresponding to the * OID; unknown if it is not one of the known * types */ int syntaxCheck( String syntax ) { int i = unknown; if ( syntax == null ) { } else if ( syntax.equals( cisString ) ) { i = cis; } else if ( syntax.equals( binaryString ) ) { i = binary; } else if ( syntax.equals( cesString ) ) { i = ces; } else if ( syntax.equals( intString ) ) { i = integer; } else if ( syntax.equals( telephoneString ) ) { i = telephone; } else if ( syntax.equals( dnString ) ) { i = dn; } return i; } public String toString() { return "LDAPSyntaxSchemaElement: " + getSyntaxString(); } int syntax = unknown; String syntaxString = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPResponse.java0000664001003300100330000000674510602743265027153 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import org.ietf.ldap.client.opers.JDAPProtocolOp; import org.ietf.ldap.client.opers.JDAPResult; /** * Represents the response to a particular LDAP operation. * * @version 1.0 */ public class LDAPResponse extends LDAPMessage { static final long serialVersionUID = 5822205242593427418L; /** * Constructor * * @param msgid message identifier * @param rsp operation response * @param controls array of controls or null */ LDAPResponse(int msgid, JDAPProtocolOp rsp, LDAPControl controls[]) { super(msgid, rsp, controls); } /** * Returns any error message in the response. * * @return the error message of the last error (or null * if no message was set). */ public String getErrorMessage() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getErrorMessage(); } /** * Returns the partially matched DN field, if any, in a server response. * * @return the maximal subset of a DN to match, * or null. */ public String getMatchedDN() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getMatchedDN(); } /** * Returns all referrals, if any, in a server response. * * @return a list of referrals or null. */ public String[] getReferrals() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getReferrals(); } /** * Returns the result code in a server response. * * @return the result code. */ public int getResultCode() { JDAPResult result = (JDAPResult) getProtocolOp(); return result.getResultCode(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPMatchingRuleUseSchema.java0000664001003300100330000002130510602743265031522 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * The definition of a matching rule use in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * that need to be specified in the definition of a matching rule use. * According to the RFC, the description of a matching rule use can * include the following information: *

* *

    *
  • an OID identifying the matching rule *
  • a name identifying the matching rule use *
  • a description of the matching rule use *
  • a list of attributes the matching rule applies to *
*

* * When you construct an LDAPMatchingRuleUseSchema object, you can * specify these types of information as arguments to the constructor or * in the MatchingRuleUseDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with values in this * format. *

* * You can get the name, OID, and description of this matching rule use * definition by using the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this matching rule definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines MatchingRuleUseDescription follows: *

*

 * Values of the matchingRuleUse list the attributes which are suitable
 * for use with an extensible matching rule.
 *
 *    MatchingRuleUseDescription = "(" whsp
 *        numericoid whsp  ; MatchingRule identifier
 *        [ "NAME" qdescrs ]
 *        [ "DESC" qdstring ]
 *        [ "OBSOLETE" ]
 *       "APPLIES" oids    ; AttributeType identifiers
 *    whsp ")"
 * 
*

* * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement * @see org.ietf.ldap.LDAPMatchingRuleSchema **/ public class LDAPMatchingRuleUseSchema extends LDAPAttributeSchema { /** * Constructs a matching rule use definition, using the specified * information. * @param names names of the matching rule * @param oid object identifier (OID) of the matching rule * in dotted-decimal format (for example, "1.2.3.4") * @param description description of the matching rule * @param obsolete true if the element is obsolete * @param attributes array of the OIDs of the attributes for which * the matching rule is applicable */ public LDAPMatchingRuleUseSchema( String[] names, String oid, String description, boolean obsolete, String[] attributes ) { if ( (oid == null) || (oid.trim().length() < 1) ) { throw new IllegalArgumentException( "OID required" ); } this.names = names; this.oid = oid; this.description = description; attrName = "matchingruleuse"; _attributes = new String[attributes.length]; for( int i = 0; i < attributes.length; i++ ) { _attributes[i] = attributes[i]; } if ( obsolete ) { setQualifier( OBSOLETE, "" ); } } /** * Constructs a matching rule use definition based on descriptions in * the MatchingRuleUseDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. For example, when * you search an LDAP server for its schema, the server returns an entry * with attributes that include "matchingrule" and "matchingruleuse". * The values of these attributes are matching rule descriptions * in this format. *

* * @param use definition of the use of the matching rule in the * MatchingRuleUseDescription format */ public LDAPMatchingRuleUseSchema( String use ) { attrName = "matchingruleuse"; parseValue( use ); Vector v = (Vector)properties.get( "APPLIES" ); if ( v != null ) { _attributes = new String[v.size()]; v.copyInto( _attributes ); v.removeAllElements(); } } /** * Gets the list of the OIDs of the attribute types which can be used * with the matching rule. * @return array of the OIDs of the attribute types which can be used * with the matching rule. */ public String[] getApplicableAttributes() { return _attributes; } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "matchingruleuse"; } /** * Gets the matching rule use definition in the string representation * of the MatchingRuleUseDescription data type defined in X.501 (see * RFC 2252, Lightweight Directory Access Protocol * (v3): Attribute Syntax Definitions * for a description of these formats). * This is the format that LDAP servers and clients use to exchange * schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "matchingrules" and "matchingruleuse". The * values of these attributes are matching rule description and * matching rule use description in these formats.) *

* * @return a string in a format that can be used as the value of * the matchingruleuse attribute (which describes the use of * a matching rule in the schema) of a subschema object */ public String getValue() { String s = getValuePrefix(); if ( (_attributes != null) && (_attributes.length > 0) ) { s += "APPLIES ( "; for( int i = 0; i < _attributes.length; i++ ) { if ( i > 0 ) s += " $ "; s += _attributes[i]; } s += " ) "; } s += ')'; return s; } /** * Gets the definition of the matching rule use in Directory format * * @return definition of the matching rule use in Directory format */ public String toString() { return getValue(); } // Qualifiers tracked explicitly static final String[] EXPLICIT = { OBSOLETE }; private String[] _attributes = null; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPConnection.java0000664001003300100330000071257310602743265027457 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.*; import java.net.*; import java.util.*; import javax.security.auth.callback.CallbackHandler; import org.ietf.ldap.client.*; import org.ietf.ldap.client.opers.*; import org.ietf.ldap.ber.stream.*; import org.ietf.ldap.util.*; /** * Represents a connection to an LDAP server.

* * Use objects of this class to perform LDAP operations (such as * search, modify, and add) on an LDAP server.

* * To perform an LDAP operation on a server, you need to follow * these steps:

* *

    *
  1. Create a new LDAPConnection object. *
  2. Use the connect method to connect to the * LDAP server. *
  3. Use the authenticate method to authenticate * to server. *
  4. Perform the LDAP operation. *
  5. Use the disconnect method to disconnect from * the server when done. *
*

* * All operations block until completion (with the exception of * the search method in which the results may not all return at * the same time). *

* * This class also specifies a default set of constraints * (such as the maximum length of time to allow for an operation before timing out) * which apply to all operations. To get and set these constraints, * use the getOption and setOption methods. * To override these constraints for an individual operation, * define a new set of constraints by creating a LDAPConstraints * object and pass the object to the method for the operation. For search * operations, additional constraints are defined in LDAPSearchConstraints * (a subclass of LDAPConstraints). To override the default search * constraints, create an LDAPSearchConstraints object and pass it * to the search method. *

* * If you set up your client to follow referrals automatically, * an operation that results in a referral will create a new connection * to the LDAP server identified in the referral. In order to have * your client authenticate to that LDAP server automatically, you need * to define a class that implements the LDAPAuthHandler interface. * In your definition of the class, you need to define a * getAuthProvider method that creates an LDAPAuthProvider * object containing the distinguished name and password to use for reauthentication. *

* * Most errors that occur raise the same exception (LDAPException). * In order to determine the exact problem that occurred, you can retrieve the * result code from this exception and compare its value against a set of defined * result codes. *

* * @version 1.0 * @see org.ietf.ldap.LDAPConstraints * @see org.ietf.ldap.LDAPSearchConstraints * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPAuthProvider * @see org.ietf.ldap.LDAPException */ public class LDAPConnection implements Cloneable, Serializable { static final long serialVersionUID = -8698420087475771144L; /** * Version of the LDAP protocol used by default. * LDAP_VERSION is 2, so your client will * attempt to authenticate to LDAP servers as an LDAP v2 client. * The following is an example of some code that prints the * value of this variable: *

* *

     * LDAPConnection ld = new LDAPConnection();
     * System.out.println( "The default LDAP protocol version used is "
     *                      ld.LDAP_VERSION );
     * 
* * If you want to authenticate as an LDAP v3 client, * use the bind(int version, String dn, byte[] passwd) method. * For example: *

* *

     * ld.bind( 3, myDN, myPW );
     * 
* * @see org.ietf.ldap.LDAPConnection#bind(int, java.lang.String, byte[]) */ public final static int LDAP_VERSION = 2; /** * Name of the property specifying the version of the SDK.

* * To get the version number, pass this name to the * getProperty method. The SDK version number * is of the type Float. For example:

*

     *      ...
     *      Float sdkVersion = ( Float )myConn.getProperty( myConn.LDAP_PROPERTY_SDK );
     *      System.out.println( "SDK version: " + sdkVersion );
     *      ... 
* @see org.ietf.ldap.LDAPConnection#getProperty(java.lang.String) */ public final static String LDAP_PROPERTY_SDK = "version.sdk"; /** * Name of the property specifying the highest supported version of * the LDAP protocol.

* * To get the version number, pass this name to the * getProperty method. The LDAP protocol version number * is of the type Float. For example:

*

     *      ...
     *      Float LDAPVersion = ( Float )myConn.getProperty( myConn.LDAP_PROPERTY_PROTOCOL );
     *      System.out.println( "Highest supported LDAP protocol version: " + LDAPVersion );
     *      ... 
* @see org.ietf.ldap.LDAPConnection#getProperty(java.lang.String) */ public final static String LDAP_PROPERTY_PROTOCOL = "version.protocol"; /** * Name of the property specifying the types of authentication allowed by this * API (for example, anonymous authentication and simple authentication).

* * To get the supported types, pass this name to the * getProperty method. The value of this property is * of the type String. For example:

*

     *      ...
     *      String authTypes = ( String )myConn.getProperty( myConn.LDAP_PROPERTY_SECURITY );
     *      System.out.println( "Supported authentication types: " + authTypes );
     *      ... 
* @see org.ietf.ldap.LDAPConnection#getProperty(java.lang.String) */ public final static String LDAP_PROPERTY_SECURITY = "version.security"; /** * Name of the property to enable/disable LDAP message trace.

* * The property can be specified either as a system property * (java -D command line option), or programmatically with the * setProperty method. *

* When -D command line option is used, defining the property with * no value will send the trace output to the standard error. If the * value is defined, it is assumed to be the name of an output file. * If the file name is prefixed with a '+' character, the file is * opened in append mode. *

* When the property is set with the setProperty method, * the property value must be either a String (represents a file name) * an OutputStream or an instance of LDAPTraceWriter. To stop tracing, * null should be passed as the property value. * * @see org.ietf.ldap.LDAPConnection#setProperty(java.lang.String, java.lang.Object) */ public final static String TRACE_PROPERTY = "com.org.ietf.ldap.trace"; /** * Specifies the serial connection setup policy when a list of hosts is * passed to the connect method. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay(int) */ public final static int NODELAY_SERIAL = -1; /** * Specifies the parallel connection setup policy with no delay when a * list of hosts is passed to the connect method. * For each host in the list, a separate thread is created to attempt * to connect to the host. All threads are started simultaneously. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay(int) */ public final static int NODELAY_PARALLEL = 0; /** * Constants */ private final static String defaultFilter = "(objectClass=*)"; private final static LDAPConstraints readConstraints = new LDAPSearchConstraints(); /** * The default port number for LDAP servers. You can specify * this identifier when calling the LDAPConnection.connect * method to connect to an LDAP server. * @see org.ietf.ldap.LDAPConnection#connect */ public final static int DEFAULT_PORT = 389; /** * Option specifying how aliases are dereferenced. *

* * This option can have one of the following values: *

*

* * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int DEREF = 2; /** * Option specifying the maximum number of search results to * return. *

* * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int SIZELIMIT = 3; /** * Option specifying the maximum number of milliseconds to * wait for an operation to complete. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int TIMELIMIT = 4; /** * Option specifying the maximum number of milliseconds the * server should spend returning search results before aborting * the search. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int SERVER_TIMELIMIT = 5; /** * Option specifying whether or not referrals to other LDAP * servers are followed automatically. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPAuthProvider */ public static final int REFERRALS = 8; /** * Option specifying the object containing the method for * getting authentication information (the distinguished name * and password) used during a referral. For example, when * referred to another LDAP server, your client uses this object * to obtain the DN and password. Your client authenticates to * the LDAP server using this DN and password. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPAuthProvider */ public static final int REFERRALS_REBIND_PROC = 9; /** * Option specifying the maximum number of referrals to follow * in a sequence when requesting an LDAP operation. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int REFERRALS_HOP_LIMIT = 10; /** * Option specifying the object containing the method for * authenticating to the server. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPBindHandler */ public static final int BIND = 13; /** * Option specifying the version of the LDAP protocol * used by your client when interacting with the LDAP server. * If no version is set, the default version is 2. If you * are planning to use LDAP v3 features (such as controls * or extended operations), you should set this version to 3 * or specify version 3 as an argument to the authenticate * method of the LDAPConnection object. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption * @see org.ietf.ldap.LDAPConnection#bind(int, java.lang.String, byte[]) */ public static final int PROTOCOL_VERSION = 17; /** * Option specifying the number of results to return at a time. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int BATCHSIZE = 20; /* * Valid options for Scope */ /** * Specifies that the scope of a search includes * only the base DN (distinguished name). * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public static final int SCOPE_BASE = 0; /** * Specifies that the scope of a search includes * only the entries one level below the base DN (distinguished name). * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public static final int SCOPE_ONE = 1; /** * Specifies that the scope of a search includes * the base DN (distinguished name) and all entries at all levels * beneath that base. * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public static final int SCOPE_SUB = 2; /* * Valid options for Dereference */ /** * Specifies that aliases are never dereferenced. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int DEREF_NEVER = 0; /** * Specifies that aliases are dereferenced when searching the * entries beneath the starting point of the search (but * not when finding the starting entry). * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int DEREF_SEARCHING = 1; /** * Specifies that aliases are dereferenced when finding the * starting point for the search (but not when searching * under that starting entry). * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int DEREF_FINDING = 2; /** * Specifies that aliases are always dereferenced. * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int DEREF_ALWAYS = 3; /** * Option specifying server controls for LDAP operations. These * controls are passed to the LDAP server. They may also be returned by * the server. * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int SERVERCONTROLS = 12; /** * Attribute type that you can specify in the LDAPConnection * search method if you don't want to retrieve any of the * attribute types for entries found by the search. * @see org.ietf.ldap.LDAPConnection#search */ public static final String NO_ATTRS = "1.1"; /** * Attribute type that you can specify in the LDAPConnection * search method if you want to retrieve all attribute types. * You can use this if you want to retrieve all attributes in * addition to an operational attribute. For example: *

* *

     * ...
     * String [] MY_ATTRS = { LDAPConnection.ALL_USER_ATTRS, "modifiersName",
     *     "modifyTimestamp" };
     * LDAPSearchResults res = ld.search( MY_SEARCHBASE,
     *     LDAPConnection.SCOPE_SUB, MY_FILTER, MY_ATTRS, false, cons );
     * ...
     * 
* @see org.ietf.ldap.LDAPConnection#search */ public static final String ALL_USER_ATTRS = "*"; /** * Internal variables */ private LDAPSearchConstraints _defaultConstraints = new LDAPSearchConstraints(); // A clone of constraints for the successful bind. Used by // "smart failover" for the automatic rebind private LDAPConstraints _rebindConstraints; private Vector _responseListeners; private Vector _searchListeners; private boolean _bound; private String _prevBoundDN; private byte[] _prevBoundPasswd; private String _boundDN; private byte[] _boundPasswd; private int _protocolVersion = LDAP_VERSION; private LDAPConnSetupMgr _connMgr; private int _connSetupDelay = -1; private int _connectTimeout = 0; private LDAPSocketFactory _factory; /* _thread does all socket i/o for the object and any clones */ private transient LDAPConnThread _thread = null; /* To manage received server controls on a per-thread basis, we keep a table of active threads and a table of controls, indexed by thread */ private Vector _attachedList = new Vector(); private Hashtable _responseControlTable = new Hashtable(); private LDAPCache _cache = null; static Hashtable _threadConnTable = new Hashtable(); // This handles the case when the client lost the connection to the // server. After the client reconnects with the server, the bound resets // to false. If the client used to have anonymous bind, then this boolean // will take care of the case whether the client should send anonymous bind // request to the server. private boolean _anonymousBound = false; private Object _security = null; private LDAPSaslBind _saslBinder = null; private CallbackHandler _saslCallbackHandler = null; private Properties _securityProperties; private Hashtable _properties = new Hashtable(); private LDAPConnection _referralConnection; private String _authMethod = "none"; /** * Properties */ private final static Float SdkVersion = new Float(4.14f); private final static Float ProtocolVersion = new Float(3.0f); private final static String SecurityVersion = new String("none,simple,sasl"); private final static Float MajorVersion = new Float(4.0f); private final static Float MinorVersion = new Float(0.14f); private final static String DELIM = "#"; private final static String PersistSearchPackageName = "org.ietf.ldap.controls.LDAPPersistSearchControl"; final static String EXTERNAL_MECHANISM = "external"; private final static String EXTERNAL_MECHANISM_PACKAGE = "com.netscape.sasl"; final static String DEFAULT_SASL_PACKAGE = "com.netscape.sasl"; final static String SCHEMA_BUG_PROPERTY = "com.org.ietf.ldap.schema.quoting"; final static String SASL_PACKAGE_PROPERTY = "com.org.ietf.ldap.saslpackage"; /** * Constructs a new LDAPConnection object, * which represents a connection to an LDAP server.

* * Calling the constructor does not actually establish * the connection. To connect to the LDAP server, use the * connect method. * * @see org.ietf.ldap.LDAPConnection#connect(java.lang.String, int) * @see org.ietf.ldap.LDAPConnection#bind(int, java.lang.String, byte[]) */ public LDAPConnection() { super(); _factory = null; _properties.put(LDAP_PROPERTY_SDK, SdkVersion); _properties.put(LDAP_PROPERTY_PROTOCOL, ProtocolVersion); _properties.put(LDAP_PROPERTY_SECURITY, SecurityVersion); _properties.put("version.major", MajorVersion); _properties.put("version.minor", MinorVersion); } /** * Constructs a new LDAPConnection object that * will use the specified socket factory class to create * socket connections. The socket factory class must implement * the LDAPSocketFactory interface.
* (For example, the LDAPSSLSocketFactory * class implements this interface.) *

* * Note that calling the LDAPConnection constructor * does not actually establish a connection to an LDAP server. * To connect to an LDAP server, use the * connect method. The socket connection will be * constructed when this method is called. *

* * @see org.ietf.ldap.LDAPSocketFactory * @see org.ietf.ldap.LDAPSSLSocketFactory * @see org.ietf.ldap.LDAPConnection#connect(java.lang.String, int) * @see org.ietf.ldap.LDAPConnection#bind(int, java.lang.String, byte[]) * @see org.ietf.ldap.LDAPConnection#getSocketFactory * @see org.ietf.ldap.LDAPConnection#setSocketFactory(org.ietf.ldap.LDAPSocketFactory) */ public LDAPConnection( LDAPSocketFactory factory ) { this(); _factory = factory; } /** * Abandons a current search operation, notifying the server not * to send additional search results. * * @param searchResults the search results returned when the search * was started * @exception LDAPException Failed to notify the LDAP server. * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) * @see org.ietf.ldap.LDAPSearchResults */ public void abandon( LDAPSearchResults searchResults ) throws LDAPException { abandon( searchResults, _defaultConstraints ); } /** * Abandons a current search operation, notifying the server not * to send additional search results. * * @param searchResults the search results returned when the search * was started * @param cons preferences for the operation * @exception LDAPException Failed to notify the LDAP server. * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) * @see org.ietf.ldap.LDAPSearchResults */ public void abandon( LDAPSearchResults searchResults, LDAPConstraints cons ) throws LDAPException { if ( (!isConnected()) || (searchResults == null) ) { return; } int id = searchResults.getMessageID(); if ( id != -1 ) { abandon( id ); } } /** * Cancels the ldap request with the specified id and discards * any results already received. * * @param id an LDAP request id * @exception LDAPException Failed to send request. */ public void abandon( int id ) throws LDAPException { abandon( id, _defaultConstraints ); } /** * Cancels the ldap request with the specified id and discards * any results already received. * * @param id an LDAP request id * @param cons preferences for the operation * @exception LDAPException Failed to send request. */ public void abandon( int id, LDAPConstraints cons ) throws LDAPException { if (!isConnected()) { return; } for (int i=0; i<3; i++) { try { /* Tell listener thread to discard results */ _thread.abandon( id ); /* Tell server to stop sending results */ _thread.sendRequest(null, new JDAPAbandonRequest(id), null, _defaultConstraints); /* No response is forthcoming */ break; } catch (NullPointerException ne) { // do nothing } } if (_thread == null) { throw new LDAPException("Failed to send abandon request to the server.", LDAPException.OTHER); } } /** * Cancels all outstanding search requests associated with this * LDAPSearchQueue object and discards any results already received. * * @param searchlistener a search listener returned from a search * @exception LDAPException Failed to send request. */ public void abandon( LDAPSearchQueue searchlistener ) throws LDAPException { abandon( searchlistener, _defaultConstraints ); } /** * Cancels all outstanding search requests associated with this * LDAPSearchQueue object and discards any results already received. * * @param searchlistener a search listener returned from a search * @param cons preferences for the operation * @exception LDAPException Failed to send request. */ public void abandon( LDAPSearchQueue searchlistener, LDAPConstraints cons ) throws LDAPException { int[] ids = searchlistener.getMessageIDs(); for (int i=0; i < ids.length; i++) { searchlistener.removeRequest(ids[i]); abandon(ids[i]); } } /** * Adds an entry to the directory.

* * Before using this method, you need to create an * LDAPEntry object and use it to specify the * distinguished name and attributes of the new entry. Make sure * to specify values for all required attributes in the * entry. If all required attributes are not specified and the LDAP server * checks the entry against the schema, an LDAPException * may be thrown (where the LDAP result code is * OBJECT_CLASS_VIOLATION).

* * For example, the following section of code creates an * LDAPEntry object for a new entry and uses the object * to add the new entry to the directory. Because the definition of * the LDAP inetOrgPerson class specifies that the * cn, sn, and objectclass * attributes are required, these attributes are specified as part * of the new entry. (mail is not required but is shown * here as an example of specifying additional attributes.) *

* *

     * ...
     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     *
     * LDAPAttribute attr1 = new LDAPAttribute( "cn", "Barbara Jensen" );
     * LDAPAttribute attr2 = new LDAPAttribute( "sn", "Jensen" );
     * LDAPAttribute attr3 = new LDAPAttribute( "objectclass", "top" );
     * LDAPAttribute attr4 = new LDAPAttribute( "objectclass", "person" );
     * LDAPAttribute attr5 = new LDAPAttribute( "objectclass", "organizationalPerson" );
     * LDAPAttribute attr6 = new LDAPAttribute( "objectclass", "inetOrgPerson" );
     * LDAPAttribute attr7 = new LDAPAttribute( "mail", "bjensen@aceindustry.com" );
     *
     * LDAPAttributeSet myAttrs = new LDAPAttributeSet();
     * myAttrs.add( attr1 );
     * myAttrs.add( attr2 );
     * myAttrs.add( attr3 );
     * myAttrs.add( attr4 );
     * myAttrs.add( attr5 );
     * myAttrs.add( attr6 );
     * myAttrs.add( attr7 );
     *
     * LDAPEntry myEntry = new LDAPEntry( myDN, myAttrs );
     *
     * myConn.add( myEntry );
     * ... 
* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @exception LDAPException Failed to add the specified entry to the * directory. * @see org.ietf.ldap.LDAPEntry */ public void add( LDAPEntry entry ) throws LDAPException { add(entry, _defaultConstraints); } /** * Adds an entry to the directory and allows you to specify preferences * for this LDAP add operation by using an * LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to add the specified entry to the * directory. * @see org.ietf.ldap.LDAPEntry * @see org.ietf.ldap.LDAPConstraints */ public void add( LDAPEntry entry, LDAPConstraints cons ) throws LDAPException { internalBind (cons); LDAPResponseQueue myListener = getResponseListener (); LDAPAttributeSet attrs = entry.getAttributeSet (); LDAPAttribute[] attrList = new LDAPAttribute[attrs.size()]; Iterator it = attrs.iterator(); for( int i = 0; i < attrs.size(); i++ ) { attrList[i] = (LDAPAttribute)it.next(); } int attrPosition = 0; LDAPMessage response; try { sendRequest (new JDAPAddRequest (entry.getDN(), attrList), myListener, cons); response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.ADD_REQUEST, null, 0, null, null, false, null, entry, null, null); } finally { releaseResponseListener (myListener); } } /** * Adds an entry to the directory. * * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPEntry * @see org.ietf.ldap.LDAPResponseQueue */ public LDAPResponseQueue add( LDAPEntry entry, LDAPResponseQueue listener ) throws LDAPException{ return add( entry, listener, _defaultConstraints ); } /** * Adds an entry to the directory and allows you to specify constraints * for this LDAP add operation by using an LDAPConstraints * object. For example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param entry LDAPEntry object specifying the distinguished name and * attributes of the new entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPEntry * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ public LDAPResponseQueue add( LDAPEntry entry, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException{ if (cons == null) { cons = _defaultConstraints; } internalBind (cons); if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } LDAPAttributeSet attrs = entry.getAttributeSet (); LDAPAttribute[] attrList = new LDAPAttribute[attrs.size()]; Iterator it = attrs.iterator(); for( int i = 0; i < attrs.size(); i++ ) { attrList[i] = (LDAPAttribute)it.next(); } int attrPosition = 0; sendRequest (new JDAPAddRequest (entry.getDN(), attrList), listener, cons); return listener; } /** * Registers an object to be notified on arrival of an unsolicited * message from a server * * @param listener An object to be notified on arrival of an * unsolicited message from a server */ public void addUnsolicitedNotificationListener( LDAPUnsolicitedNotificationListener listener ) { } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password. * If you are not already connected to the LDAP server, this * method attempts to reconnect to the server. *

* * For example, the following section of code authenticates the * client as Barbara Jensen. The code assumes that the client * has already established a connection with an LDAP server. *

* *

     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String myPW = "hifalutin";
     * try {
     *     myConn.bind( myDN, myPW.getBytes() );
     * } catch ( LDAPException e ) {
     *     switch( e.getResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified user does not exist." );
     *             break;
     *         case e.INVALID_CREDENTIALS:
     *             System.out.println( "Invalid password." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getResultCode() );
     *             System.out.println( "Failed to authentice as " + myDN );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Authenticated as " + myDN );
     * 
* * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException Failed to authenticate to the LDAP server. */ private void bind( String dn, byte[] passwd) throws LDAPException { bind( _protocolVersion, dn, passwd, _defaultConstraints ); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password. The * default protocol version (version 2) is used. If the server * doesn't support the default version, an LDAPException is thrown * with the error code PROTOCOL_ERROR. This method allows the * user to specify the preferences for the bind operation. * * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ private void bind( String dn, byte[] passwd, LDAPConstraints cons ) throws LDAPException { bind( _protocolVersion, dn, passwd, cons ); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password, and * requests that the server use at least the specified * protocol version. If the server doesn't support that * level, an LDAPException is thrown with the error code * PROTOCOL_ERROR. * * @param version required LDAP protocol version * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind( int version, String dn, byte[] passwd ) throws LDAPException { bind( version, dn, passwd, _defaultConstraints ); } /** * Authenticates to the LDAP server (to which you are currently * connected) using the specified name and password, and * requesting that the server use at least the specified * protocol version. If the server doesn't support that * level, an LDAPException is thrown with the error code * PROTOCOL_ERROR. This method allows the user to specify the * preferences for the bind operation. * * @param version required LDAP protocol version * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind( int version, String dn, byte[] passwd, LDAPConstraints cons ) throws LDAPException { _prevBoundDN = _boundDN; _prevBoundPasswd = _boundPasswd; _boundDN = dn; _boundPasswd = passwd; _anonymousBound = ((_prevBoundDN == null) || (_prevBoundPasswd == null)); internalBind (version, true, cons); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and whatever SASL mechanisms * are supported by the server. Each supported mechanism in turn * is tried until authentication succeeds or an exception is thrown. * If the object has been disconnected from an LDAP server, this * method attempts to reconnect to the server. If the object had * already authenticated, the old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param authzid If not null and not empty, an LDAP authzID [AUTH] * to be passed to the SASL layer. If null or empty, * the authzId will be treated as an empty string * and processed as per RFC 2222 [SASL]. * @param props Optional qualifiers for the authentication session * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind( String dn, String authzid, Map props, CallbackHandler cbh ) throws LDAPException { bind( dn, authzid, props, cbh, _defaultConstraints ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and whatever SASL mechanisms * are supported by the server. Each supported mechanism in turn * is tried until authentication succeeds or an exception is thrown. * If the object has been disconnected from an LDAP server, this * method attempts to reconnect to the server. If the object had * already authenticated, the old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param authzid If not null and not empty, an LDAP authzID [AUTH] * to be passed to the SASL layer. If null or empty, * the authzId will be treated as an empty string * and processed as per RFC 2222 [SASL]. * @param props Optional qualifiers for the authentication session * @param cbh a class which the SASL framework can call to * obtain additional required information * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind( String dn, String authzid, Map props, CallbackHandler cbh, LDAPConstraints cons ) throws LDAPException { if ( !isConnected() ) { connect(); } // Get the list of mechanisms from the server String[] attrs = { "supportedSaslMechanisms" }; LDAPEntry entry = read( "", attrs ); LDAPAttribute attr = entry.getAttribute( attrs[0] ); if ( attr == null ) { throw new LDAPException( "Not found in root DSE: " + attrs[0], LDAPException.NO_SUCH_ATTRIBUTE ); } bind( dn, authzid, attr.getStringValueArray(), props, cbh, cons ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param authzid If not null and not empty, an LDAP authzID [AUTH] * to be passed to the SASL layer. If null or empty, * the authzId will be treated as an empty string * and processed as per RFC 2222 [SASL]. * @param props Optional qualifiers for the authentication session * @param mechanisms a list of acceptable mechanisms. The first one * for which a Mechanism Driver can be instantiated is returned. * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. * @see org.ietf.ldap.LDAPConnection#bind(String, String, Map, * CallbackHandler) */ public void bind( String dn, String authzid, String[] mechanisms, Map props, CallbackHandler cbh ) throws LDAPException { bind( dn, authzid, mechanisms, props, cbh, _defaultConstraints ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param authzid If not null and not empty, an LDAP authzID [AUTH] * to be passed to the SASL layer. If null or empty, * the authzId will be treated as an empty string * and processed as per RFC 2222 [SASL]. * @param props Optional qualifiers for the authentication session * @param mechanisms a list of acceptable mechanisms. The first one * for which a Mechanism Driver can be instantiated is returned. * @param cbh a class which the SASL framework can call to * obtain additional required information * @param cons preferences for the bind operation * @exception LDAPException Failed to authenticate to the LDAP server. * @see org.ietf.ldap.LDAPConnection#bind(String, String, Map, * CallbackHandler, LDAPConstraints) */ public void bind( String dn, String authzid, String[] mechanisms, Map props, CallbackHandler cbh, LDAPConstraints cons ) throws LDAPException { if ( !isConnected() ) { connect(); } else { // If the thread has more than one LDAPConnection, then // we should disconnect first. Otherwise, // we can reuse the same thread for the rebind. if (_thread.getClientCount() > 1) { disconnect(); connect(); } } _boundDN = null; _protocolVersion = 3; // Must be 3 for SASL if ( props == null ) { props = new Hashtable(); } _saslBinder = new LDAPSaslBind( dn, mechanisms, props, cbh ); _saslCallbackHandler = cbh; _saslBinder.bind( this ); _authMethod = "sasl"; _boundDN = dn; } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param version required LDAP protocol version * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue */ public LDAPResponseQueue bind( int version, String dn, byte[] passwd, LDAPResponseQueue listener ) throws LDAPException{ return bind( version, dn, passwd, listener, _defaultConstraints ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue */ private LDAPResponseQueue bind( String dn, byte[] passwd, LDAPResponseQueue listener) throws LDAPException{ return bind( _protocolVersion, dn, passwd, listener, _defaultConstraints ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ private LDAPResponseQueue bind( String dn, byte[] passwd, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException{ return bind( _protocolVersion, dn, passwd, listener, cons ); } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and password and allows you * to specify constraints for this LDAP add operation by using an * LDAPConstraints object. If the object * has been disconnected from an LDAP server, this method attempts to * reconnect to the server. If the object had already authenticated, the * old authentication is discarded. * * @param version required LDAP protocol version * @param dn if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection * and all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ public LDAPResponseQueue bind( int version, String dn, byte[] passwd, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException{ if (cons == null) { cons = _defaultConstraints; } _prevBoundDN = _boundDN; _prevBoundPasswd = _boundPasswd; _boundDN = dn; _boundPasswd = passwd; _protocolVersion = version; if (_thread == null) { connect(); } else if (_thread.getClientCount() > 1) { disconnect(); connect(); } if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } sendRequest(new JDAPBindRequest(version, _boundDN, _boundPasswd), listener, cons); return listener; } /** * Authenticates to the LDAP server (to which the object is currently * connected) using the specified name and a specified SASL mechanism * or set of mechanisms. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param authzid If not null and not empty, an LDAP authzID [AUTH] * to be passed to the SASL layer. If null or empty, * the authzId will be treated as an empty string * and processed as per RFC 2222 [SASL]. * @param mechanisms a list of acceptable mechanisms. The first one * for which a Mechanism Driver can be instantiated is returned. * @param packageName a package containing a SASL ClientFactory, * e.g. "myclasses.SASL". If null, a system default is used. * @param cbh a class which the SASL framework can call to * obtain additional required information * @exception LDAPException Failed to authenticate to the LDAP server. * @deprecated Please use authenticate without packageName * instead. */ public void bind( String dn, String authzid, String[] mechanisms, String packageName, Map props, CallbackHandler cbh, LDAPConstraints cons ) throws LDAPException { if ( props == null ) { props = new Hashtable(); } props.put( LDAPSaslBind.CLIENTPKGS, packageName ); bind( dn, authzid, mechanisms, props, cbh, cons ); } /** * Creates and returns a copy of the object. The new * LDAPConnection object contains the same information as * the original connection, including: *
    *
  • the default search constraints *
  • host name and port number of the LDAP server *
  • the DN and password used to authenticate to the LDAP server *
*

* @return the LDAPconnection object representing the * new object. */ public synchronized Object clone() { try { LDAPConnection c = (LDAPConnection)super.clone(); if (!isConnected()) { this.internalBind(_defaultConstraints); } c._defaultConstraints = (LDAPSearchConstraints)_defaultConstraints.clone(); c._responseListeners = null; c._searchListeners = null; c._bound = this._bound; c._connMgr = _connMgr; c._connSetupDelay = _connSetupDelay; c._boundDN = this._boundDN; c._boundPasswd = this._boundPasswd; c._prevBoundDN = this._prevBoundDN; c._prevBoundPasswd = this._prevBoundPasswd; c._anonymousBound = this._anonymousBound; c.setCache(this._cache); // increments cache reference cnt c._factory = this._factory; c._thread = this._thread; /* share current connection thread */ synchronized (_threadConnTable) { Vector v = (Vector)_threadConnTable.get(this._thread); if (v != null) { v.addElement(c); } else { printDebug("Failed to clone"); return null; } } c._thread.register(c); return c; } catch (Exception e) { } return null; } /** * Checks to see if an entry contains an attribute with a specified value. * Returns true if the entry has the value. Returns * false if the entry does not have the value or the * attribute. To represent the value that you want compared, you need * to create an LDAPAttribute object.

* * Note that only string values can be compared.

* * For example, the following section of code checks to see if the entry * "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US" contains * the attribute "mail" with the value "bjensen@aceindustry.com". * *

     * ...
     * LDAPConnection myConn = new LDAPConnection();
     * ...
     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String nameOfAttr = "mail";
     * String valOfAttr = "bjensen@aceindustry.com";
     * LDAPAttribute cmpThisAttr = new LDAPAttribute( nameOfAttr, valOfAttr );
     * boolean hasValue = myConn.compare( myDN, cmpThisAttr );
     * if ( hasValue ) {
     *     System.out.println( "Attribute and value found in entry." );
     * } else {
     *     System.out.println( "Attribute and value not found in entry." );
     * }
     * ...
* * @param DN the distinguished name of the entry to use in * the comparison * @param attr the attribute to compare against the entry. * (The method checks to see if the entry has an attribute with the same name * and value as this attribute.) * @return true if the entry contains the specified attribute and value. * @exception LDAPException Failed to perform the comparison. * @see org.ietf.ldap.LDAPAttribute */ public boolean compare( String DN, LDAPAttribute attr ) throws LDAPException { return compare( DN, attr, _defaultConstraints ); } public boolean compare( String DN, LDAPAttribute attr, LDAPConstraints cons ) throws LDAPException { internalBind(cons); LDAPResponseQueue myListener = getResponseListener (); Enumeration en = attr.getStringValues(); String val = (String)en.nextElement(); JDAPAVA ass = new JDAPAVA(attr.getName(), val); LDAPMessage response; try { sendRequest (new JDAPCompareRequest (DN, ass), myListener, cons); response = myListener.getResponse (); int resultCode = ((JDAPResult)response.getProtocolOp()).getResultCode(); if (resultCode == JDAPResult.COMPARE_FALSE) { return false; } if (resultCode == JDAPResult.COMPARE_TRUE) { return true; } checkMsg (response); } catch (LDAPReferralException e) { Vector res = new Vector(); performReferrals(e, cons, JDAPProtocolOp.COMPARE_REQUEST, DN, 0, null, null, false, null, null, attr, res); boolean bool = false; if (res.size() > 0) { bool = ((Boolean)res.elementAt(0)).booleanValue(); } return bool; } finally { releaseResponseListener (myListener); } return false; /* this should never be executed */ } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ public boolean compare( String DN, LDAPAttribute attr, LDAPSearchConstraints cons ) throws LDAPException { return compare( DN, attr, (LDAPConstraints)cons ); } /** * Compare an attribute value with one in the directory. The result can * be obtained by calling getResultCode on the * LDAPResponse from the LDAPResponseQueue. * The code will be LDAPException.COMPARE_TRUE or * LDAPException.COMPARE_FALSE. * * @param dn distinguished name of the entry to compare * @param attr attribute with a value to compare * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. */ public LDAPResponseQueue compare( String dn, LDAPAttribute attr, LDAPResponseQueue listener ) throws LDAPException { return compare( dn, attr, listener, _defaultConstraints ); } /** * Compare an attribute value with one in the directory. The result can * be obtained by calling getResultCode on the * LDAPResponse from the LDAPResponseQueue. * The code will be LDAPException.COMPARE_TRUE or * LDAPException.COMPARE_FALSE. * * @param dn distinguished name of the entry to compare * @param attr attribute with a value to compare * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to this operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. */ public LDAPResponseQueue compare( String dn, LDAPAttribute attr, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException { if (cons == null) { cons = _defaultConstraints; } internalBind (cons); if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } Enumeration en = attr.getStringValues(); String val = (String)en.nextElement(); JDAPAVA ava = new JDAPAVA(attr.getName(), val); sendRequest (new JDAPCompareRequest (dn, ava), listener, cons); return listener; } /** * Connects to the specified host and port. If this LDAPConnection object * represents an open connection, the connection is closed first * before the new connection is opened. *

* * For example, the following section of code establishes a connection with * the LDAP server running on the host ldap.netscape.com and the port 389. *

* *

     * String ldapHost = "ldap.netscape.com";
     * int ldapPort = 389;
     * LDAPConnection myConn = new LDAPConnection();
     * try {
     *     myConn.connect( ldapHost, ldapPort );
     * } catch ( LDAPException e ) {
     *     System.out.println( "Unable to connect to " + ldapHost +
     *                         " at port " + ldapPort );
     *     return;
     * }
     * System.out.println( "Connected to " + ldapHost + " at port " + ldapPort )
     * 
*

* You can limit the time spent waiting for the connection to be established * by calling setConnectTimeout before connect. *

* @param host host name of the LDAP server to which you want to connect. * This value can also be a space-delimited list of hostnames or * hostnames and port numbers (using the syntax * hostname:portnumber). For example, you can specify * the following values for the host argument:
*

     *   myhost
     *   myhost hishost:389 herhost:5000 whathost
     *   myhost:686 myhost:389 hishost:5000 whathost:1024
     *
* If multiple servers are specified in the host list, the connection * setup policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently. *

* @param port port number of the LDAP server to which you want to connect. * This parameter is ignored for any host in the host * parameter which includes a colon and port number. * @exception LDAPException The connection failed. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay * @see org.ietf.ldap.LDAPConnection#setConnectTimeout */ public void connect(String host, int port) throws LDAPException { connect( host, port, null, null, _defaultConstraints, false ); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server. If this LDAPConnection object * represents an open connection, the connection is closed first * before the new connection is opened. *

* * For example, the following section of code establishes a connection * with the LDAP server running on ldap.netscape.com at port 389. The * example also attempts to authenticate the client as Barbara Jensen. *

* *

     * String ldapHost = "ldap.netscape.com";
     * int ldapPort = 389;
     * String myDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String myPW = "hifalutin";
     * LDAPConnection myConn = new LDAPConnection();
     * try {
     *     myConn.connect( ldapHost, ldapPort, myDN, myPW );
     * } catch ( LDAPException e ) {
     *     switch( e.getResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified user does not exist." );
     *             break;
     *         case e.INVALID_CREDENTIALS:
     *             System.out.println( "Invalid password." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getResultCode() );
     *             System.out.println( "Failed to connect to " + ldapHost + " at port " + ldapPort );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Connected to " + ldapHost + " at port " + ldapPort );
     * 
*

* You can limit the time spent waiting for the connection to be established * by calling setConnectTimeout before connect. *

* @param host host name of the LDAP server to which you want to connect. * This value can also be a space-delimited list of hostnames or * hostnames and port numbers (using the syntax * hostname:portnumber). For example, you can specify * the following values for the host argument:
*

     *   myhost
     *   myhost hishost:389 herhost:5000 whathost
     *   myhost:686 myhost:389 hishost:5000 whathost:1024
     *
* If multiple servers are specified in the host list, the connection * setup policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently. *

* @param port port number of the LDAP server to which you want to connect. * This parameter is ignored for any host in the host * parameter which includes a colon and port number. * @param dn distinguished name used for authentication * @param passwd password used for authentication * @exception LDAPException The connection or authentication failed. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay * @see org.ietf.ldap.LDAPConnection#setConnectTimeout */ private void connect(String host, int port, String dn, byte[] passwd) throws LDAPException { connect(host, port, dn, passwd, _defaultConstraints, true); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server. If this LDAPConnection object * represents an open connection, the connection is closed first * before the new connection is opened. This method allows the user to * specify the preferences for the bind operation. *

* You can limit the time spent waiting for the connection to be established * by calling setConnectTimeout before connect. *

* @param host host name of the LDAP server to which you want to connect. * This value can also be a space-delimited list of hostnames or * hostnames and port numbers (using the syntax * hostname:portnumber). For example, you can specify * the following values for the host argument:
*

     *   myhost
     *   myhost hishost:389 herhost:5000 whathost
     *   myhost:686 myhost:389 hishost:5000 whathost:1024
     *
* If multiple servers are specified in the host list, the connection * setup policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently. *

* @param port port number of the LDAP server to which you want to connect. * This parameter is ignored for any host in the host * parameter which includes a colon and port number. * @param dn distinguished name used for authentication * @param passwd password used for authentication * @param cons preferences for the bind operation * @exception LDAPException The connection or authentication failed. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay * @see org.ietf.ldap.LDAPConnection#setConnectTimeout */ private void connect(String host, int port, String dn, byte[] passwd, LDAPConstraints cons) throws LDAPException { connect(host, port, dn, passwd, cons, true); } private void connect(String host, int port, String dn, byte[] passwd, LDAPConstraints cons, boolean doAuthenticate) throws LDAPException { if ( isConnected() ) { disconnect (); } if ((host == null) || (host.equals(""))) { throw new LDAPException ( "no host for connection", LDAPException.PARAM_ERROR ); } /* Parse the list of hosts */ int defaultPort = port; StringTokenizer st = new StringTokenizer( host ); String hostList[] = new String[st.countTokens()]; int portList[] = new int[st.countTokens()]; int i = 0; while( st.hasMoreTokens() ) { String s = st.nextToken(); int colon = s.indexOf( ':' ); if ( colon > 0 ) { hostList[i] = s.substring( 0, colon ); portList[i] = Integer.parseInt( s.substring( colon+1 ) ); } else { hostList[i] = s; portList[i] = defaultPort; } i++; } /* Create the Connection Setup Manager */ _connMgr = new LDAPConnSetupMgr(hostList, portList, _factory); _connMgr.setConnSetupDelay(_connSetupDelay); _connMgr.setConnectTimeout(_connectTimeout); connect(); if ( doAuthenticate ) { bind( dn, passwd, cons ); } } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server, with the specified LDAP * protocol version. If the server does not support the requested * protocol version, an exception is thrown. If this LDAPConnection * object represents an open connection, the connection is closed first * before the new connection is opened. This is equivalent to * connect(host, port) followed by bind(version, dn, passwd).

* * @param version requested version of LDAP: currently 2 or 3 * @param host a hostname to which to connect or a dotted string representing * the IP address of this host. * Alternatively, this can be a space-delimited list of host names. * Each host name may include a trailing colon and port number. In the * case where more than one host name is specified, the connection setup * policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently.

* *

     *   Examples:
     *      "directory.knowledge.com"
     *      "199.254.1.2"
     *      "directory.knowledge.com:1050 people.catalog.com 199.254.1.2"
     * 
* @param port the TCP or UDP port number to which to connect or contact. * The default LDAP port is 389. "port" is ignored for any host name which * includes a colon and port number. * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name and passwd as password. * @exception LDAPException The connection or authentication failed. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay */ private void connect(int version, String host, int port, String dn, byte[] passwd) throws LDAPException { connect(version, host, port, dn, passwd, _defaultConstraints); } /** * Connects to the specified host and port and uses the specified DN and * password to authenticate to the server, with the specified LDAP * protocol version. If the server does not support the requested * protocol version, an exception is thrown. This method allows the user * to specify preferences for the bind operation. If this LDAPConnection * object represents an open connection, the connection is closed first * before the new connection is opened. This is equivalent to * connect(host, port) followed by bind(version, dn, passwd).

* * @param version requested version of LDAP: currently 2 or 3 * @param host a hostname to which to connect or a dotted string representing * the IP address of this host. * Alternatively, this can be a space-delimited list of host names. * Each host name may include a trailing colon and port number. In the * case where more than one host name is specified, the connection setup * policy specified with the ConnSetupDelay property controls * whether connection attempts are made serially or concurrently.

* *

     *   Examples:
     *      "directory.knowledge.com"
     *      "199.254.1.2"
     *      "directory.knowledge.com:1050 people.catalog.com 199.254.1.2"
     * 
* @param port the TCP or UDP port number to which to connect or contact. * The default LDAP port is 389. "port" is ignored for any host name which * includes a colon and port number. * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param passwd if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name and passwd as password * @param cons preferences for the bind operation * @exception LDAPException The connection or authentication failed. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay */ private void connect(int version, String host, int port, String dn, byte[] passwd, LDAPConstraints cons) throws LDAPException { setProtocolVersion(version); connect(host, port, dn, passwd, cons); } /** * @deprecated Please use the method signature where cons is * LDAPConstraints instead of LDAPSearchConstraints */ private void connect(int version, String host, int port, String dn, byte[] passwd, LDAPSearchConstraints cons) throws LDAPException { connect(version, host, port, dn, passwd, (LDAPConstraints)cons); } /** * Internal routine to connect with internal params * @exception LDAPException failed to connect */ private synchronized void connect () throws LDAPException { if ( isConnected() ) { return; } if (_connMgr == null) { throw new LDAPException ( "no connection parameters", LDAPException.PARAM_ERROR ); } _connMgr.openConnection(); _thread = getNewThread(_connMgr, _cache); authenticateSSLConnection(); } /** * Deletes the entry for the specified DN from the directory.

* * For example, the following section of code deletes the entry for * Barbara Jensen from the directory.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * myConn.delete( myEntryDN );
     * ... 
* * @param DN distinguished name identifying the entry * to remove from the directory * @exception LDAPException Failed to delete the specified entry from * the directory. */ public void delete( String DN ) throws LDAPException { delete(DN, _defaultConstraints); } /** * Deletes the entry for the specified DN from the directory and * allows you to specify preferences for this LDAP delete operation * by using an LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN distinguished name identifying the entry * to remove from the directory * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to delete the specified entry from * the directory. * @see org.ietf.ldap.LDAPConstraints */ public void delete( String DN, LDAPConstraints cons ) throws LDAPException { internalBind (cons); LDAPResponseQueue myListener = getResponseListener (); LDAPMessage response; try { sendRequest (new JDAPDeleteRequest (DN), myListener, cons); response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.DEL_REQUEST, DN, 0, null, null, false, null, null, null, null); } finally { releaseResponseListener (myListener); } } /** * Deletes the entry for the specified DN from the directory. * * @param dn distinguished name of the entry to delete * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ public LDAPResponseQueue delete( String dn, LDAPResponseQueue listener ) throws LDAPException { return delete( dn, listener, _defaultConstraints ); } /** * Deletes the entry for the specified DN from the directory. * * @param dn distinguished name of the entry to delete * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ public LDAPResponseQueue delete( String dn, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException { if (cons == null) { cons = _defaultConstraints; } internalBind (cons); if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } sendRequest (new JDAPDeleteRequest(dn), listener, cons); return listener; } /** * Disconnects from the LDAP server. Before you can perform LDAP operations * again, you need to reconnect to the server by calling * connect. * @exception LDAPException Failed to disconnect from the LDAP server. * @see org.ietf.ldap.LDAPConnection#connect(java.lang.String, int) */ public synchronized void disconnect() throws LDAPException { if (!isConnected()) throw new LDAPException ( "unable to disconnect() without connecting", LDAPException.OTHER ); // Clone the Connection Setup Manager if the connection is shared if (_thread.isRunning() && _thread.getClientCount() > 1) { _connMgr = (LDAPConnSetupMgr) _connMgr.clone(); _connMgr.disconnect(); } if (_referralConnection != null && _referralConnection.isConnected()) { _referralConnection.disconnect(); } _referralConnection = null; if (_cache != null) { _cache.removeReference(); _cache = null; } deleteThreadConnEntry(); deregisterConnection(); } /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol.

* * Note that in order for the extended operation to work, the server * that you are connecting to must support LDAP v3 and must be configured * to process the specified extended operation. * * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see org.ietf.ldap.LDAPExtendedOperation */ public LDAPExtendedOperation extendedOperation( LDAPExtendedOperation op ) throws LDAPException { return extendedOperation(op, _defaultConstraints); } /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol. This method allows the * user to set the preferences for the operation.

* * Note that in order for the extended operation to work, the server * that you are connecting to must support LDAP v3 and must be configured * to process the specified extended operation. * * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @param cons preferences for the extended operation * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see org.ietf.ldap.LDAPExtendedOperation */ public LDAPExtendedOperation extendedOperation( LDAPExtendedOperation op, LDAPConstraints cons ) throws LDAPException { internalBind (cons); LDAPResponseQueue myListener = getResponseListener (); LDAPMessage response = null; byte[] results = null; String resultID; try { sendRequest ( new JDAPExtendedRequest( op.getID(), op.getValue() ), myListener, cons ); response = myListener.getResponse(); checkMsg (response); JDAPExtendedResponse res = (JDAPExtendedResponse)response.getProtocolOp(); results = res.getValue(); resultID = res.getID(); } catch (LDAPReferralException e) { return performExtendedReferrals( e, cons, op ); } finally { releaseResponseListener (myListener); } return new LDAPExtendedOperation( resultID, results ); } /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol.

* * Note that in order for the extended operation to work, the server * that you are connecting to must support LDAP v3 and must be configured * to process the specified extended operation. * * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @param queue handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see org.ietf.ldap.LDAPExtendedOperation */ public LDAPResponseQueue extendedOperation( LDAPExtendedOperation op, LDAPResponseQueue queue ) throws LDAPException { return extendedOperation( op, queue, _defaultConstraints ); } /** * Performs an extended operation on the directory. Extended operations * are part of version 3 of the LDAP protocol.

* * Note that in order for the extended operation to work, the server * that you are connecting to must support LDAP v3 and must be configured * to process the specified extended operation. * * @param op LDAPExtendedOperation object specifying the OID of the * extended operation and the data to use in the operation * @param queue handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to execute the operation * @return LDAPExtendedOperation object representing the extended response * returned by the server. * @see org.ietf.ldap.LDAPExtendedOperation */ public LDAPResponseQueue extendedOperation( LDAPExtendedOperation op, LDAPResponseQueue queue, LDAPConstraints cons ) throws LDAPException { return null; } /** * Finalize method, which disconnects from the LDAP server * @exception LDAPException Thrown on error in disconnecting */ protected void finalize() throws LDAPException { if (isConnected()) { disconnect(); } } /** * Returns the distinguished name (DN) used for authentication over * this connection. * @return distinguished name used for authentication over this connection. */ public String getAuthenticationDN () { return _boundDN; } /** * Returns the password used for authentication over this connection. * @return password used for authentication over this connection. */ byte[] getAuthenticationPassword () { return _boundPasswd; } /** * Gets the authentication method used to bind:
* "none", "simple", or "sasl" * * @return the authentication method, or "none" */ public String getAuthenticationMethod() { return isConnected() ? _authMethod : "none"; } /** * Gets the LDAPCache object associated with * the current LDAPConnection object. *

* * @return the LDAPCache object representing * the cache that the current connection should use * @see org.ietf.ldap.LDAPCache * @see org.ietf.ldap.LDAPConnection#setCache(org.ietf.ldap.LDAPCache) */ public LDAPCache getCache() { return _cache; } /** * Returns the maximum time to wait for the connection to be established. * @return the maximum connect time in seconds or 0 (unlimited) * @see org.ietf.ldap.LDAPConnection#setConnectTimeout */ public int getConnectTimeout () { return _connectTimeout; } /** * Returns the delay in seconds when making concurrent connection attempts to * multiple servers. * @return the delay in seconds between connection attempts:
* NODELAY_SERIAL The serial connection setup policy is enabled * (no concurrency).
* NODELAY_PARALLEL The parallel connection setup policy with no delay * is enabled.
* delay > 0 The parallel connection setup policy with the delay of * delay seconds is enabled. * @see org.ietf.ldap.LDAPConnection#setConnSetupDelay */ public int getConnSetupDelay () { return _connSetupDelay; } /** * Returns the set of constraints that apply to all operations * performed through this connection (unless you specify a different * set of constraints when calling a method). *

* * Note that if you want to get individual constraints (rather than * getting the * entire set of constraints), call the getOption method. *

* * Typically, you might call the getConstraints method * to create a slightly different set of constraints for a particular * operation. *

* * For example, the following section of code changes the timeout * to 3000 milliseconds for a specific rename. Rather than construct a new * set of constraints from scratch, the example gets the current * settings for the connections and just changes the setting for the * timeout. *

* * Note that this change only applies to the searches performed with this * custom set of constraints. All other searches performed through this * connection use the original set of search constraints. *

* *

     * ...
     * LDAPConstraints myOptions = ld.getConstraints();
     * myOptions.setTimeout( 3000 );
     * ld.search( "cn=William Jensen, ou=Accounting, o=Ace Industry,c=US",
     *            "cn=Will Jensen",
     *            null,
     *            false,
     *            myOptions );
     * ...
     * 
* * @return a copy of the LDAPConstraints object representing the * set of constraints that apply (by default) to all operations * performed through this connection. * @see org.ietf.ldap.LDAPConstraints * @see org.ietf.ldap.LDAPConnection#getOption */ public LDAPConstraints getConstraints () { return (LDAPConstraints)getSearchConstraints(); } /** * Returns the host name of the LDAP server to which you are connected. * @return host name of the LDAP server. */ public String getHost () { if (_connMgr != null) { return _connMgr.getHost(); } return null; } /** * Gets the stream for reading from the listener socket * * @return the stream for reading from the listener socket, or * null if there is none */ public InputStream getInputStream() { return (_thread != null) ? _thread.getInputStream() : null; } /** * Gets the stream for writing to the socket * * @return the stream for writing to the socket, or * null if there is none */ public OutputStream getOutputStream() { return (_thread != null) ? _thread.getOutputStream() : null; } /** * Returns the port number of the LDAP server to which you are connected. * @return port number of the LDAP server. */ public int getPort () { if (_connMgr != null) { return _connMgr.getPort(); } return -1; } /** * Gets a property of a connection.

* * You can get the following properties for a given connection:

*

    *
  • LDAP_PROPERTY_SDK

    * To get the version of this SDK, get this property. The value of * this property is of the type Float.

    *

  • LDAP_PROPERTY_PROTOCOL

    * To get the highest supported version of the LDAP protocol, get * this property. * The value of this property is of the type Float.

    *

  • LDAP_PROPERTY_SECURITY

    * To get a comma-separated list of the types of authentication * supported, get this property. The value of this property is of the * type String.

    *

*

* * For example, the following section of code gets the version of * the SDK.

* *

     *       ...
     *       Float sdkVersion = ( Float )myConn.getProperty( myConn.LDAP_PROPERTY_SDK );
     *       System.out.println( "SDK version: " + sdkVersion );
     *       ... 
* * @param name name of the property (for example, LDAP_PROPERTY_SDK)

* * @return the value of the property.

* * Since the return value is an object, you should recast it as the appropriate type. * (For example, when getting the LDAP_PROPERTY_SDK property, * recast the return value as a Float.)

* * If you pass this method an unknown property name, the method * returns null.

* * @exception LDAPException Unable to get the value of the * specified property.

* * @see org.ietf.ldap.LDAPConnection#LDAP_PROPERTY_SDK * @see org.ietf.ldap.LDAPConnection#LDAP_PROPERTY_PROTOCOL * @see org.ietf.ldap.LDAPConnection#LDAP_PROPERTY_SECURITY */ public Object getProperty(String name) throws LDAPException { return _properties.get( name ); } /** * Returns the protocol version that the connection is bound to (which * currently is 3). If the connection is not bound, it returns 3. * * @return the protocol version that the connection is bound to */ public int getProtocolVersion() { return _protocolVersion; } /** * Returns an array of the latest controls (if any) from server. *

* To retrieve the controls from a search result, call the * getResponseControls method from the LDAPSearchResults * object returned with the result. * @return an array of the controls returned by an operation, or * null if none. * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPSearchResults#getResponseControls */ public LDAPControl[] getResponseControls() { LDAPControl[] controls = null; /* Get the latest controls returned for our thread */ synchronized(_responseControlTable) { Vector responses = (Vector)_responseControlTable.get(_thread); if (responses != null) { // iterate through each response control for (int i=0,size=responses.size(); i * @param msdid Message ID */ LDAPControl[] getResponseControls(int msgID) { LDAPControl[] controls = null; /* Get the latest controls returned for our thread */ synchronized(_responseControlTable) { Vector responses = (Vector)_responseControlTable.get(_thread); if (responses != null) { // iterate through each response control for (int i=0,size=responses.size(); isearch * method). *

* * Note that if you want to get individual constraints (rather than * getting the * entire set of constraints), call the getOption method. *

* * Typically, you might call the getSearchConstraints method * to create a slightly different set of search constraints * to apply to a particular search. *

* * For example, the following section of code changes the maximum number * of results to 10 for a specific search. Rather than construct a new * set of search constraints from scratch, the example gets the current * settings for the connections and just changes the setting for the * maximum results. *

* * Note that this change only applies to the searches performed with this * custom set of constraints. All other searches performed through this * connection use the original set of search constraints. *

* *

     * ...
     * LDAPSearchConstraints myOptions = ld.getSearchConstraints();
     * myOptions.setMaxResults( 10 );
     * String[] myAttrs = { "objectclass" };
     * LDAPSearchResults myResults = ld.search( "o=Ace Industry,c=US",
     *                                          LDAPConnection.SCOPE_SUB,
     *                                          "(objectclass=*)",
     *                                          myAttrs,
     *                                          false,
     *                                          myOptions );
     * ...
     * 
* * @return a copy of the LDAPSearchConstraints object * representing the set of search constraints that apply (by default) to * all searches performed through this connection. * @see org.ietf.ldap.LDAPSearchConstraints * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public LDAPSearchConstraints getSearchConstraints () { return (LDAPSearchConstraints)_defaultConstraints.clone(); } /** * Gets the object representing the socket factory used to establish * a connection to the LDAP server. *

* * @return the object representing the socket factory used to * establish a connection to a server. * @see org.ietf.ldap.LDAPSocketFactory * @see org.ietf.ldap.LDAPSSLSocketFactory * @see org.ietf.ldap.LDAPConnection#setSocketFactory(org.ietf.ldap.LDAPSocketFactory) */ public LDAPSocketFactory getSocketFactory () { return _factory; } /** * Indicates whether this client has authenticated to the LDAP server * (other than anonymously with simple bind) * * @return false initially, false upon a bind * request, and true after successful completion of the last * outstanding non-anonymous simple bind */ public boolean isBound() { if (_bound) { if ((_boundDN == null) || _boundDN.equals("") || (_boundPasswd == null) || (_boundPasswd.length < 1)) { return false; } } return _bound; } /** * Indicates if the connection represented by this object * is open at this time * * @return true if connected to an LDAP server over this * connection. * If not connected to an LDAP server, returns false. */ public boolean isConnected() { // This is the hack: If the user program calls isConnected() when // the thread is about to shut down, the isConnected might get called // before the deregisterConnection(). We add the yield() so that // the deregisterConnection() will get called first. // This problem only exists on Solaris. Thread.yield(); return (_thread != null); } /** * Indicates if the connection is currently protected by TLS * * @return true if the connection is currently protected * by TLS; if not connected to an LDAP server, returns false. */ public boolean isTLS() { return false; } /** * Makes a single change to an existing entry in the directory * (for example, changes the value of an attribute, adds a new * attribute value, or removes an existing attribute value).

* * Use the LDAPModification object to specify the change * to make and the LDAPAttribute object * to specify the attribute value to change. The * LDAPModification object allows you add an attribute * value, change an attibute value, or remove an attribute * value.

* * For example, the following section of code changes Barbara Jensen's email * address in the directory to babs@aceindustry.com.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     *
     * LDAPAttribute attrEmail = new LDAPAttribute( "mail", "babs@aceindustry.com" );
     * LDAPModification singleChange = new LDAPModification( LDAPModification.REPLACE, attrEmail );
     *
     * myConn.modify( myEntryDN, singleChange );
     * ... 
* * @param DN the distinguished name of the entry to modify * @param mod a single change to make to the entry * @exception LDAPException Failed to make the specified change to the * directory entry. * @see org.ietf.ldap.LDAPModification */ public void modify( String DN, LDAPModification mod ) throws LDAPException { modify( DN, mod, _defaultConstraints ); } /** * Makes a single change to an existing entry in the directory and * allows you to specify preferences for this LDAP modify operation * by using an LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN the distinguished name of the entry to modify * @param mod a single change to make to the entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to make the specified change to the * directory entry. * @see org.ietf.ldap.LDAPModification * @see org.ietf.ldap.LDAPConstraints */ public void modify( String DN, LDAPModification mod, LDAPConstraints cons ) throws LDAPException { LDAPModification[] mods = { mod }; modify( DN, mods, cons ); } /** * Makes a set of changes to an existing entry in the directory * (for example, changes attribute values, adds new attribute values, * or removes existing attribute values).

* * Use an array of LDAPModification objects to specify the * changes to make. Each change must be specified by * an LDAPModification object, and you must specify each * attribute value to modify, add, or remove by an LDAPAttribute * object.

* * @param DN the distinguished name of the entry to modify * @param mods an array of objects representing the changes to make * to the entry * @exception LDAPException Failed to make the specified changes to the * directory entry. * @see org.ietf.ldap.LDAPModification */ public void modify( String DN, LDAPModification[] mods ) throws LDAPException { modify( DN, mods, _defaultConstraints ); } /** * Makes a set of changes to an existing entry in the directory and * allows you to specify preferences for this LDAP modify operation * by using an LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * @param DN the distinguished name of the entry to modify * @param mods an array of objects representing the changes to make * to the entry * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to make the specified changes to the * directory entry. * @see org.ietf.ldap.LDAPModification * @see org.ietf.ldap.LDAPConstraints */ public void modify( String DN, LDAPModification[] mods, LDAPConstraints cons ) throws LDAPException { internalBind (cons); LDAPResponseQueue myListener = getResponseListener (); LDAPMessage response = null; try { sendRequest (new JDAPModifyRequest (DN, mods), myListener, cons); response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.MODIFY_REQUEST, DN, 0, null, null, false, mods, null, null, null); } finally { releaseResponseListener (myListener); } } /** * Makes a single change to an existing entry in the directory. For * example, it changes the value of an attribute, adds a new attribute * value, or removes an existing attribute value).
* The LDAPModification object specifies both the change to make and * the LDAPAttribute value to be changed. * * @param dn distinguished name of the entry to modify * @param mod a single change to make to an entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPModification * @see org.ietf.ldap.LDAPResponseQueue */ public LDAPResponseQueue modify( String dn, LDAPModification mod, LDAPResponseQueue listener ) throws LDAPException{ return modify( dn, mod, listener, _defaultConstraints ); } /** * Makes a single change to an existing entry in the directory. For * example, it changes the value of an attribute, adds a new attribute * value, or removes an existing attribute value).
* The LDAPModification object specifies both the change to make and * the LDAPAttribute value to be changed. * * @param dn distinguished name of the entry to modify * @param mod a single change to make to an entry * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPModification * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ public LDAPResponseQueue modify( String dn, LDAPModification mod, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException{ if (cons == null) { cons = _defaultConstraints; } internalBind (cons); if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } LDAPModification[] modList = { mod }; sendRequest (new JDAPModifyRequest (dn, modList), listener, cons); return listener; } /** * Reads the entry for the specified distiguished name (DN) and retrieves * all attributes for the entry. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves all attributes for that entry. *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * try {
     *     foundEntry = myConn.read( findDN );
     * } catch ( LDAPException e ) {
     *     switch( e.getResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified entry does not exist." );
     *             break;
     *         case e.LDAP_PARTIAL_RESULTS:
     *             System.out.println( "Entry served by a different LDAP server." );
     *             break;
     *         case e.INSUFFICIENT_ACCESS_RIGHTS:
     *             System.out.println( "You do not have the access rights to perform this operation." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getResultCode() );
     *             System.out.println( "Could not read the specified entry." );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Found the specified entry." );
     * 
* * @param DN distinguished name of the entry to retrieve * @exception LDAPException Failed to find or read the specified entry * from the directory. * @return LDAPEntry returns the specified entry or raises an exception * if the entry is not found. */ public LDAPEntry read( String DN ) throws LDAPException { return read( DN, null, _defaultConstraints ); } /** * Reads the entry for the specified distiguished name (DN) and retrieves all * attributes for the entry. This method allows the user to specify the * preferences for the read operation. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves all attributes for that entry. *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * try {
     *     foundEntry = myConn.read( findDN );
     * } catch ( LDAPException e ) {
     *     switch( e.getResultCode() ) {
     *         case e.NO_SUCH_OBJECT:
     *             System.out.println( "The specified entry does not exist." );
     *             break;
     *         case e.LDAP_PARTIAL_RESULTS:
     *             System.out.println( "Entry served by a different LDAP server." );
     *             break;
     *         case e.INSUFFICIENT_ACCESS_RIGHTS:
     *             System.out.println( "You do not have the access rights to perform this operation." );
     *             break;
     *         default:
     *             System.out.println( "Error number: " + e.getResultCode() );
     *             System.out.println( "Could not read the specified entry." );
     *             break;
     *     }
     *     return;
     * }
     * System.out.println( "Found the specified entry." );
     * 
* * @param DN distinguished name of the entry to retrieve * @param cons preferences for the read operation * @exception LDAPException Failed to find or read the specified entry * from the directory. * @return LDAPEntry returns the specified entry or raises an exception * if the entry is not found. */ public LDAPEntry read( String DN, LDAPSearchConstraints cons ) throws LDAPException { return read( DN, null, cons ); } /** * Reads the entry for the specified distinguished name (DN) and * retrieves only the specified attributes from the entry. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves only the cn and * sn attributes. * The example prints out all attributes that have been retrieved * (the two specified attributes). *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * String getAttrs[] = { "cn", "sn" };
     * try {
     *      foundEntry = myConn.read( findDN, getAttrs );
     * } catch ( LDAPException e ) {
     *      switch( e.getResultCode() ) {
     *           case e.NO_SUCH_OBJECT:
     *               System.out.println( "The specified entry does not exist." );
     *               break;
     *           case e.LDAP_PARTIAL_RESULTS:
     *               System.out.println( "Entry served by a different LDAP server." );
     *               break;
     *           case e.INSUFFICIENT_ACCESS_RIGHTS:
     *               System.out.println( "You do not have the access " +
     *                                   "rights to perform this operation." );
     *               break;
     *           default:
     *               System.out.println( "Error number: " + e.getResultCode() );
     *               System.out.println( "Could not read the specified entry." );
     *               break;
     *      }
     *      return;
     * }
     *
     * LDAPAttributeSet foundAttrs = foundEntry.getAttributeSet();
     * int size = foundAttrs.size();
     * Iterator enumAttrs = foundAttrs.iterator();
     * System.out.println( "Attributes: " );
     *
     * while ( enumAttrs.hasMore() ) {
     *      LDAPAttribute anAttr = ( LDAPAttribute )enumAttrs.next();
     *      String attrName = anAttr.getName();
     *      System.out.println( "\t" + attrName );
     *      Enumeration enumVals = anAttr.getStringValues();
     *      while ( enumVals.hasMoreElements() ) {
     *           String aVal = ( String )enumVals.nextElement();
     *           System.out.println( "\t\t" + aVal );
     *      }
     * }
     * 
* * @param DN distinguished name of the entry to retrieve * @param attrs names of attributes to retrieve * @return LDAPEntry returns the specified entry (or raises an * exception if the entry is not found). * @exception LDAPException Failed to read the specified entry from * the directory. */ public LDAPEntry read( String DN, String attrs[] ) throws LDAPException { return read( DN, attrs, _defaultConstraints ); } /** * Reads the entry for the specified distinguished name (DN) and * retrieves only the specified attributes from the entry. *

* * For example, the following section of code reads the entry for * Barbara Jensen and retrieves only the cn and * sn attributes. * The example prints out all attributes that have been retrieved * (the two specified attributes). *

* *

     * String findDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * LDAPEntry foundEntry = null;
     * String getAttrs[] = { "cn", "sn" };
     * try {
     *      foundEntry = myConn.read( findDN, getAttrs );
     * } catch ( LDAPException e ) {
     *      switch( e.getResultCode() ) {
     *           case e.NO_SUCH_OBJECT:
     *               System.out.println( "The specified entry does not exist." );
     *               break;
     *           case e.LDAP_PARTIAL_RESULTS:
     *               System.out.println( "Entry served by a different LDAP server." );
     *               break;
     *           case e.INSUFFICIENT_ACCESS_RIGHTS:
     *               System.out.println( "You do not have the access " +
     *                                   "rights to perform this operation." );
     *               break;
     *           default:
     *               System.out.println( "Error number: " + e.getResultCode() );
     *               System.out.println( "Could not read the specified entry." );
     *               break;
     *      }
     *      return;
     * }
     *
     * LDAPAttributeSet foundAttrs = foundEntry.getAttributeSet();
     * int size = foundAttrs.size();
     * Iterator enumAttrs = foundAttrs.iterator();
     * System.out.println( "Attributes: " );
     *
     * while ( enumAttrs.hasMore() ) {
     *      LDAPAttribute anAttr = ( LDAPAttribute )enumAttrs.next();
     *      String attrName = anAttr.getName();
     *      System.out.println( "\t" + attrName );
     *      Enumeration enumVals = anAttr.getStringValues();
     *      while ( enumVals.hasMoreElements() ) {
     *           String aVal = ( String )enumVals.nextElement();
     *           System.out.println( "\t\t" + aVal );
     *      }
     * }
     * 
* * @param DN distinguished name of the entry to retrieve * @param attrs names of attributes to retrieve * @param cons preferences for the read operation * @return LDAPEntry returns the specified entry (or raises an * exception if the entry is not found). * @exception LDAPException Failed to read the specified entry from * the directory. */ public LDAPEntry read( String DN, String attrs[], LDAPSearchConstraints cons ) throws LDAPException { LDAPSearchResults results = search (DN, SCOPE_BASE, "(|(objectclass=*)(objectclass=ldapsubentry))", attrs, false, cons); if ( results == null ) { return null; } LDAPEntry entry = results.next(); // cleanup required for referral connections while( results.hasMore() ) { results.next(); } return entry; } /** * Reads the entry specified by the LDAP URL.

* * When you call this method, a new connection is created automatically, * using the host and port specified in the URL. After finding the entry, * the method closes this connection (in other words, it disconnects from * the LDAP server).

* * If the URL specifies a filter and scope, these are not used. * Of the information specified in the URL, this method only uses * the LDAP host name and port number, the base distinguished name (DN), * and the list of attributes to return.

* * The method returns the entry specified by the base DN.

* * (Note: If you want to search for more than one entry, use the * search( LDAPUrl ) method instead.)

* * For example, the following section of code reads the entry specified * by the LDAP URL. *

* *

     * String flatURL = "ldap://alway.mcom.com:3890/cn=Barbara Jenson,ou=Product Development,o=Ace Industry,c=US?cn,sn,mail";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "BAD URL!!!  BAD, BAD, BAD URL!!!" );
     *    return;
     * }
     * LDAPEntry myEntry = null;
     * try {
     *    myEntry = myConn.read( myURL );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getResultCode();
     *    switch( errCode ) {
     *        case ( e.NO_SUCH_OBJECT ):
     *            System.out.println( "The specified entry " + myDN +
     *                                " does not exist in the directory." );
     *            return;
     *        default:
     *            System.out.println( "An internal error occurred." );
     *            return;
     *    }
     * }
     * 
* * @param toGet LDAP URL specifying the entry to read * @return LDAPEntry returns the entry specified by the URL (or raises * an exception if the entry is not found). * @exception LDAPException Failed to read the specified entry from * the directory. * @see org.ietf.ldap.LDAPUrl * @see org.ietf.ldap.LDAPConnection#search(org.ietf.ldap.LDAPUrl) */ public static LDAPEntry read( LDAPUrl toGet ) throws LDAPException { return read( toGet, null ); } /** * Reads the entry specified by the LDAP URL.

* * When you call this method, a new connection is created automatically, * using the host and port specified in the URL. After finding the entry, * the method closes this connection (in other words, it disconnects from * the LDAP server).

* * If the URL specifies a filter and scope, these are not used. * Of the information specified in the URL, this method only uses * the LDAP host name and port number, the base distinguished name (DN), * and the list of attributes to return.

* * The method returns the entry specified by the base DN.

* * (Note: If you want to search for more than one entry, use the * search( LDAPUrl ) method instead.)

* * For example, the following section of code reads the entry specified * by the LDAP URL. *

* *

     * String flatURL = "ldap://alway.mcom.com:3890/cn=Barbara Jenson,ou=Product Development,o=Ace Industry,c=US?cn,sn,mail";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "BAD URL!!!  BAD, BAD, BAD URL!!!" );
     *    return;
     * }
     * LDAPEntry myEntry = null;
     * try {
     *    myEntry = myConn.read( myURL );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getResultCode();
     *    switch( errCode ) {
     *        case ( e.NO_SUCH_OBJECT ):
     *            System.out.println( "The specified entry " + myDN +
     *                                " does not exist in the directory." );
     *            return;
     *        default:
     *            System.out.println( "An internal error occurred." );
     *            return;
     *    }
     * }
     * 
* * @param toGet LDAP URL specifying the entry to read * @param cons preferences for the read operation * @return LDAPEntry returns the entry specified by the URL (or raises * an exception if the entry is not found). * @exception LDAPException Failed to read the specified entry from * the directory. * @see org.ietf.ldap.LDAPUrl * @see org.ietf.ldap.LDAPConnection#search(org.ietf.ldap.LDAPUrl) */ public static LDAPEntry read( LDAPUrl toGet, LDAPSearchConstraints cons ) throws LDAPException { if (cons == null) { cons = new LDAPSearchConstraints(); } String host = toGet.getHost (); int port = toGet.getPort(); if (host == null) { throw new LDAPException ( "no host for connection", LDAPException.PARAM_ERROR ); } String[] attributes = toGet.getAttributeArray (); String DN = toGet.getDN(); LDAPEntry returnValue; LDAPConnection connection = new LDAPConnection (); if (toGet.isSecure()) { LDAPSocketFactory factory = toGet.getSocketFactory(); if (factory == null) { throw new LDAPException("No socket factory for LDAPUrl", LDAPException.OTHER); } connection.setSocketFactory(factory); } connection.connect (host, port); returnValue = connection.read (DN, attributes, cons); connection.disconnect (); return returnValue; } /** * Disconnect from the server and then reconnect using the current * credentials and authentication method * @exception LDAPException if not previously connected, or if * there is a failure on disconnecting or on connecting */ public void reconnect() throws LDAPException { disconnect(); connect(); if (_saslBinder != null) { _saslBinder.bind(this, true); _authMethod = "sasl"; } else { internalBind (_protocolVersion, true, _defaultConstraints); } } /** * Deregisters an object so that it will no longer be notified on * arrival of an unsolicited message from a server. If the object is * null or was not previously registered for unsolicited notifications, * the method does nothing. */ public void removeUnsolicitedNotificationListener( LDAPUnsolicitedNotificationListener listener ) { } /** * Renames an existing entry in the directory.

* * You can specify whether or not the original name of the entry is * retained as a value in the entry. For example, suppose you rename * the entry "cn=Barbara" to "cn=Babs". You can keep "cn=Barbara" * as a value in the entry so that the cn attribute has two values:

* *

     *       cn=Barbara
     *       cn=Babs
     * 
* The following example renames an entry. The old name of the entry * is kept as a value in the entry.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String newRDN = "cn=Babs Jensen";
     * myConn.rename( myEntryDN, newRDN, false );
     * ... 
* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @exception LDAPException Failed to rename the specified entry. */ public void rename( String DN, String newRDN, boolean deleteOldRDN ) throws LDAPException { rename( DN, newRDN, null, deleteOldRDN ); } /** * Renames an existing entry in the directory.

* * You can specify whether or not the original name of the entry is * retained as a value in the entry. For example, suppose you rename * the entry "cn=Barbara" to "cn=Babs". You can keep "cn=Barbara" * as a value in the entry so that the cn attribute has two values:

* *

     *       cn=Barbara
     *       cn=Babs
     * 
* The following example renames an entry. The old name of the entry * is kept as a value in the entry.

* *

     * ...
     * String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
     * String newRDN = "cn=Babs Jensen";
     * myConn.rename( myEntryDN, newRDN, false );
     * ... 
* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to rename the specified entry. */ public void rename( String DN, String newRDN, boolean deleteOldRDN, LDAPConstraints cons ) throws LDAPException { rename( DN, newRDN, null, deleteOldRDN, cons ); } /** * Renames an existing entry in the directory and (optionally) * changes the location of the entry in the directory tree.

* * NOTE: Netscape Directory Server 3.0 does not support the * capability to move an entry to a different location in the * directory tree. If you specify a value for the newParentDN * argument, an LDAPException will be thrown. *

* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param newParentDN if not null, the distinguished name for the * entry under which the entry should be moved (for example, to move * an entry under the Accounting subtree, specify this argument as * "ou=Accounting, o=Ace Industry, c=US") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @exception LDAPException Failed to rename the specified entry. */ public void rename( String DN, String newRDN, String newParentDN, boolean deleteOldRDN ) throws LDAPException { rename( DN, newRDN, newParentDN, deleteOldRDN, _defaultConstraints ); } /** * Renames an existing entry in the directory and (optionally) * changes the location of the entry in the directory tree. Also * allows you to specify preferences for this LDAP modify DN operation * by using an LDAPConstraints object. For * example, you can specify whether or not to follow referrals. * You can also apply LDAP v3 controls to the operation. *

* * NOTE: Netscape Directory Server 3.0 does not support the * capability to move an entry to a different location in the * directory tree. If you specify a value for the newParentDN * argument, an LDAPException will be thrown. *

* * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry (for example, * "cn=newName") * @param newParentDN if not null, the distinguished name for the * entry under which the entry should be moved (for example, to move * an entry under the Accounting subtree, specify this argument as * "ou=Accounting, o=Ace Industry, c=US") * @param deleteOldRDN if true, the old name is not retained * as an attribute value (for example, the attribute value "cn=oldName" is * removed). If false, the old name is retained * as an attribute value (for example, the entry might now have two values * for the cn attribute: "cn=oldName" and "cn=newName"). * @param cons the set of preferences to apply to this operation * @exception LDAPException Failed to rename the specified entry. * @see org.ietf.ldap.LDAPConstraints */ public void rename ( String DN, String newRDN, String newParentDN, boolean deleteOldRDN, LDAPConstraints cons ) throws LDAPException { internalBind (cons); LDAPResponseQueue myListener = getResponseListener (); try { JDAPModifyRDNRequest request = null; if ( newParentDN != null ) { request = new JDAPModifyRDNRequest( DN, newRDN, deleteOldRDN, newParentDN ); } else { request = new JDAPModifyRDNRequest( DN, newRDN, deleteOldRDN ); } sendRequest (request, myListener, cons); LDAPMessage response = myListener.getResponse(); checkMsg (response); } catch (LDAPReferralException e) { performReferrals(e, cons, JDAPProtocolOp.MODIFY_RDN_REQUEST, DN, 0, newRDN, null, deleteOldRDN, null, null, null, null); } finally { releaseResponseListener (myListener); } } /** * Renames an existing entry in the directory. * * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry * @param deleteOldRDN if true, the old name is not retained as an * attribute value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue */ public LDAPResponseQueue rename( String DN, String newRDN, boolean deleteOldRDN, LDAPResponseQueue listener ) throws LDAPException{ return rename( DN, newRDN, deleteOldRDN, listener, _defaultConstraints ); } /** * Renames an existing entry in the directory. * * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry * @param deleteOldRDN if true, the old name is not retained as an attribute * value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to the operation * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue * @see org.ietf.ldap.LDAPConstraints */ public LDAPResponseQueue rename( String DN, String newRDN, boolean deleteOldRDN, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException{ if (cons == null) { cons = _defaultConstraints; } internalBind (cons); if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } sendRequest (new JDAPModifyRDNRequest (DN, newRDN, deleteOldRDN), listener, cons); return listener; } /** * Renames an existing entry in the directory. * * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry * @param newParentDN if not null, the distinguished name for the * entry under which the entry should be moved (for example, to move * an entry under the Accounting subtree, specify this argument as * "ou=Accounting, o=Ace Industry, c=US") * @param deleteOldRDN if true, the old name is not retained as an * attribute value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue */ public LDAPResponseQueue rename( String DN, String newRDN, String newParentDN, boolean deleteOldRDN, LDAPResponseQueue listener ) throws LDAPException{ return rename( DN, newRDN, newParentDN, deleteOldRDN, listener, _defaultConstraints ); } /** * Renames an existing entry in the directory. * * @param DN current distinguished name of the entry * @param newRDN new relative distinguished name for the entry * @param newParentDN if not null, the distinguished name for the * entry under which the entry should be moved (for example, to move * an entry under the Accounting subtree, specify this argument as * "ou=Accounting, o=Ace Industry, c=US") * @param deleteOldRDN if true, the old name is not retained as an * attribute value * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPResponseQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPResponseQueue */ public LDAPResponseQueue rename( String DN, String newRDN, String newParentDN, boolean deleteOldRDN, LDAPResponseQueue listener, LDAPConstraints cons ) throws LDAPException{ if (cons == null) { cons = _defaultConstraints; } internalBind (cons); if (listener == null) { listener = new LDAPResponseQueue(/*asynchOp=*/true); } JDAPModifyRDNRequest request; if ( newParentDN != null ) { request = new JDAPModifyRDNRequest( DN, newRDN, deleteOldRDN, newParentDN ); } else { request = new JDAPModifyRDNRequest( DN, newRDN, deleteOldRDN ); } sendRequest( request, listener, cons ); return listener; } /** * Performs the search specified by the LDAP URL.

* * For example, the following section of code searches for all entries under * the ou=Product Development,o=Ace Industry,c=US subtree of a * directory. The example gets and prints the mail attribute for each entry * found.

* *

     * String flatURL = "ldap://alway.mcom.com:3890/ou=Product Development,o=Ace Industry,c=US?mail?sub?objectclass=*";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "Incorrect URL syntax." );
     *    return;
     * }
     *
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myURL );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     *
     * while ( myResults.hasMore() ) {
     *    LDAPEntry myEntry = myResults.next();
     *    String nextDN = myEntry.getDN();
     *    System.out.println( nextDN );
     *    LDAPAttributeSet entryAttrs = myEntry.getAttributeSet();
     *    Iterator attrsInSet = entryAttrs.iterator();
     *    while ( attrsInSet.hasMore() ) {
     *        LDAPAttribute nextAttr = (LDAPAttribute)attrsInSet.next();
     *        String attrName = nextAttr.getName();
     *        System.out.print( "\t" + attrName + ": " );
     *        Enumeration valsInAttr = nextAttr.getStringValues();
     *        while ( valsInAttr.hasMoreElements() ) {
     *            String nextValue = (String)valsInAttr.nextElement();
     *            System.out.println( nextValue );
     *        }
     *    }
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param toGet LDAP URL representing the search to perform * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the search specified by * the LDAP URL. * @see org.ietf.ldap.LDAPUrl * @see org.ietf.ldap.LDAPSearchResults * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchResults) */ public static LDAPSearchResults search( LDAPUrl toGet ) throws LDAPException { return search( toGet, null ); } /** * Performs the search specified by the LDAP URL. This method also * allows you to specify constraints for the search (such as the * maximum number of entries to find or the * maximum time to wait for search results).

* * As part of the search constraints, you can specify whether or not you * want the results delivered all at once or in smaller batches. * If you specify the results delivered in smaller * batches, each iteration blocks until the next batch of results is * returned.

* * For example, the following section of code retrieves the first 5 * matching entries for the search specified by the LDAP URL. The * example accomplishes this by creating a new set of search * constraints where the maximum number of search results is 5.

* *

     * LDAPSearchConstraints mySearchConstraints = myConn.getSearchConstraints();
     * mySearchConstraints.setMaxResults( 5 );
     * String flatURL = "ldap://alway.mcom.com:3890/ou=Product Development,o=Ace Industry,c=US?mail?sub?objectclass=*";
     * LDAPUrl myURL;
     * try {
     *    myURL = new LDAPUrl( flatURL );
     * } catch ( java.net.MalformedURLException e ) {
     *    System.out.println( "Incorrect URL syntax." );
     *    return;
     * }
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myURL, mySearchConstraints );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param toGet LDAP URL representing the search to run * @param cons constraints specific to the search * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the search specified * by the LDAP URL. * @see org.ietf.ldap.LDAPUrl * @see org.ietf.ldap.LDAPSearchResults * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchResults) */ public static LDAPSearchResults search( LDAPUrl toGet, LDAPSearchConstraints cons ) throws LDAPException { String host = toGet.getHost (); int port = toGet.getPort(); if (host == null) { throw new LDAPException ( "no host for connection", LDAPException.PARAM_ERROR ); } String[] attributes = toGet.getAttributeArray (); String DN = toGet.getDN(); String filter = toGet.getFilter(); if (filter == null) { filter = defaultFilter; } int scope = toGet.getScope (); LDAPConnection connection = new LDAPConnection (); if (toGet.isSecure()) { LDAPSocketFactory factory = toGet.getSocketFactory(); if (factory == null) { throw new LDAPException("No socket factory for LDAPUrl", LDAPException.OTHER); } connection.setSocketFactory(factory); } connection.connect (host, port); LDAPSearchResults results; if (cons != null) { results = connection.search (DN, scope, filter, attributes, false, cons); } else { results = connection.search (DN, scope, filter, attributes, false); } results.closeOnCompletion(connection); return results; } /** * Performs the search specified by the criteria that you enter.

* * For example, the following section of code searches for all entries under * the ou=Product Development,o=Ace Industry,c=US subtree of a * directory. The example gets and prints the mail attribute for each entry * found.

* *

     * String myBaseDN = "ou=Product Development,o=Ace Industry,c=US";
     * String myFilter="(objectclass=*)";
     * String[] myAttrs = { "mail" };
     *
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myBaseDN, LDAPConnection.SCOPE_SUB, myFilter, myAttrs, false );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     *
     * while ( myResults.hasMore() ) {
     *    LDAPEntry myEntry = myResults.next();
     *    String nextDN = myEntry.getDN();
     *    System.out.println( nextDN );
     *    LDAPAttributeSet entryAttrs = myEntry.getAttributeSet();
     *    Iterator attrsInSet = entryAttrs.iterator();
     *    while ( attrsInSet.hasMore() ) {
     *        LDAPAttribute nextAttr = (LDAPAttribute)attrsInSet.next();
     *        String attrName = nextAttr.getName();
     *        System.out.println( "\t" + attrName + ":" );
     *        Enumeration valsInAttr = nextAttr.getStringValues();
     *        while ( valsInAttr.hasMoreElements() ) {
     *            String nextValue = (String)valsInAttr.nextElement();
     *            System.out.println( "\t\t" + nextValue );
     *        }
     *    }
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPConnection.SCOPE_BASE (search only the base DN)

    *

  • LDAPConnection.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPConnection.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes that you want returned in the * search results * @param attrsOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the specified search. * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchResults) */ public LDAPSearchResults search( String base, int scope, String filter, String[] attrs, boolean attrsOnly ) throws LDAPException { return search( base, scope, filter, attrs, attrsOnly, _defaultConstraints ); } /** * Performs the search specified by the criteria that you enter. * This method also allows you to specify constraints for the search * (such as the maximum number of entries to find or the * maximum time to wait for search results).

* * As part of the search constraints, you can specify whether or not * you want the * results delivered all at once or in smaller batches. If you * specify that you want the results delivered in smaller batches, * each iteration blocks until the * next batch of results is returned.

* * For example, the following section of code retrieves the first 5 entries * matching the specified search criteria. The example accomplishes * this by creating a new set of search constraints where the maximum * number of search results is 5.

* *

     * String myBaseDN = "ou=Product Development,o=Ace Industry,c=US";
     * String myFilter="(objectclass=*)";
     * String[] myAttrs = { "mail" };
     * LDAPSearchConstraints mySearchConstraints = myConn.getSearchConstraints();
     * mySearchConstraints.setMaxResults( 5 );
     *
     * LDAPSearchResults myResults = null;
     * try {
     *    myResults = myConn.search( myBaseDN, LDAPConnection.SCOPE_SUB, myFilter, myAttrs, false, mySearchConstraints );
     * } catch ( LDAPException e ) {
     *    int errCode = e.getResultCode();
     *    System.out.println( "LDAPException: return code:" + errCode );
     *    return;
     * }
     * 
*

* * To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPConnection.SCOPE_BASE (search only the base DN)

    *

  • LDAPConnection.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPConnection.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes to return in the search * results * @param cons constraints specific to this search (for example, the * maximum number of entries to return) * @param attrsOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found * @return LDAPSearchResults the results of the search as an enumeration. * @exception LDAPException Failed to complete the specified search. * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchResults) */ public LDAPSearchResults search( String base, int scope, String filter, String[] attrs, boolean attrsOnly, LDAPSearchConstraints cons ) throws LDAPException { if (cons == null) { cons = _defaultConstraints; } LDAPSearchResults returnValue = new LDAPSearchResults( this, cons, base, scope, filter, attrs, attrsOnly ); Vector cacheValue = null; Long key = null; boolean isKeyValid = true; try { // get entry from cache which is a vector of JDAPMessages if ( _cache != null ) { // create key for cache entry using search arguments key = _cache.createKey( getHost(), getPort(),base, filter, scope, attrs, _boundDN, cons ); cacheValue = (Vector)_cache.getEntry(key); if ( cacheValue != null ) { return new LDAPSearchResults( cacheValue, this, cons, base, scope, filter, attrs, attrsOnly ); } } } catch ( LDAPException e ) { isKeyValid = false; printDebug("Exception: "+e); } internalBind( cons ); LDAPSearchQueue myListener = getSearchListener( cons ); int deref = cons.getDereference(); JDAPSearchRequest request = null; try { request = new JDAPSearchRequest( base, scope, deref, cons.getMaxResults(), cons.getServerTimeLimit(), attrsOnly, filter, attrs ); } catch ( IllegalArgumentException e ) { throw new LDAPException(e.getMessage(), LDAPException.PARAM_ERROR); } // if using cache, then we need to set the key of the search listener if ( (_cache != null) && isKeyValid ) { myListener.setKey( key ); } try { sendRequest( request, myListener, cons ); } catch ( LDAPException e ) { releaseSearchListener( myListener ); throw e; } /* Is this a persistent search? */ boolean isPersistentSearch = false; LDAPControl[] controls = (LDAPControl[])getOption( SERVERCONTROLS, cons ); for ( int i = 0; (controls != null) && (i < controls.length); i++ ) { if ( controls[i] instanceof org.ietf.ldap.controls.LDAPPersistSearchControl ) { isPersistentSearch = true; break; } } /* For a persistent search, don't wait for a first result, because there may be none at this time if changesOnly was specified in the control. */ if ( isPersistentSearch ) { returnValue.associatePersistentSearch (myListener); } else if ( cons.getBatchSize() == 0 ) { /* Synchronous search if all requested at once */ try { /* Block until all results are in */ LDAPMessage response = myListener.completeRequest(); Iterator results = myListener.getAllMessages().iterator(); checkSearchMsg(returnValue, response, cons, base, scope, filter, attrs, attrsOnly); while ( results.hasNext() ) { LDAPMessage msg = (LDAPMessage)results.next(); checkSearchMsg( returnValue, msg, cons, base, scope, filter, attrs, attrsOnly ); } } finally { releaseSearchListener( myListener ); } } else { /* * Asynchronous to retrieve one at a time, check to make sure * the search didn't fail */ LDAPMessage firstResult = myListener.getResponse(); if ( firstResult instanceof LDAPResponse ) { try { checkSearchMsg( returnValue, firstResult, cons, base, scope, filter, attrs, attrsOnly ); } finally { releaseSearchListener( myListener ); } } else { try { checkSearchMsg( returnValue, firstResult, cons, base, scope, filter, attrs, attrsOnly ); } catch ( LDAPException ex ) { releaseSearchListener( myListener ); throw ex; } /* we let this listener get garbage collected.. */ returnValue.associate( myListener ); } } return returnValue; } /** * Performs the search specified by the criteria that you enter.

* To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPConnection.SCOPE_BASE (search only the base DN)

    *

  • LDAPConnection.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPConnection.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes that you want returned in the * search results * @param typesOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @return LDAPSearchQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchQueue) */ public LDAPSearchQueue search( String base, int scope, String filter, String attrs[], boolean typesOnly, LDAPSearchQueue listener ) throws LDAPException { return search( base, scope, filter, attrs, typesOnly, listener, _defaultConstraints ); } /** * Performs the search specified by the criteria that you enter. * This method also allows you to specify constraints for the search * (such as the maximum number of entries to find or the * maximum time to wait for search results).

* To abandon the search, use the abandon method. * * @param base the base distinguished name from which to search * @param scope the scope of the entries to search. You can specify one * of the following:

*

    *
  • LDAPConnection.SCOPE_BASE (search only the base DN)

    *

  • LDAPConnection.SCOPE_ONE * (search only entries under the base DN)

    *

  • LDAPConnection.SCOPE_SUB * (search the base DN and all entries within its subtree)

    *

*

* @param filter search filter specifying the search criteria * @param attrs list of attributes that you want returned in the search * results * @param typesOnly if true, returns the names but not the values of the * attributes found. If false, returns the names and values for * attributes found. * @param listener handler for messages returned from a server in response * to this request. If it is null, a listener object is created internally. * @param cons constraints specific to this search (for example, the * maximum number of entries to return) * @return LDAPSearchQueue handler for messages returned from a server * in response to this request. * @exception LDAPException Failed to send request. * @see org.ietf.ldap.LDAPConnection#abandon(org.ietf.ldap.LDAPSearchQueue) */ public LDAPSearchQueue search( String base, int scope, String filter, String attrs[], boolean typesOnly, LDAPSearchQueue listener, LDAPSearchConstraints cons ) throws LDAPException { if ( cons == null ) { cons = _defaultConstraints; } internalBind( cons ); if ( listener == null ) { listener = new LDAPSearchQueue( /*asynchOp=*/true, cons ); } JDAPSearchRequest request = null; try { request = new JDAPSearchRequest( base, scope, cons.getDereference(), cons.getMaxResults(), cons.getServerTimeLimit(), typesOnly, filter, attrs ); } catch ( IllegalArgumentException e ) { throw new LDAPException( e.getMessage(), LDAPException.PARAM_ERROR ); } sendRequest( request, listener, cons ); return listener; } /** * Sets the specified LDAPCache object as the * cache for the LDAPConnection object. *

* * @param cache the LDAPCache object representing * the cache that the current connection should use * @see org.ietf.ldap.LDAPCache * @see org.ietf.ldap.LDAPConnection#getCache */ public void setCache( LDAPCache cache ) { if ( _cache != null ) { _cache.removeReference(); } if ( cache != null ) { cache.addReference(); } _cache = cache; if ( _thread != null ) { _thread.setCache( cache ); } } /** * Specifies the maximum time to wait for the connection to be established. * If the value is 0, the time is not limited. * @param timeout the maximum connect time in seconds or 0 (unlimited) */ public void setConnectTimeout (int timeout) { if ( timeout < 0 ) { throw new IllegalArgumentException( "Timeout value can not be negative" ); } _connectTimeout = timeout; if ( _connMgr != null ) { _connMgr.setConnectTimeout( _connectTimeout ); } } /** * Specifies the delay in seconds when making concurrent connection attempts to * multiple servers. *

Effectively, selects the connection setup policy when a list of hosts is passed * to the connect method. * *
If the serial policy is selected, the default one, an attempt is made to * connect to the first host in the list. The next entry in * the list is tried only if the attempt to connect to the current host fails. * This might cause your application to block for unacceptably long time if a host is down. * *
If the parallel policy is selected, multiple connection attempts may run * concurrently on a separate thread. A new connection attempt to the next entry * in the list can be started with or without delay. *

You must set the ConnSetupDelay before making the call to the * connect method. * * @param delay the delay in seconds between connection attempts. Possible values are:
* NODELAY_SERIAL Use the serial connection setup policy.
* NODELAY_PARALLEL Use the parallel connection setup policy with no delay. * Start all connection setup threads immediately.
* delay > 0 Use the parallel connection setup policy with delay. * Start another connection setup thread after delay seconds.
* @see org.ietf.ldap.LDAPConnection#NODELAY_SERIAL * @see org.ietf.ldap.LDAPConnection#NODELAY_PARALLEL * @see org.ietf.ldap.LDAPConnection#connect(java.lang.String, int) */ public void setConnSetupDelay( int delay ) { _connSetupDelay = delay; if ( _connMgr != null ) { _connMgr.setConnSetupDelay( delay ); } } /** * Set the default constraint set for all operations. * @param cons LDAPConstraints object to use as the default * constraint set * @see org.ietf.ldap.LDAPConnection#getConstraints * @see org.ietf.ldap.LDAPConstraints */ public void setConstraints( LDAPConstraints cons ) { _defaultConstraints.setHopLimit( cons.getHopLimit() ); _defaultConstraints.setReferralFollowing( cons.getReferralFollowing() ); _defaultConstraints.setTimeLimit( cons.getTimeLimit() ); _defaultConstraints.setReferralHandler( cons.getReferralHandler() ); LDAPControl[] tServerControls = cons.getControls(); LDAPControl[] oServerControls = null; if ( (tServerControls != null) && (tServerControls.length > 0) ) { oServerControls = new LDAPControl[tServerControls.length]; for( int i = 0; i < tServerControls.length; i++ ) { oServerControls[i] = (LDAPControl)tServerControls[i].clone(); } } _defaultConstraints.setControls( oServerControls ); if ( cons instanceof LDAPSearchConstraints ) { LDAPSearchConstraints scons = (LDAPSearchConstraints)cons; _defaultConstraints.setServerTimeLimit( scons.getServerTimeLimit() ); _defaultConstraints.setDereference( scons.getDereference() ); _defaultConstraints.setMaxResults( scons.getMaxResults() ); _defaultConstraints.setBatchSize( scons.getBatchSize() ); _defaultConstraints.setMaxBacklog( scons.getMaxBacklog() ); } } /** * Sets the stream for reading from the listener socket if * there is one * * @param is the stream for reading from the listener socket */ public void setInputStream( InputStream is ) { if ( _thread != null ) { _thread.setInputStream( is ); } } /** * Sets the stream for writing to the socket * * @param os the stream for writing to the socket, if there is one */ public void setOutputStream( OutputStream os ) { if ( _thread != null ) { _thread.setOutputStream( os ); } } /** * Sets a global property of the connection. * The following properties are defined:
* com.org.ietf.ldap.schema.quoting - "standard" or "NetscapeBug"
* Note: if this property is not set, the SDK will query the server * to determine if attribute syntax values and objectclass superior * values must be quoted when adding schema.
* com.org.ietf.ldap.saslpackage - the default is "com.netscape.sasl"
*

* * @param name name of the property to set * @param val value to set * @exception LDAPException Unable to set the value of the specified * property. */ public void setProperty( String name, Object val ) throws LDAPException { if ( name.equalsIgnoreCase( SCHEMA_BUG_PROPERTY ) ) { _properties.put( SCHEMA_BUG_PROPERTY, val ); } else if ( name.equalsIgnoreCase( SASL_PACKAGE_PROPERTY ) ) { _properties.put( SASL_PACKAGE_PROPERTY, val ); } else if ( name.equalsIgnoreCase( "debug" ) ) { debug = ((String)val).equalsIgnoreCase( "true" ); } else if ( name.equalsIgnoreCase( TRACE_PROPERTY ) ) { Object traceOutput = null; if (val == null) { _properties.remove(TRACE_PROPERTY); } else { if ( _thread != null ) { traceOutput = createTraceOutput( val ); } _properties.put( TRACE_PROPERTY, val ); } if ( _thread != null ) { _thread.setTraceOutput( traceOutput ); } // This is used only by the ldapjdk test cases to simulate a // server problem and to test fail-over and rebind } else if ( name.equalsIgnoreCase( "breakConnection" ) ) { _connMgr.breakConnection(); } else { throw new LDAPException( "Unknown property: " + name ); } } /** * Set the default constraint set for all search operations. * @param cons LDAPSearchConstraints object to use as the * default constraint set * @see org.ietf.ldap.LDAPConnection#getSearchConstraints * @see org.ietf.ldap.LDAPSearchConstraints */ public void setSearchConstraints( LDAPSearchConstraints cons ) { _defaultConstraints = (LDAPSearchConstraints)cons.clone(); } /** * Specifies the object representing the socket factory that you * want to use to establish a connection to a server. *

* * @param factory the object representing the socket factory that * you want to use to establish a connection to a server * @see org.ietf.ldap.LDAPSocketFactory * @see org.ietf.ldap.LDAPSSLSocketFactory * @see org.ietf.ldap.LDAPConnection#getSocketFactory */ public void setSocketFactory( LDAPSocketFactory factory ) { _factory = factory; } /** * Begin using the Transport Layer Security (TLS) protocol for session * privacy [TLS][LDAPTLS]. If the socket factory of the connection is * not capable of initiating a TLS session, an LDAPException is thrown * with the error code TLS_NOT_SUPPORTED. If the server does not support * the transition to a TLS session, an LDAPException is thrown with the * error code returned by the server. If there are outstanding LDAP * operations on the connection, an LDAPException is thrown. */ public void startTLS() throws LDAPException { } /** * Stop using the Transport Layer Security (TLS) protocol for session * privacy [LDAPTLS]. If the server does not support the termination of * a TLS session, an LDAPException is thrown with the error code * returned by the server. If there are outstanding LDAP operations on * the connection, an LDAPException is thrown. */ public void stopTLS() throws LDAPException { } /** * Returns the value of the specified option for this * LDAPConnection object.

* * These options represent the constraints for the current connection. * To get all constraints for the current connection, call the * getSearchConstraints method. *

* * By default, the constraints apply to all operations performed * through the current connection. You can change these constraints: *

* *

    *
  • If you want to set a constraint only for a particular operation, * create an LDAPConstraints object (or a * LDAPSearchConstraints object for a search or find operation) * with your new constraints * and pass it to the LDAPConnection method that performs the * operation. *

    * *

  • If you want to override these constraints for all operations * performed under the current connection, call the * setOption method to change the constraint. *

    * *

*

* * For example, the following section of code gets and prints the * maximum number of search results that are returned for searches * performed through this connection. (This applies to all searches * unless a different set of search constraints is specified in an * LDAPSearchConstraints object.) *

* *

     * LDAPConnection ld = new LDAPConnection();
     * int sizeLimit = ( (Integer)ld.getOption( LDAPConnection.SIZELIMIT ) ).intValue();
     * System.out.println( "Maximum number of results: " + sizeLimit );
     * 
* * @param option you can specify one of the following options: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OptionData TypeDescription
* LDAPConnection.PROTOCOL_VERSIONIntegerSpecifies the version of the LDAP protocol used by the * client. *

By default, the value of this option is 2.

* LDAPConnection.DEREFIntegerSpecifies when your client dereferences aliases. *
     * Legal values for this option are:
     *
     * DEREF_NEVER       Aliases are never dereferenced.
     *
     * DEREF_FINDING     Aliases are dereferenced when find-
     *                   ing the starting point for the
     *                   search (but not when searching
     *                   under that starting entry).
     *
     * DEREF_SEARCHING   Aliases are dereferenced when
     *                   searching the entries beneath the
     *                   starting point of the search (but
     *                   not when finding the starting
     *                   entry).
     *
     * DEREF_ALWAYS      Aliases are always dereferenced.
     *
*

By default, the value of this option is * DEREF_NEVER.

* LDAPConnection.SIZELIMITIntegerSpecifies the maximum number of search results to return. * If this option is set to 0, there is no maximum limit. *

By default, the value of this option is 1000.

* LDAPConnection.TIMELIMITIntegerSpecifies the maximum number of milliseconds to wait for results * before timing out. If this option is set to 0, there is no maximum * time limit. *

By default, the value of this option is 0.

* LDAPConnection.REFERRALSBooleanSpecifies whether or not your client follows referrals automatically. * If true, your client follows referrals automatically. * If false, an LDAPReferralException is raised * when referral is detected. *

By default, the value of this option is false.

* LDAPConnection.REFERRALS_REBIND_PROCLDAPAuthHandlerSpecifies an object with a class that implements the * LDAPAuthHandler interface. You must define this class and * the getAuthProvider method that will be used to * get the distinguished name and password to use for authentication. * Modifying this option sets the LDAPConnection.BIND option to null. *

By default, the value of this option is null.

* LDAPConnection.BINDLDAPBindSpecifies an object with a class that implements the * LDAPBind * interface. You must define this class and the * bind method that will be used to authenticate * to the server on referrals. Modifying this option sets the * LDAPConnection.REFERRALS_REBIND_PROC to null. *

By default, the value of this option is null.

* LDAPConnection.REFERRALS_HOP_LIMITIntegerSpecifies the maximum number of referrals in a sequence that * your client will follow. (For example, if REFERRALS_HOP_LIMIT is 5, * your client will follow no more than 5 referrals in a row when resolving * a single LDAP request.) *

By default, the value of this option is 10.

* LDAPConnection.BATCHSIZEIntegerSpecifies the number of search results to return at a time. * (For example, if BATCHSIZE is 1, results are returned one at a time.) *

By default, the value of this option is 1.

LDAPControl[]Specifies the client controls that may affect the handling of LDAP * operations in the LDAP classes. These controls are used by the client * and are not passed to the LDAP server. At this time, no client controls * are defined for clients built with the Netscape LDAP classes.
* LDAPConnection.SERVERCONTROLSLDAPControl[]Specifies the server controls that are passed to the LDAP * server on each LDAP operation. Not all servers support server * controls; a particular server may or may not support a given * server control.
* MAXBACKLOGIntegerSpecifies the maximum number of search results to accumulate in an * LDAPSearchResults before suspending the reading of input from the server. *

By default, the value of this option is 100. The value 0 means there * is no limit.

* @return the value for the option wrapped in an object. (You * need to cast the returned value as its appropriate type. For * example, when getting the SIZELIMIT option, cast the returned * value as an Integer.) * @exception LDAPException Failed to get the specified option. * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPConstraints * @see org.ietf.ldap.LDAPSearchConstraints * @see org.ietf.ldap.LDAPReferralException * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPConnection#getSearchConstraints * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public Object getOption( int option ) throws LDAPException { if (option == LDAPConnection.PROTOCOL_VERSION) { return new Integer(_protocolVersion); } return getOption(option, _defaultConstraints); } private static Object getOption( int option, LDAPSearchConstraints cons ) throws LDAPException { switch (option) { case LDAPConnection.DEREF: return new Integer (cons.getDereference()); case LDAPConnection.SIZELIMIT: return new Integer (cons.getMaxResults()); case LDAPConnection.TIMELIMIT: return new Integer (cons.getServerTimeLimit()); case LDAPConnection.REFERRALS: return new Boolean (cons.getReferralFollowing()); case LDAPConnection.REFERRALS_REBIND_PROC: return cons.getReferralHandler(); case LDAPConnection.REFERRALS_HOP_LIMIT: return new Integer (cons.getHopLimit()); case LDAPConnection.BATCHSIZE: return new Integer (cons.getBatchSize()); case LDAPConnection.SERVERCONTROLS: return cons.getControls(); case MAXBACKLOG: return new Integer (cons.getMaxBacklog()); default: throw new LDAPException ( "invalid option", LDAPException.PARAM_ERROR ); } } /** * Sets the value of the specified option for this * LDAPConnection object.

* * These options represent the constraints for the current * connection. * To get all constraints for the current connection, call the * getSearchConstraints method. *

* * By default, the option that you set applies to all subsequent * operations performed through the current connection. If you want to * set a constraint only for a particular operation, create an * LDAPConstraints object (or a * LDAPSearchConstraints object for a search or find operation) * with your new constraints * and pass it to the LDAPConnection method that performs the * operation. *

* * For example, the following section of code changes the constraint for * the maximum number of search results that are returned for searches * performed through this connection. (This applies to all searches * unless a different set of search constraints is specified in an * LDAPSearchConstraints object.) *

* *

     * LDAPConnection ld = new LDAPConnection();
     * Integer newLimit = new Integer( 20 );
     * ld.setOption( LDAPConnection.SIZELIMIT, newLimit );
     * System.out.println( "Changed the maximum number of results to " + newLimit.intValue() );
     * 
* * @param option you can specify one of the following options: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OptionData TypeDescription
* LDAPConnection.PROTOCOL_VERSIONIntegerSpecifies the version of the LDAP protocol used by the * client. *

By default, the value of this option is 2. If you want * to use LDAP v3 features (such as extended operations or * controls), you need to set this value to 3.

* LDAPConnection.DEREFIntegerSpecifies when your client dereferences aliases. *
     * Legal values for this option are:
     *
     * DEREF_NEVER       Aliases are never dereferenced.
     *
     * DEREF_FINDING     Aliases are dereferenced when find-
     *                   ing the starting point for the
     *                   search (but not when searching
     *                   under that starting entry).
     *
     * DEREF_SEARCHING   Aliases are dereferenced when
     *                   searching the entries beneath the
     *                   starting point of the search (but
     *                   not when finding the starting
     *                   entry).
     *
     * DEREF_ALWAYS      Aliases are always dereferenced.
     *
*

By default, the value of this option is * DEREF_NEVER.

* LDAPConnection.SIZELIMITIntegerSpecifies the maximum number of search results to return. * If this option is set to 0, there is no maximum limit. *

By default, the value of this option is 1000.

* LDAPConnection.TIMELIMITIntegerSpecifies the maximum number of milliseconds to wait for results * before timing out. If this option is set to 0, there is no maximum * time limit. *

By default, the value of this option is 0.

* LDAPConnection.REFERRALSBooleanSpecifies whether or not your client follows referrals automatically. * If true, your client follows referrals automatically. * If false, an LDAPReferralException is * raised when a referral is detected. *

By default, the value of this option is false.

* LDAPConnection.REFERRALS_REBIND_PROCLDAPAuthHandlerSpecifies an object with a class that implements the * LDAPAuthHandler * interface. You must define this class and the * getAuthProvider method that will be used to get * the distinguished name and password to use for authentication. * Modifying this option sets the LDAPConnection.BIND option to null. *

By default, the value of this option is null.

* LDAPConnection.BINDLDAPBindSpecifies an object with a class that implements the * LDAPBind * interface. You must define this class and the * bind method that will be used to autheniticate * to the server on referrals. Modifying this option sets the * LDAPConnection.REFERRALS_REBIND_PROC to null. *

By default, the value of this option is null.

* LDAPConnection.REFERRALS_HOP_LIMITIntegerSpecifies the maximum number of referrals in a sequence that * your client will follow. (For example, if REFERRALS_HOP_LIMIT is 5, * your client will follow no more than 5 referrals in a row when resolving * a single LDAP request.) *

By default, the value of this option is 10.

* LDAPConnection.BATCHSIZEIntegerSpecifies the number of search results to return at a time. * (For example, if BATCHSIZE is 1, results are returned one at a time.) *

By default, the value of this option is 1.

LDAPControl[]Specifies the client controls that may affect handling of LDAP * operations in the LDAP classes. These controls are used by the client * and are not passed to the server. At this time, no client controls * are defined for clients built with the Netscape LDAP classes.
* LDAPConnection.SERVERCONTROLSLDAPControl[]Specifies the server controls that are passed to the LDAP * server on each LDAP operation. Not all servers support server * controls; a particular server may or may not support a particular * control.
* MAXBACKLOGIntegerSpecifies the maximum number of search results to accumulate in an * LDAPSearchResults before suspending the reading of input from the server. *

By default, the value of this option is 100. The value 0 means there * is no limit.

* @param value the value to assign to the option. The value must be * the java.lang object wrapper for the appropriate parameter * (e.g. boolean->Boolean, * integer->Integer) * @exception LDAPException Failed to set the specified option. * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPConstraints * @see org.ietf.ldap.LDAPSearchConstraints * @see org.ietf.ldap.LDAPReferralException * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPConnection#getSearchConstraints * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public void setOption( int option, Object value ) throws LDAPException { if (option == LDAPConnection.PROTOCOL_VERSION) { setProtocolVersion(((Integer)value).intValue()); return; } setOption(option, value, _defaultConstraints); } private static void setOption( int option, Object value, LDAPSearchConstraints cons ) throws LDAPException { try { switch (option) { case LDAPConnection.DEREF: cons.setDereference(((Integer)value).intValue()); return; case LDAPConnection.SIZELIMIT: cons.setMaxResults(((Integer)value).intValue()); return; case LDAPConnection.TIMELIMIT: cons.setTimeLimit(((Integer)value).intValue()); return; case LDAPConnection.SERVER_TIMELIMIT: cons.setServerTimeLimit(((Integer)value).intValue()); return; case LDAPConnection.REFERRALS: cons.setReferralFollowing(((Boolean)value).booleanValue()); return; case LDAPConnection.REFERRALS_REBIND_PROC: cons.setReferralHandler((LDAPReferralHandler)value); return; case LDAPConnection.REFERRALS_HOP_LIMIT: cons.setHopLimit(((Integer)value).intValue()); return; case LDAPConnection.BATCHSIZE: cons.setBatchSize(((Integer)value).intValue()); return; case LDAPConnection.SERVERCONTROLS: if ( value == null ) cons.setControls( (LDAPControl[]) null ); else if ( value instanceof LDAPControl ) cons.setControls( (LDAPControl) value ); else if ( value instanceof LDAPControl[] ) cons.setControls( (LDAPControl[])value ); else throw new LDAPException ( "invalid LDAPControl", LDAPException.PARAM_ERROR ); return; case MAXBACKLOG: cons.setMaxBacklog( ((Integer)value).intValue() ); return; default: throw new LDAPException ( "invalid option", LDAPException.PARAM_ERROR ); } } catch ( ClassCastException cc ) { throw new LDAPException ( "invalid option value", LDAPException.PARAM_ERROR ); } } /** * Send a request to the server */ void sendRequest( JDAPProtocolOp oper, LDAPMessageQueue myListener, LDAPConstraints cons ) throws LDAPException { // retry three times if we get a nullPointer exception. // Don't remove this. The following situation might happen: // Before sendRequest gets invoked, it is possible that the // LDAPConnThread encountered a network error and called // deregisterConnection which set the thread reference to null. boolean requestSent = false; for ( int i = 0; !requestSent && (i < 3); i++ ) { try { _thread.sendRequest( this, oper, myListener, cons ); requestSent = true; } catch( NullPointerException ne ) { // do nothing } catch (IllegalArgumentException e) { throw new LDAPException(e.getMessage(), LDAPException.PARAM_ERROR); } } if ( !isConnected() ) { throw new LDAPException( "The connection is not available", LDAPException.OTHER ); } if ( !requestSent ) { throw new LDAPException( "Failed to send request", LDAPException.OTHER ); } } /** * Internal routine. Binds to the LDAP server. * This method is used by the "smart failover" feature. If a server * or network error has occurred, an attempt is made to automatically * restore the connection on the next ldap operation request * @exception LDAPException failed to bind or the user has disconncted */ private void internalBind( LDAPConstraints cons ) throws LDAPException { // If the user has invoked disconnect() no attempt is made // to restore the connection if ( (_connMgr != null) && _connMgr.isUserDisconnected() ) { throw new LDAPException( "not connected", LDAPException.OTHER ); } if ( _saslBinder != null ) { if ( !isConnected() ) { connect(); } _saslBinder.bind( this, false ); _authMethod = "sasl"; } else { //Rebind using _rebindConstraints if ( _rebindConstraints == null ) { _rebindConstraints = _defaultConstraints; } internalBind ( _protocolVersion, false, _rebindConstraints ); } } void checkSearchMsg( LDAPSearchResults value, LDAPMessage msg, LDAPSearchConstraints cons, String dn, int scope, String filter, String attrs[], boolean attrsOnly) throws LDAPException { value.setMsgID( msg.getMessageID() ); try { checkMsg( msg ); // not the JDAPResult if ( msg.getProtocolOp().getType() != JDAPProtocolOp.SEARCH_RESULT ) { value.add( msg ); } } catch ( LDAPReferralException e ) { Vector res = new Vector(); try { performReferrals( e, cons, JDAPProtocolOp.SEARCH_REQUEST, dn, scope, filter, attrs, attrsOnly, null, null, null, res ); } catch ( LDAPException ex ) { if ( msg.getProtocolOp() instanceof JDAPSearchResultReference ) { /* Don't want to miss all remaining results, so continue. This is very ugly (using println). We should have a configurable parameter (probably in LDAPSearchConstraints) whether to ignore failed search references or throw an exception. */ System.err.println( "LDAPConnection.checkSearchMsg: " + "ignoring bad referral" ); return; } throw ex; } // The size of the vector can be more than 1 because it is possible // to visit more than one referral url to retrieve the entries for ( int i = 0; i < res.size(); i++ ) { value.addReferralEntries( (LDAPSearchResults)res.elementAt(i) ); } res = null; } catch ( LDAPException e ) { if ( (e.getResultCode() == LDAPException.ADMIN_LIMIT_EXCEEDED) || (e.getResultCode() == LDAPException.TIME_LIMIT_EXCEEDED) || (e.getResultCode() == LDAPException.SIZE_LIMIT_EXCEEDED) ) { value.add(e); } else { throw e; } } } /** * Internal routine. Binds to the LDAP server. * @param version protocol version to request from server * @param rebind true if the bind/authenticate operation is requested, * false if the method is invoked by the "smart failover" feature * @exception LDAPException failed to bind */ private void internalBind( int version, boolean rebind, LDAPConstraints cons ) throws LDAPException { _saslBinder = null; if ( !isConnected() ) { _bound = false; _authMethod = "none"; connect(); // special case: the connection currently is not bound, and now // there is a bind request. The connection needs to reconnect if // the thread has more than one LDAPConnection. } else if ( !_bound && rebind && (_thread.getClientCount() > 1) ) { disconnect(); connect(); } // if the connection is still intact and no rebind request if ( _bound && !rebind ) { return; } // if the connection was lost and did not have any kind of bind // operation and the current one does not request any bind operation (ie, // no authenticate has been called) if ( !_anonymousBound && ((_boundDN == null) || (_boundPasswd == null)) && !rebind ) { return; } if ( _bound && rebind ) { if ( _protocolVersion == version ) { if ( _anonymousBound && ((_boundDN == null) || (_boundPasswd == null)) ) { return; } if ( !_anonymousBound && (_boundDN != null) && (_boundPasswd != null) && _boundDN.equals(_prevBoundDN) && equalsBytes(_boundPasswd, _prevBoundPasswd) ) { return; } } // if we got this far, we need to rebind since previous and // current credentials are not the same. // if the current connection is the only connection of the thread, // then reuse this current connection. otherwise, disconnect the // current one (ie, detach from the current thread) and reconnect // again (ie, get a new thread). if ( _thread.getClientCount() > 1 ) { disconnect(); connect(); } } _protocolVersion = version; LDAPResponseQueue myListener = getResponseListener(); try { if ( (_referralConnection != null) && _referralConnection.isConnected() ) { _referralConnection.disconnect(); } _referralConnection = null; _bound = false; sendRequest( new JDAPBindRequest( _protocolVersion, _boundDN, _boundPasswd), myListener, cons ); checkMsg( myListener.getResponse() ); markConnAsBound(); _rebindConstraints = (LDAPConstraints)cons.clone(); _authMethod = "simple"; } catch (LDAPReferralException e) { _referralConnection = createReferralConnection( e, cons ); } finally { releaseResponseListener( myListener ); } } private static boolean equalsBytes( byte[] b1, byte[] b2 ) { if ( b1 == null ) { return ( b2 == null ); } else if ( b2 == null ) { return true; } if ( b1.length != b2.length ) { return false; } for( int i = 0; i < b1.length; i++ ) { if ( b1[i] != b2[1] ) { return false; } } return true; } /** * Mark this connection as bound in the thread connection table */ void markConnAsBound() { synchronized (_threadConnTable) { if (_threadConnTable.containsKey(_thread)) { Vector v = (Vector)_threadConnTable.get(_thread); for (int i=0, n=v.size(); i * * @param version the LDAP protocol version that your client uses */ private void setProtocolVersion( int version ) { _protocolVersion = version; } /** * Remove this connection from the thread connection table */ private void deleteThreadConnEntry() { synchronized ( _threadConnTable ) { Vector connVector = (Vector)_threadConnTable.get( _thread ); if ( connVector == null ) { printDebug( "Thread table does not contain the thread of " + "this object" ); return; } Enumeration enumv = connVector.elements(); while ( enumv.hasMoreElements() ) { LDAPConnection c = (LDAPConnection)enumv.nextElement(); if ( c.equals( this ) ) { connVector.removeElement( c ); if ( connVector.size() == 0 ) { _threadConnTable.remove( _thread ); } return; } } } } /** * Remove the association between this object and the connection thread */ synchronized void deregisterConnection() { if ( (_thread != null) && _thread.isRunning() ) { _thread.deregister( this ); } _thread = null; _bound = false; } /** * Returns the trace output object if set by the user */ Object getTraceOutput() throws LDAPException { // Check first if trace output has been set using setProperty() Object traceOut = _properties.get( TRACE_PROPERTY ); if ( traceOut != null ) { return createTraceOutput( traceOut ); } // Check if the property has been set with java // -Dcom.org.ietf.ldap.trace // If the property does not have a value, send the trace to the // System.err, otherwise use the value as the output file name try { traceOut = System.getProperty( TRACE_PROPERTY ); if ( traceOut != null ) { return createTraceOutput( traceOut ); } } catch ( Exception e ) { ;// In browser, access to property might not be allowed } return null; } private synchronized LDAPConnThread getNewThread(LDAPConnSetupMgr connMgr, LDAPCache cache) throws LDAPException { LDAPConnThread newThread = null; Vector v = null; synchronized( _threadConnTable ) { Enumeration keys = _threadConnTable.keys(); boolean connExists = false; // transverse each thread while ( keys.hasMoreElements() ) { LDAPConnThread connThread = (LDAPConnThread)keys.nextElement(); Vector connVector = (Vector)_threadConnTable.get( connThread ); Enumeration enumv = connVector.elements(); // traverse each LDAPConnection under the same thread while ( enumv.hasMoreElements() ) { LDAPConnection conn = (LDAPConnection)enumv.nextElement(); // this is not a brand new connection if ( conn.equals( this ) ) { connExists = true; if ( !connThread.isAlive() ) { // need to move all the LDAPConnections from the dead thread // to the new thread try { newThread = new LDAPConnThread( connMgr, cache, getTraceOutput() ); v = (Vector)_threadConnTable.remove( connThread ); break; } catch ( Exception e ) { throw new LDAPException( "unable to establish connection", LDAPException.UNAVAILABLE ); } } break; } } if ( connExists ) { break; } } // if this connection is new or the corresponding thread for // the current connection is dead if ( !connExists ) { try { newThread = new LDAPConnThread( connMgr, cache, getTraceOutput() ); v = new Vector(); v.addElement( this ); } catch ( Exception e ) { throw new LDAPException( "unable to establish connection", LDAPException.UNAVAILABLE ); } } // add new thread to the table if ( newThread != null ) { _threadConnTable.put( newThread, v ); for ( int i = 0, n = v.size(); i < n; i++ ) { LDAPConnection c = (LDAPConnection)v.elementAt( i ); newThread.register( c ); c._thread = newThread; } } } return newThread; } /** * Performs certificate-based authentication if client authentication was * specified at construction time. * @exception LDAPException if certificate-based authentication fails. */ private void authenticateSSLConnection() throws LDAPException { // if this is SSL if ( (_factory != null) && (_factory instanceof LDAPSSLSocketFactoryExt) ) { if ( ((LDAPSSLSocketFactoryExt)_factory).isClientAuth() ) { bind( null, null, new String[] {EXTERNAL_MECHANISM}, EXTERNAL_MECHANISM_PACKAGE, null, null, null ); } } } /** * Gets a new listening agent from the internal buffer of available agents. * These objects are used to make the asynchronous LDAP operations * synchronous. * * @return response listener object */ synchronized LDAPResponseQueue getResponseListener() { if ( _responseListeners == null ) { _responseListeners = new Vector( 5 ); } LDAPResponseQueue l; if ( _responseListeners.size() < 1 ) { l = new LDAPResponseQueue ( /*asynchOp=*/false ); } else { l = (LDAPResponseQueue)_responseListeners.elementAt( 0 ); _responseListeners.removeElementAt( 0 ); } return l; } /** * Get a new search listening agent from the internal buffer of available * agents. These objects are used to make the asynchronous LDAP operations * synchronous. * @return a search response listener object */ private synchronized LDAPSearchQueue getSearchListener ( LDAPSearchConstraints cons ) { if ( _searchListeners == null ) { _searchListeners = new Vector( 5 ); } LDAPSearchQueue l; if ( _searchListeners.size() < 1 ) { l = new LDAPSearchQueue ( /*asynchOp=*/false, cons ); } else { l = (LDAPSearchQueue)_searchListeners.elementAt( 0 ); _searchListeners.removeElementAt( 0 ); l.setSearchConstraints( cons ); } return l; } /** * Put a listening agent into the internal buffer of available agents. * These objects are used to make the asynchronous LDAP operations * synchronous. * @param l listener to buffer */ synchronized void releaseResponseListener( LDAPResponseQueue l ) { if ( _responseListeners == null ) { _responseListeners = new Vector( 5 ); } l.reset(); _responseListeners.addElement( l ); } /** * Put a search listening agent into the internal buffer of available * agents. These objects are used to make the asynchronous LDAP * operations synchronous. * @param l listener to buffer */ synchronized void releaseSearchListener( LDAPSearchQueue l ) { if ( _searchListeners == null ) { _searchListeners = new Vector( 5 ); } l.reset(); _searchListeners.addElement( l ); } /** * Checks the message (assumed to be a return value). If the resultCode * is anything other than SUCCESS, it throws an LDAPException describing * the server's (error) response. * @param m server response to validate * @exception LDAPException failed to check message */ void checkMsg( LDAPMessage m ) throws LDAPException { if ( m.getProtocolOp() instanceof JDAPResult ) { JDAPResult response = (JDAPResult)m.getProtocolOp(); int resultCode = response.getResultCode(); if ( resultCode == JDAPResult.SUCCESS ) { return; } if ( resultCode == JDAPResult.REFERRAL ) { throw new LDAPReferralException ( "referral", resultCode, response.getReferrals() ); } if ( resultCode == JDAPResult.LDAP_PARTIAL_RESULTS ) { throw new LDAPReferralException ( "referral", resultCode, response.getErrorMessage() ); } else { throw new LDAPException ( "error result", resultCode, response.getErrorMessage(), response.getMatchedDN() ); } } else if ( m.getProtocolOp() instanceof JDAPSearchResultReference ) { String[] referrals = ((JDAPSearchResultReference)m.getProtocolOp()).getUrls(); throw new LDAPReferralException ( "referral", JDAPResult.SUCCESS, referrals ); } else { return; } } /** * Set response controls for the current connection for a particular * thread. Get the oldest returned controls and remove them from the * queue. If the connection is executing a persistent search, there may * be more than one set of controls in the queue. For any other * operation, there will only ever be at most one set of controls * (controls from any earlier operation are replaced by controls * received on the latest operation on this connection by this thread). * @param current the target thread * @param con the server response controls */ void setResponseControls( LDAPConnThread current, LDAPResponseControl con ) { synchronized(_responseControlTable) { Vector v = (Vector)_responseControlTable.get( current ); // if the current thread already contains response controls from // a previous operation if ( (v != null) && (v.size() > 0) ) { // look at each response control for ( int i = v.size() - 1; i >= 0; i-- ) { LDAPResponseControl response = (LDAPResponseControl)v.elementAt( i ); // if this response control belongs to this connection if ( response.getConnection().equals( this ) ) { // if the given control is null or // the given control is not null and the current // control does not correspond to the new LDAPMessage if ( (con == null) || (con.getMsgID() != response.getMsgID()) ) { v.removeElement( response ); } // For the same connection, if the message id from the // given control is the same as the one in the queue, // those controls in the queue will not get removed // since they come from the persistent search control // which allows more than one control response for // one persistent search operation. } } } else { if ( con != null ) { v = new Vector(); } } if ( con != null ) { v.addElement( con ); _responseControlTable.put( current, v ); } /* Do some garbage collection: check if any attached threads have exited */ /* Now check all threads in the list */ Enumeration e = _attachedList.elements(); while( e.hasMoreElements() ) { LDAPConnThread aThread = (LDAPConnThread)e.nextElement(); if ( !aThread.isAlive() ) { _responseControlTable.remove( aThread ); _attachedList.removeElement( aThread ); } } } /* Make sure we're registered */ if ( _attachedList.indexOf( current ) < 0 ) { _attachedList.addElement( current ); } } /** * Set up connection for referral. * @param u referral URL * @param cons search constraints * @return new LDAPConnection, already connected and authenticated */ private LDAPConnection prepareReferral( String connectList, LDAPConstraints cons ) throws LDAPException { LDAPConnection connection = new LDAPConnection( this.getSocketFactory() ); // Set the same connection setup failover policy as for this connection connection.setConnSetupDelay( getConnSetupDelay() ); connection.setOption( REFERRALS, new Boolean(true) ); connection.setOption( REFERRALS_REBIND_PROC, cons.getReferralHandler() ); // need to set the protocol version which gets passed to connection connection.setOption( PROTOCOL_VERSION, new Integer(_protocolVersion) ); connection.setOption( REFERRALS_HOP_LIMIT, new Integer(cons.getHopLimit()-1) ); try { connection.connect( connectList, connection.DEFAULT_PORT ); } catch ( LDAPException e ) { throw new LDAPException( "Referral connect failed: " + e.getMessage(), e.getResultCode() ); } return connection; } private void referralRebind( LDAPConnection ldc, LDAPConstraints cons ) throws LDAPException{ try { LDAPReferralHandler handler = cons.getReferralHandler(); if ( handler == null ) { ldc.bind ( _protocolVersion, null, null ); } else if ( handler instanceof LDAPAuthHandler ) { LDAPAuthProvider auth = ((LDAPAuthHandler)handler).getAuthProvider( ldc.getHost(), ldc.getPort()); ldc.bind( _protocolVersion, auth.getDN(), auth.getPassword() ); } else if ( handler instanceof LDAPBindHandler ) { String[] urls = { "ldap://" + ldc.getHost() + ':' + ldc.getPort() + '/' }; ((LDAPBindHandler)handler).bind( urls, ldc); } } catch ( LDAPException e ) { throw new LDAPException( "Referral bind failed: " + e.getMessage(), e.getResultCode() ); } } private String createReferralConnectList( String[] urls ) { String connectList = ""; String host = null; int port = 0; for ( int i=0; urls != null && i < urls.length; i++ ) { try { LDAPUrl url = new LDAPUrl( urls[i] ); host = url.getHost(); port = url.getPort(); if ( (host == null) || (host.length() < 1) ) { // If no host:port was specified, use the latest // (hop-wise) parameters host = getHost(); port = getPort(); } } catch ( Exception e ) { host = getHost(); port = getPort(); } connectList += (i==0 ? "" : " ") + host+":"+port; } return (connectList.length() == 0) ? null : connectList; } private LDAPUrl findReferralURL( LDAPConnection ldc, String[] urls ) { String connHost = ldc.getHost(); int connPort = ldc.getPort(); for ( int i = 0; i < urls.length; i++ ) { try { LDAPUrl url = new LDAPUrl( urls[i] ); String host = url.getHost(); int port = url.getPort(); if ( host == null || host.length() < 1 ) { // No host:port specified, compare with the latest // (hop-wise) parameters if ( connHost.equals( getHost() ) && connPort == getPort() ) { return url; } } else if ( connHost.equals( host ) && connPort == port ) { return url; } } catch ( Exception e ) { } } return null; } /** * Establish the LDAPConnection to the referred server. This one is used * for bind operation only since we need to keep this new connection for * the subsequent operations. This new connection will be destroyed in * two circumstances: disconnect gets called or the client binds as * someone else. * @return the new LDAPConnection to the referred server */ LDAPConnection createReferralConnection( LDAPReferralException e, LDAPConstraints cons ) throws LDAPException { if ( cons.getHopLimit() <= 0 ) { throw new LDAPException( "exceed hop limit", e.getResultCode(), e.getLDAPErrorMessage() ); } if ( !cons.getReferralFollowing() ) { throw e; } String connectList = createReferralConnectList( e.getReferrals() ); // If there are no referrals (because the server isn't set up for // them), give up here if ( connectList == null ) { throw new LDAPException( "No target URL in referral", LDAPException.NO_RESULTS_RETURNED ); } LDAPConnection connection = null; connection = prepareReferral( connectList, cons ); try { connection.bind( _protocolVersion, _boundDN, _boundPasswd ); } catch ( LDAPException authEx ) { // Disconnect needed to terminate the LDAPConnThread try { connection.disconnect(); } catch ( LDAPException ignore ) { } throw authEx; } return connection; } /** * Follows a referral * * @param e referral exception * @param cons search constraints */ void performReferrals( LDAPReferralException e, LDAPConstraints cons, int ops, /* unions of different operation parameters */ String dn, int scope, String filter, String types[], boolean attrsOnly, LDAPModification mods[], LDAPEntry entry, LDAPAttribute attr, /* result */ Vector results ) throws LDAPException { if ( cons.getHopLimit() <= 0 ) { throw new LDAPException( "exceed hop limit", e.getResultCode(), e.getLDAPErrorMessage() ); } if ( !cons.getReferralFollowing() ) { if ( ops == JDAPProtocolOp.SEARCH_REQUEST ) { LDAPSearchResults res = new LDAPSearchResults(); res.add( e ); results.addElement( res ); return; } else { throw e; } } String[] urls = e.getReferrals(); // If there are no referrals (because the server isn't configured to // return one), give up here if ( (urls == null) || (urls.length == 0) ) { return; } LDAPUrl referralURL = null; LDAPConnection connection = null; if ( (_referralConnection != null) && _referralConnection.isConnected() ) { referralURL = findReferralURL( _referralConnection, urls ); } if ( referralURL != null ) { connection = _referralConnection; } else { String connectList = createReferralConnectList( urls ); connection = prepareReferral( connectList, cons ); // which one did we connect to... referralURL = findReferralURL( connection, urls ); // Authenticate referralRebind( connection, cons ); } String newDN = referralURL.getDN(); String DN = null; if ( (newDN == null) || newDN.equals("") ) { DN = dn; } else { DN = newDN; } // If this was a one-level search, and a direct subordinate // has a referral, there will be a "?base" in the URL, and // we have to rewrite the scope from one to base if ( referralURL.toString().indexOf("?base") > -1 ) { scope = SCOPE_BASE; } LDAPSearchConstraints newcons = (LDAPSearchConstraints)cons.clone(); newcons.setHopLimit( cons.getHopLimit()-1 ); performReferrals( connection, newcons, ops, DN, scope, filter, types, attrsOnly, mods, entry, attr, results ); } void performReferrals( LDAPConnection connection, LDAPConstraints cons, int ops, String dn, int scope, String filter, String types[], boolean attrsOnly, LDAPModification mods[], LDAPEntry entry, LDAPAttribute attr, Vector results ) throws LDAPException { LDAPSearchResults res = null; try { switch ( ops ) { case JDAPProtocolOp.SEARCH_REQUEST: res = connection.search( dn, scope, filter, types, attrsOnly, (LDAPSearchConstraints)cons ); if ( res != null ) { res.closeOnCompletion( connection ); results.addElement( res ); } else { if ( (_referralConnection == null) || !connection.equals(_referralConnection) ) { connection.disconnect(); } } break; case JDAPProtocolOp.MODIFY_REQUEST: connection.modify( dn, mods, cons ); break; case JDAPProtocolOp.ADD_REQUEST: if ( (dn != null) && !dn.equals("") ) entry.setDN( dn ); connection.add( entry, cons ); break; case JDAPProtocolOp.DEL_REQUEST: connection.delete( dn, cons ); break; case JDAPProtocolOp.MODIFY_RDN_REQUEST: connection.rename( dn, filter /* newRDN */, attrsOnly /* deleteOld */, cons ); break; case JDAPProtocolOp.COMPARE_REQUEST: boolean bool = connection.compare( dn, attr, cons ); results.addElement( new Boolean(bool) ); break; default: /* impossible */ break; } } catch ( LDAPException ee ) { throw ee; } finally { if ( (connection != null) && ((ops != JDAPProtocolOp.SEARCH_REQUEST) || (res == null)) && ((_referralConnection == null) || !connection.equals(_referralConnection)) ) { connection.disconnect(); } } } /** * Follows a referral for an extended operation * * @param e referral exception * @param cons search constraints */ private LDAPExtendedOperation performExtendedReferrals( LDAPReferralException e, LDAPConstraints cons, LDAPExtendedOperation op ) throws LDAPException { if ( cons.getHopLimit() <= 0 ) { throw new LDAPException( "exceed hop limit", e.getResultCode(), e.getLDAPErrorMessage() ); } if ( !cons.getReferralFollowing() ) { throw e; } String[] u = e.getReferrals(); // If there are no referrals (because the server isn't configured to // return one), give up here if ( (u == null) || (u.length == 0) ) { return null; } String connectList = createReferralConnectList( u ); LDAPConnection connection = prepareReferral( connectList, cons ); referralRebind( connection, cons ); LDAPExtendedOperation results = connection.extendedOperation( op ); connection.disconnect(); return results; /* return right away if operation is successful */ } /** * Sets up basic connection privileges for Communicator. * @return true if in Communicator and connections okay. */ private static boolean checkCommunicator() { try { java.lang.reflect.Method m = LDAPCheckComm.getMethod( "netscape.security.PrivilegeManager", "enablePrivilege" ); if ( m == null ) { printDebug( "Method is null" ); return false; } Object[] args = new Object[1]; args[0] = new String( "UniversalConnect" ); m.invoke( null, args); printDebug( "UniversalConnect enabled" ); args[0] = new String( "UniversalPropertyRead" ); m.invoke( null, args); printDebug( "UniversalPropertyRead enabled" ); return true; } catch ( LDAPException e ) { printDebug( "Exception: " + e.toString() ); } catch ( Exception ie ) { printDebug( "Exception on invoking " + "enablePrivilege: " + ie.toString() ); } return false; } /** * Reports if the class is running in a Netscape browser. * @return true if the class is running in a Netscape browser. */ public static boolean isNetscape() { return isCommunicator; } static void printDebug( String msg ) { if ( debug ) { System.out.println( msg ); } } /** * Returns the string representation for this LDAPConnection. *

* For example: * *

LDAPConnection {ldap://dilly:389 (2) ldapVersion:3 bindDN:
     * "uid=admin,o=iplanet.com"}
* * For cloned connections, the number of LDAPConnection instances sharing * the same physical connection is shown in parenthesis following the ldap * url. * If an LDAPConnection objectis not cloned, this number is omitted from * the string representation. * * @return string representation of the connection * @see org.ietf.ldap.LDAPConnection#clone */ public String toString() { int cloneCnt = (_thread == null) ? 0 : _thread.getClientCount(); StringBuffer sb = new StringBuffer( "LDAPConnection {" ); //url // sb.append( (isSecure() ? "ldaps" : "ldap") ); sb.append( "ldap" ); sb.append( "://" ); sb.append( getHost() ); sb.append( ":" ); sb.append( getPort() ); // clone count if ( cloneCnt > 1 ) { sb.append( " (" ); sb.append( cloneCnt ); sb.append( ")" ); } // ldap version sb.append( " ldapVersion:" ); sb.append( _protocolVersion ); // bind DN sb.append( " bindDN:\"" ); if ( getAuthenticationDN() != null ) { sb.append( getAuthenticationDN() ); } sb.append( "\"}" ); return sb.toString(); } /** * Prints out the LDAP Java SDK version and the highest LDAP * protocol version supported by the SDK. To view this * information, open a terminal window, and enter: *
java org.ietf.ldap.LDAPConnection
     * 
* @param args not currently used */ public static void main(String[] args) { System.out.println( "LDAP SDK Version is " + SdkVersion ); System.out.println( "LDAP Protocol Version is " + ProtocolVersion ); } /** * Option specifying the maximum number of unread results to be cached in * any LDAPSearchResults without suspending reading from the server * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public static final int MAXBACKLOG = 30; private static boolean isCommunicator = checkCommunicator(); private static boolean debug = false; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSocketFactory.java0000664001003300100330000000577610602743265030140 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import java.io.*; import java.net.*; /** * Represents a socket connection that you can use to connect to an * LDAP server. You can write a class that implements this interface * if you want to use a TLS socket to connect to a secure server. * (The LDAPSSLSocketFactory class, which is included * in the org.ietf.ldap package, implements this * interface for SSL connections.) *

* * When you construct a new LDAPConnection * object, you can specify that the connection use this socket. * To do this, pass the constructor an object of the class that * implements this interface. *

* * @version 1.0 * @see LDAPConnection#LDAPConnection(org.ietf.ldap.LDAPSocketFactory) * @see LDAPSSLSocketFactory */ public interface LDAPSocketFactory { /** * Returns a socket to the specified host name and port number. *

* * @param host name of the host to which you want to connect * @param port port number to which you want to connect * @exception LDAPException Failed to create the socket. * @see LDAPSSLSocketFactory#createSocket(java.lang.String,int) */ public Socket createSocket( String host, int port ) throws LDAPException; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPConnSetupMgr.java0000664001003300100330000004275010602743265027735 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import java.io.*; import java.net.*; /** * Makes a connection to a server from a list using "smart" failover. * Connection attempts can be made serially from the same thread, or * in parallel by creating a separate thread after the specified delay. * Connection setup status is preserved for later attempts, so that servers * that are more likely to be available will be tried first. *

* The total time spent opening a connection can be limited with the * ConnectTimeout property. *

* When a connection is successfully created, a socket is opened. The socket * is passed to the LDAPConnThread. The LDAPConnThread must call * invalidateConnection() if the connection is lost due to a network or * server error, or disconnect() if the connection is deliberately terminated * by the user. */ class LDAPConnSetupMgr implements Cloneable, Serializable { static final long serialVersionUID = 1519402748245755306L; /** * Policy for opening a connection when multiple servers are used */ private static final int SERIAL = 0; private static final int PARALLEL = 1; /** * ServerEntry.connSetupStatus possible value. The values also represent * the likelihood that the connection will be setup to a server. Lower * values have higher priority. See sortDsList() method */ private static final int CONNECTED = 0; private static final int DISCONNECTED = 1; private static final int NEVER_USED = 2; private static final int INTERRUPTED = 3; private static final int FAILED = 4; /** * Representation for a server in the server list. */ class ServerEntry { String host; int port; int connSetupStatus; Thread connSetupThread; ServerEntry(String host, int port, int status) { this.host = host; this.port = port; connSetupStatus = status; connSetupThread = null; } public String toString() { return "{" +host+":"+port + " status="+connSetupStatus+"}"; } } /** * Socket to the connected server */ private Socket _socket = null; /** * Last exception occured during connection setup */ private LDAPException _connException = null; /** * List of server to use for the connection setup */ ServerEntry[] _dsList; /** * Index of the last connected server */ private int _dsIdx = -1; /** * Socket factory for SSL connections */ LDAPSocketFactory _factory; /** * Connection setup policy (PARALLEL or SERIAL) */ int _policy = SERIAL; /** * Delay in ms before another connection setup thread is started. */ int _connSetupDelay = -1; /** * The maximum time to wait to established the connection */ int _connectTimeout = 0; /** * During connection setup, the current count of servers to which * connection attmpt has been made */ private transient int _attemptCnt = 0; /** * Connection IDs for ldap trace messages */ private static int _nextId; private int _id; /** * Constructor * @param host list of host names to which to connect * @param port list of port numbers corresponding to the host list * @param factory socket factory for SSL connections */ LDAPConnSetupMgr(String[] hosts, int[] ports, LDAPSocketFactory factory) { _dsList = new ServerEntry[hosts.length]; for (int i=0; i < hosts.length; i++) { _dsList[i] = new ServerEntry(hosts[i], ports[i], NEVER_USED); } _factory = factory; _id = _nextId++; } /** * Try to open the connection to any of the servers in the list, limiting * the time waiting for the connection to be established * @return connection socket */ synchronized Socket openConnection() throws LDAPException{ long tcur=0, tmax = Long.MAX_VALUE; Thread th = null; reset(); // If reconnecting, sort dsList so that servers more likly to // be available are tried first sortDsList(); if (_connectTimeout == 0) { // No need for a separate thread, connect time not limited connect(); } else { // Wait for connection at most _connectTimeout milliseconds // Run connection setup in a separate thread to monitor the time tmax = System.currentTimeMillis() + _connectTimeout; th = new Thread (new Runnable() { public void run() { connect(); } }, "ConnSetupMgr"); th.setDaemon(true); th.start(); while (_socket==null && (_attemptCnt < _dsList.length) && (tcur = System.currentTimeMillis()) < tmax) { try { wait(tmax - tcur); } catch (InterruptedException e) { th.interrupt(); cleanup(); throw new LDAPInterruptedException("Interrupted connect operation"); } } } if (_socket != null) { return _socket; } if ( th != null && (tcur = System.currentTimeMillis()) >= tmax) { // We have timed out th.interrupt(); cleanup(); throw new LDAPException( "connect timeout, " + getServerList() + " might be unreachable", LDAPException.CONNECT_ERROR); } if (_connException != null && _dsList.length == 1) { throw _connException; } throw new LDAPException( "failed to connect to server " + getServerList(), LDAPException.CONNECT_ERROR); } private void reset() { _socket = null; _connException = null; _attemptCnt = 0; for (int i=0; i < _dsList.length; i++) { _dsList[i].connSetupThread = null; } } private String getServerList() { StringBuffer sb = new StringBuffer(); for (int i=0; i < _dsList.length; i++) { sb.append(i==0 ? "" : " "); sb.append(_dsList[i].host); sb.append(":"); sb.append(_dsList[i].port); } return sb.toString(); } private void connect() { if (_policy == SERIAL || _dsList.length == 1) { openSerial(); } else { openParallel(); } } /** * Called when the current connection is lost. * Put the connected server at the end of the server list for * the next connect attempt. */ synchronized void invalidateConnection() { if (_socket != null) { _dsList[_dsIdx].connSetupStatus = FAILED; // Move the entry to the end of the list int srvCnt = _dsList.length, j=0; ServerEntry[] newDsList = new ServerEntry[_dsList.length]; for (int i=0; i < srvCnt; i++) { if (i != _dsIdx) { newDsList[j++] = _dsList[i]; } } newDsList[j] = _dsList[_dsIdx]; _dsList = newDsList; _dsIdx = j; } _socket = null; } /** * Called when the current connection is terminated by the user. * Mark the connected server status as DISCONNECTED. This will * put it at top of the server list for the next connect attempt. */ void disconnect() { if (_socket != null) { _dsList[_dsIdx].connSetupStatus = DISCONNECTED; } _socket = null; } Socket getSocket() { return _socket; } String getHost() { if (_dsIdx >= 0) { return _dsList[_dsIdx].host; } return _dsList[0].host; } int getPort() { if (_dsIdx >= 0) { return _dsList[_dsIdx].port; } return _dsList[0].port; } int getConnSetupDelay() { return _connSetupDelay/1000; } /** * Selects the connection failover policy * @param delay in seconds for the parallel connection setup policy. * Possible values are:
(delay=-1) use serial policy,
* (delay=0) start immediately concurrent threads to each specified server *
(delay>0) create a new connection setup thread after delay seconds */ void setConnSetupDelay(int delay) { _policy = (delay < 0) ? SERIAL : PARALLEL; _connSetupDelay = delay*1000; } int getConnectTimeout() { return _connectTimeout/1000; } /** * Sets the maximum time to spend in the openConnection() call * @param timeout in seconds to wait for the connection to be established */ void setConnectTimeout(int timeout) { _connectTimeout = timeout*1000; } /** * Check if the user has voluntarily closed the connection */ boolean isUserDisconnected() { return (_dsIdx >=0 && _dsList[_dsIdx].connSetupStatus == DISCONNECTED); } /** * Try sequentially to open a new connection to a server. */ private void openSerial() { for (int i=0; i < _dsList.length; i++) { _dsList[i].connSetupThread = Thread.currentThread(); connectServer(i); if (_socket != null) { return; } } } /** * Try concurrently to open a new connection a server. Create a separate * thread for each connection attempt. */ private synchronized void openParallel() { for (int i=0; _socket==null && i < _dsList.length; i++) { //Create a Thread to execute connectSetver() final int dsIdx = i; String threadName = "ConnSetupMgr " + _dsList[dsIdx].host + ":" + _dsList[dsIdx].port; Thread t = new Thread(new Runnable() { public void run() { connectServer(dsIdx); } }, threadName); _dsList[dsIdx].connSetupThread = t; t.setDaemon(true); t.start(); // Wait before starting another thread if the delay is not zero if (_connSetupDelay != 0 && i < (_dsList.length-1)) { try { wait(_connSetupDelay); } catch (InterruptedException e) { return; } } } // At this point all threads are started. Wait until first thread // succeeds to connect or all threads terminate while (_socket == null && (_attemptCnt < _dsList.length)) { // Wait for a thread to terminate try { wait(); } catch (InterruptedException e) {} } } /** * Connect to the server at the given index */ void connectServer(int idx) { ServerEntry entry = _dsList[idx]; Thread currThread = Thread.currentThread(); Socket sock = null; LDAPException conex = null; try { /* If we are to create a socket ourselves, make sure it has sufficient privileges to connect to the desired host */ if (_factory == null) { sock = new Socket (entry.host, entry.port); //s.setSoLinger( false, -1 ); } else { sock = _factory.createSocket(entry.host, entry.port); } } catch (IOException e) { conex = new LDAPException("failed to connect to server " + entry.host+":"+entry.port, LDAPException.CONNECT_ERROR); } catch (LDAPException e) { conex = e; } if (currThread.isInterrupted()) { return; } synchronized (this) { if (_socket == null && entry.connSetupThread == currThread) { entry.connSetupThread = null; if (sock != null) { entry.connSetupStatus = CONNECTED; _socket = sock; _dsIdx = idx; cleanup(); // Signal other concurrent threads to terminate } else { entry.connSetupStatus = FAILED; _connException = conex; } _attemptCnt++; notifyAll(); } } } /** * Terminate all concurrently running connection setup threads */ private synchronized void cleanup() { Thread currThread = Thread.currentThread(); for (int i=0; i < _dsList.length; i++) { ServerEntry entry = _dsList[i]; if (entry.connSetupThread != null && entry.connSetupThread != currThread) { entry.connSetupStatus = INTERRUPTED; //Thread.stop() is considered to be dangerous, use Thread.interrupt(). //interrupt() will however not work if the thread is blocked in the //socket library native connect() call, but the connect() will //eventually timeout and the thread will die. entry.connSetupThread.interrupt(); entry.connSetupThread = null; } } } /** * Sorts Server List so that servers which are more likely to be available * are tried first. The likelihood of making a successful connection * is determined by the connSetupStatus. Lower values have higher * likelihood. Thus, the order of server access is (1) disconnected by * the user (2) never used (3) interrupted connection attempt * (4) connection setup failed/connection lost */ private void sortDsList() { int srvCnt = _dsList.length; for (int i=1; i < srvCnt; i++) { for (int j=0; j < i; j++) { if (_dsList[i].connSetupStatus < _dsList[j].connSetupStatus) { // swap entries ServerEntry entry = _dsList[j]; _dsList[j] = _dsList[i]; _dsList[i] = entry; } } } } /** * This is used only by the ldapjdk test libaray to simulate a * server problem and to test fail-over and rebind * @return A flag whether the connection was closed */ boolean breakConnection() { try { _socket.close(); return true; } catch (Exception e) { return false; } } public String toString() { String str = "dsIdx="+_dsIdx+ " dsList="; for (int i=0; i < _dsList.length; i++) { str += _dsList[i]+ " "; } return str; } int getID() { return _id; } String getLDAPUrl() { return ((_factory == null) ? "ldap" : "ldaps") + "://" + getHost() + ":" + getPort(); } public Object clone() { try { LDAPConnSetupMgr cloneMgr = (LDAPConnSetupMgr) super.clone(); cloneMgr._dsList = new ServerEntry[_dsList.length]; for (int i=0; i<_dsList.length; i++) { ServerEntry e = _dsList[i]; cloneMgr._dsList[i] = new ServerEntry(e.host, e.port, e.connSetupStatus); } return cloneMgr; } catch (CloneNotSupportedException ex) { return null; } } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/DynamicInvoker.java0000664001003300100330000001217610602743265027631 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.lang.reflect.*; import java.util.Hashtable; /** * Utility class to dynamically find methods of a class and to invoke * them */ class DynamicInvoker { static Object invokeMethod( Object obj, String packageName, String methodName, Object[] args, String[] argNames ) throws LDAPException { try { java.lang.reflect.Method m = getMethod( packageName, methodName, argNames ); if ( m != null ) { return m.invoke( obj, args ); } else { System.err.println( "No such method: " + packageName + "." + methodName ); } } catch ( Exception e ) { e.printStackTrace(); throw new LDAPException( "Invoking " + methodName + ": " + e.toString(), LDAPException.PARAM_ERROR ); } return null; } static Method getMethod( String packageName, String methodName, String[] args ) throws LDAPException { try { Method method = null; String suffix = ""; if ( args != null ) { for ( int i = 0; i < args.length; i++ ) { suffix = suffix + args[i].getClass().getName(); } } String key = packageName + "." + methodName + "." + suffix; if ( (method = (Method)(m_methodLookup.get(key))) != null ) { return method; } Class c = Class.forName( packageName ); Method[] m = c.getMethods(); for ( int i = 0; i < m.length; i++ ) { Class[] params = m[i].getParameterTypes(); if ( m[i].getName().equals(methodName) && signatureCorrect( params, args ) ) { m_methodLookup.put( key, m[i] ); return m[i]; } } throw new LDAPException( "Method " + methodName + " not found in " + packageName ); } catch ( ClassNotFoundException e ) { throw new LDAPException( "Class " + packageName + " not found" ); } } static private boolean signatureCorrect( Class params[], String args[] ) { if ( args == null ) { return true; } if ( params.length != args.length ) { System.err.println( params.length + " method parameters vs " + args.length + " expected" ); return false; } for ( int i = 0; i < params.length; i++ ) { if ( !params[i].getName().equals(args[i]) ) { System.err.println( params[i].getName() + " method parameter vs " + args[i] + " expected" ); return false; } } return true; } private static Hashtable m_methodLookup = new Hashtable(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPAuthHandler.java0000664001003300100330000000736110602743265027547 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * Specifies how to retrieve authentication information automatically * for referrals. If you have set up the search constraints (or the options * in the LDAPConnection object) to use automatic referral, * you must define a class that implements this interface. *

* * If no class implements this interface, clients that follow automatic * referrals are authenticated anonymously to subsequent LDAP servers. * The following example is a simple class that implements this interface. * Objects of the myLDAPAuthHandler class check the host and port of the * referred LDAP server. If the host and port are "alway.mcom.com:389", * the directory manager's name and password are used to authenticate. * For all other LDAP servers, anonymous authentication is used. * *

 * public class myLDAPAuthHandler implements org.ietf.ldap.LDAPAuthHandler
 * {
 *  private String myDN;
 *  private String myPW;
 *  private LDAPAuthHandlerAuth myRebindInfo;

 *  public myLDAPAuthHandler () {
 *    myDN = "c=Directory Manager,o=Universal Exports,c=UK";
 *    myPW = "alway4444";
 *  }
 *
 *  public LDAPAuthHandlerAuth getRebindAuthentication( String host, int port ) {
 *    if ( host.equalsIgnoreCase( "alway.mcom.com" ) && ( port == 389 ) ) {
 *      myRebindInfo = new LDAPAuthHandlerAuth( myDN, myPW );
 *    } else {
 *      myRebindInfo = new LDAPAuthHandlerAuth( "", "" );
 *    }
 *    return myRebindInfo;
 *  }
 * } 
* * * @version 1.0 */ public interface LDAPAuthHandler extends LDAPReferralHandler { /** * Returns an LDAPAuthProvider object, which the calling function * can use to get the DN and password to use for authentication (if the client * is set up to follow referrals automatically). * @return LDAPAuthProvider object containing authentication information. * @see org.ietf.ldap.LDAPAuthProvider */ public LDAPAuthProvider getAuthProvider( String host, int port ); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSearchQueue.java0000664001003300100330000001701710602743265027561 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.*; import org.ietf.ldap.client.*; /** * Manages search results, references and responses returned on one or * more search requests * */ public class LDAPSearchQueue extends LDAPMessageQueueImpl { static final long serialVersionUID = -7163312406176592277L; /** * Constructs a search message queue * * @param asynchOp a boolean flag indicating whether the object is used * for asynchronous LDAP operations * @param cons LDAP search constraints * @see org.ietf.ldap.LDAPAsynchronousConnection */ LDAPSearchQueue( boolean asynchOp, LDAPSearchConstraints cons ) { super( asynchOp ); _constraints = cons; } /** * Blocks until a search result, reference or response is available, * or until all operations associated with the object have completed * or been canceled. * Wakes up the LDAPConnThread if the backlog limit has been reached. * * @return a search result, search reference, search response message, * or null if there are no more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted * @see LDAPResponse * @see LDAPSearchResult * @see LDAPSearchResultReference */ public LDAPMessage getResponse() throws LDAPException{ LDAPMessage result = super.getResponse(); // Notify LDAPConnThread to wake up if backlog limit has been reached if ( result instanceof LDAPSearchResult || result instanceof LDAPSearchResultReference ) { LDAPConnThread connThread = getConnThread( result.getMessageID() ); if ( connThread != null ) { connThread.resultRetrieved(); } } return result; } /** * Blocks until a response is available for a particular message ID, or * until all operations associated with the message ID have completed or * been canceled, and returns the response. If there is no outstanding * operation for the message ID (or if it is zero or a negative number), * IllegalArgumentException is thrown. * * @param msgid A particular message to query for responses available * @return a response for an LDAP operation or null if there are no * more outstanding requests. * @exception LDAPException Network error exception * @exception LDAPInterruptedException The invoking thread was interrupted */ public LDAPMessage getResponse( int msgid ) throws LDAPException { LDAPMessage result = super.getResponse( msgid ); // Notify LDAPConnThread to wake up if backlog limit has been reached if ( result instanceof LDAPSearchResult || result instanceof LDAPSearchResultReference ) { LDAPConnThread connThread = getConnThread( result.getMessageID() ); if ( connThread != null ) { connThread.resultRetrieved(); } } return result; } /** * Reports true if all results for a particular message ID have been * received by the API implementation. That is the case if a * searchResultDone response has been received by the SDK. There may * still be messages queued in the object for retrieval by the * application. If there is no outstanding operation for the message ID * (or if it is zero or a negative number), IllegalArgumentException is * thrown. * * @param msgid A particular message to query for completion * @return true if all results for a particular message ID have been * received */ public synchronized boolean isComplete( int msgid ) throws LDAPException { boolean OK = false; for ( int i = (_messageQueue.size()-1); i >= 0; i-- ) { LDAPMessage msg = (LDAPMessage)_messageQueue.get(i); if ( msg.getMessageID() == msgid ) { OK = true; break; } } if ( !OK ) { throw new IllegalArgumentException( "Invalid msg ID: " + msgid ); } // Search an instance of LDAPResponse for ( int i = _messageQueue.size()-1; i >= 0; i-- ) { LDAPMessage msg = (LDAPMessage)_messageQueue.get(i); if ( msg instanceof LDAPResponse ) { return true; } } return false; } /** * Gets the key of the cache entry * * @return the key of the cache entry */ Long getKey() { return _key; } /** * Returns the search constraints used to create this object. * * @return the search constraints used to create this object. */ LDAPSearchConstraints getSearchConstraints() { return _constraints; } /** * Resets the state of this object so it can be recycled * Used by LDAPConnection synchronous operations. */ void reset() { super.reset(); _constraints = null; } /** * Sets the key of the cache entry. The queue needs to know this value * when the results get processed. After the results have been * saved in the vector, then the key and a vector of results are put in * the cache. * * @param key the key of the cache entry */ void setKey( Long key ) { _key = key; } /** * Sets search constraints * * @param cons LDAP search constraints */ void setSearchConstraints( LDAPSearchConstraints cons ) { _constraints = cons; } // this instance variable is only for cache purposes private Long _key = null; private LDAPSearchConstraints _constraints; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPResourceBundle.java0000664001003300100330000001242110602743265030262 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import java.io.*; /** * This class represents a locale-specific resource for a property file. * It retrieves the property file for the given base name including the * absolute path name and locale. The property file has to be located in the * CLASSPATH and the property file's suffix is .props. *

* If the specified locale is en and us and the base name of the file is * netscape/ldap/errors/ErrorCodes, then the class loader will search for * the file in the following order: *

 *
 *   ErrorCodes_en_us.properties
 *   ErrorCodes_en.properties
 *   ErrorCodes.properties
 *
 * 
* @see java.util.Locale */ class LDAPResourceBundle implements java.io.Serializable { static final long serialVersionUID = -5903986665461157980L; private static final boolean _debug = false; private static final String _suffix = ".properties"; private static final String _locale_separator = "_"; /** * Return the property resource bundle according to the base name of the * property file and the locale. The class loader will find the closest match * with the given locale. * @return the property resource bundle. * @exception IOException Gets thrown when failed to open the resource * bundle file. */ static PropertyResourceBundle getBundle( String baseName ) throws IOException { return getBundle( baseName, Locale.getDefault() ); } /** * Return the property resource bundle according to the base name of the * property file and the locale. The class loader will find the closest match * with the given locale. * @param baseName the base name of the property file. The base name contains * no locale context and no . suffix. * @param l the locale * @return the property resource bundle. * @exception IOException Gets thrown when failed to create a property * resource */ static PropertyResourceBundle getBundle( String baseName, Locale l ) throws IOException { String localeStr = _locale_separator + l.toString(); InputStream fin = null; while ( true ) { if ( (fin = getStream(baseName, localeStr)) != null ) { PropertyResourceBundle p = new PropertyResourceBundle( fin ); return p; } else { int index = localeStr.lastIndexOf( _locale_separator ); if ( index == -1 ) { printDebug( "File " + baseName + localeStr + _suffix + " not found" ); return null; } else { localeStr = localeStr.substring( 0, index ); } } } } /** * Constructs the whole absolute path name of a property file and retrieves * an input stream on the file. * @param baseName the base name of the property file. The base name contains * no locale context and no . suffix. * @param the locale string to insert into the file name * @return the input stream of the property file. */ private static InputStream getStream( String baseName, String locale ) { String fStr = baseName + locale + _suffix; return ClassLoader.getSystemResourceAsStream( fStr ); } /** * Prints debug messages if the debug mode is on. * @param str the message that is printed */ private static void printDebug(String str) { if ( _debug ) { System.out.println( str ); } } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPCheckComm.java0000664001003300100330000000664410602743265027204 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * This static class checks if the caller is an applet running in * Netscape Communicator. If so, it returns the appropriate method. */ class LDAPCheckComm { /** * Returns the method whose name matches the specified argument. * @param classPackage the class package * @param name the method name * @return the method. * @exception LDAPException Gets thrown if the method is not found or * the caller is not an applet running in Netscape * Communicator. */ static java.lang.reflect.Method getMethod(String classPackage, String name) throws LDAPException { SecurityManager sec = System.getSecurityManager(); if ( sec == null ) { /* Not an applet, we can do what we want to */ return null; } else if ( sec.toString().startsWith("java.lang.NullSecurityManager") ) { /* Not an applet, we can do what we want to */ return null; } else if (sec.toString().startsWith("netscape.security.AppletSecurity")) { /* Running as applet. Is PrivilegeManager around? */ try { Class c = Class.forName(classPackage); java.lang.reflect.Method[] m = c.getMethods(); for( int i = 0; i < m.length; i++ ) { if ( m[i].getName().equals(name) ) { return m[i]; } } throw new LDAPException("no enable privilege in " + classPackage); } catch (ClassNotFoundException e) { throw new LDAPException("Class not found"); } } return null; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPBindHandler.java0000664001003300100330000000564610602743265027526 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * Performs explicit bind processing on a referral. A client may * specify an instance of this class for use on a single operation * (through the LDAPConstraints object) or all operations * (through LDAPConnection.setOption()). It is typically used * to control the authentication mechanism used on implicit referral * handling. */ public interface LDAPBindHandler { /** * This method is called by LDAPConnection when * authenticating. An implementation of LDAPBindHandler may access * the host, port, credentials, and other information in the * LDAPConnection in order to decide on an appropriate * authentication mechanism.
* The bind method can also interact with a user or external module. * @exception org.ietf.ldap.LDAPReferralException * @see org.ietf.ldap.LDAPConnection#bind * @param ldapurls urls which may be selected to connect and bind to * @param conn an established connection to an LDAP server */ public void bind( String[] ldapurls, LDAPConnection conn ) throws LDAPReferralException; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPInterruptedException.java0000664001003300100330000000547010602743265031533 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * An exception thrown when the LDAP operation being invoked has * been interrupted. For example, an application might interrupt a thread that * is performing a search. * * @version 1.0 */ public class LDAPInterruptedException extends LDAPException { static final long serialVersionUID = 5267455101797397456L; /** * Constructs a default exception with a specified string of * additional information. This string appears if you call * the toString() method. *

* * @param message the additional information * @see org.ietf.ldap.LDAPInterruptedException#toString() */ LDAPInterruptedException( String message ) { super( message, LDAPException.OTHER, (Throwable)null); } /** * Gets the string representation of the exception. */ public String toString() { String str = "org.ietf.ldap.LDAPInterruptedException: "; String msg = super.getMessage(); if (msg != null) { str +=msg; } return str; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPConnThread.java0000664001003300100330000006266210602743265027402 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.client.opers.*; import org.ietf.ldap.ber.stream.*; import org.ietf.ldap.util.*; import java.io.*; import java.net.*; import java.text.SimpleDateFormat; /** * Multiple LDAPConnection clones can share a single physical connection, * which is maintained by a thread. * * +----------------+ * | LDAPConnection | --------+ * +----------------+ | * | * +----------------+ | +----------------+ * | LDAPConnection | --------+------- | LDAPConnThread | * +----------------+ | +----------------+ * | * +----------------+ | * | LDAPConnection | --------+ * +----------------+ * * All LDAPConnections send requests and get responses from * LDAPConnThread (a thread). */ class LDAPConnThread extends Thread { /** * Constants */ private final static int MAXMSGID = Integer.MAX_VALUE; private final static int BACKLOG_CHKCNT = 50; /** * Internal variables */ transient private static int _highMsgId; transient private InputStream _serverInput; transient private OutputStream _serverOutput; transient private Hashtable _requests; transient private Hashtable _messages = null; transient private Vector _registered; transient private boolean _disconnected = false; transient private LDAPCache _cache = null; transient private boolean _doRun = true; private Socket _socket = null; transient private Thread _thread = null; transient Object _sendRequestLock = new Object(); transient LDAPConnSetupMgr _connMgr = null; transient Object _traceOutput = null; transient private int _backlogCheckCounter = BACKLOG_CHKCNT; // Time Stamp format Hour(0-23):Minute:Second.Milliseconds used for // trace msgs static SimpleDateFormat _timeFormat = new SimpleDateFormat( "HH:mm:ss.SSS" ); /** * Constructs a connection thread that maintains connection to the * LDAP server * * @param connMgr * @param cache * @param traceOutput */ public LDAPConnThread( LDAPConnSetupMgr connMgr, LDAPCache cache, Object traceOutput ) throws LDAPException { super( "LDAPConnThread " + connMgr.getHost() + ":" + connMgr.getPort() ); _requests = new Hashtable (); _registered = new Vector (); _connMgr = connMgr; _socket = connMgr.getSocket(); setCache( cache ); setTraceOutput( traceOutput ); // Allow the application to exit if only LDAPConnThread threads are // running setDaemon( true ); try { _serverInput = new BufferedInputStream( _socket.getInputStream() ); _serverOutput = new BufferedOutputStream( _socket.getOutputStream() ); } catch ( IOException e ) { // a kludge to make the thread go away. Since the thread has already // been created, the only way to clean up the thread is to call the // start() method. Otherwise, the exit method will be never called // because the start() was never called. In the run method, stop // is called right away if _doRun is false. _doRun = false; start(); throw new LDAPException ( "failed to connect to server " + _connMgr.getHost(), LDAPException.CONNECT_ERROR ); } if ( traceOutput != null ) { StringBuffer sb = new StringBuffer( " connected to " ); sb.append( _connMgr.getLDAPUrl() ); logTraceMessage( sb ); } start(); /* start the thread */ } InputStream getInputStream() { return _serverInput; } void setInputStream( InputStream is ) { _serverInput = is; } OutputStream getOutputStream() { return _serverOutput; } void setOutputStream( OutputStream os ) { _serverOutput = os; } void setTraceOutput( Object traceOutput ) { synchronized ( _sendRequestLock ) { if ( traceOutput == null ) { _traceOutput = null; } else if ( traceOutput instanceof OutputStream ) { _traceOutput = new PrintWriter( (OutputStream)traceOutput ); } else if ( traceOutput instanceof LDAPTraceWriter ) { _traceOutput = traceOutput; } } } void logTraceMessage( StringBuffer msg ) { if ( _traceOutput == null ) { return; } String timeStamp = _timeFormat.format( new Date() ); StringBuffer sb = new StringBuffer( timeStamp ); sb.append( " ldc=" ); sb.append( _connMgr.getID() ); synchronized( _sendRequestLock ) { if ( _traceOutput instanceof PrintWriter ) { PrintWriter traceOutput = (PrintWriter)_traceOutput; traceOutput.print( sb ); // header traceOutput.println( msg ); traceOutput.flush(); } else if ( _traceOutput instanceof LDAPTraceWriter ) { sb.append( msg ); ((LDAPTraceWriter)_traceOutput).write( sb.toString() ); } } } /** * Set the cache to use for searches. * @param cache The cache to use for searches; null for no * cache */ synchronized void setCache( LDAPCache cache ) { _cache = cache; _messages = (_cache != null) ? new Hashtable() : null; } /** * Allocates a new LDAP message ID. These are arbitrary numbers used to * correlate client requests with server responses. * * @return new unique msgId */ private int allocateId() { synchronized( _sendRequestLock ) { _highMsgId = (_highMsgId + 1) % MAXMSGID; return _highMsgId; } } /** * Sends an LDAP request via this connection thread * * @param request request to send * @param toNotify response queue to receive the response * when ready */ void sendRequest( LDAPConnection conn, JDAPProtocolOp request, LDAPMessageQueue toNotify, LDAPConstraints cons ) throws LDAPException { if ( !_doRun ) { throw new LDAPException ( "not connected to a server", LDAPException.SERVER_DOWN ); } LDAPMessage msg = new LDAPMessage( allocateId(), request, cons.getControls() ); LDAPMessageQueueImpl queue = (LDAPMessageQueueImpl)toNotify; if ( queue != null ) { if ( !(request instanceof JDAPAbandonRequest || request instanceof JDAPUnbindRequest) ) { /* Only worry about toNotify if we expect a response... */ this._requests.put( new Integer( msg.getMessageID()), queue ); /* Notify the backlog checker that there may be another outstanding request */ resultRetrieved(); } queue.addRequest( msg.getMessageID(), conn, this, cons.getTimeLimit() ); } synchronized( _sendRequestLock ) { try { if ( _traceOutput != null ) { logTraceMessage( msg.toTraceString() ); } msg.write( _serverOutput ); _serverOutput.flush(); } catch ( IOException e ) { networkError( e ); } } } /** * Registers with this connection thread * * @param conn LDAP connection */ public synchronized void register( LDAPConnection conn ) { if ( !_registered.contains( conn ) ) _registered.addElement( conn ); } int getClientCount() { return _registered.size(); } boolean isRunning() { return _doRun; } /** * Deregisters with this connection thread. If all connections * are deregistered, this thread is to be killed. * * @param conn LDAP connection */ public synchronized void deregister(LDAPConnection conn) { _registered.removeElement( conn ); if ( _registered.size() == 0 ) { try { if ( !_disconnected ) { LDAPSearchConstraints cons = conn.getSearchConstraints(); sendRequest( null, new JDAPUnbindRequest(), null, cons ); } // must be set after the call to sendRequest _doRun =false; if ( (_thread != null) && (_thread != Thread.currentThread()) ) { _thread.interrupt(); // Wait up to 1 sec for thread to accept disconnect // notification. When the interrupt is accepted, // _thread is set to null. See run() method. try { wait( 1000 ); } catch ( InterruptedException e ) { } } } catch( Exception e ) { LDAPConnection.printDebug( e.toString() ); } finally { cleanUp(); } } } /** * Cleans up before shutting down the thread */ private void cleanUp() { if ( !_disconnected ) { try { _serverOutput.close(); } catch ( Exception e ) { } finally { _serverOutput = null; } try { _serverInput.close (); } catch ( Exception e ) { } finally { _serverInput = null; } try { _socket.close (); } catch ( Exception e ) { } finally { _socket = null; } _disconnected = true; /** * Notify the Connection Setup Manager that the connection was * terminated by the user */ _connMgr.disconnect(); /** * Cancel all outstanding requests */ if ( _requests != null ) { Enumeration requests = _requests.elements(); while ( requests.hasMoreElements() ) { LDAPMessageQueueImpl queue = (LDAPMessageQueueImpl)requests.nextElement(); queue.removeAllRequests( this ); } } /** * Notify all the registered queues of this mishap. * IMPORTANT: This needs to be done last. Otherwise, the socket * input stream and output stream might never get closed and the * whole task will get stuck when trying to stop the * LDAPConnThread. */ if ( _registered != null ) { Vector registerCopy = (Vector)_registered.clone(); Enumeration cancelled = registerCopy.elements(); while ( cancelled.hasMoreElements() ) { LDAPConnection c = (LDAPConnection)cancelled.nextElement(); c.deregisterConnection(); } } _registered.clear(); _registered = null; _messages = null; _requests.clear(); _cache = null; } } /** * Sleep if there is a backlog of search results */ private void checkBacklog() throws InterruptedException{ while ( true ) { if ( _requests.size() == 0 ) { return; } Enumeration queues = _requests.elements(); while( queues.hasMoreElements() ) { LDAPMessageQueue l = (LDAPMessageQueue)queues.nextElement(); // If there are any threads waiting for a regular response // message, we have to go read the next incoming message if ( !(l instanceof LDAPSearchQueue ) ) { return; } LDAPSearchQueue sl = (LDAPSearchQueue)l; // should never happen, but just in case if ( sl.getSearchConstraints() == null ) { return; } int slMaxBacklog = sl.getSearchConstraints().getMaxBacklog(); int slBatchSize = sl.getSearchConstraints().getBatchSize(); // Disabled backlog check ? if ( slMaxBacklog == 0 ) { return; } // Synch op with zero batch size ? if ( !sl.isAsynchOp() && slBatchSize == 0 ) { return; } // Max backlog not reached for at least one queue ? // (if multiple requests are in progress) if ( sl.getMessageCount() < slMaxBacklog ) { return; } } synchronized( this ) { wait( 3000 ); } } } /** * This is called when a search result has been retrieved from the incoming * queue. We use the notification to unblock the queue thread, if it * is waiting for the backlog to lighten. */ synchronized void resultRetrieved() { notifyAll(); } /** * Reads from the LDAP server input stream for incoming LDAP messages. */ public void run() { // if there is a problem establishing a connection to the server, // stop the thread right away... if ( !_doRun ) { return; } _thread = Thread.currentThread(); LDAPMessage msg = null; JDAPBERTagDecoder decoder = new JDAPBERTagDecoder(); while ( _doRun ) { yield(); int[] nread = new int[1]; nread[0] = 0; try { // Check after every BACKLOG_CHKCNT number of messages if the // backlog is too high if ( --_backlogCheckCounter <= 0 ) { _backlogCheckCounter = BACKLOG_CHKCNT; checkBacklog(); } BERElement element = BERElement.getElement( decoder, _serverInput, nread ); msg = LDAPMessage.parseMessage( element ); if ( _traceOutput != null ) { logTraceMessage( msg.toTraceString() ); } // pass in the ber element size to approximate the size of the // cache entry, thereby avoiding serialization of the entry // stored in the cache processResponse( msg, nread[0] ); } catch ( Exception e ) { if (_doRun) { networkError( e ); } else { // interrupted from deregister() synchronized( this ) { _thread = null; notifyAll(); } } } } } /** * When a response arrives from the LDAP server, it is processed by * this routine. It will pass the message on to the listening object * associated with the LDAP msgId. * @param msg New message from LDAP server */ private void processResponse( LDAPMessage msg, int size ) { Integer messageID = new Integer( msg.getMessageID() ); LDAPMessageQueueImpl l = (LDAPMessageQueueImpl)_requests.get( messageID ); if ( l == null ) { return; /* nobody is waiting for this response (!) */ } // For asynch operations controls are to be read from the LDAPMessage // For synch operations controls are copied into the LDAPConnection // For synch search operations, controls are also copied into // LDAPSearchResults (see LDAPConnection.checkSearchMsg()) if ( ! l.isAsynchOp() ) { /* Were there any controls for this client? */ LDAPControl[] con = msg.getControls(); if ( con != null ) { int msgid = msg.getMessageID(); LDAPConnection ldc = l.getConnection( msgid ); if ( ldc != null ) { ldc.setResponseControls( this, new LDAPResponseControl(ldc, msgid, con) ); } } } if ( (_cache != null) && (l instanceof LDAPSearchQueue) ) { cacheSearchResult( (LDAPSearchQueue)l, msg, size ); } l.addMessage( msg ); if ( msg instanceof LDAPResponse ) { _requests.remove( messageID ); if ( _requests.size() == 0 ) { _backlogCheckCounter = BACKLOG_CHKCNT; } } } /** * Collects search results to be added to the LDAPCache. Search results are * packaged in a vector and temporary stored into a hashtable _messages * using the message id as the key. The vector first element (at index 0) * is a Long integer representing the total size of all LDAPEntries entries. * It is followed by the actual LDAPEntries. * If the total size of entries exceeds the LDAPCache max size, or a * referral has been received, caching of search results is disabled and * the entry is not added to the LDAPCache. A disabled search request is * denoted by setting the entry size to -1. */ private synchronized void cacheSearchResult( LDAPSearchQueue l, LDAPMessage msg, int size ) { Integer messageID = new Integer( msg.getMessageID() ); Long key = l.getKey(); Vector v = null; if ( (_cache == null) || (key == null) ) { return; } if ( msg instanceof LDAPSearchResult ) { // Get the vector containing the LDAPMessages for the specified // messageID v = (Vector)_messages.get( messageID ); if ( v == null ) { _messages.put( messageID, v = new Vector() ); v.addElement( new Long(0) ); } // Return if the entry size is -1, i.e. caching is disabled if ( ((Long)v.firstElement()).longValue() == -1L ) { return; } // add the size of the current LDAPMessage to the lump sum // assume the size of LDAPMessage is more or less the same as // the size of LDAPEntry. Eventually an LDAPEntry object gets // stored in the cache instead of the LDAPMessage object. long entrySize = ((Long)v.firstElement()).longValue() + size; // If the entrySize exceeds the cache size, discard the collected // entries and disble collecting of entries for this search request // by setting the entry size to -1. if ( entrySize > _cache.getSize() ) { v.removeAllElements(); v.addElement( new Long(-1L) ); return; } // update the lump sum located in the first element of the vector v.setElementAt( new Long(entrySize), 0 ); // convert LDAPMessage object into LDAPEntry which is stored to the // end of the Vector v.addElement( ((LDAPSearchResult)msg).getEntry() ); } else if ( msg instanceof LDAPSearchResultReference ) { // If a search reference is received disable caching of // this search request v = (Vector)_messages.get(messageID); if ( v == null ) { _messages.put( messageID, v = new Vector() ); } else { v.removeAllElements(); } v.addElement( new Long(-1L) ); } else if ( msg instanceof LDAPResponse ) { // The search request has completed. Store the cache entry // in the LDAPCache if the operation has succeded and caching // is not disabled due to the entry size or referrals boolean fail = ((LDAPResponse)msg).getResultCode() > 0; v = (Vector)_messages.remove( messageID ); if ( !fail ) { // If v is null, meaning there are no search results from the // server if ( v == null ) { v = new Vector(); v.addElement(new Long(0)); } // add the new entry if the entry size is not -1 (caching // disabled) if ( ((Long)v.firstElement()).longValue() != -1L ) { _cache.addEntry( key, v ); } } } } /** * Stop dispatching responses for a particular message ID * * @param id Message ID for which to discard responses */ void abandon( int id ) { if ( !_doRun ) { return; } LDAPMessageQueueImpl l = (LDAPMessageQueueImpl)_requests.remove( new Integer(id) ); // Clean up cache if enabled if ( _messages != null ) { _messages.remove( new Integer(id) ); } if ( l != null ) { l.removeRequest( id ); } resultRetrieved(); // If LDAPConnThread is blocked in checkBacklog() } /** * Changes the queue for a message ID. Required when * LDAPMessageQueue.merge() is invoked. * * @param id Message ID for which to change the queue * @return Previous queue */ LDAPMessageQueue changeQueue( int id, LDAPMessageQueue toNotify ) { if ( !_doRun ) { LDAPMessageQueueImpl queue = (LDAPMessageQueueImpl)toNotify; queue.setException( this, new LDAPException( "Server down", LDAPException.OTHER ) ); return null; } return (LDAPMessageQueue)_requests.put( new Integer(id), toNotify ); } /** * Handles network errors. Basically shuts down the whole connection. * * @param e The exception which was caught while trying to read from * input stream. */ private synchronized void networkError( Exception e ) { _doRun = false; // notify the Connection Setup Manager that the connection is lost _connMgr.invalidateConnection(); try { // notify each queue that the server is down. Enumeration requests = _requests.elements(); while ( requests.hasMoreElements() ) { LDAPMessageQueueImpl queue = (LDAPMessageQueueImpl)requests.nextElement(); queue.setException( this, new LDAPException( "Server down", LDAPException.OTHER) ); } } catch( NullPointerException ee ) { System.err.println( "Exception: " + ee.toString() ); } cleanUp(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPEntry.java0000664001003300100330000001757210602743265026456 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.*; /** * Represents an entry in the directory. * * @version 1.0 */ public class LDAPEntry implements Serializable { static final long serialVersionUID = -5563306228920012807L; private String dn = null; private LDAPAttributeSet attrSet = null; /** * Constructs an empty entry. */ public LDAPEntry() { dn = null; attrSet = new LDAPAttributeSet(); } /** * Constructs a new entry with the specified distinguished name and with * an empty attribute set. * @param distinguishedName the distinguished name of the new entry */ public LDAPEntry( String distinguishedName ) { dn = distinguishedName; attrSet = new LDAPAttributeSet(); } /** * Constructs a new entry with the specified distinguished name and * set of attributes. * @param distinguishedName the distinguished name of the new entry * @param attrs the set of attributes to assign to the new entry * @see org.ietf.ldap.LDAPAttributeSet */ public LDAPEntry( String distinguishedName, LDAPAttributeSet attrs ) { dn = distinguishedName; attrSet = attrs; } /** * Returns the distinguished name of the current entry. * @return distinguished name of the current entry. */ public String getDN() { return dn; } void setDN(String name) { dn = name; } /** * In an entry, returns the single attribute that exactly matches the * specified attribute name. * @param attrName name of attribute to return * For example: *

     *     "cn"            // Only a non-subtyped version of cn
     *     "cn;lang-ja"    // Only a Japanese version of cn, will not
     *                     // return "cn;lang-ja-JP-kanji", for example
     *
* @return attribute in the current entry that has exactly the same name, * or null (if no attribute in the entry matches the specified name). * @see org.ietf.ldap.LDAPAttribute */ public LDAPAttribute getAttribute(String attrName) { return attrSet.getAttribute(attrName); } /** * Returns the subtype that matches "attrName" and that best matches * a language specification "lang". If there are subtypes other than * "lang" subtypes included in attrName, e.g. "cn;binary", only * attributes with all of those subtypes are returned. If lang is * null or empty, the method behaves as getAttribute(attrName). If * there are no matching attributes, null is returned. * * Example:
     *  Assume the entry contains only the following attributes:
     *     cn;lang-en
     *     cn;lang-ja-JP-kanji
     *     sn
     *  getAttribute( "cn" ) returns null.
     *  getAttribute( "sn" ) returns the "sn" attribute.
     *  getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute.
     *  getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute.
     *  getAttribute( "cn", "lang-ja" ) returns null.
     *  getAttribute( "sn", "lang-en" ) returns the "sn" attribute.
     *
*

* @param attrName name of attribute to find in the entry * @param lang a language specification (for example, lang-en) * @return the attribute that matches the base name and that best * matches any specified language subtype. * @see org.ietf.ldap.LDAPAttribute */ public LDAPAttribute getAttribute( String attrName, String lang ) { return attrSet.getAttribute( attrName, lang ); } /** * Returns the attribute set of the entry. * @return set of attributes in the entry. * @see org.ietf.ldap.LDAPAttributeSet */ public LDAPAttributeSet getAttributeSet() { return attrSet; } /** * Creates a new attribute set containing only the attributes * that have the specified subtypes. *

* * For example, suppose an entry contains the following attributes: *

* *

     * cn
     * cn;lang-ja
     * sn;phonetic;lang-ja
     * sn;lang-us
     * 
* * If you call the getAttributeSet method and pass * lang-ja as the argument, the method returns * an attribute set containing the following attributes: *

* *

     * cn;lang-ja
     * sn;phonetic;lang-ja
     * 
* * @param subtype semi-colon delimited list of subtypes * that you want to find in attribute names. *
     *     "lang-ja"        // Only Japanese language subtypes
     *     "binary"         // Only binary subtypes
     *     "binary;lang-ja" // Only Japanese language subtypes
     *                         which also are binary
     *
* @return attribute set containing the attributes that have * the specified subtypes. * @see org.ietf.ldap.LDAPAttributeSet * @see org.ietf.ldap.LDAPAttributeSet#getSubset */ public LDAPAttributeSet getAttributeSet(String subtype) { return attrSet.getSubset(subtype); } /** * Retrieves the string representation of the entry's * distinguished name (DN) and its attributes. * For example: * *
     * LDAPEntry: uid=bjensen, ou=People, o=airius.com; LDAPAttributeSet:
     * LDAPAttribute {type='cn', values='Barbara Jensen,Babs Jensen'}
     * LDAPAttribute {type='sn', values='Jensen'}LDAPAttribute {type='givenname',
     * values='Barbara'}LDAPAttribute {type='objectclass', values='top,person,
     * organizationalPerson,inetOrgPerson'}LDAPAttribute {type='ou',
     * values='Product Development,People'}
     * 
* * @return string representation of the entry's DN and its attributes. */ public String toString() { StringBuffer sb = new StringBuffer("LDAPEntry: "); if ( dn != null ) { sb.append(dn); sb.append("; "); } if ( attrSet != null ) { sb.append(attrSet.toString()); } return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/0000775001003300100330000000000010667357310024610 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/0000775001003300100330000000000010667357311026104 5ustar viveklviveklldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERChoice.java0000664001003300100330000000726310602743266030477 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Choice object. Note that this class may be * used by a client. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Encoding is the encoding of the specific type used.
 * 
* * @version 1.0 */ public class BERChoice extends BERElement { /** * Internal variables */ private BERElement m_value = null; /** * Constructs a choice element. * @param value any BERElement value */ public BERChoice(BERElement value) { m_value = value; } /** * Constructs a choice element from an input stream. * Note that with the current decoding architecture choice types * will not be decoded as choices but rather as the types * chosen. The following method will never be called. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERChoice(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { m_value = getElement(decoder, stream, bytes_read); } /** * Sends the BER encoding of the chosen type directly to a stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { m_value.write(stream); } /** * Gets the value of the chosen type. * @param element type */ public BERElement getValue() { return m_value; } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.CHOICE; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "CHOICE {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERSequence.java0000664001003300100330000000636010602743266031052 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Sequence object. A sequence object can * contains a sequence of BER Elements. *

See CCITT X.209. * *

 * ENCODING RULE:
 *  tag    = 0x30 (always constructed)
 * 
* * @version 1.0 */ public class BERSequence extends BERConstruct { /** * Constructs a sequence element. */ public BERSequence() { super(); } /** * Constructs a sequence element from an input stream. * @param decoder application-specific BER decoder * @param stream input stream from which to read BER * @param bytes_read array of 1 int; value is incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERSequence(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder, stream, bytes_read); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.SEQUENCE; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String elements = ""; for (int i = 0; i < super.size(); i++) { if (i != 0) elements = elements + ", "; elements = elements + ((BERElement)super.elementAt(i)).toString(); } return "Sequence {" + elements + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERNull.java0000664001003300100330000000651410602743266030215 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the NULL type. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   tag = 0x05
 *   length value is zero (short or long form).
 *   no contents
 *
 * Example 1:  (short form)
 *   05 00
 * Example 2:  (long form)
 *   05 81 00
 * 
* * @version 1.0 */ public class BERNull extends BERElement { /** * Constructs a NULL element. */ public BERNull() { } /** * Constructs a null element from an input stream. * @param stream input stream from socket * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERNull(InputStream stream, int[] bytes_read) throws IOException { /* The result should be zero of course */ readLengthOctets(stream,bytes_read); } /** * Sends the BER encoding directly to stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { byte[] buffer = new byte[2]; buffer[0] = (byte)BERElement.NULL; /* NULL tag */ buffer[1] = 0x00; /* length */ stream.write(buffer); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.NULL; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Null {}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERIntegral.java0000664001003300100330000001444510602743266031052 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This is the base class for integral types such as Integer and * Enumerated. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = << depends on type >>
 *   length = (short or long form)
 *   one or more contents octets hold integral value
 *   value in two's complement
 *
 * Example 1:  (Integer - zero)
 *   02 01 00
 * Example 2:  (Enumerated - 1)
 *   0A 01 01
 * Example 3:  (Integer - 300, short form)
 *   02 02 01 2C
 * Example 4:  (Integer - 300, long form)
 *   02 84 00 00 01 2C
 * 
* * @version 1.0 */ public abstract class BERIntegral extends BERElement { /** * Value of element */ private int m_value; /** * Constructs an integral type with a value. * @param value integer value */ public BERIntegral(int value) { m_value = value; } /** * Constructs an integral element from an input stream. * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERIntegral(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { boolean negative = false; int octet = stream.read(); bytes_read[0]++; if ((octet & 0x80) > 0) /* left-most bit is 1. */ negative = true; for (int i = 0; i < contents_length; i++) { if (i > 0) { octet = stream.read(); bytes_read[0]++; } if (negative) m_value = (m_value<<8) + (int)(octet^0xFF)&0xFF; else m_value = (m_value<<8) + (int)(octet&0xFF); } if (negative) /* convert to 2's complement */ m_value = (m_value + 1) * -1; } } /** * Writes BER to stream. * @param stream output stream * @exception IOException on failure to write */ public void write(OutputStream stream) throws IOException { int binary_value = m_value; int num_content_octets = 0; int total_ber_octets; int offset=1; int lead; int i; byte[] content_octets = new byte[10]; /* should be plenty big */ byte[] net_octets = new byte[10]; /* pse need this in network order */ /* Get content octets - need to determine length */ if (m_value == 0) { num_content_octets = 1; content_octets[offset] = (byte)0x00; net_octets[offset] = (byte)0x00; } else { if (m_value < 0) /* convert from 2's complement */ binary_value = (m_value * -1) -1; do { if (m_value < 0) content_octets[num_content_octets+offset] = (byte)((binary_value^0xFF)&0xFF); else content_octets[num_content_octets+offset] = (byte)(binary_value&0xFF); binary_value = (binary_value>>8); num_content_octets++; } while (binary_value > 0); /* pse 1/16/96 we've just created a string that is in non-network order flip it for net order */ for (i=0; i 0) && ((lead & 0x80) > 0)) { offset = 0; net_octets[offset] = (byte)0x00; num_content_octets++; } } stream.write(getType()); sendDefiniteLength(stream, num_content_octets); stream.write(net_octets,offset,num_content_octets); /* contents */ } /** * Gets the integral value. * @return element value. */ public int getValue() { return m_value; } /** * Gets the element type. * @return element type. */ public abstract int getType(); /** * Gets the string representation. * @return string representation of tag. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERBoolean.java0000664001003300100330000000745110602743266030663 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Boolean object. *

See CCITT X.209. * *

 * ENCODING RULE:
 *  tag    = 0x01
 *  length = 0x01
 *  one contents octet (non-zero indicates TRUE).
 *
 * Example 1:  (false)
 *   01 01 00
 * Example 2:  (true)
 *   01 01 FF
 * 
* * @version 1.0 */ public class BERBoolean extends BERElement { /** * Internal variables */ private boolean m_value = true; /** * Constructs a boolean element. * @param value boolean value */ public BERBoolean(boolean value) { m_value = value; } /** * Constructs a boolean element from an input stream. * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERBoolean(InputStream stream, int[] bytes_read) throws IOException { int octet = stream.read(); /* skip length */ bytes_read[0]++; octet = stream.read(); /* content octet */ bytes_read[0]++; if (octet > 0) m_value = true; else m_value = false; } /** * Sends the BER encoding directly to a stream. * @param stream output stream */ public void write(OutputStream stream) throws IOException { stream.write(BERElement.BOOLEAN); stream.write(0x01); if (m_value) stream.write(0xFF); /* non-zero means true. */ else stream.write(0x00); /* zero means false. */ } /** * Gets the boolean value. * @param element type */ public boolean getValue() { return m_value; } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.BOOLEAN; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Boolean {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BEREnumerated.java0000664001003300100330000000615010602743266031370 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Enumerated object. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x0a
 *   length = (short or long form)
 *   one or more contents octets hold integral value
 *   value in two's complement
 *
 * Example:  (Enumerated - 1)
 *   0A 01 01
 * 
* * @version 1.0 */ public class BEREnumerated extends BERIntegral { /** * Constructs an enumerated element with a value. * @param value integral value */ public BEREnumerated(int value) { super(value); } /** * Constructs an enumerated element with the input stream. * @param stream input stream from which to decode * @param bytes_read array of 1 int; value incremented by * number of bytes read from array * @exception IOException failed to construct */ public BEREnumerated(InputStream stream, int[] bytes_read) throws IOException { super(stream, bytes_read); } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.ENUMERATED; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Enumerated {" + getValue() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERElement.java0000664001003300100330000003071710602743266030676 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the tagged object type. A nested tag is * allowed. A tagged element contains another BER element. *

See CCITT X.209. * * @version 1.0 */ public abstract class BERElement implements Serializable { /** * Possible element types. */ public final static int BOOLEAN = 0x01; public final static int INTEGER = 0x02; public final static int BITSTRING = 0x03; public final static int OCTETSTRING = 0x04; public final static int NULL = 0x05; public final static int OBJECTID = 0x06; public final static int REAL = 0x09; public final static int ENUMERATED = 0x0a; public final static int SET = 0x31; /* always constructed */ public final static int SEQUENCE = 0x30; /* always constructed */ public final static int NUMERICSTRING = 0x12; public final static int PRINTABLESTRING = 0x13; public final static int TELETEXSTRING = 0x14; public final static int VIDEOTEXSTRING = 0x15; public final static int IA5STRING = 0x16; public final static int UTCTIME = 0x17; public final static int GRAPHICSTRING = 0x19; public final static int VISIBLESTRING = 0x1A; public final static int GENERALSTRING = 0x1B; /** * Internal (non-transmitted) tags. */ public final static int TAG = -1; public final static int CHOICE = -2; public final static int ANY = -3; /** * Possible tags. */ public final static int EOC = 0x00; /* End Of Construction */ public final static int UNIVERSAL = 0x00; public final static int APPLICATION = 0x40; public final static int CONTEXT = 0x80; public final static int SASLCONTEXT = 0xa0; public final static int PRIVATE = 0xC0; public final static int PRIMITIVE = 0x00; public final static int CONSTRUCTED = 0x20; public final static int MRA_OID = 0x01; public final static int MRA_TYPE = 0x02; public final static int MRA_VALUE = 0x03; public final static int MRA_DNATTRS = 0x04; public final static int EXOP_REQ_OID = 0x00; public final static int EXOP_REQ_VALUE = 0x01; public final static int EXOP_RES_OID = 0x0a; public final static int EXOP_RES_VALUE = 0x0b; public final static int SK_MATCHRULE = 0x00; public final static int SK_REVERSE = 0x01; public final static int SR_ATTRTYPE = 0x00; /** * Gets a ber element from the input stream. * @param decoder decoder for application specific BER * @param stream source of ber encoding * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to decode an element. */ public static BERElement getElement(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { BERElement element = null; int tag = stream.read(); bytes_read[0] = 1; if (tag == EOC) { stream.read(); /* length octet (always zero) */ bytes_read[0] = 1; element = null; } else if (tag == BOOLEAN) { element = new BERBoolean(stream, bytes_read); } else if (tag == INTEGER) { element = new BERInteger(stream, bytes_read); } else if (tag == BITSTRING) { element = new BERBitString(stream, bytes_read); } else if (tag == (BITSTRING | CONSTRUCTED)) { element = new BERBitString(decoder, stream, bytes_read); } else if (tag == OCTETSTRING) { element = new BEROctetString(stream, bytes_read); } else if (tag == (OCTETSTRING | CONSTRUCTED)) { element = new BEROctetString(decoder, stream, bytes_read); } else if (tag == NULL) { element = new BERNull(stream, bytes_read); } else if (tag == OBJECTID) { element = new BERObjectId(stream, bytes_read); } else if (tag == REAL) { element = new BERReal(stream, bytes_read); } else if (tag == ENUMERATED) { element = new BEREnumerated(stream, bytes_read); } else if (tag == SEQUENCE) { element = new BERSequence(decoder, stream, bytes_read); } else if (tag == SET) { element = new BERSet(decoder, stream, bytes_read); } else if (tag == NUMERICSTRING) { element = new BERNumericString(stream, bytes_read); } else if (tag == (NUMERICSTRING | CONSTRUCTED)) { element = new BERNumericString(decoder, stream, bytes_read); } else if (tag == PRINTABLESTRING) { element = new BERPrintableString(stream, bytes_read); } else if (tag == (PRINTABLESTRING | CONSTRUCTED)) { element = new BERPrintableString(decoder, stream, bytes_read); } else if (tag == UTCTIME) { element = new BERUTCTime(stream, bytes_read); } else if (tag == (UTCTIME | CONSTRUCTED)) { element = new BERUTCTime(decoder, stream, bytes_read); } else if (tag == VISIBLESTRING) { element = new BERVisibleString(stream, bytes_read); } else if (tag == (VISIBLESTRING | CONSTRUCTED)) { element = new BERVisibleString(decoder, stream, bytes_read); } else if ((tag & (APPLICATION | PRIVATE | CONTEXT)) > 0) { element = new BERTag(decoder, tag, stream, bytes_read); } else throw new IOException("invalid tag " + tag); return element; } /** * Reads and decodes a length byte and then that many octets * from the input stream. * @param stream input stream from which to read * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @return length of contents or -1 if indefinite length. * @exception IOException failed to read octets */ public static int readLengthOctets(InputStream stream, int[] bytes_read) throws IOException { int contents_length = 0; int octet = stream.read(); bytes_read[0]++; if (octet == 0x80) /* Indefinite length */ contents_length = -1; else if ((octet & 0x80) > 0) { /* Definite (long form) - num octets encoded in 7 rightmost bits */ int num_length_octets = (octet & 0x7F); for (int i = 0; i < num_length_octets; i++) { octet = stream.read(); bytes_read[0]++; contents_length = (contents_length<<8) + octet; } } else { /* Definite (short form) - one length octet. Value encoded in */ /* 7 rightmost bits. */ contents_length = octet; } return contents_length; } /** * Writes length octets (definite length only) to stream. * Uses shortform whenever possible. * @param stream output stream to write to * @param num_content_octets value to be encode into length octets * @return number of bytes sent to stream. * @exception IOException failed to read octets */ public static void sendDefiniteLength(OutputStream stream, int num_content_octets) throws IOException { int bytes_written = 0; if (num_content_octets <= 127) { /* Use short form */ stream.write(num_content_octets); } else { /* Using long form: * Need to determine how many octets are required to * encode the length. */ int num_length_octets = 0; int num = num_content_octets; while (num >= 0) { num_length_octets++; num = (num>>8); if (num <= 0) break; } byte[] buffer = new byte[num_length_octets+1]; buffer[0] = (byte)(0x80 | num_length_octets); num = num_content_octets; for (int i = num_length_octets; i > 0; i--) { buffer[i] = (byte)(num & 0xFF); num = (num>>8); } stream.write(buffer); } } /** * Reads a number of bytes from an input stream and form * an integer.. * @param stream source of data * @param bytes_read number of bytes read * @param length number of bytes to be read (1 to 4) * @return the value of the data as two's complement. * @exception IOException failed to read octets */ protected int readUnsignedBinary(InputStream stream, int[] bytes_read, int length) throws IOException { int value = 0; int octet; for (int i = 0; i < length; i++) { octet = stream.read(); bytes_read[0]++; value = (value<<8) + octet; } return value; } /** * Reads the two's complement representation of an integer from * an input stream. * @param stream source of data * @param bytes_read number of bytes read * @param length number of bytes to be read * @return the integer value as two's complement. * @exception IOException failed to read octets */ protected int readTwosComplement(InputStream stream, int[] bytes_read, int length) throws IOException { int value = 0; if (length > 0) { boolean negative = false; int octet = stream.read(); bytes_read[0]++; if ((octet & 0x80) > 0) /* left-most bit is 1. */ negative = true; for (int i = 0; i < length; i++) { if (i > 0) { octet = stream.read(); bytes_read[0]++; } if (negative) value = (value<<8) + (int)(octet^0xFF)&0xFF; else value = (value<<8) + (int)(octet&0xFF); } if (negative) /* convert to 2's complement */ value = (value + 1) * -1; } return value; } /** * Converts byte to hex string. * @param value byte value * @return string representation of Hex String */ public String byteToHexString(byte value) { if (value < 0) return Integer.toHexString((value & 0x7F) + 128); else return Integer.toHexString(value); } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @return bytes written to stream. */ public abstract void write(OutputStream stream) throws IOException; /** * Gets the element type. * @return element type. */ public abstract int getType(); /** * Gets the string representation. * @return string representation of an element. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERTagDecoder.java0000664001003300100330000000533310602743266031302 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This is an abstract class which should be extended * for use by the BERTag class in decoding application * specific BER tags. Since different applications may * define their own tag, the BER package needs a tag decoder * to give hints on how to decode implicitly tagged * objects. Each application should extend this * decoder. * * @version 1.0 */ public abstract class BERTagDecoder { /** * Gets an application specific ber element from an input stream. * @param decoder an instance of a BERTagDecoder * @param tag element tag * @param stream source stream * @param bytes_read array of 1 int; value incremented by number * of bytes read from stream * @param implicit array of implicit flags */ public abstract BERElement getElement(BERTagDecoder decoder, int tag, InputStream stream, int[] bytes_read, boolean[] implicit) throws IOException; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERReal.java0000664001003300100330000001765310602743266030174 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Real object. *

See CCITT X.209. * *

 * ENCODING RULE:
 *  tag    = 0x09
 * 
* * @version 1.0 */ public class BERReal extends BERElement { /** * Constants: special ASN.1 real values */ public final static float PLUS_INFINITY = 1.0f/0.0f; public final static float MINUS_INFINITY = -1.0f/0.0f; /** * Value of element */ private float m_value = 0; /** * Constructs a real element with a value * @param value float value */ public BERReal(float value) { m_value = value; } /** * Constructs a real element from an input stream. * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream. * @exception IOException failed to construct */ public BERReal(InputStream stream, int[] bytes_read) throws IOException { int length = super.readLengthOctets(stream, bytes_read); if (length == 0) /* zero length indicates value is zero */ m_value = 0; else { int octet = stream.read(); /* first content octet */ bytes_read[0]++; if (octet == 0x40) /* bit 8 = 1 */ m_value = PLUS_INFINITY; else if (octet == 0x41) /* bit 8 = 1 and bit 1 = 1 */ m_value = MINUS_INFINITY; else if ((octet & 0x80) > 0) { /* bit 8 = 1 */ /* Binary encoding */ /* M = S*N*2F where S = -1 or 1, 0<= F <= 3. */ int sign; int base; int number; int f; /* binary scaling factor */ int exponent; int mantissa; int num_exponent_octets; int contents_length_left; if ((octet & 0x40) > 0) sign = -1; else sign = 1; if ((octet & 0x20) > 0) { if ((octet & 0x10) > 0) { /* bits 6+5 = 11 */ /* reserved for future use */ base = 0; } else { /* bits 6+5 = 10 */ base = 16; } } else if ((octet & 0x10) > 0) { /* bits 6+5 = 01 */ base = 8; } else { /* bits 6+5 = 00 */ base = 2; } if ((octet & 0x08) > 0) { if ((octet & 0x04) > 0) { /* bits 4+3 = 11 */ f = 3; } else { /* bits 4+3 = 10 */ f = 2; } } else if ((octet & 0x04) > 0) { /* bits 4+3 = 01 */ f = 1; } else { /* bits 4+3 = 00 */ f = 0; } if ((octet & 0x02) > 0) { if ((octet & 0x01) > 0) { /* bits 2+1 = 11 */ /* Following octet encodes the number of octets used to * encode the exponent. */ num_exponent_octets = stream.read(); bytes_read[0]++; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } else { /* bits 2+1 = 10 */ num_exponent_octets = 3; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } } else if ((octet & 0x01) > 0) { /* bits 2+1 = 01 */ num_exponent_octets = 2; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } else { /* bits 2+1 = 00 */ num_exponent_octets = 1; exponent = readTwosComplement(stream,bytes_read,num_exponent_octets); } contents_length_left = length - 1 - num_exponent_octets; number = readUnsignedBinary(stream, bytes_read, contents_length_left); mantissa = (int)(sign * number * Math.pow(2, f)); m_value = mantissa * (float)Math.pow((double)base,(double)exponent); } else { /* bits 8 + 7 = 00 */ /* ISO 6093 field */ /*** NOTE: It has been agreed that this feature will * not be provided right now. */ throw new IOException("real ISO6093 not supported. "); } } } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { if (m_value == 0) { stream.write(BERElement.REAL); stream.write(0x00); /* length */ } else if (m_value == PLUS_INFINITY) { stream.write(BERElement.REAL); stream.write(0x01); /* length */ stream.write(0x40); /* contents */ } else if (m_value == MINUS_INFINITY) { stream.write(BERElement.REAL); stream.write(0x01); /* length */ stream.write(0x41); /* contents */ } else { /* Non-special real value */ /* NOTE: currently always sends as a base 2 binary encoding * (see X.2 09 section 10.5.) * * M = S * N * 2F * * Simple encoding always uses F = 1. */ // bcm - incomplete. } } /** * Gets the element type. * @return element type */ public int getType() { return BERElement.REAL; } /** * Gets the string representation. * @return string representation of tag */ public String toString() { return "Real {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERPrintableString.java0000664001003300100330000000745610602743266032420 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the PrintableString type. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x13
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 */ public class BERPrintableString extends BERCharacterString { /** * Constructs a printable string element containing buffer. * @param buffer string value */ public BERPrintableString(String string) { m_value = string; } /** * Constructs a printables tring element from buffer. * @param buffer byte array value */ public BERPrintableString(byte[] buffer) { super(buffer); } /** * Constructs a printable string element from an input stream * (for constructed encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERPrintableString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder,stream,bytes_read); } /** * Constructs a printablestring element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERPrintableString(InputStream stream, int[] bytes_read) throws IOException { super(stream,bytes_read); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.PRINTABLESTRING; } /** * Gets the string representation. Note that it prints out * values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "PrintableString (null)"; else return "PrintableString {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERNumericString.java0000664001003300100330000000747110602743266032077 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the NumericString type. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x12
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 */ public class BERNumericString extends BERCharacterString { /** * Constructs a numeric string element from a string * @param buffer string with value of element */ public BERNumericString(String string) { m_value = string; } /** * Constructs a numeric string element from a byte array * @param buffer buffer */ public BERNumericString(byte[] buffer) { super(buffer); } /** * Constructs a numeric string element from an input stream * (for constructed encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERNumericString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder,stream,bytes_read); } /** * Constructs a numericstring element from an input stream * (for primitive encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERNumericString(InputStream stream, int[] bytes_read) throws IOException { super(stream,bytes_read); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.NUMERICSTRING; } /** * Gets the string representation. Note that currently prints out * values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "NumericString (null)"; else return "NumericString {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERCharacterString.java0000664001003300100330000001524210602743266032364 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This is an abstract base class for character string types. * * @version 1.0 */ public abstract class BERCharacterString extends BERElement { /** * Internal variables */ protected String m_value = null; /** * Constructs a character string element containing a buffer. */ public BERCharacterString() { } /** * Constructs a character string element containing buffer. * @param buffer a string value */ public BERCharacterString(String string) { m_value = string; } /** * Constructs a character string element from a byte array. * @param buffer buffer containing UTF8 data */ public BERCharacterString(byte[] buffer) { try{ m_value = new String(buffer,"UTF8"); } catch(Throwable x) {} } /** * Constructs a character string element from an input stream * (for constructed encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERCharacterString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; if (contents_length == -1) { /* Constructed - indefinite length content octets. */ do { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a string of same type * - add it to the existing buffer */ BERCharacterString octet_element = (BERCharacterString)element; String string_buffer = octet_element.getValue(); if (m_value == null) { m_value = string_buffer; } else { m_value = m_value + string_buffer; } } } while (element != null); } else { /* Definite length content octets string. */ bytes_read[0] += contents_length; while (contents_length > 0) { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a string of the same type * - add it to the existing buffer */ BERCharacterString octet_element = (BERCharacterString)element; String string_buffer = octet_element.getValue(); if (m_value == null) { m_value = string_buffer; } else { m_value = m_value + string_buffer; } } contents_length -= component_length[0]; } } } /** * Constructs a character string element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERCharacterString(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { byte[] buffer = new byte[contents_length]; for (int i = 0; i < contents_length; i++) { buffer[i] = (byte) stream.read(); } bytes_read[0] += contents_length; try { m_value = new String(buffer,"UTF8"); } catch(Throwable x) {} } } private byte[] byte_buf; /** * Writes BER to stream. * @param stream output stream */ public void write(OutputStream stream) throws IOException { stream.write(getType()); /* tag */ if (m_value == null) { sendDefiniteLength(stream, 0); } else { try { byte_buf = m_value.getBytes("UTF8"); sendDefiniteLength(stream, byte_buf.length); /* length */ } catch(Throwable x) {} stream.write(byte_buf,0,byte_buf.length); /* contents */ } } /** * Gets the element value. * @param element value */ public String getValue() { return m_value; } /** * Gets the element type. * @param element type */ public abstract int getType(); /** * Gets the string representation. * @return string representation. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERInteger.java0000664001003300100330000000624210602743266030676 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Integer object. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x02
 *   length = (short or long form)
 *   one or more contents octets hold integer
 *   value in two's complement
 *
 * Example 1:  (zero)
 *   02 01 00
 * Example 2:  (1)
 *   02 01 01
 * Example 3:  (300 - short form)
 *   02 02 01 2C
 * Example 4:  (300 - long form)
 *   02 84 00 00 01 2C
 * 
* * @version 1.0 */ public class BERInteger extends BERIntegral { /** * Constructs a integer element. * @param value integer value */ public BERInteger(int value) { super(value); } /** * Constructs an integer element with the input stream. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERInteger(InputStream stream, int[] bytes_read) throws IOException { super(stream, bytes_read); } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.INTEGER; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "Integer {" + getValue() + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERTag.java0000664001003300100330000001326510602743266030017 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the tagged object type. A nested tag is * allowed. A tagged element contains another * ber element. *

See CCITT X.209. * *

 * ENCODING RULE:
 *  tag    = whatever it is constructed with
 * 
* * @version 1.0 */ public class BERTag extends BERElement { /** * Value of tag */ private int m_tag = 0; /** * Value of element */ private BERElement m_element = null; /** * Implicit or not */ private boolean m_implicit = false; /** * Constructs a tag element. * @param tag tag value * @param element ber element * @param implicit tagged implicitly */ public BERTag(int tag, BERElement element, boolean implicit) { m_tag = tag; m_element = element; m_implicit = implicit; } /** * Constructs a tag element from an input stream. * @param decoder decoder object for application-specific tags * @param tag tag value; already stripped from stream * @param stream source * @param bytes_read array of 1 int; incremented by number * of bytes read from stream * @exception IOException failed to construct */ public BERTag(BERTagDecoder decoder, int tag, InputStream stream, int[] bytes_read) throws IOException { m_tag = tag; boolean[] implicit = new boolean[1]; /* * Need to use user callback to decode contents of * a non-universal tagged value. */ m_element = decoder.getElement(decoder, tag, stream, bytes_read, implicit); m_implicit = implicit[0]; } /** * Gets the element from the tagged object. * @return BER element. */ public BERElement getValue() { return m_element; } /** * Sets the implicit tag. If it is an implicit tag, * the next element tag can be omitted (it will * not be sent to a stream or buffer). * @param value implicit flag */ public void setImplicit(boolean value) { m_implicit = value; } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to send */ public void write(OutputStream stream) throws IOException { stream.write(m_tag); /* bcm - assuming tag is one byte */ ByteArrayOutputStream contents_stream = new ByteArrayOutputStream(); m_element.write(contents_stream); byte[] contents_buffer = contents_stream.toByteArray(); if (m_implicit) { /* Assumes tag is only one byte. Rest of buffer is */ /* length and contents of tagged element. */ stream.write(contents_buffer, 1, contents_buffer.length -1); } else { /* Send length */ sendDefiniteLength(stream, contents_buffer.length); /* Send contents */ stream.write(contents_buffer); } } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.TAG; } /** * Gets the element tag. * @return element tag. */ public int getTag() { return m_tag; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String s = ""; if ((m_tag & 0xC0) == 0) /* bits 8 + 7 are zeros */ s = s + "UNIVERSAL-"; else if (((m_tag & 0x80) & (m_tag & 0x40)) > 0) /* bits 8 + 7 are ones */ s = s + "PRIVATE-"; else if ((m_tag & 0x40) > 0) /* bit 8 is zero, bit 7 is one */ s = s + "APPLICATION-"; else if ((m_tag & 0x80) > 0) /* bit 8 is one, bit 7 is zero */ s = s + "CONTEXT-"; return "[" + s + (m_tag&0x1f) + "] " + m_element.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERUTCTime.java0000664001003300100330000001423610602743266030555 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the UTCTime object. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x17
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 */ public class BERUTCTime extends BERElement { /** * Internal variables */ private String m_value = null; /** * Constructs a UTC time element containing the specified string. * @param utc_string string in UTC time format */ public BERUTCTime(String utc_string) { m_value = utc_string; } /** * Constructs a UTCTime element from an input stream * (for constructed encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERUTCTime(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; m_value = ""; if (contents_length == -1) { /* Constructed - indefinite length content octets. */ { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is an octetstring - add it to the existing buffer */ BERUTCTime utc_element = (BERUTCTime)element; m_value += utc_element.getValue(); } } while (element != null); } else { /* Definite length content octets string. */ bytes_read[0] += contents_length; while (contents_length > 0) { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is an octetstring - add it to the existing buffer */ BERUTCTime utc_element = (BERUTCTime)element; m_value += utc_element.getValue(); } contents_length -= component_length[0]; } } } /** * Constructs a UTC time element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERUTCTime(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { byte[] byte_buf = new byte[contents_length]; for (int i = 0; i < contents_length; i++) { byte_buf[i] = (byte) stream.read(); } bytes_read[0] += contents_length; try{ m_value = new String(byte_buf, "UTF8"); } catch(Throwable x) {} } } /** * Writes BER to a stream. * @return number of bytes written to stream. * @exception IOException failed to write */ private byte[] byte_buf; public void write(OutputStream stream) throws IOException { stream.write((byte)getType()); if (m_value == null) { sendDefiniteLength(stream, 0); } else { try{ byte_buf = m_value.getBytes("UTF8"); sendDefiniteLength(stream, byte_buf.length); /* length */ } catch(Throwable x) {} stream.write(byte_buf,0,byte_buf.length); /* contents */ } } /** * Gets the element value. * @param element value */ public String getValue() { return m_value; } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.UTCTIME; } /** * Gets the string representation. * NOTE: currently prints out values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "UTCTime (null)"; else return "UTCTime {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERVisibleString.java0000664001003300100330000000741010602743266032063 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the VisibleString object. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x1A
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 */ public class BERVisibleString extends BERCharacterString { /** * Constructs a visiblestring element. * @param string string */ public BERVisibleString(String string) { m_value = string; } /** * Constructs a visiblestring element from buffer. * @param buffer buffer */ public BERVisibleString(byte[] buffer) { super(buffer); } /** * Constructs a visiblestring element with the input stream. * (for constructed encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERVisibleString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder,stream,bytes_read); } /** * Constructs a visiblestring element with the input stream. * (for primitive encoding) * @param stream input stream * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BERVisibleString(InputStream stream, int[] bytes_read) throws IOException { super(stream,bytes_read); } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.VISIBLESTRING; } /** * Gets the string representation. Note that currently prints out * values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "VisibleString (null)"; return "VisibleString {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERConstruct.java0000664001003300100330000001165410602743266031270 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This abstract class serves as a base class for constructed * types such as sequence or set. *

See CCITT X.209. * * @version 1.0 */ public abstract class BERConstruct extends BERElement { /** * List of BER elements in the construct. */ private Vector m_elements = new Vector(); /** * Constructs a construct element. */ public BERConstruct() { } /** * Constructs a construct element from an input stream. * @param decoder decoder for application specific BER * @param stream input stream from socket * @param bytes_read array of 1 int; value incremented by number * of bytes read from stream * @exception IOException failed to construct */ public BERConstruct(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream,bytes_read); int[] component_length = new int[1]; if (contents_length == -1) { /* Constructed - indefinite length */ BERElement element = null; { component_length[0] = 0; element = getElement(decoder, stream, component_length); if (element != null) addElement(element); } while (element != null); } else { /* Constructed - definite length */ bytes_read[0] += contents_length; while (contents_length > 0) { component_length[0] = 0; addElement(getElement(decoder, stream,component_length)); contents_length -= component_length[0]; } } } /** * Adds an element to the list. * @return BER encoding of the element. */ public void addElement(BERElement element) { m_elements.addElement(element); } /** * Retrieves number of elements. * @return number of elements. */ public int size() { return m_elements.size(); } /** * Gets ber element at specific position. * @param index index of the element to get * @return BER element. */ public BERElement elementAt(int index) { return (BERElement)m_elements.elementAt(index); } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to send */ public void write(OutputStream stream) throws IOException { stream.write(getType()); ByteArrayOutputStream contents_stream = new ByteArrayOutputStream(); for (int i = 0; i < m_elements.size(); i++) { BERElement e = elementAt(i); e.write(contents_stream); } byte[] contents_buffer = contents_stream.toByteArray(); sendDefiniteLength(stream, contents_buffer.length); stream.write(contents_buffer); } /** * Gets the element type. * @param element type */ public abstract int getType(); /** * Gets the string representation. * @return string representation of tag. */ public abstract String toString(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BEROctetString.java0000664001003300100330000001660110602743266031546 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the OctetString type. *

See CCITT X.209. * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x04
 *   length = (short or long form)
 *   one or more contents octets
 * 
* * @version 1.0 */ public class BEROctetString extends BERElement { /** * Raw value of element */ private byte[] m_value = null; /** * Constructs an octet string element containing a copy of * the contents of buffer. * @param buffer a UCS-2 String */ public BEROctetString(String buffer) { if (buffer == null) return; try { m_value = buffer.getBytes( "UTF8" ); } catch (Throwable xxx){}; } /** * Constructs an octet string element containing a reference to * buffer. * @param buffer a byte array, which must be in UTF-8 format if * it is string data */ public BEROctetString(byte[] buffer) { m_value = buffer; } /** * Constructs an octet string element containing a * subset of buffer. * @param buffer buffer containing 'octets' * @param start start of buffer range to copy * @param end end of buffer range to copy */ public BEROctetString(byte[] buffer, int start, int end) { m_value = new byte[end - start]; for (int i = 0; i < end - start; i++) m_value[i] = buffer[start + i]; } /** * Constructs an octet string element from an input stream * (for constructed encoding) * @param decoder a decode that understands the specific tags * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BEROctetString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; if (contents_length == -1) { /* Constructed - indefinite length content octets. */ do { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is an octetstring - add it to the existing buffer */ BEROctetString octet_element = (BEROctetString)element; byte[] octet_buffer = octet_element.getValue(); if (m_value == null) { m_value = new byte[octet_buffer.length]; System.arraycopy(octet_buffer,0, m_value,0,octet_buffer.length); } else { byte[] new_buffer = new byte[m_value.length + octet_buffer.length]; System.arraycopy(m_value,0,new_buffer,0,m_value.length); System.arraycopy(octet_buffer,0, new_buffer,m_value.length, octet_buffer.length); m_value = new_buffer; } } } while (element != null); } else { /* Definite length content octets string. */ bytes_read[0] += contents_length; m_value = new byte[contents_length]; stream.read(m_value, 0, contents_length); } } /** * Constructs an octet string element from an input stream * (for primitive encoding) * @param stream source * @param bytes_read array of 1 int, incremented by number of bytes read * @exception IOException failed to construct */ public BEROctetString(InputStream stream, int[] bytes_read) throws IOException { int contents_length = super.readLengthOctets(stream, bytes_read); /* Definite length content octets string. */ if (contents_length > 0) { m_value = new byte[contents_length]; for (int i = 0; i < contents_length; i++) { m_value[i] = (byte) stream.read(); } bytes_read[0] += contents_length; } } /** * Writes BER to stream * @return number of bytes written to stream. * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { stream.write((byte)BERElement.OCTETSTRING); /* OCTETSTRING tag */ if (m_value == null) { sendDefiniteLength(stream, 0); } else { sendDefiniteLength(stream, m_value.length); /* length */ stream.write(m_value,0,m_value.length); /* contents */ } } /** * Gets the element value. * @param element value */ public byte[] getValue() { return m_value; } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.OCTETSTRING; } /** * Gets the string representation. * NOTE: currently prints out values in decimal form. * @return string representation of tag. */ public String toString() { if (m_value == null) return "OctetString (null)"; String octets = ""; for (int i = 0; i < m_value.length; i++) { if (i != 0) octets = octets + " "; octets = octets + byteToHexString(m_value[i]); } return "OctetString {" + octets + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERSet.java0000664001003300100330000000670010602743266030033 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the Set object. A set object can contain * a set of BER elements. *

See CCITT X.209. * *

 * ENCODING RULE:
 *  tag    = 0x31 (always constructed)
 * 
* * @version 1.0 */ public class BERSet extends BERConstruct { /** * Constructs a set element. * @exception failed to construct */ public BERSet() throws IOException { } /** * Constructs a set element from an input stream. * @param decoder decoder for application-specific BER * @param stream source * @param bytes_read array of 1 int; value incremented by number * of bytes read from stream * @exception IOException failed to construct */ public BERSet(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { super(decoder, stream,bytes_read); } /** * Sends the BER encoding directly to a stream. * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { super.write(stream); } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.SET; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String elements = ""; for (int i = 0; i < super.size(); i++) { if (i != 0) elements = elements + ", "; elements = elements + ((BERElement)super.elementAt(i)).toString(); } return "Set {" + elements + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERObjectId.java0000664001003300100330000001571310602743266030767 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.util.StringTokenizer; import java.io.*; /** * This class is for the Object ID object. *

See CCITT X.209. * * @version 1.0 */ public class BERObjectId extends BERElement { /** * Values of each component of the OID */ private int[] m_value = null; /** * Constructs an object ID element from an array of values. * @param value object ID value as array of components */ public BERObjectId(int[] value) { m_value = new int[value.length]; System.arraycopy(value,0,m_value,0,value.length); } /** * Constructs an object id element from a string. * @param value object id value in format "2.100.3" */ public BERObjectId(String value) { StringTokenizer tokenizer = new StringTokenizer(value, "."); m_value = new int[tokenizer.countTokens()]; for (int i=0; i 0) { contents_read[0] = 0; sub_id = readSubIdentifier(stream, contents_read); contents_length -= contents_read[0]; oid.addElement(new Integer(sub_id)); } m_value = new int[oid.size()]; for (int i = 0; i= 2 identifier components (values). * @param stream output stream * @exception IOException failed to write */ public void write(OutputStream stream) throws IOException { stream.write(BERElement.OBJECTID); ByteArrayOutputStream contents_stream = new ByteArrayOutputStream(); /* first subidentifier packs two component values */ writeSubIdentifier(contents_stream,m_value[0]*40 + m_value[1]); for (int i = 2; i < m_value.length; i++) { writeSubIdentifier(contents_stream,m_value[i]); } byte[] contents_buffer = contents_stream.toByteArray(); sendDefiniteLength(stream, contents_buffer.length); stream.write(contents_buffer); } /** * Reads a sub identifier from stream. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream */ private int readSubIdentifier(InputStream stream, int[] bytes_read) throws IOException { int octet; int sub_id = 0; do { octet = stream.read(); bytes_read[0]++; sub_id = (sub_id << 7) | (octet & 0x7F); } while ((octet & 0x80) > 0); return sub_id; } /** * Sends the BER encoding of a sub identifier directly to stream. * @param stream output stream * @param value sub-identifier value */ private void writeSubIdentifier(OutputStream stream, int value) throws IOException { ByteArrayOutputStream sub_id_stream = new ByteArrayOutputStream(); /* gather octets in reverse order */ while (value > 0) { sub_id_stream.write(value & 0x7F); value = value >> 7; } byte[] sub_id_buffer = sub_id_stream.toByteArray(); for (int i=sub_id_buffer.length-1; i>0; i--) { /* all but last octet have bit 8 = 1 */ stream.write(sub_id_buffer[i] | 0x80); } stream.write(sub_id_buffer[0]); /* last octet has bit 8 = 0 */ } /** * Gets the element value. * @return element value. */ public int[] getValue() { return m_value; } /** * Gets the element type. * @return element type. */ public int getType() { return BERElement.OBJECTID; } /** * Gets the string representation. * @return string representation of element. */ public String toString() { if (m_value == null) return "ObjectIdentifier (null)"; String oid = ""; for (int i = 0; i < m_value.length; i++) { if (i != 0) oid = oid + " "; oid = oid + m_value[i]; } return "ObjectIdentifier {" + oid + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERAny.java0000664001003300100330000000676010602743265030034 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.io.*; /** * This class is for the "any" object that is unknown to the * BER package but conforms to BER rules. *

See CCITT X.209. * * *

 * Encoding Rule:
 *   The encoding is that of the particular implementation.
 * 
* * @version 1.0 */ public class BERAny extends BERElement { /** * Internal variables */ private BERElement m_value = null; /** * Constructs an "any" element. * @param value BERElement value */ public BERAny(BERElement value) { m_value = value; } /** * Constructs an "any" element from an input stream. * Note that with the current decoding architecture "any" types * will not be decoded as any's but rather as the particular * implementation. The following method will never be called. * @param stream input stream * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERAny(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { m_value = getElement(decoder, stream, bytes_read); } /** * Sends the BER encoding directly to an output stream. * @param stream output stream */ public void write(OutputStream stream) throws IOException { m_value.write(stream); } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.ANY; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { return "ANY {" + m_value + "}"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/ber/stream/BERBitString.java0000664001003300100330000002371410602743266031211 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap.ber.stream; import java.util.*; import java.util.BitSet; import java.io.*; /** * This class is for the BitString object. Note that the BitSet class * has a bug: size() returns the size of the internal allocated memory * rather than the number of bits. Current work-around is to maintain * the number of bits ourselves in m_value_num_bits. * Change is required when BitSet is fixed. *

See CCITT X.209. * * *

 * ENCODING RULE:
 *   Primitive Definite length.
 *   tag = 0x03
 * 
* * @version 1.0 */ public class BERBitString extends BERElement { /** * Internal variables */ private BitSet m_value; private int m_value_num_bits; /** * Constructs a boolean element. * @param value boolean value */ public BERBitString(BitSet value) { m_value = value; } /** * Constructs a bitstring element from an input stream * (for constructed encodings). * @param stream source * @param bytes_read array of 1 int; value incremented by * number of bytes read from stream * @exception IOException failed to construct */ public BERBitString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException { int octet; int contents_length = super.readLengthOctets(stream, bytes_read); int[] component_length = new int[1]; BERElement element = null; if (contents_length == -1) { /* Constructed - indefinite length. */ { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a bitstring - add it to the existing BitSet */ BERBitString bit_string_element = (BERBitString)element; BitSet new_bit_set = new BitSet(m_value_num_bits + bit_string_element.getSize()); for (int i = 0; i 0) { component_length[0] = 0; element = getElement(decoder,stream,component_length); if (element != null) { /* element is a bitstring - add it to the existing BitSet */ BERBitString bit_string_element = (BERBitString)element; BitSet new_bit_set = new BitSet(m_value_num_bits + bit_string_element.getSize()); for (int i = 0; i 0) { m_value.set(bit_num); } else m_value.clear(bit_num); bit_num++; mask = mask / 2; } } octet = stream.read(); /* last content octet */ int mask = 0x80; for (int j = 0; j < 8-last_unused_bits; j++) { if ((octet & mask) > 0) m_value.set(bit_num); else m_value.clear(bit_num); bit_num++; mask = mask / 2; } bytes_read[0] += contents_length; } /** * Sends the BER encoding directly to a stream. * Always sends in primitive form. * @param stream output stream */ public void write(OutputStream stream) throws IOException { stream.write(BERElement.BITSTRING); //int num_bits = m_value.size(); /* number of bits to send */ int num_bits = m_value_num_bits; /* Number of bits unused int the last contents octet */ int last_unused_bits = 8 - (num_bits % 8); /* Figure out the number of content octets */ int num_content_octets = (int)(num_bits/8) + 1; if (last_unused_bits > 0) num_content_octets += 1; stream.write(num_content_octets); /* length octet */ stream.write(last_unused_bits); /* first content octet */ for (int i = 0; i < (int)(num_bits/8); i++) { int new_octet = 0; int bit = 0x80; for (int j = 0; j < 8; j++) { if (m_value.get(i*8+j)) new_octet += bit; bit = bit/2; } stream.write(new_octet); } /* * Last octet may not use all bits. If last octet DOES use all * bits then it has already been written above. */ if (last_unused_bits > 0) { int new_octet = 0; int bit = 0x80; for (int j = 0; j < last_unused_bits; j++) { if (m_value.get(((int)(num_bits/8))*8+j)) new_octet += bit; bit = bit/2; } stream.write(new_octet); } } /** * Gets the bitstring value. * @param element type */ public BitSet getValue() { return m_value; } /** * Gets the number of bits. * @return bit numbers. */ public int getSize() { return m_value_num_bits; } /** * Gets the element type. * @param element type */ public int getType() { return BERElement.BITSTRING; } /** * Gets the string representation. * @return string representation of tag. */ public String toString() { String hex_string = ""; int octet; //int num_bits = m_value.size(); int num_bits = m_value_num_bits; for (int i = 0; i < (int)(num_bits/8); i++) { octet = 0; int bit = 0x80; for (int j = 0; j < 8; j++) { if (m_value.get(i*8+j)) octet += bit; bit = bit/2; } hex_string += " " + (byte)octet; } int bit = 0x80; octet = 0; for (int k = 0; k < num_bits-(int)(num_bits/8); k++) { if (m_value.get(((int)(num_bits/8))*8+k)) octet += bit; bit = bit/2; } hex_string += " " + (byte)octet; return "Bitstring {" + hex_string + " }"; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSearchConstraints.java0000664001003300100330000002601710602743265031004 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * Represents a set of search preferences. * You can set these preferences for a particular search * by creating an LDAPSearchConstraints object, * specifying your preferences, and passing the object to * the LDAPConnection.search method. *

* * @version 1.0 */ public class LDAPSearchConstraints extends LDAPConstraints { private int deref; private int maxRes; private int batch; private int serverTimeLimit; private int maxBacklog = 100; /** * Constructs an object with the default set of search constraints */ public LDAPSearchConstraints() { super(); deref = 0; maxRes = 1000; batch = 1; serverTimeLimit = 0; } /** * Constructs an object with the supplied constraints as template */ public LDAPSearchConstraints( LDAPConstraints cons ) { this(); setHopLimit( cons.getHopLimit() ); setReferralFollowing( cons.getReferralFollowing() ); setTimeLimit( cons.getTimeLimit() ); setReferralHandler( cons.getReferralHandler()); LDAPControl[] tServerControls = cons.getControls(); if ( (tServerControls != null) && (tServerControls.length > 0) ) { LDAPControl[] oServerControls = new LDAPControl[tServerControls.length]; for( int i = 0; i < tServerControls.length; i++ ) { oServerControls[i] = (LDAPControl)tServerControls[i].clone(); } setControls(oServerControls); } if ( cons instanceof LDAPSearchConstraints ) { LDAPSearchConstraints scons = (LDAPSearchConstraints)cons; setServerTimeLimit( scons.getServerTimeLimit() ); setDereference( scons.getDereference() ); setMaxResults( scons.getMaxResults() ); setBatchSize( scons.getBatchSize() ); setMaxBacklog( scons.getMaxBacklog() ); } } /** * Constructs a new LDAPSearchConstraints object and allows you * to specify the search constraints in that object. *

* @param msLimit maximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param timeLimit maximum time in seconds for the server to spend * processing a search request (the default value is 0, indicating that there * is no limit) * @param dereference either LDAPConnection.DEREF_NEVER, * LDAPConnection.DEREF_FINDING, * LDAPConnection.DEREF_SEARCHING, or * LDAPConnection.DEREF_ALWAYS (see LDAPConnection.setOption). * LDAPConnection.DEREF_NEVER is the default. * @param maxResults maximum number of search results to return * (1000 by default) * @param doReferrals specify true to follow referrals * automatically, or false to throw an * LDAPReferralException error if the server sends back * a referral (false by default) * @param batchSize specify the number of results to return at a time * (1 by default) * @param bind_proc specifies the object that * implements the LDAPBind interface (you need to * define this class). The object will be used to authenticate * to the server on referrals. * (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see org.ietf.ldap.LDAPConnection#setOption(int, java.lang.Object) * @see org.ietf.ldap.LDAPConnection#search(org.ietf.ldap.LDAPUrl, org.ietf.ldap.LDAPSearchConstraints) * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean, org.ietf.ldap.LDAPSearchConstraints) */ public LDAPSearchConstraints( int msLimit, int timeLimit, int dereference, int maxResults, boolean doReferrals, int batchSize, LDAPReferralHandler handler, int hop_limit) { super( msLimit, doReferrals, handler, hop_limit ); serverTimeLimit = timeLimit; deref = dereference; maxRes = maxResults; batch = batchSize; } /** * Returns the suggested number of results to return at a time during * search. This should be 0 if intermediate results are not needed, and * 1 if results are to be processed as they come in. * @return number of results to return at a time. */ public int getBatchSize() { return batch; } /** * Specifies how aliases should be dereferenced. * @return LDAPConnection.DEREF_NEVER to * never follow ("dereference") aliases, * LDAPConnection.DEREF_FINDING to dereference when finding * the starting point for the search (but not when searching * under that starting entry), LDAPConnection.DEREF_SEARCHING * to dereference when searching the entries beneath the * starting point of the search (but not when finding the starting * entry), or LDAPConnection.DEREF_ALWAYS to always * dereference aliases. */ public int getDereference() { return deref; } /** * Get the maximum number of unread entries any search listener can * have before we stop reading from the server. * @return the maximum number of unread entries per listener. * @deprecated Use LDAPConnection.getOption() */ public int getMaxBacklog() { return maxBacklog; } /** * Returns the maximum number of search results that are to be returned; 0 means * there is no limit. * @return maximum number of search results to be returned. */ public int getMaxResults() { return maxRes; } /** * Returns the maximum number of seconds to wait for the server to * spend on a search operation.If 0, there is no time limit. * @return maximum number of seconds for the server to spend. */ public int getServerTimeLimit() { return serverTimeLimit; } /** * Sets the suggested number of results to return at a time during search. * This should be 0 if intermediate results are not needed, and 1 if * results are to be processed as they come in. (By default, this is 1.) * @param batchSize number of results to return at a time */ public void setBatchSize( int batchSize ) { batch = batchSize; } /** * Sets a preference indicating how aliases should be dereferenced. * @param dereference LDAPConnection.DEREF_NEVER to * never follow ("dereference") aliases, * LDAPConnection.DEREF_FINDING to dereference when finding * the starting point for the search (but not when searching * under that starting entry), LDAPConnection.DEREF_SEARCHING * to dereference when searching the entries beneath the * starting point of the search (but not when finding the starting * entry), or LDAPConnection.DEREF_ALWAYS to always * dereference aliases */ public void setDereference( int dereference ) { deref = dereference; } /** * Set the maximum number of unread entries any search listener can * have before we stop reading from the server. * @param backlog the maximum number of unread entries per listener * @deprecated Use LDAPConnection.setOption() */ public void setMaxBacklog( int backlog ) { maxBacklog = backlog; } /** * Sets the maximum number of search results to return; 0 means * there is no limit. (By default, this is set to 1000.) * @param maxResults maximum number of search results to return */ public void setMaxResults( int maxResults ) { maxRes = maxResults; } /** * Sets the maximum number of seconds for the server to spend * returning search results. If 0, there is no time limit. * @param limit maximum number of seconds for the server to spend. * (0 by default, which means that there is no maximum time limit.) */ public void setServerTimeLimit( int limit ) { serverTimeLimit = limit; } /** * Makes a copy of an existing set of search constraints. * @return a copy of an existing set of search constraints. */ public Object clone() { return new LDAPSearchConstraints( this ); } /** * Return a string representation of the object for debugging * * @return A string representation of the object */ public String toString() { StringBuffer sb = new StringBuffer("LDAPSearchConstraints {"); sb.append( super.toString() + ' ' ); sb.append("size limit " + maxRes + ", "); sb.append("server time limit " + serverTimeLimit + ", "); sb.append("aliases " + deref + ", "); sb.append("batch size " + batch + ", "); sb.append("max backlog " + maxBacklog); sb.append('}'); return sb.toString(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPExtendedOperation.java0000664001003300100330000001437710602743265030776 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; /** * Version 3 of the LDAP protocol include the means to define additional * operations ("extended operations") beyond the standard LDAP * operations. An LDAP v3 client can send an extended operation request, * identifying the operation by its unique object ID (OID). The server * receives the request and if OID corresponds to an operation supported * by the server, the server procoess the request and sends an extended * operation response back to the client. *

* * Objects of this class can be used to represent extended operation * requests (sent by your client) or extended operation responses * (returned by an LDAP v3 server). *

* * To determine which extended operations are supported by a server, * you need to search for the root DSE (DSA-specific entry, where DSA is * another term for "LDAP server") and find the values of the * supportedExtension attribute. This attribute contains the * object IDs (OIDs) of the extended operations supported by this server. *

* * The following section of code demonstrates how to get the list * of the extended operations supported by an LDAP server. *

* *

 * public static void main( String[] args )
 * {
 *   LDAPConnection ld = new LDAPConnection();
 *   try {
 *     String MY_HOST = "localhost";
 *     int MY_PORT = 389;
 *     ld.connect( MY_HOST, MY_PORT );
 *     try {
 *       ld.authenticate( 3, "cn=Directory Manager", "23skidoo" );
 *     } catch( LDAPException e ) {
 *       System.out.println( "LDAP server does not support v3." );
 *       ld.disconnect();
 *       System.exit(1);
 *     }
 *
 *     String MY_FILT = "(objectclass=*)";
 *     String MY_BASE = "";
 *     String getAttrs[] = { "supportedExtension" };
 *     LDAPSearchResults res = ld.search( MY_BASE,
 *       LDAPConnection.SCOPE_BASE, MY_FILT, getAttrs, false );
 *
 *     while ( res.hasMoreElements() ) {
 *       LDAPEntry findEntry = (LDAPEntry)res.nextElement();
 *       LDAPAttributeSet findAttrs = findEntry.getAttributeSet();
 *       Enumeration enumAttrs = findAttrs.getAttributes();
 *
 *         while ( enumAttrs.hasMoreElements() ) {
 *           LDAPAttribute anAttr = (LDAPAttribute)enumAttrs.nextElement();
 *           String attrName = anAttr.getName();
 *           System.out.println( attrName );
 *           Enumeration enumVals = anAttr.getStringValues();
 *
 *           while ( enumVals.hasMoreElements() ) {
 *             String aVal = ( String )enumVals.nextElement();
 *             System.out.println( "\t" + aVal );
 *           }
 *         }
 *      }
 *   }
 *   catch( LDAPException e ) {
 *     System.out.println( "Error: " + e.toString() );
 *   }
 *   try {
 *     ld.disconnect();
 *   }
 *   catch( LDAPException e ) {
 *     System.exit(1);
 *   }
 *   System.exit(0);
 * }
 * 
*

* * If you compile and run this example against an LDAP server that * supports v3 of the protocol, you might receive the following results: *

* *

 * supportedextension
 *   1.2.3.4
 * 
*

* * For more information on LDAP controls, see the Internet-Draft on * the LDAP v3 protocol. (Note that this internet draft is still a * work in progress. You can find the latest draft at the ASID home page. *

* * @version 1.0 * @see org.ietf.ldap.LDAPConnection#extendedOperation(org.ietf.ldap.LDAPExtendedOperation) * @see org.ietf.ldap.LDAPConnection#search(java.lang.String, int, java.lang.String, java.lang.String[], boolean) * */ public class LDAPExtendedOperation implements Serializable { static final long serialVersionUID = 4010382829133611945L; /** * Construct an object * @param oid identifier for the particular operation * @param vals operation-specific data */ public LDAPExtendedOperation( String oid, byte[] vals ) { _oid = oid; _vals = vals; } /** * Gets the identifier for this operation * * @return identifier for the operation */ public String getID() { return _oid; } /** * Gets the data for this operation * * @return operation-specific data */ public byte[] getValue() { return _vals; } /** * Sets the data for this operation * * @param vals operation-specific data */ public void setValue( byte[] vals ) { _vals = vals; } private String _oid; private byte[] _vals; } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSchema.java0000664001003300100330000012207010602743265026543 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.*; /** * This object represents the schema of an LDAP v3 server. * You can use the fetchSchema method to retrieve * the schema used by a server. (The server must support LDAP v3 * and the capability to retrieve the schema over the LDAP protocol.) *

* * After you retrieve the schema, you can use this object to get * the object class, attribute type, and matching rule descriptions * in the schema. You can also add your own object classes, * attribute types, and matching rules to the schema. *

* * To remove any object classes, attribute types, and matching rules * that you added, call the remove methods of the * LDAPObjectClassSchema, LDAPAttributeSchema, * and LDAPMatchingRuleSchema classes. (This method is * inherited from the LDAPSchemaElement class.) *

* * The following class is an example of an LDAP client that can * fetch the schema, get and print object class descriptions and * attribute type descriptions, and add object classes and attribute * types to the schema over the LDAP protocol. *

* *

 * import org.ietf.ldap.*;
 * public class TestSchema {
 *     public static void main( String[] args ) {
 *         String HOSTNAME = "ldap.netscape.com";
 *         int PORT_NUMBER = DEFAULT_PORT;
 *         String ROOT_DN = "cn=Directory Manager";
 *         String ROOT_PASSWORD = "23skidoo";
 *
 *         LDAPConnection ld = new LDAPConnection();
 *
 *         // Construct a new LDAPSchema object to get the schema.
 *         LDAPSchema dirSchema = new LDAPSchema();
 *
 *         try {
 *             // Connect to the server.
 *             ld.connect( HOSTNAME, PORT_NUMBER );
 *
 *             // Get the schema from the directory.
 *             dirSchema.fetchSchema( ld );
 *
 *             // Get and print the inetOrgPerson object class description.
 *             LDAPObjectClassSchema objClass = dirSchema.getObjectClass(
 *                 "inetOrgPerson" );
 *             if ( objClass != null ) {
 *                 System.out.println("inetOrgPerson := "+objClass.toString());
 *             }
 *
 *             // Get and print the definition of the userPassword attribute.
 *             LDAPAttributeSchema attrType = dirSchema.getAttribute(
 *                 "userpassword" );
 *             if ( attrType != null ) {
 *                 System.out.println("userPassword := " + attrType.toString());
 *             }
 *
 *             // Create a new object class definition.
 *             String[] requiredAttrs = {"cn", "mail"};
 *             String[] optionalAttrs = {"sn", "phoneNumber"};
 *             LDAPObjectClassSchema newObjClass =
 *                     new LDAPObjectClassSchema( "newInetOrgPerson",
 *                                                "1.2.3.4.5.6.7",
 *                                                "top",
 *                                                "Experiment",
 *                                                requiredAttrs,
 *                                                optionalAttrs );
 *
 *             // Authenticate as root DN to get permissions to edit the schema.
 *             ld.authenticate( ROOT_DN, ROOT_PASSWORD );
 *
 *             // Add the new object class to the schema.
 *             newObjClass.add( ld );
 *
 *             // Create a new attribute type "hairColor".
 *             LDAPAttributeSchema newAttrType =
 *                     new LDAPAttributeSchema( "hairColor",
 *                                              "1.2.3.4.5.4.3.2.1",
 *                                              "Blonde, red, etc",
 *                                              LDAPAttributeSchema.cis,
 *                                              false );
 *             // Add a custom qualifier
 *             newObjClass.setQualifier( "X-OWNER", "John Jacobson" );
 *
 *             // Add the new attribute type to the schema.
 *             newAttrType.add( ld );
 *
 *             // Fetch the schema again to verify that changes were made.
 *             dirSchema.fetchSchema( ld );
 *
 *             // Get and print the new attribute type.
 *             newAttrType = dirSchema.getAttribute( "hairColor" );
 *             if ( newAttrType != null ) {
 *                 System.out.println("hairColor := " + newAttrType.toString());
 *             }
 *
 *             // Get and print the new object class.
 *             newObjClass = dirSchema.getObjectClass( "newInetOrgPerson" );
 *             if ( newObjClass != null ) {
 *                 System.out.println("newInetOrgPerson := " +newObjClass.toString());
 *             }
 *
 *             ld.disconnect();
 *
 *         } catch ( Exception e ) {
 *             System.err.println( e.toString() );
 *             System.exit( 1 );
 *         }
 *
 *         System.exit( 0 );
 *     }
 * }
 * 
* * If you are using the Netscape Directory Server 3.0, you can also * verify that the class and attribute type have been added through * the directory server manager (go to Schema | Edit or View Attributes * or Schema | Edit or View Object Classes). *

* * To remove the classes and attribute types added by the example, * see the examples under the LDAPSchemaElement class. *

* * @see org.ietf.ldap.LDAPAttributeSchema * @see org.ietf.ldap.LDAPObjectClassSchema * @see org.ietf.ldap.LDAPMatchingRuleSchema * @see org.ietf.ldap.LDAPSchemaElement * @version 1.0 * @author Rob Weltman **/ public class LDAPSchema implements Serializable { static final long serialVersionUID = -3911737419783579398L; /** * Constructs a new LDAPSchema object. * Once you construct the object, you can get * the schema by calling fetchSchema. *

* * You can also print out the schema by using the * main method. For example, you can enter * the following command: *

     * java org.ietf.ldap.LDAPSchema myhost.mydomain.com 389
     * 
* * Note that you need to call fetchSchema * to get the schema from the server. Constructing the * object does not fetch the schema. *

* * @see org.ietf.ldap.LDAPSchema#fetchSchema * @see org.ietf.ldap.LDAPSchema#main */ public LDAPSchema() { } public LDAPSchema( LDAPEntry entry ) { initialize( entry ); } /** * Adds a schema element definition to the schema object. If the schema * object already contains an element with the same class and OID as el, * IllegalArgumentException is thrown. Changes are applied to a directory * by calling saveSchema. * * @param el A non-null schema definition */ public void add( LDAPSchemaElement el ) { add( el, true ); } /** * Adds a schema element definition to the schema object. If the schema * object already contains an element with the same class and OID as el, * IllegalArgumentException is thrown. Changes are applied to a directory * by calling saveSchema. * * @param el A non-null schema definition * @param isChange true if called by a client, meaning that * a directory is to be changed and not just this object */ private void add( LDAPSchemaElement el, boolean isChange ) { String ID = el.getID(); if ( ID != null ) { LDAPSchemaElement oldEl = (LDAPSchemaElement)_IDToElement.get( ID ); if ( (oldEl != null) && namesTheSame( oldEl, el ) ) { throw new IllegalArgumentException( "Schema element already " + "defined for " + ID + "; old: " + oldEl + " ; new: " + el ); } _IDToElement.put( ID, el ); } if ( isChange ) { _changeList.add( getModificationForElement( el, LDAPModification.ADD, null ) ); } String name; try { name = (el.getNames().length > 0) ? el.getNames()[0].toLowerCase() : ""; } catch ( Exception e ) { System.err.println( el ); e.printStackTrace(); return; } if ( el instanceof LDAPAttributeSchema ) { _attributes.put( name, el ); } else if ( el instanceof LDAPObjectClassSchema ) { _objectClasses.put( name, el ); } else if ( el instanceof LDAPMatchingRuleSchema ) { _matchingRules.put( name, el ); } else if ( el instanceof LDAPMatchingRuleUseSchema ) { _matchingRuleUses.put( name, el ); } else if ( el instanceof LDAPNameFormSchema ) { _nameForms.put( name, el ); } else if ( el instanceof LDAPSyntaxSchema ) { if ( name.length() < 1 ) { name = el.getID(); } _syntaxes.put( name, el ); } else if ( el instanceof LDAPDITContentRuleSchema ) { _contentRules.put( name, el ); } else if ( el instanceof LDAPDITStructureRuleSchema ) { _structureRulesByName.put( name, el ); _structureRulesById.put( new Integer( ((LDAPDITStructureRuleSchema)el).getRuleID() ), el ); } } /** * Retrieve the entire schema from the root of a Directory Server * * @param ld an active connection to a Directory Server * @exception LDAPException on failure. */ public void fetchSchema( LDAPConnection ld ) throws LDAPException { fetchSchema( ld, "" ); } /** * Retrieve the schema for a specific entry * * @param ld an active connection to a Directory Server * @param dn the entry for which to fetch schema * @exception LDAPException on failure. */ public void fetchSchema( LDAPConnection ld, String dn ) throws LDAPException { clear(); /* Find the subschemasubentry value for this DN */ String entryName = getSchemaDN( ld, dn ); /* Get the entire schema definition entry */ LDAPEntry entry = readSchema( ld, entryName ); initialize( entry ); } /** * Get an enumeration of the names of the attribute types in this schema. * @return an enumeration of attribute names (all lower-case). */ public Enumeration getAttributeNames() { return _attributes.keys(); } /** * Gets the definition of the attribute type with the specified name. * @param name name of the attribute type to find * @return an LDAPAttributeSchema object representing * the attribute type definition, or null if not found. */ public LDAPAttributeSchema getAttributeSchema( String name ) { return (LDAPAttributeSchema)_attributes.get( name.toLowerCase() ); } /** * Gets an enumeration of the attribute type definitions in this schema. * @return an enumeration of attribute type definitions. */ public Enumeration getAttributeSchemas() { return _attributes.elements(); } /** * Get an enumeration of the names of the content rules in this schema. * @return an enumeration of names of the content rule objects */ public Enumeration getDITContentRuleNames() { return _contentRules.keys(); } /** * Gets the definition of a content rule with the specified name. * @param name name of the rule to find * @return an LDAPDITContentRuleSchema object representing * the rule, or null if not found. */ public LDAPDITContentRuleSchema getDITContentRuleSchema( String name ) { return (LDAPDITContentRuleSchema)_contentRules.get( name.toLowerCase() ); } /** * Get an enumeration of the content rules in this schema. * @return an enumeration of content rule objects */ public Enumeration getDITContentRuleSchemas() { return _contentRules.elements(); } /** * Get an enumeration of the names of the structure rules in this schema. * @return an enumeration of names of the structure rule objects */ public Enumeration getDITStructureRuleNames() { return _structureRulesByName.keys(); } /** * Gets the definition of a structure rule with the specified name. * @param name name of the rule to find * @return an LDAPDITStructureRuleSchema object representing * the rule, or null if not found. */ public LDAPDITStructureRuleSchema getDITStructureRuleSchema( String name ) { return (LDAPDITStructureRuleSchema)_structureRulesByName.get( name.toLowerCase() ); } /** * Gets the definition of a structure rule with the specified name. * @param ID ID of the rule to find * @return an LDAPDITStructureRuleSchema object representing * the rule, or null if not found. */ public LDAPDITStructureRuleSchema getDITStructureRuleSchema( int ID ) { return (LDAPDITStructureRuleSchema)_structureRulesById.get( new Integer( ID ) ); } /** * Get an enumeration of the structure rules in this schema. * @return an enumeration of structure rule objects */ public Enumeration getDITStructureRuleSchemas() { return _structureRulesByName.elements(); } /** * Get an enumeration of the names of the matching rules in this schema. * @return an enumeration of matching rule names (all lower-case). */ public Enumeration getMatchingRuleNames() { return _matchingRules.keys(); } /** * Gets the definition of a matching rule with the specified name. * @param name name of the matching rule to find * @return an LDAPMatchingRuleSchema object representing * the matching rule definition, or null if not found. */ public LDAPMatchingRuleSchema getMatchingRuleSchema( String name ) { return (LDAPMatchingRuleSchema)_matchingRules.get( name.toLowerCase() ); } /** * Gets an enumeration ofthe matching rule definitions in this schema. * @return an enumeration of matching rule definitions. */ public Enumeration getMatchingRuleSchemas() { return _matchingRules.elements(); } /** * Get an enumeration of the names of the matching rule uses in this schema. * @return an enumeration of matching rule use names (all lower-case). */ public Enumeration getMatchingRuleUseNames() { return _matchingRuleUses.keys(); } /** * Gets the definition of a matching rule use with the specified name. * @param name name of the matching rule use to find * @return an LDAPMatchingRuleUseSchema object representing * the matching rule definition, or null if not found. */ public LDAPMatchingRuleUseSchema getMatchingRuleUseSchema( String name ) { return (LDAPMatchingRuleUseSchema)_matchingRuleUses.get( name.toLowerCase() ); } /** * Gets an enumeration ofthe matching rule use definitions in this schema. * @return an enumeration of matching rule use definitions. */ public Enumeration getMatchingRuleUseSchemas() { return _matchingRuleUses.elements(); } /** * Get an enumeration of the names of the name forms in this schema. * @return an enumeration of names of name form objects */ public Enumeration getNameFormNames() { return _nameForms.keys(); } /** * Gets the definition of a name form with the specified name. * @param name name of the name form to find * @return an LDAPNameFormSchema object representing * the syntax definition, or null if not found. */ public LDAPNameFormSchema getNameFormSchema( String name ) { return (LDAPNameFormSchema)_nameForms.get( name.toLowerCase() ); } /** * Get an enumeration of the name forms in this schema. * @return an enumeration of name form objects */ public Enumeration getNameFormSchemas() { return _nameForms.elements(); } /** * Get an enumeration of the names of the object classes in this schema. * @return an enumeration of object class names (all lower-case). */ public Enumeration getObjectClassNames() { return _objectClasses.keys(); } /** * Gets the definition of the object class with the specified name. * @param name name of the object class to find * @return an LDAPObjectClassSchema object representing * the object class definition, or null if not found. */ public LDAPObjectClassSchema getObjectClassSchema( String name ) { return (LDAPObjectClassSchema)_objectClasses.get( name.toLowerCase() ); } /** * Gets an enumeration ofthe object class definitions in this schema. * @return an enumeration of object class definitions. */ public Enumeration getObjectClassSchemas() { return _objectClasses.elements(); } /** * Get an enumeration of the names of the syntaxes in this schema. * @return an enumeration of syntax names (all lower-case). */ public Enumeration getSyntaxNames() { return _syntaxes.keys(); } /** * Gets the definition of a syntax with the specified name. * @param name name of the syntax to find * @return an LDAPSyntaxSchema object representing * the syntax definition, or null if not found. */ public LDAPSyntaxSchema getSyntaxSchema( String name ) { return (LDAPSyntaxSchema)_syntaxes.get( name.toLowerCase() ); } /** * Get an enumeration of the syntaxes in this schema. * @return an enumeration of syntax objects */ public Enumeration getSyntaxSchemas() { return _syntaxes.elements(); } /** * Modifies a schema element definition of the schema object. If the * schema object does not contain an element with the same class and OID * as el, it is added. Changes are applied to a directory by calling * saveSchema. * * @param el A non-null schema definition */ public void modify( LDAPSchemaElement el ) { modify( el, true ); } /** * Modifies a schema element definition of the schema object. If the * schema object does not contain an element with the same class and OID * as el, it is added. Changes are applied to a directory by calling * saveSchema. * * @param el A non-null schema definition * @param isChange true if called by a client, meaning that * a directory is to be changed and not just this object */ private void modify( LDAPSchemaElement el, boolean isChange ) { String ID = el.getID(); if ( isChange ) { // Remove if already present and then add LDAPSchemaElement oldEl = ( ID != null ) ? (LDAPSchemaElement)_IDToElement.get( ID ) : null; if ( oldEl != null ) { _changeList.add( getModificationForElement( oldEl, LDAPModification.DELETE, null ) ); } _changeList.add( getModificationForElement( el, LDAPModification.ADD, null ) ); } if ( ID != null ) { _IDToElement.put( ID, el ); } String name = (el.getNames().length > 0) ? el.getNames()[0].toLowerCase() : ""; if ( el instanceof LDAPAttributeSchema ) { _attributes.put( name, el ); } else if ( el instanceof LDAPObjectClassSchema ) { _objectClasses.put( name, el ); } else if ( el instanceof LDAPMatchingRuleSchema ) { _matchingRules.put( name, el ); } else if ( el instanceof LDAPMatchingRuleUseSchema ) { _matchingRuleUses.put( name, el ); } else if ( el instanceof LDAPNameFormSchema ) { _nameForms.put( name, el ); } else if ( el instanceof LDAPSyntaxSchema ) { if ( name.length() < 1 ) { name = el.getID(); } _syntaxes.put( name, el ); } else if ( el instanceof LDAPDITContentRuleSchema ) { _contentRules.put( name, el ); } else if ( el instanceof LDAPDITStructureRuleSchema ) { _structureRulesByName.put( name, el ); _structureRulesById.put( new Integer( ((LDAPDITStructureRuleSchema)el).getRuleID() ), el ); } } /** * Removes a schema element definition of the schema object. If the * schema object does not contain an element with the same class and OID * as el, this is a noop. Changes are applied to a directory by calling * saveSchema. * * @param el A non-null schema definition */ public void remove( LDAPSchemaElement el ) { remove( el, true ); } /** * Removes a schema element definition of the schema object. If the * schema object does not contain an element with the same class and OID * as el, this is a noop. Changes are applied to a directory by calling * saveSchema. * * @param el A non-null schema definition * @param isChange true if called by a client, meaning that * a directory is to be changed and not just this object */ private void remove( LDAPSchemaElement el, boolean isChange ) { String ID = el.getID(); if ( isChange ) { // Remove it if present if ( (ID != null) && _IDToElement.containsKey( ID ) ) { _changeList.add( getModificationForElement( el, LDAPModification.DELETE, null ) ); } } if ( ID != null ) { _IDToElement.remove( ID ); } String name = (el.getNames().length > 0) ? el.getNames()[0].toLowerCase() : ""; if ( el instanceof LDAPAttributeSchema ) { _attributes.remove( name ); } else if ( el instanceof LDAPObjectClassSchema ) { _objectClasses.remove( name ); } else if ( el instanceof LDAPMatchingRuleSchema ) { _matchingRules.remove( name ); } else if ( el instanceof LDAPMatchingRuleUseSchema ) { _matchingRuleUses.remove( name ); } else if ( el instanceof LDAPNameFormSchema ) { _nameForms.remove( name ); } else if ( el instanceof LDAPSyntaxSchema ) { if ( name.length() < 1 ) { name = el.getID(); } _syntaxes.remove( name ); } else if ( el instanceof LDAPDITContentRuleSchema ) { _contentRules.remove( name ); } else if ( el instanceof LDAPDITStructureRuleSchema ) { _structureRulesByName.remove( name ); _structureRulesById.remove( new Integer( ((LDAPDITStructureRuleSchema)el).getRuleID() ) ); } } /** * Save the schema changes to the root of a Directory Server * * @param ld an active connection to a Directory Server * @exception LDAPException on failure. */ public void saveSchema( LDAPConnection ld ) throws LDAPException { saveSchema( ld, "" ); } /** * Save the schema changes to a specific entry * * @param ld an active connection to a Directory Server * @param dn the entry at which to save schema * @exception LDAPException on failure. */ public void saveSchema( LDAPConnection ld, String dn ) throws LDAPException { // Get array of changes to be made LDAPModification[] mods = (LDAPModification[])_changeList.toArray( new LDAPModification[0] ); if ( mods.length < 1 ) { return; } /* Find the subschemasubentry value for this DN */ String entryName = getSchemaDN( ld, dn ); /* Make the changes; exception thrown on error */ ld.modify( entryName, mods ); /* If we got this far, the changes were saved and we can reset the change list */ _changeList.clear(); } /** * Displays the schema (including the descriptions of its object * classes, attribute types, and matching rules) in an easily * readable format (not the same as the format expected by * an LDAP server). * @return a string containing the schema in printable format. */ public String toString() { String s = "Object classes:\n"; Enumeration en = getObjectClassSchemas(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } s += "Attributes:\n"; en = getAttributeSchemas(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } s += "Matching rules:\n"; en = getMatchingRuleSchemas(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } s += "Syntaxes:\n"; en = getSyntaxSchemas(); while( en.hasMoreElements() ) { s += en.nextElement().toString(); s += '\n'; } return s; } /** * Removes all definitions */ void clear() { _attributes.clear(); _objectClasses.clear(); _matchingRules.clear(); _matchingRuleUses.clear(); _nameForms.clear(); _syntaxes.clear(); _contentRules.clear(); _structureRulesByName.clear(); _structureRulesById.clear(); _IDToElement.clear(); _changeList.clear(); } /** * Creates a modification object corresponding to a schema element and * a change type * * @param el The schema element * @param op Type of modification to make * @param ld Optional connection to server where change is to be made */ private static LDAPModification getModificationForElement( LDAPSchemaElement el, int op, LDAPConnection ld ) { boolean quotingBug; try { quotingBug = (ld != null) ? !LDAPSchema.isAttributeSyntaxStandardsCompliant( ld ) : false; } catch ( LDAPException e ) { quotingBug = false; } LDAPAttribute attr = new LDAPAttribute( el.getAttributeName(), el.getValue( quotingBug ) ); return new LDAPModification( op, attr ); } /** * Retrieve the DN of the schema definitions for a specific entry. * @param ld an active connection to a Directory Server * @param dn the entry for which to fetch schema * @exception LDAPException on failure. */ private static String getSchemaDN( LDAPConnection ld, String dn ) throws LDAPException { if ( (ld == null) || !ld.isConnected() ) { throw new LDAPException( "No connection", LDAPException.OTHER ); } String[] attrs = { "subschemasubentry" }; LDAPEntry entry = ld.read( dn, attrs ); if ( entry == null ) { throw new LDAPException( "", LDAPException.NO_SUCH_OBJECT ); } LDAPAttribute attr = entry.getAttribute( attrs[0] ); String entryName = "cn=schema"; if ( attr != null ) { Enumeration en = attr.getStringValues(); if ( en.hasMoreElements() ) { entryName = (String)en.nextElement(); } } return entryName; } /** * Extracts all schema elements from subschema entry * * @param entry entry containing schema definitions */ protected void initialize( LDAPEntry entry ) { /* Get all object class definitions */ LDAPAttribute attr = entry.getAttribute( "objectclasses" ); Enumeration en; if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPObjectClassSchema sch = new LDAPObjectClassSchema( (String)en.nextElement() ); add( sch, false ); } } /* Get all attribute definitions */ attr = entry.getAttribute( "attributetypes" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPAttributeSchema sch = new LDAPAttributeSchema( (String)en.nextElement() ); add( sch, false ); } } /* Get all syntax definitions */ attr = entry.getAttribute( "ldapsyntaxes" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPSyntaxSchema sch = new LDAPSyntaxSchema( (String)en.nextElement() ); add( sch, false ); } } /* Get all structure rule definitions */ attr = entry.getAttribute( "ldapditstructurerules" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPDITStructureRuleSchema sch = new LDAPDITStructureRuleSchema( (String)en.nextElement() ); add( sch, false ); } } /* Get all content rule definitions */ attr = entry.getAttribute( "ldapditcontentrules" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPDITContentRuleSchema sch = new LDAPDITContentRuleSchema( (String)en.nextElement() ); add( sch, false ); } } /* Get all name form definitions */ attr = entry.getAttribute( "nameforms" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { LDAPNameFormSchema sch = new LDAPNameFormSchema( (String)en.nextElement() ); add( sch, false ); } } /* Matching rules are tricky, because we have to match up a rule with its use. First get all the uses. */ Hashtable h = new Hashtable(); attr = entry.getAttribute( "matchingruleuse" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { String use = (String)en.nextElement(); LDAPMatchingRuleSchema sch = new LDAPMatchingRuleSchema( null, use ); h.put( sch.getID(), use ); } } /* Now get the rules, and assign uses to them */ attr = entry.getAttribute( "matchingrules" ); if ( attr != null ) { en = attr.getStringValues(); while( en.hasMoreElements() ) { String raw = (String)en.nextElement(); LDAPMatchingRuleSchema sch = new LDAPMatchingRuleSchema( raw, null ); String use = (String)h.get( sch.getID() ); if ( use != null ) sch = new LDAPMatchingRuleSchema( raw, use ); add( sch, false ); } } } /** * Read one attribute definition from a server to determine if * attribute syntaxes are quoted (a bug, present in Netscape * and Novell servers). * @param ld an active connection to a Directory Server * @return true if standards-compliant. * @exception LDAPException on failure. */ static boolean isAttributeSyntaxStandardsCompliant( LDAPConnection ld ) throws LDAPException { /* Check if this has already been investigated */ String schemaBug = (String)ld.getProperty( ld.SCHEMA_BUG_PROPERTY ); if ( schemaBug != null ) { return schemaBug.equalsIgnoreCase( "standard" ); } boolean compliant = true; /* Get the schema definitions for attributes */ String entryName = getSchemaDN( ld, "" ); String[] attrs = { "attributetypes" }; LDAPEntry entry = ld.read( entryName, attrs ); /* Get all attribute definitions, and check the first one */ LDAPAttribute attr = entry.getAttribute( "attributetypes" ); if ( attr != null ) { Enumeration en = attr.getStringValues(); if( en.hasMoreElements() ) { compliant = !isSyntaxQuoted( (String)en.nextElement() ); } } ld.setProperty( ld.SCHEMA_BUG_PROPERTY, compliant ? "standard" : "NetscapeBug" ); return compliant; } /** * Parses an attribute schema definition to see if the SYNTAX value * is quoted. It shouldn't be (according to RFC 2252), but it is for * some LDAP servers. It will either be:
* SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 or
* SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' * @param raw Definition of the attribute type in the * AttributeTypeDescription format. */ static boolean isSyntaxQuoted( String raw ) { int ind = raw.indexOf( " SYNTAX " ); if ( ind >= 0 ) { ind += 8; int l = raw.length() - ind; // Extract characters char[] ch = new char[l]; raw.getChars( ind, raw.length(), ch, 0 ); ind = 0; // Skip to ' or start of syntax value while( (ind < ch.length) && (ch[ind] == ' ') ) { ind++; } if ( ind < ch.length ) { return ( ch[ind] == '\'' ); } } return false; } /** * Compares to schema elements for identical names; order and case are * ignored * * @param el1 First element to compare * @param el2 Second element to compare * @return true if the elements have the same names */ private static boolean namesTheSame( LDAPSchemaElement el1, LDAPSchemaElement el2 ) { // Don't bother if either element is null if ( (el1 == null) || (el2 == null) ) { return false; } String[] names1 = el1.getNames(); String[] names2 = el2.getNames(); if ( (names1 == null) ^ (names2 == null) ) { return false; } // If neither have any names, return true if ( names1 == null ) { return true; } if ( names1.length != names2.length ) { return false; } if ( names1.length == 0 ) { return true; } if ( names1.length == 1 ) { return ( names1[0].equalsIgnoreCase( names2[0] ) ); } Comparator comp = new Comparator() { public int compare( Object o1, Object o2 ) { return ((String)o1).compareToIgnoreCase( (String)o2 ); } public boolean equals( Object obj ) { return false; } }; Arrays.sort( names1, comp ); Arrays.sort( names2, comp ); for( int i = 0; i < names1.length; i++ ) { if ( !names1[i].equalsIgnoreCase( names2[i] ) ) { return false; } } return true; } /** * Helper for "main" to print out schema elements. * * @param en enumeration of schema elements */ private static void printEnum( Enumeration en ) { while( en.hasMoreElements() ) { LDAPSchemaElement s = (LDAPSchemaElement)en.nextElement(); System.out.println( " " + s ); } } /** * Reads the schema definitions from a particular subschema entry */ private static LDAPEntry readSchema( LDAPConnection ld, String dn, String[] attrs ) throws LDAPException { LDAPSearchResults results = ld.search (dn, ld.SCOPE_BASE, "objectclass=subschema", attrs, false); if ( !results.hasMore() ) { throw new LDAPException( "Cannot read schema", LDAPException.INSUFFICIENT_ACCESS_RIGHTS ); } return results.next(); } /** * Reads the schema definitions from a particular subschema entry */ private static LDAPEntry readSchema( LDAPConnection ld, String dn ) throws LDAPException { return readSchema( ld, dn, new String[] { "*", "ldapSyntaxes", "matchingRules", "attributeTypes", "objectClasses" } ); } /** * Fetch the schema from the LDAP server at the specified * host and port, and print out the schema (including descriptions * of its object classes, attribute types, and matching rules). * The schema is printed in an easily readable format (not the * same as the format expected by an LDAP server). For example, * you can enter the following command to print the schema: *

     * java org.ietf.ldap.LDAPSchema myhost.mydomain.com 389
     * 
* * @param args the host name and the port number of the LDAP server * (for example, org.ietf.ldap.LDAPSchema directory.netscape.com * 389) */ public static void main( String[] args ) { if ( args.length < 2 ) { System.err.println( "Usage: org.ietf.ldap.LDAPSchema HOST PORT" ); System.exit(1 ); } int port = Integer.parseInt( args[1] ); LDAPConnection ld = new LDAPConnection(); try { ld.connect( args[0], port ); LDAPSchema schema = new LDAPSchema(); schema.fetchSchema( ld ); ld.disconnect(); System.out.println( "Object classes: " ); printEnum( schema.getObjectClassSchemas() ); System.out.println( "\nAttributes: " ); printEnum( schema.getAttributeSchemas() ); System.out.println( "\nMatching rules: " ); printEnum( schema.getMatchingRuleSchemas() ); System.out.println( "\nSyntaxes: " ); printEnum( schema.getSyntaxSchemas() ); System.exit( 0 ); } catch ( LDAPException e ) { System.err.println( e ); } } private Hashtable _objectClasses = new Hashtable(); private Hashtable _attributes = new Hashtable(); private Hashtable _matchingRules = new Hashtable(); private Hashtable _matchingRuleUses = new Hashtable(); private Hashtable _syntaxes = new Hashtable(); private Hashtable _structureRulesByName = new Hashtable(); private Hashtable _structureRulesById = new Hashtable(); private Hashtable _contentRules = new Hashtable(); private Hashtable _nameForms = new Hashtable(); private Hashtable _IDToElement = new Hashtable(); private ArrayList _changeList = new ArrayList(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPAttributeSchema.java0000664001003300100330000004267610602743265030444 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; /** * The definition of an attribute type in the schema. * RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions covers the types of information * to specify when defining an attribute type. According to the RFC, * the description of an attribute type can include the following: *

* *

    *
  • an OID identifying the attribute type *
  • a name identifying the attribute type *
  • a description of the attribute type *
  • the name of the parent attribute type *
  • the syntax used by the attribute (for example, * cis or int) *
  • an indication of whether the attribute type is single-valued * or multi-valued *
*

* * When you construct an LDAPAttributeSchema object, you can * specify these types of information as arguments to the constructor or * in the AttributeTypeDescription format specified in RFC 2252. * When an LDAP client searches an LDAP server for the schema, the server * returns schema information as an object with attribute values in this * format. *

* * There a number of additional optional description fields which * are not explicitly accessible through LDAPAttributeSchema, but which * can be managed with setQualifier, getQualifier, and getQualifierNames: *

* *

    *
  • EQUALITY *
  • ORDERING *
  • SUBSTR *
  • COLLECTIVE *
  • NO-USER-MODIFICATION *
  • USAGE *
  • OBSOLETE *
*

* * To get the name, OID, and description of this attribute type * definition, use the getName, getOID, and * getDescription methods inherited from the abstract class * LDAPSchemaElement. Optional and custom qualifiers are * accessed with getQualifier and getQualifierNames * from LDAPSchemaElement. *

* * To add or remove this attribute type definition from the * schema, use the add and remove * methods, which this class inherits from the LDAPSchemaElement * abstract class. *

* RFC 2252 defines AttributeTypeDescription as follows: *

*

 *     AttributeTypeDescription = "(" whsp
 *          numericoid whsp              ; AttributeType identifier
 *        [ "NAME" qdescrs ]             ; name used in AttributeType
 *        [ "DESC" qdstring ]            ; description
 *        [ "OBSOLETE" whsp ]
 *        [ "SUP" woid ]                 ; derived from this other
 *                                       ; AttributeType
 *        [ "EQUALITY" woid              ; Matching Rule name
 *        [ "ORDERING" woid              ; Matching Rule name
 *        [ "SUBSTR" woid ]              ; Matching Rule name
 *        [ "SYNTAX" whsp noidlen whsp ] ; see section 4.3
 *        [ "SINGLE-VALUE" whsp ]        ; default multi-valued
 *        [ "COLLECTIVE" whsp ]          ; default not collective
 *        [ "NO-USER-MODIFICATION" whsp ]; default user modifiable
 *        [ "USAGE" whsp AttributeUsage ]; default userApplications
 *        whsp ")"
 *
 *    AttributeUsage =
 *        "userApplications"     /
 *        "directoryOperation"   /
 *        "distributedOperation" / ; DSA-shared
 *        "dSAOperation"          ; DSA-specific, value depends on server
 * 
* * @version 1.0 * @see org.ietf.ldap.LDAPSchemaElement **/ public class LDAPAttributeSchema extends LDAPSchemaElement { static final long serialVersionUID = 2482595821879862595L; /** * Constructs a blank element. */ protected LDAPAttributeSchema() { super(); } /** * Constructs an attribute type definition, using the specified * information * @param names names of the attribute type * @param oid object identifier (OID) of the attribute type * in dotted-string format (for example, "1.2.3.4") * @param description description of attribute type * @param syntaxString syntax of this attribute type in dotted-string * format (for example, "1.2.3.4.5") * @param single true if the attribute type is single-valued * @param superior superior attribute as a name or OID; null * if there is no superior * @param obsolete true if this attribute is obsolete * @param equality Object Identifier of the equality matching rule * for the attribute in dotted-decimal format; MAY be null * @param ordering Object Identifier of the ordering matching rule * for the attribute in dotted-decimal format; MAY be null * @param substring Object Identifier of the substring matching rule * for the attribute in dotted-decimal format; MAY be null * @param collective true if this is a collective attribute. * @param userMod true if the attribute is modifiable by users. * @param usage One of the following: *
    *
  • USER_APPLICATIONS *
  • DIRECTORY_OPERATION *
  • DISTRIBUTED_OPERATION *
  • DSA_OPERATION *
*/ public LDAPAttributeSchema( String[] names, String oid, String description, String syntaxString, boolean single, String superior, boolean obsolete, String equality, String ordering, String substring, String collective, boolean userMod, int usage ) { super( names, oid, description ); attrName = "attributetypes"; syntaxElement.syntax = syntaxElement.syntaxCheck( syntaxString ); syntaxElement.syntaxString = syntaxString; setQualifier( SYNTAX, syntaxElement.syntaxString ); if ( single ) { setQualifier( SINGLE, "" ); } if ( (superior != null) && (superior.length() > 0) ) { setQualifier( SUPERIOR, superior ); } if ( obsolete ) { setQualifier( OBSOLETE, "" ); } if ( (equality != null) && (equality.length() > 0) ) { setQualifier( EQUALITY, equality ); } if ( (ordering != null) && (ordering.length() > 0) ) { setQualifier( ORDERING, ordering ); } if ( (substring != null) && (substring.length() > 0) ) { setQualifier( SUBSTR, substring ); } if ( (collective != null) && (collective.length() > 0) ) { setQualifier( COLLECTIVE, collective ); } if ( !userMod ) { setQualifier( NO_USER_MODIFICATION, "" ); } setQualifier( USAGE, String.valueOf( usage ) ); } /** * Constructs an attribute type definition based on a description in * the AttributeTypeDescription format. For information on this format, * (see RFC 2252, Lightweight Directory Access Protocol (v3): * Attribute Syntax Definitions. This is the format that LDAP servers * and clients use to exchange schema information. (For example, when * you search an LDAP server for its schema, the server returns an entry * with the attributes "objectclasses" and "attributetypes". The * values of "attributetypes" are attribute type descriptions * in this format.) *

* * @param raw definition of the attribute type in the * AttributeTypeDescription format */ public LDAPAttributeSchema( String raw ) { attrName = "attributetypes"; parseValue( raw ); String val = (String)properties.get( SYNTAX ); if ( val != null ) { syntaxElement.syntaxString = val; syntaxElement.syntax = syntaxElement.syntaxCheck( val ); } } /** * Returns the value of a property of the object or null if there is none * * @param key the name of the property * @return the value of a property of the object or null if there is none */ private String getStringProperty( String key ) { String[] val = getQualifier( key ); return ((val != null) && (val.length > 0)) ? val[0] : null; } /** * Returns the Object Identifier of the equality matching rule in effect * for this attribute, or null if there is none * @return the Object Identifier of the equality matching rule in effect * for this attribute, or null if there is none */ public String getEqualityMatchingRule() { return getStringProperty( EQUALITY ); } /** * Returns the Object Identifier of the order matching rule in effect * for this attribute, or null if there is none * @return the Object Identifier of the order matching rule in effect * for this attribute, or null if there is none */ public String getOrderMatchingRule() { return getStringProperty( ORDERING ); } /** * Returns the Object Identifier of the substring matching rule in effect * for this attribute, or null if there is none * @return the Object Identifier of the substring matching rule in effect * for this attribute, or null if there is none */ public String getSubstringMatchingRule() { return getStringProperty( SUBSTR ); } /** * Gets the name of the attribute that this attribute inherits from, * if any. * @return the name of the attribute from which this attribute * inherits, or null if it does not have a superior. */ public String getSuperior() { return getStringProperty( SUPERIOR ); } /** * Gets the syntax of the schema element * @return one of the following values: *

    *
  • cis (case-insensitive string) *
  • ces (case-exact string) *
  • binary (binary data) *
  • int (integer) *
  • telephone (telephone number -- identical to cis, * but blanks and dashes are ignored during comparisons) *
  • dn (distinguished name) *
  • unknown (not a known syntax) *
* @deprecated use getSyntaxString instead */ public int getSyntax() { return syntaxElement.syntax; } /** * Gets the usage property of the object * * @return the usage property of the object; one of the following: *
    *
  • USER_APPLICATIONS *
  • DIRECTORY_OPERATION *
  • DISTRIBUTED_OPERATION *
  • DSA_OPERATION *
*/ public int getUsage() { int usage; try { usage = Integer.parseInt( getStringProperty( USAGE ) ); } catch ( Exception e ) { usage = USER_APPLICATIONS; } return usage; } /** * Gets the syntax of the attribute type in dotted-decimal format, * for example "1.2.3.4.5" * @return The attribute syntax in dotted-decimal format. */ public String getSyntaxString() { return syntaxElement.syntaxString; } /** * Prepares a value in RFC 2252 format for submission to a server * * @param quotingBug true if SUP and SYNTAX values are to * be quoted. This is required to work with bugs in certain LDAP servers. * @return a String ready for submission to an LDAP server. */ String getValue( boolean quotingBug ) { String s = getValuePrefix(); String val = getValue( SUPERIOR, false ); if ( val.length() > 0 ) { s += val + ' '; } val = getOptionalValues( MATCHING_RULES ); if ( val.length() > 0 ) { s += val + ' '; } val = getValue( SYNTAX, quotingBug ); if ( val.length() > 0 ) { s += val + ' '; } if ( isSingleValued() ) { s += SINGLE + ' '; } val = getOptionalValues( NOVALS ); if ( val.length() > 0 ) { s += val + ' '; } val = getOptionalValues( new String[] {USAGE} ); if ( val.length() > 0 ) { s += val + ' '; } val = getCustomValues(); if ( val.length() > 0 ) { s += val + ' '; } s += ')'; return s; } /** * Determines if the attribute type is collective * * @return true if collective */ public boolean isCollective() { return (properties != null) ? properties.containsKey( COLLECTIVE ) : false; } /** * Determines if the attribute type is single-valued * * @return true if single-valued, * false if multi-valued. */ public boolean isSingleValued() { return (properties != null) ? properties.containsKey( SINGLE ) : false; } /** * Determines if the attribute type is modifiable by users * * @return true if modifiable by users */ public boolean isUserModifiable() { return (properties != null) ? !properties.containsKey( NO_USER_MODIFICATION ) : true; } /** * Gets the definition of the attribute type in Directory format * * @return definition of the attribute type in Directory format */ public String toString() { return getValue( false ); } /** * Gets the attribute name for a schema element * * @return The attribute name of the element */ String getAttributeName() { return "attributetypes"; } // Predefined qualifiers public static final String EQUALITY = "EQUALITY"; public static final String ORDERING = "ORDERING"; public static final String SUBSTR = "SUBSTR"; public static final String SINGLE = "SINGLE-VALUE"; public static final String COLLECTIVE = "COLLECTIVE"; public static final String NO_USER_MODIFICATION = "NO-USER-MODIFICATION"; public static final String USAGE = "USAGE"; // Usage constants /** An ordinary user attribute */ public static final int USER_APPLICATIONS = 0; /** An operational attribute used for a directory operation or which * holds a directory specific value */ public static final int DIRECTORY_OPERATION = 1; /** An operational attribute used to hold server (DSA) information that * is shared among servers holding replicas of the entry */ public static final int DISTRIBUTED_OPERATION = 2; /** An operational attribute used to hold server (DSA) information that * is local to a server */ public static final int DSA_OPERATION = 3; // Qualifiers known to not have values; prepare a Hashtable static String[] NOVALS = { SINGLE, COLLECTIVE, NO_USER_MODIFICATION }; static { for( int i = 0; i < NOVALS.length; i++ ) { novalsTable.put( NOVALS[i], NOVALS[i] ); } } static final String[] MATCHING_RULES = { EQUALITY, ORDERING, SUBSTR }; // Qualifiers which we output explicitly in toString() static final String[] IGNOREVALS = { SINGLE, OBSOLETE, SUPERIOR, SINGLE, COLLECTIVE, NO_USER_MODIFICATION, SYNTAX}; protected LDAPSyntaxSchemaElement syntaxElement = new LDAPSyntaxSchemaElement(); } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPExtendedResponse.java0000664001003300100330000000575510602743265030634 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import org.ietf.ldap.client.opers.JDAPExtendedResponse; /** * Represents a server response to an extended operation request. * * @version 1.0 */ public class LDAPExtendedResponse extends LDAPResponse implements Serializable { static final long serialVersionUID = -3813049515964705320L; /** * Constructor * * @param msgid message identifier * @param rsp extended operation response * @paarm controls array of controls or null */ LDAPExtendedResponse( int msgid, JDAPExtendedResponse rsp, LDAPControl controls[] ) { super(msgid, rsp, controls); } /** * Returns the OID of the response * * @return the response OID */ public String getID() { JDAPExtendedResponse result = (JDAPExtendedResponse)getProtocolOp(); return result.getID(); } /** * Returns the raw bytes of the value part of the response * * @return response as a raw array of bytes */ public byte[] getValue() { JDAPExtendedResponse result = (JDAPExtendedResponse)getProtocolOp(); return result.getValue(); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPResponseQueue.java0000664001003300100330000000451210602743265030146 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.Vector; /** * Represents the message queue associated with a particular LDAP * operation or operations. * */ public class LDAPResponseQueue extends LDAPMessageQueueImpl { static final long serialVersionUID = 901897097111294329L; /** * Constructor * * @param asynchOp a boolean flag that is true if the object is used for * asynchronous LDAP operations * @see org.ietf.ldap.LDAPAsynchronousConnection */ LDAPResponseQueue( boolean asynchOp ) { super( asynchOp ); } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSearchResultReference.java0000664001003300100330000000546710602743265031600 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import org.ietf.ldap.client.opers.JDAPSearchResultReference; /** * An LDAPSearchResultReference object encapsulates a continuation * reference from a search operation. * * @version 1.0 */ public class LDAPSearchResultReference extends LDAPMessage { static final long serialVersionUID = -7816778029315223117L; /** * A list of LDAP URLs that are referred to. */ private String _URLs[]; /** * Constructor * * @param msgid message identifier * @param resRef search result reference response * @param controls array of controls or null * @see org.ietf.ldap.LDAPEntry */ LDAPSearchResultReference( int msgid, JDAPSearchResultReference resRef, LDAPControl[]controls ) { super( msgid, resRef, controls ); _URLs = resRef.getUrls(); } /** * Returns a list of LDAP URLs that are referred to * * @return a list of URLs. */ public String[] getReferrals() { return _URLs; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPSaslBind.java0000664001003300100330000004375110602743265027052 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import org.ietf.ldap.client.*; import org.ietf.ldap.client.opers.*; import org.ietf.ldap.ber.stream.*; import org.ietf.ldap.util.*; import java.io.*; import java.net.*; import javax.security.auth.callback.CallbackHandler; import javax.security.sasl.*; /** * Authenticates to a server using SASL */ public class LDAPSaslBind implements LDAPBindHandler, Serializable { static final long serialVersionUID = -7615315715163655443L; /** * Construct an object which can authenticate to an LDAP server * using the specified name and a specified SASL mechanism. * * @param dn if non-null and non-empty, specifies that the connection and * all operations through it should authenticate with dn as the * distinguished name * @param mechanisms array of mechanism names, e.g. { "GSSAPI", "SKEY" } * @param props optional additional properties of the desired * authentication mechanism, e.g. minimum security level * @param cbh a class which may be called by the SASL framework to * obtain additional required information */ public LDAPSaslBind( String dn, String[] mechanisms, Map props, CallbackHandler cbh ) { _dn = dn; _mechanisms = mechanisms; _props = props; _cbh = cbh; } /** * Authenticates to the LDAP server (that the object is currently * connected to) using the parameters that were provided to the * constructor. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param ldc an active connection to a server, which will have * the new authentication state on return from the method * @exception LDAPException Failed to authenticate to the LDAP server. */ public void bind( LDAPConnection ldc ) throws LDAPException { if ( _props == null ) { _props = new HashMap(); } String packageNames = (String)_props.get( CLIENTPKGS ); if ( packageNames == null ) { packageNames = System.getProperty( CLIENTPKGS ); } if ( packageNames == null ) { packageNames = ldc.DEFAULT_SASL_PACKAGE; } StringTokenizer st = new StringTokenizer( packageNames, "|" ); while( st.hasMoreTokens() ) { String packageName = st.nextToken(); try { _saslClient = getClient( ldc, packageName ); if ( _saslClient != null ) { break; } } catch ( LDAPException e ) { if ( !st.hasMoreTokens() ) { throw e; } } } if ( _saslClient != null ) { bind( ldc, true ); return; } else { ldc.printDebug( "LDAPSaslBind.bind: getClient " + "returned null" ); } } /** * Authenticates to the LDAP server (that the object is currently * connected to) using the parameters that were provided to the * constructor. If the requested SASL mechanism is not * available, an exception is thrown. If the object has been * disconnected from an LDAP server, this method attempts to reconnect * to the server. If the object had already authenticated, the old * authentication is discarded. * * @param ldapurls urls which may be selected to connect and bind to * @param ldc an active connection to a server, which will have * the new authentication state on return from the method * @exception LDAPReferralException Failed to authenticate to the LDAP * server */ public void bind( String[] ldapurls, LDAPConnection conn ) throws LDAPReferralException { try { // ??? What to do with the URLs? bind( conn ); } catch ( LDAPReferralException ex ) { throw ex; } catch ( LDAPException ex ) { // ??? throw new LDAPReferralException( ex.getMessage(), ex.getResultCode(), ex.getLDAPErrorMessage() ); } } /** * Get a SaslClient object from the Sasl framework * * @param ldc contains the host name * @param packageName package containing a ClientFactory * @return a SaslClient supporting one of the mechanisms * of the member variable _mechanisms. * @exception LDAPException on error producing a client */ private Object getClient( LDAPConnection ldc, String packageName ) throws LDAPException { try { Object[] args = new Object[6]; args[0] = _mechanisms; args[1] = _dn; args[2] = "ldap"; args[3] = ldc.getHost(); args[4] = _props; args[5] = _cbh; String[] argNames = new String[6]; argNames[0] = "[Ljava.lang.String;"; argNames[1] = "java.lang.String"; argNames[2] = "java.lang.String"; argNames[3] = "java.lang.String"; argNames[4] = "java.util.Map"; argNames[5] = CALLBACK_HANDLER; // Get a mechanism driver return DynamicInvoker.invokeMethod( null, "javax.security.sasl.Sasl", "createSaslClient", args, argNames ); } catch ( Exception e ) { ldc.printDebug( "LDAPSaslBind.getClient: " + packageName+".Sasl.createSaslClient: " + e ); throw new LDAPException( e.toString(), LDAPException.OTHER ); } } void bind( LDAPConnection ldc, boolean rebind ) throws LDAPException { if ( (ldc.isConnected() && rebind) || !ldc.isConnected() ) { try { String className = _saslClient.getClass().getName(); ldc.printDebug( "LDAPSaslBind.bind: calling " + className+".hasInitialResponse" ); // Get initial response if any byte[] outVals = null; if ( hasInitialResponse() ) { outVals = evaluateChallenge( new byte[0] ); } String mechanismName = getMechanismName(); ldc.printDebug( "LDAPSaslBind.bind: mechanism " + "name is " + mechanismName ); boolean isExternal = isExternalMechanism( mechanismName ); ldc.printDebug( "LDAPSaslBind.bind: calling " + "saslBind" ); JDAPBindResponse response = saslBind( ldc, mechanismName, outVals ); int resultCode = response.getResultCode(); while ( !checkForSASLBindCompletion( ldc, resultCode ) ) { if ( isExternal ) { continue; } byte[] b = response.getCredentials(); if ( b == null ) { b = new byte[0]; } outVals = evaluateChallenge( b ); ldc.printDebug( "SaslClient.evaluateChallenge returned [" + ((outVals != null) ? new String( outVals ) : "null") + "] for [" + new String( b ) + "]" ); if ( resultCode == LDAPException.SUCCESS ) { // we're done; don't expect to send another BIND if ( outVals != null ) { throw new LDAPException( "Protocol error: attempting to send " + "response after completion" ); } break; } response = saslBind( ldc, mechanismName, outVals ); resultCode = response.getResultCode(); } // Make sure authentication REALLY is complete if ( !isComplete() ) { // Authentication session hijacked! throw new LDAPException( "The server indicates that " + "authentication is successful" + ", but the SASL driver " + "indicates that authentication" + " is not yet done.", LDAPException.OTHER ); } else if ( resultCode == LDAPException.SUCCESS ) { // Has a security layer been negotiated? String qop = (String)getNegotiatedProperty( QOP ); if ( (qop != null) && (qop.equalsIgnoreCase("auth-int") || qop.equalsIgnoreCase("auth-conf")) ) { // Use SaslClient.wrap() and SaslClient.unwrap() for // future communication with server ldc.setInputStream( new SecureInputStream( ldc.getInputStream(), _saslClient ) ); ldc.setOutputStream( new SecureOutputStream( ldc.getOutputStream(), _saslClient ) ); } ldc.markConnAsBound(); } } catch (LDAPException e) { throw e; } catch (Exception e) { throw new LDAPException(e.toString(), LDAPException.OTHER); } } } boolean isExternalMechanism( String name ) { return name.equalsIgnoreCase( LDAPConnection.EXTERNAL_MECHANISM ); } // Wrapper functions for dynamically invoking methods of SaslClient private boolean checkForSASLBindCompletion( LDAPConnection ldc, int resultCode ) throws LDAPException { ldc.printDebug( "LDAPSaslBind.bind: saslBind " + "returned " + resultCode ); if ( isComplete() ) { if ( (resultCode == LDAPException.SUCCESS) || (resultCode == LDAPException.SASL_BIND_IN_PROGRESS) ) { return true; } else { throw new LDAPException( "Authentication failed", resultCode ); } } else { return false; } } private boolean hasInitialResponse() throws LDAPException { if ( !_useReflection ) { return ((SaslClient)_saslClient).hasInitialResponse(); } else { return ((Boolean)DynamicInvoker.invokeMethod( _saslClient, _saslClient.getClass().getName(), "hasInitialResponse", null, null)).booleanValue(); } } private String getMechanismName() throws LDAPException { if ( !_useReflection ) { return ((SaslClient)_saslClient).getMechanismName(); } else { return (String)DynamicInvoker.invokeMethod( _saslClient, _saslClient.getClass().getName(), "getMechanismName", null, null ); } } private boolean isComplete() throws LDAPException { if ( !_useReflection ) { return ((SaslClient)_saslClient).isComplete(); } else { return ((Boolean)DynamicInvoker.invokeMethod( _saslClient, _saslClient.getClass().getName(), "isComplete", null, null)).booleanValue(); } } private byte[] evaluateChallenge( byte[] b ) throws LDAPException { try { if ( !_useReflection ) { return ((SaslClient)_saslClient).evaluateChallenge( b ); } else { Object[] args = { b }; String[] argNames = { "[B" }; // class name for byte array return (byte[])DynamicInvoker.invokeMethod( _saslClient, _saslClient.getClass().getName(), "evaluateChallenge", args, argNames ); } } catch ( Exception e ) { throw new LDAPException( "", LDAPException.PARAM_ERROR, e ); } } private Object getNegotiatedProperty( String propName ) throws LDAPException { try { if ( !_useReflection ) { return ((SaslClient)_saslClient).getNegotiatedProperty( propName ); } else { Object[] args = { propName }; String[] argNames = { "String" }; return DynamicInvoker.invokeMethod( _saslClient, _saslClient.getClass().getName(), "getNegotiatedProperty", args, argNames ); } } catch ( Exception e ) { throw new LDAPException( "", LDAPException.PARAM_ERROR, e ); } } private JDAPBindResponse saslBind( LDAPConnection ldc, String mechanismName, byte[] credentials ) throws LDAPException { LDAPResponseQueue myListener = ldc.getResponseListener(); try { ldc.sendRequest( new JDAPBindRequest( 3, _dn, mechanismName, credentials ), myListener, ldc.getConstraints() ); LDAPMessage response = myListener.getResponse(); JDAPProtocolOp protocolOp = response.getProtocolOp(); if ( protocolOp instanceof JDAPBindResponse ) { return (JDAPBindResponse)protocolOp; } else { throw new LDAPException( "Unknown response from the " + "server during SASL bind", LDAPException.OTHER ); } } finally { ldc.releaseResponseListener( myListener ); } } private static final String CALLBACK_HANDLER = "javax.security.auth.callback.CallbackHandler"; static final String CLIENTPKGS = "javax.security.sasl.client.pkgs"; private static final String QOP = "javax.security.sasl.qop"; private static final String REFLECTION_PROP = "org.ietf.ldap.sasl.reflect"; private String _dn; private String[] _mechanisms; private Map _props = null; private CallbackHandler _cbh; private Object _saslClient = null; private static boolean _useReflection = ( System.getProperty(REFLECTION_PROP) != null ); // ??? Security layer support not implemented class SecureInputStream extends InputStream { public SecureInputStream( InputStream is, Object saslClient ) { _input = is; _saslClient = saslClient; } public int read() throws IOException { return _input.read(); } private InputStream _input; private Object _saslClient; } class SecureOutputStream extends OutputStream { public SecureOutputStream( OutputStream os, Object saslClient ) { _output = os; _saslClient = saslClient; } public void write( int b ) throws IOException { _output.write( b ); } private OutputStream _output; private Object _saslClient; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPReferralHandler.java0000664001003300100330000000355310602743265030407 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; /** * Common base interface for referral handlers */ public interface LDAPReferralHandler { } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPUrl.java0000664001003300100330000006337510602743265026121 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.util.*; import java.io.*; import java.net.MalformedURLException; import org.ietf.ldap.factory.*; /** * Represents an LDAP URL. The complete specification for LDAP URLs is in * RFC 1959. In addition, the secure ldap (ldaps://) is also * supported. LDAP URLs have the following format: * *
 * "ldap[s]://" [ hostName [":" portNumber] ] "/"
 *                      distinguishedName
 *          ["?" attributeList ["?" scope
 *                      "?" filterString ] ]
 * 
* where *

*

    *
  • all text within double-quotes are literal

    *

  • hostName and portNumber * identify the location of the LDAP server.

    *

  • distinguishedName is the name of an entry * within the given directory (the entry represents the starting point * of the search)

    *

  • attributeList contains a list of attributes * to retrieve (if null, fetch all attributes). This is a comma-delimited * list of attribute names.

    *

  • scope is one of the following: *
      *
    • base indicates that this is a search only for the * specified entry *
    • one indicates that this is a search for matching entries * one level under the specified entry (and not including the entry itself) *
    • sub indicates that this is a search for matching entries * at all levels under the specified entry (including the entry itself) *
    *

    * If not specified, scope is base by * default.

    *

  • filterString is a human-readable representation * of the search criteria. This value is used only for one-level or subtree * searches.

    *

*

* Note that if scope and filterString * are not specified, an LDAP URL identifies exactly one entry in the * directory.

* The same encoding rules for other URLs (e.g. HTTP) apply for LDAP * URLs. Specifically, any "illegal" characters are escaped with * %HH, where HH represent the * two hex digits which correspond to the ASCII value of the character. * This encoding is only legal (or necessary) on the DN and filter portions * of the URL. * * @version 1.0 */ public class LDAPUrl implements java.io.Serializable { static final long serialVersionUID = -3245440798565713640L; public static String defaultFilter = "(objectClass=*)"; private String _hostName; private int _portNumber; private String _DN; private Vector _attributes; private int _scope; private String _filter; private String _URL; private boolean _secure; private String[] _extensions; private static LDAPSocketFactory _factory; /** * The default port number for secure LDAP connections. * @see org.ietf.ldap.LDAPUrl#LDAPUrl(String, int, String, String[], int, * String, String[]) */ public static final int DEFAULT_SECURE_PORT = 636; /** * Constructs a URL object with the specified string as URL. * @param url LDAP search expression in URL form * @exception MalformedURLException failed to parse URL */ public LDAPUrl( String url ) throws java.net.MalformedURLException { _attributes = null; _scope = LDAPConnection.SCOPE_BASE; _filter = defaultFilter; _URL = url; parseUrl(url); } /** * Constructs with the specified host, port, and DN. This form is used to * create URL references to a particular object in the directory. * @param host host name of the LDAP server, or null for "nearest X.500/LDAP" * @param port port number of the LDAP server (use LDAPConnection.DEFAULT_PORT for * the default port) * @param DN distinguished name of the object */ public LDAPUrl( String host, int port, String DN ) { initialize( host, port, DN, null, LDAPConnection.SCOPE_BASE, defaultFilter, null ); } /** * Constructs a full-blown LDAP URL to specify an LDAP search operation. * @param host host name of the LDAP server, or null for "nearest X.500/LDAP" * @param port port number of the LDAP server (use LDAPConnection.DEFAULT_PORT for * the default non-secure port or LDAPUrl.DEFAULT_SECURE_PORT for the default * secure port) * @param DN distinguished name of the object * @param attributes list of the attributes to return. Use null for "all * attributes." * @param scope depth of the search (in DN namespace). Use one of the LDAPConnection scopes: * SCOPE_BASE, SCOPE_ONE, or SCOPE_SUB. * @param filter LDAP filter string (as defined in RFC 1558). Use null for * no filter (this effectively makes the URL reference a single object). * @param extensions LDAP URL extensions specified; may be null or * empty. Each extension is a type=value expression. * The =value part MAY be omitted. The expression * may be prefixed with '!' if it is mandatory for * evaluation of the URL. */ public LDAPUrl( String host, int port, String DN, String[] attributes, int scope, String filter, String[] extensions ) { if ( attributes != null ) { Vector list = new Vector(); for ( int k = 0; k < attributes.length; k++ ) { list.addElement(attributes[k]); } initialize( host, port, DN, list.elements(), scope, filter, extensions ); } else { initialize( host, port, DN, null, scope, filter, extensions ); } } /** * Decodes a URL-encoded string. Any occurences of %HH are decoded to the * hex value represented. However, this routine does NOT decode "+" * into " ". See RFC 1738 for full details about URL encoding/decoding. * @param URLEncoded a segment of a URL which was encoded using the URL * encoding rules * @exception MalformedURLException failed to parse URL */ public static String decode( String URLEncoded ) throws MalformedURLException { StringBuffer decoded = new StringBuffer (URLEncoded); int srcPos = 0, dstPos = 0; try { while (srcPos < decoded.length()) { if (decoded.charAt (srcPos) != '%') { if (srcPos != dstPos) decoded.setCharAt (dstPos, decoded.charAt (srcPos)); srcPos++; dstPos++; continue; } decoded.setCharAt (dstPos, (char) ((hexValue(decoded.charAt (srcPos+1))<<4) | (hexValue(decoded.charAt (srcPos+2))))); dstPos++; srcPos += 3; } } catch (StringIndexOutOfBoundsException sioob) { // Indicates that a "%" character occured without the following HH throw new MalformedURLException (); } /* 070497 Url problems submitted by Netscape */ /* decoded.setLength (dstPos+1); */ decoded.setLength (dstPos); return decoded.toString (); } /** * Encodes an arbitrary string. Any illegal characters are encoded as * %HH. However, this routine does NOT decode "+" into " " (this is a HTTP * thing, not a general URL thing). Note that, because Sun's URLEncoder * does do this encoding, we can't use it. * See RFC 1738 for full details about URL encoding/decoding. * @param toEncode an arbitrary string to encode for embedding within a URL */ public static String encode( String toEncode ) { StringBuffer encoded = new StringBuffer (toEncode.length()+10); for (int currPos = 0; currPos < toEncode.length(); currPos++) { char currChar = toEncode.charAt (currPos); if ((currChar >= 'a' && currChar <= 'z') || (currChar >= 'A' && currChar <= 'Z') || (currChar >= '0' && currChar <= '9') || ("$-_.+!*'(),".indexOf (currChar) > 0)) { // this is the criteria for "doesn't need to be encoded" (whew!) encoded.append (currChar); } else { encoded.append ("%"); encoded.append (hexChar ((currChar & 0xF0) >> 4)); encoded.append (hexChar (currChar & 0x0F)); } } return encoded.toString(); } /** * Return the collection of attributes specified in the URL, or null * for "every attribute" * @return string array of attributes. */ public String[] getAttributeArray() { if ( _attributes == null ) { return new String[0]; } else { String[] attrNames = new String[_attributes.size()]; Enumeration attrs = getAttributes(); int i = 0; while ( attrs.hasMoreElements() ) { attrNames[i++] = (String)attrs.nextElement(); } return attrNames; } } /** * Return the collection of attributes specified in the URL, or null * for "every attribute" * @return enumeration of attributes. */ public Enumeration getAttributes() { if ( _attributes == null ) { return null; } else { return _attributes.elements(); } } /** * Return the distinguished name encapsulated in the URL * @return target distinguished name. */ public String getDN() { return _DN; } /** * Returns the search filter (RFC 1558), or the default if none was * specified. * @return the search filter. */ public String getFilter() { return _filter; } /** * Return the host name of the LDAP server * @return LDAP host. */ public String getHost() { return _hostName; } /** * Return the port number for the LDAP server * @return port number. */ public int getPort() { return _portNumber; } /** * Returns the scope of the search, according to the values * SCOPE_BASE, SCOPE_ONE, SCOPE_SUB as defined in LDAPConnection. This refers * to how deep within the directory namespace the search will look * @return search scope. */ public int getScope() { return _scope; } /** * Returns the scope of the search. If the scope returned is -1, then * the given string is not for the scope. * @param str the string against which to compare the scope type * @returns the scope of the search, -1 is returned if the given string is * not SUB, ONE or BASE (the acceptable LDAPConnection values for scope). */ private int getScope(String str) { int s = -1; if (str.equalsIgnoreCase("base")) s = LDAPConnection.SCOPE_BASE; else if (str.equalsIgnoreCase("one")) s = LDAPConnection.SCOPE_ONE; else if (str.equalsIgnoreCase("sub")) s = LDAPConnection.SCOPE_SUB; return s; } /** * Gets the socket factory to be used for ldaps:// URLs. *

* If the factory is not explicitly specified with * LDAPUrl.setSocketFactory, the method will * attempt the determine the default factory based on the * available factories in the org.ietf.ldap.factory package. * * @return the socket factory to be used for ldaps:// URLs */ public static LDAPSocketFactory getSocketFactory() { if (_factory == null) { // No factory explicity set, try to determine // the default one. try { // First try iPlanet JSSSocketFactory Class c = Class.forName("org.ietf.ldap.factory.JSSSocketFactory"); _factory = (LDAPSocketFactory) c.newInstance(); } catch (Throwable e) { } if (_factory != null) { return _factory; } try { // then try Sun JSSESocketFactory _factory = new JSSESocketFactory(null); } catch (Throwable e) { } } return _factory; } /** * Returns true if the secure ldap protocol is used. * @return true if ldaps is used. */ public boolean isSecure() { return _secure; } /** * Sets the socket factory to be used for ldaps:// URLs. * Overrides the default factory assigned by the LDAPUrl * class. * @param the socket factory to be used for ldaps:// URLs * @see org.ietf.ldap.LDAPUrl#getSocketFactory */ public static void setSocketFactory( LDAPSocketFactory factory ) { _factory = factory; } /** * Sets the protocol to ldaps or ldap * * @param secure true for ldaps */ public void setSecure( boolean secure ) { _secure = secure; initialize( _hostName, _portNumber, _DN, getAttributes(), _scope, _filter, _extensions ); } /** * Returns the URL in String format * * @return the URL in String format */ public String toString() { return _URL; } /** * Parse URL as defined in RFC 1959. Beyond the RFC, the secure ldap * (ldaps) is also supported. */ private void parseUrl(String url) throws MalformedURLException { StringTokenizer urlParser = new StringTokenizer (url, ":/?", true); String currentToken; String str = null; try { currentToken = urlParser.nextToken(); if (currentToken.equalsIgnoreCase ("LDAPS")) { _secure = true; } else if (!currentToken.equalsIgnoreCase ("LDAP")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); if (!currentToken.equals(":")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); if (!currentToken.equals("/")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); if (!currentToken.equals("/")) { throw new MalformedURLException (); } currentToken = urlParser.nextToken(); } catch (NoSuchElementException e) { throw new MalformedURLException (); } // host-port if (currentToken.equals ("/")) { _hostName = null; _portNumber = _secure ? DEFAULT_SECURE_PORT : LDAPConnection.DEFAULT_PORT; } else if (currentToken.equals (":")) { // port number without host name is not allowed throw new MalformedURLException ("No hostname"); } else if (currentToken.equals ("?")) { throw new MalformedURLException ("No host[:port]"); } else { _hostName = currentToken; if (urlParser.countTokens() == 0) { _portNumber = _secure ? DEFAULT_SECURE_PORT : LDAPConnection.DEFAULT_PORT; return; } currentToken = urlParser.nextToken (); // either ":" or "/" if (currentToken.equals (":")) { try { _portNumber = Integer.parseInt (urlParser.nextToken()); } catch (NumberFormatException nf) { throw new MalformedURLException ("Port not a number"); } catch (NoSuchElementException ex) { throw new MalformedURLException ("No port number"); } if (urlParser.countTokens() == 0) { return; } else if (! urlParser.nextToken().equals("/")) { throw new MalformedURLException (); } } else if (currentToken.equals ("/")) { _portNumber = _secure ? DEFAULT_SECURE_PORT : LDAPConnection.DEFAULT_PORT; } else { // expecting ":" or "/" throw new MalformedURLException (); } } // DN if (!urlParser.hasMoreTokens ()) { return; } _DN = decode(readNextConstruct(urlParser)); if (_DN.equals("?")) { _DN = ""; } else if (_DN.equals("/")) { throw new MalformedURLException (); } // attribute if (!urlParser.hasMoreTokens ()) { return; } str = readNextConstruct(urlParser); if (!str.equals("?")) { StringTokenizer attributeParser = new StringTokenizer (decode(str), ", "); _attributes = new Vector (); while (attributeParser.hasMoreTokens()) { _attributes.addElement (attributeParser.nextToken()); } } // scope if (!urlParser.hasMoreTokens ()) { return; } str = readNextConstruct(urlParser); if (!str.equals("?")) { _scope = getScope(str); if (_scope < 0) { throw new MalformedURLException("Bad scope:" + str); } } // filter if (!urlParser.hasMoreTokens ()) { return; } str = readNextConstruct(urlParser); _filter = decode(str); checkBalancedParentheses(_filter); if (!_filter.startsWith("(") && !_filter.endsWith(")")) { _filter = "(" + _filter + ")"; } // Nothing after the filter is allowed if (urlParser.hasMoreTokens()) { throw new MalformedURLException(); } } private void checkBalancedParentheses( String filter ) throws MalformedURLException { int parenCnt =0; StringTokenizer filterParser = new StringTokenizer (filter, "()", true); while (filterParser.hasMoreElements()) { String token = filterParser.nextToken(); if (token.equals("(")) { parenCnt++; } else if (token.equals(")")) { if (--parenCnt < 0) { throw new MalformedURLException( "Unbalanced filter parentheses"); } } } if (parenCnt != 0) { throw new MalformedURLException("Unbalanced filter parentheses"); } } /** * Initializes URL object. */ private void initialize( String host, int port, String DN, Enumeration attributes, int scope, String filter, String[] extensions ) { _hostName = host; _DN = DN; _portNumber = port; _filter = (filter != null) ? filter : defaultFilter; _scope = scope; _extensions = extensions; if (attributes != null) { _attributes = new Vector (); while (attributes.hasMoreElements()) { _attributes.addElement (attributes.nextElement()); } } else _attributes = null; StringBuffer url = new StringBuffer (_secure ? "LDAPS://" :"LDAP://"); if (host != null) { url.append (host); url.append (':'); url.append (String.valueOf (port)); } url.append ('/'); url.append (encode (DN)); if (attributes != null) { url.append ('?'); Enumeration attrList = _attributes.elements(); boolean firstElement = true; while (attrList.hasMoreElements()) { if (!firstElement) url.append (','); else firstElement = false; url.append ((String)attrList.nextElement()); } } if (filter != null) { if (attributes == null) url.append ('?'); url.append ('?'); switch (scope) { default: case LDAPConnection.SCOPE_BASE: url.append ("base"); break; case LDAPConnection.SCOPE_ONE: url.append ("one"); break; case LDAPConnection.SCOPE_SUB: url.append ("sub"); break; } url.append ('?'); url.append (filter); } _URL = url.toString(); } /** * Reads next construct from the given string parser. * @param parser the string parser * @return the next construct which can be an attribute, scope or filter. * @exception java.net.MalformedURLException Get thrown when the url format * is incorrect. */ private String readNextConstruct(StringTokenizer parser) throws MalformedURLException { try { if (parser.hasMoreTokens()) { String tkn = parser.nextToken(); if (tkn.equals("?")) { // empty construct return tkn; } else if (parser.hasMoreTokens()){ // Remove '?' delimiter String delim = parser.nextToken(); if (!delim.equals("?")) { throw new MalformedURLException(); } } return tkn; } } catch (NoSuchElementException e) { throw new MalformedURLException(); } return null; } /** * Parses hex character into integer. */ private static int hexValue (char hexChar) throws MalformedURLException { if (hexChar >= '0' && hexChar <= '9') return hexChar - '0'; if (hexChar >= 'A' && hexChar <= 'F') return hexChar - 'A' + 10; if (hexChar >= 'a' && hexChar <= 'f') return hexChar - 'a' + 10; throw new MalformedURLException (); } private static char hexChar (int hexValue) { if (hexValue < 0 || hexValue > 0xF) return 'x'; if (hexValue < 10) return (char)(hexValue + '0'); return (char)((hexValue - 10) + 'a'); } /** * Reports if the two objects represent the same URL * * @param url the object to be compared to * @return true if the two are equivalent */ public boolean equals( LDAPUrl url ) { if ( getHost() == null ) { if ( url.getHost() != null ) { return false; } } else if ( !getHost().equals( url.getHost() ) ) { return false; } if ( getPort() != url.getPort() ) { return false; } if ( getDN() == null ) { if ( url.getDN() != null ) { return false; } } else if ( !getDN().equals( url.getDN() ) ) { return false; } if ( getFilter() == null ) { if ( url.getFilter() != null ) { return false; } } else if ( !getFilter().equals( url.getFilter() ) ) { return false; } if ( getScope() != url.getScope() ) { return false; } if ( _attributes == null ) { if ( url._attributes != null ) { return false; } } else if ( _attributes.size() != url._attributes.size() ) { return false; } else { for( int i = 0; i < _attributes.size(); i++ ) { if ( _attributes.elementAt( i ) != url._attributes.elementAt( i ) ) { return false; } } } return true; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/org/ietf/ldap/LDAPConstraints.java0000664001003300100330000003006710602743265027656 0ustar viveklvivekl/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 2001 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package org.ietf.ldap; import java.io.Serializable; import java.util.Hashtable; /** * Represents a set of operation preferences. * You can set these preferences for a particular operation * by creating an LDAPConstraints object, * specifying your preferences, and passing the object to * the proper LDAPConnection method. *

* * @version 1.0 */ public class LDAPConstraints implements Cloneable, Serializable { static final long serialVersionUID = 6506767263918312029L; private int _hop_limit = 5; private LDAPReferralHandler _referralHandler = null; private boolean referrals = false; private int _time_limit = 0; private LDAPControl[] _serverControls = null; private Hashtable _properties = null; /** * Constructs an LDAPConstraints object that specifies * the default set of constraints. */ public LDAPConstraints() { } /** * Constructs a new LDAPConstraints object and allows you * to specify the constraints in that object. *

* @param msLimit maximum time in milliseconds to wait for results (0 * by default, which means that there is no maximum time limit) * @param doReferrals specify true to follow referrals * automatically, or False to throw an * LDAPReferralException error if the server sends back * a referral (False by default) * @param handler specifies the object that * implements the LDAPReferralHandler interface (you need to * define this class). The object will be used when the client * follows referrals automatically. See org.ietf.ldap.LDAPAuthHandler * and org.ietf.ldap.LDAPReferralHandler. * (This field is null by default.) * @param hop_limit maximum number of referrals to follow in a * sequence when attempting to resolve a request * @see org.ietf.ldap.LDAPConnection#setOption(int, java.lang.Object) */ public LDAPConstraints( int msLimit, boolean doReferrals, LDAPReferralHandler handler, int hop_limit ) { _time_limit = msLimit; referrals = doReferrals; _referralHandler = handler; _hop_limit = hop_limit; _serverControls = null; } /** * Returns the maximum number of milliseconds to wait for any operation * under these constraints. If 0, there is no maximum time limit * on waiting for the operation results. * @return maximum number of milliseconds to wait for operation results. */ public int getTimeLimit() { return _time_limit; } /** * Specifies whether nor not referrals are followed automatically. * Returns true if referrals are to be followed automatically, * or false if referrals throw an * LDAPReferralException. * @return true if referrals are followed automatically, * false if referrals throw an * LDAPReferralException. */ public boolean getReferralFollowing() { return referrals; } /** * Returns the object that provides the mechanism for authenticating to the * server on referrals. This object must implement the * LDAPReferralHandler interface. * @return object to use to authenticate to the server on referrals * @see org.ietf.ldap.LDAPReferralHandler */ public LDAPReferralHandler getReferralHandler() { return _referralHandler; } /** * Returns the maximum number of hops to follow during a referral. * @return maximum number of hops to follow during a referral. */ public int getHopLimit() { return _hop_limit; } /** * Returns any server controls to be applied by the server * to LDAP operations. * @return server controls for the server to apply to LDAP operations. * @see org.ietf.ldap.LDAPControl * @see org.ietf.ldap.LDAPConnection#getOption * @see org.ietf.ldap.LDAPConnection#setOption */ public LDAPControl[] getControls() { return _serverControls; } /** * Gets a property of a constraints object which has been assigned with * setProperty. Null is returned if the property is not defined. * * @param name Name of the property to retrieve */ public Object getProperty( String name ) { if ( _properties == null ) { return null; } return _properties.get( name ); } /** * Sets the maximum number of milliseconds to wait for any operation * under these constraints. If 0, there is no maximum time limit * on waiting for the operation results. If the time limit is exceeded, * an LDAPException with the result code LDAPException.TIME_LIMIT * is thrown. * @param msLimit Maximum number of milliseconds to wait for operation * results (0 by default, which means that there is no maximum time * limit.) * @see org.ietf.ldap.LDAPException#LDAP_TIMEOUT */ public void setTimeLimit( int msLimit ) { _time_limit = msLimit; } /** * Specifies whether or not referrals are followed automatically. * Specify true if referrals are to be followed automatically, * or false if referrals are to throw an * LDAPReferralException. * (By default, this is set to false.) *

* If you set this to true, you need to create an object of * this class that implements either the LDAPAuthHandler or * LDAPBind interface. The LDAPAuthProvider object * identifies the method for retrieving authentication information which * will be used when connecting to other LDAP servers during referrals. * This object should be passed to the setReferralHandler method. * Alternatively, the LDAPBind object identifies an * authentication mechanism to be used instead of the default * authentication mechanism when following referrals. This * object should be passed to the setBindHandler method. * @param doReferrals set to true if referrals should be * followed automatically, or False if referrals should throw * an LDAPReferralException * @see org.ietf.ldap.LDAPBindHandler * @see org.ietf.ldap.LDAPAuthHandler * @see org.ietf.ldap.LDAPAuthProvider */ public void setReferralFollowing( boolean doReferrals ) { referrals = doReferrals; } /** * Specifies the object that provides the method for getting * authentication information. This object must belong to a class * that implements the LDAPReferralHandler interface. * (By default, this is null.) This method sets the * LDAPReferralHandler object to null for this constraint. * @param handler object to use to obtain information for * authenticating to other LDAP servers during referrals */ public void setReferralHandler( LDAPReferralHandler handler ) { _referralHandler = handler; } /** * Sets maximum number of hops to follow in sequence during a referral. * (By default, this is 5.) * @param hop_limit maximum number of hops to follow during a referral */ public void setHopLimit( int hop_limit ) { _hop_limit = hop_limit; } /** * Sets a server control for LDAP operations. * @param control server control for LDAP operations * @see org.ietf.ldap.LDAPControl */ public void setControls( LDAPControl control ) { _serverControls = new LDAPControl[1]; _serverControls[0] = control; } /** * Sets an array of server controls for LDAP operations. * @param controls an array of server controls for LDAP operations * @see org.ietf.ldap.LDAPControl */ public void setControls( LDAPControl[] controls ) { _serverControls = controls; } /** * Sets a property of the constraints object. * No property names have been defined at this time, but the mechanism * is in place in order to support revisional as well as dynamic and * proprietary extensions to operation modifiers. * * @param name Name of the property to set * @param value Value to assign to the property */ public void setProperty( String name, Object value ) throws LDAPException { if ( _properties == null ) { _properties = new Hashtable(); } _properties.put( name, value ); } /** * Return a string representation of the object for debugging * * @return A string representation of the object */ public String toString() { StringBuffer sb = new StringBuffer("LDAPConstraints {"); sb.append("time limit " + getTimeLimit() + ", "); sb.append("referrals " + getReferralFollowing() + ", "); sb.append("hop limit " + getHopLimit() + ", "); sb.append("referral handler " + getReferralHandler() + ", "); LDAPControl[] controls = getControls(); if ( controls != null ) { sb.append(", server controls "); for (int i =0; i < controls.length; i++) { sb.append(controls[i].toString()); if ( i < (controls.length - 1) ) { sb.append(" "); } } } sb.append('}'); return sb.toString(); } /** * Makes a copy of an existing set of constraints. * @return a copy of an existing set of constraints */ public Object clone() { LDAPConstraints o = new LDAPConstraints(); o._time_limit = this._time_limit; o.referrals = this.referrals; o._referralHandler = this._referralHandler; o._hop_limit = this._hop_limit; if ( (this._serverControls != null) && (this._serverControls.length > 0) ) { o._serverControls = new LDAPControl[this._serverControls.length]; for( int i = 0; i < this._serverControls.length; i++ ) o._serverControls[i] = (LDAPControl)this._serverControls[i].clone(); } return o; } } ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/build.xml0000664001003300100330000001260010602743265023217 0ustar viveklvivekl ant compile -> compiles source files ant jars -> makes jar files of compiled source ant clean -> guess ldapjdk-4.18/mozilla/directory/java-sdk/ietfldap/README.html0000664001003300100330000000311607372633522023227 0ustar viveklvivekl The Mozilla implementation of org.ietf.ldap

The Mozilla implementation of org.ietf.ldap


Rob Weltman
November 8, 2001

 
This is a new branch of the Directory SDK for Java that complies with the proposed IETF standard API. While very similar to the netscape.ldap branch, it is different enough that just changing your import statements from "import netscape.ldap.*;" to "import org.ietf.ldap.*;" won't let you compile. There will be a migration guide and sample apps soon.

The code requires JDK 1.2 or higher, or JDK 1.8 if you have the Collections classes in your CLASSPATH.

Build the SDK with ant .
  • ant                Compiles and creates a JAR file
  • ant javadoc    Generates javadocs
At this point, consider the branch to be of Alpha quality. It implements just about everything in the IETF API except for startTLS and stopTLS.

SASL clients will require the new Java SASL API being defined in JSR 28 in the JCP. There are docs for the proposed new API that you can browse. Soon there will be a Reference Implementation for download.

ldapjdk-4.18/mozilla/directory/buildjsdk.txt0000664001003300100330000001740706751717512020642 0ustar viveklvivekl====================================================================== NETSCAPE DIRECTORY SDK FOR JAVA: BUILD INSTRUCTIONS Last updated: August 2, 1999 ====================================================================== For information on the Netscape Directory SDK source release, see http://www.mozilla.org/directory/ Note the following: - The LDAP filter classes (in the netscape.ldap.util package) use the OROMatcher(tm) regular expression package (from ORO Java Software). This is not provided with the source code release. If you want this package, you need to get it from ORO, Inc. (For details, see the ORO, Inc. home page at http://www.oroinc.com/.) Unix/Linux Build Instructions ----------------------------- System Requirements: 32MB of RAM, 128MB of swap, recommended 64MB of RAM. Tool Requirements: Sun Microsystems Java Development Kit (JDK) 1.1.7 (or a more recent version) GNU make 3.74 or a more recent version Instructions: 1. Uncompress and extract the source files by entering the following command (or your preferred variant of this command): gzip -dc .tar.gz | tar -xvf - 2. Set and unset the following environment variables. In csh/tcsh: setenv JAVA_HOME "" For example: setenv JAVA_HOME "/usr/local/jdk1.1.7" setenv CLASSPATH "" For example: setenv CLASSPATH "/usr/local/jdk1.1.7/lib/classes.zip" In sh/bash/ksh: JAVA_HOME="" CLASSPATH="" export JAVA_HOME CLASSPATH 3. Build the LDAP Java classes by entering the following commands: cd mozilla/directory/java-sdk gmake -f ldap.mk If you also want the classes packaged in a JAR file, specify "basepackage" as the target: gmake -f ldap.mk basepackage To generate javadoc specify "doc" as the target: gmake -f ldap.mk doc Note that if you are using JDK1.1, javadoc images will be missing and you'll need to copy those images from somewhere else into mozilla/directory/java-sdk/dist/doc/images. If you are using JDK1.2 you do not need to do that. The SDK will be built and copied into the following directories: mozilla/directory/java-sdk/dist/classes - class files and manifest file mozilla/directory/java-sdk/dist/packages - ldapjdk.jar JAR file (if you've specified "basepackage" as the target) mozilla/directory/java-sdk/dist/doc - ldapjdk javadoc (if you've specified "doc" as the target) 4. Build the JNDI LDAP Service Provider classes by entering the following commands: gmake -f ldapsp.mk If you also want the classes packaged in a JAR file, specify "basepackage" as the target: gmake -f ldapsp.mk basepackage To generate javadoc specify "doc" as the target: gmake -f ldapsp.mk doc The SDK will be built and copied into the following directories: mozilla/directory/java-sdk/dist/classes - class files mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file (if you've specified "basepackage" as the target) mozilla/directory/java-sdk/dist/doc/ldapsp - ldapsp controls' javadoc (if you've specified "doc" as the target) The JNDI LDAP Service Provider depends on the LDAP Java classes, so you always must build the LDAP Java first. For more information on JNDI see ldapsp/Readme.html and http://java.sun.com/products/jndi/index.html Windows Build Instructions -------------------------- System Requirements: Windows NT 3.51 or 4.0 (4.0 preferred). Tool Requirements: Sun Microsystems Java Development Kit (JDK) 1.1.7 (or a more recent version) GNU Tools for Windows (you can find these on the Internet). Specifically, you'll need: cp.exe rm.exe Here are some sample download sites to find these: Cygnus (http://www.cygnus.com/misc/gnu-win32) GNU (http://www.gnu.org/order/ftp.html) MIT (ftp://prep.ai.mit.edu/pub/gnu) Netscape uses internally modified versions of the following tools: gmake.exe shmsdos.exe uname.exe You can download them from http://www.mozilla.org/download-mozilla.html (click the Windows Build Tools link). When you unzip the file, the tools will be located in the windows\bin\x86 directory. All of these tools need to be put in your path. Extracting the Source Files: The source files for the Directory SDK are zipped in a file. When unzipping the file, make sure to specify that you want to preserve the directory structure. For example, make sure that "Use Folder Names" is checked. Instructions: NOTE: Make sure to run the commands from a standard Windows NT command prompt. Although you may be able to use other shells to build the SDK, you may need to adjust the makefiles for the shell that you are using. 1. Set the following environment variables (within the command session, either manually or via a script), or within the system environment through the Control Panel | System control panel): set MOZ_SRC=(top of your source tree, drive letter and path. For example, set MOZ_SRC=d:\mozilla_src, if the mozilla directory is at d:\mozilla_src\mozilla.) set JAVA_HOME=(directory where the JDK is installed) For example: set JAVA_HOME=D:\jdk1.1.7 set CLASSPATH=(location of the JDK classes.zip file) For example: set CLASSPATH=D:\jdk1.1.7\lib\classes.zip In addition, make sure to set your PATH environment variable to include the tools that you have downloaded. 2. Enter the following commands to build the LDAP Java classes: cd mozilla\directory\java-sdk gmake -f ldap.mk If you also want the classes packaged in a JAR file, specify "basepackage" as the target: gmake -f ldap.mk basepackage To generate javadoc specify "doc" as the target: gmake -f ldap.mk doc Note that if you are using JDK1.1, javadoc images will be missing and you'll need to copy those images from somewhere else into mozilla\directory\java-sdk\dist\doc\images. If you are using JDK1.2 you do not need to do that. The SDK will be built and copied into the following directories: mozilla\directory\java-sdk\dist\classes - class files and manifest file mozilla\directory\java-sdk\dist\packages - ldapjdk.jar JAR file (if you've specified "basepackage" as the target) mozilla\directory\java-sdk\dist\doc - ldapjdk javadoc (if you've specified "doc" as the target) 3. Build the JNDI LDAP Service Provider classes by entering the following commands: gmake -f ldapsp.mk If you also want the classes packaged in a JAR file, specify "basepackage" as the target: gmake -f ldapsp.mk basepackage To generate javadoc specify "doc" as the target: gmake -f ldapsp.mk doc The SDK will be built and copied into the following directories: mozilla/directory/java-sdk/dist/classes - class files mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file (if you've specified "basepackage" as the target) mozilla\directory\java-sdk\dist\doc\ldapsp - ldapsp controls' javadoc (if you've specified "doc" as the target) The JNDI LDAP Service Provider depends on the LDAP Java classes, so you always must build the LDAP Java first. For more information on JNDI see ldapsp/Readme.html and http://java.sun.com/products/jndi/index.html -------------------------------------------------------- Copyright (c) 1999 Netscape Communications Corporation. (http://home.netscape.com/misc/contact_info.html)