From 26ed98c04d49d65e7348ae885d6f98c2f61634fe Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Wed, 19 Nov 2008 21:48:39 +0000
Subject: [PATCH] Remove superfluous ds-cfg-cipher-strength attribute. This attribute has no effect on server DIGEST-MD5 SASL cipher selection and is being removed.

---
 opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml |   35 -----------------
 opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java                |   26 -------------
 2 files changed, 0 insertions(+), 61 deletions(-)

diff --git a/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml b/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml
index ceb4cc0..45a50b5 100644
--- a/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml
+++ b/opends/src/admin/defn/org/opends/server/admin/std/DigestMD5SASLMechanismHandlerConfiguration.xml
@@ -133,41 +133,6 @@
       </ldap:attribute>
     </adm:profile>
   </adm:property>
-    <adm:property name="cipher-strength">
-    <adm:synopsis>
-     The name of a property that specifies the minimum cipher strength that the
-	 server will support.
-    </adm:synopsis>
-    <adm:default-behavior>
-      <adm:defined>
-        <adm:value>low</adm:value>
-      </adm:defined>
-    </adm:default-behavior>
-    <adm:syntax>
-      <adm:enumeration>
-        <adm:value name="low">
-          <adm:synopsis>
-            Cipher strength suported is high, medium or low.
-          </adm:synopsis>
-        </adm:value>
-        <adm:value name="medium">
-          <adm:synopsis>
-           Cipher strength suported is medium,high.
-          </adm:synopsis>
-          </adm:value>
-          <adm:value name="high">
-          <adm:synopsis>
-          Cipher strength suported is high only.
-          </adm:synopsis>
-        </adm:value>
-      </adm:enumeration>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-cipher-strength</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
  <adm:property name="identity-mapper" mandatory="true">
     <adm:synopsis>
       Specifies the name of the identity mapper that is to be used
diff --git a/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
index 56106d5..cd2de57 100644
--- a/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
@@ -116,9 +116,6 @@
          String QOP = getQOP(configuration);
          saslProps = new HashMap<String,String>();
          saslProps.put(Sasl.QOP, QOP);
-         if(QOP.equalsIgnoreCase(SASL_MECHANISM_CONFIDENTIALITY)) {
-             saslProps.put(Sasl.STRENGTH, getStrength(configuration));
-         }
          String realm=getRealm(configuration);
          if(realm != null) {
            msg = INFO_DIGEST_MD5_REALM.get(realm);
@@ -254,9 +251,6 @@
           String QOP = getQOP(configuration);
           saslProps = new HashMap<String,String>();
           saslProps.put(Sasl.QOP, QOP);
-          if(QOP.equalsIgnoreCase(SASL_MECHANISM_CONFIDENTIALITY)) {
-              saslProps.put(Sasl.STRENGTH, getStrength(configuration));
-          }
           String realm=getRealm(configuration);
           if(realm != null) {
                msg = INFO_DIGEST_MD5_REALM.get(realm);
@@ -279,26 +273,6 @@
 
 
   /**
-   * Retrieves the cipher strength string to use if confidentiality is enforce.
-   * This determination is the lowest value that the server can use.
-   *
-   * @param configuration The configuration to examine.
-   * @return The cipher strength string.
-   */
-  private String
-  getStrength(DigestMD5SASLMechanismHandlerCfg configuration) {
-      CipherStrength strength = configuration.getCipherStrength();
-      if(strength.equals(CipherStrength.HIGH)) {
-          return "high";
-      } else if(strength.equals(CipherStrength.MEDIUM)) {
-          return "high,medium";
-      } else {
-          return "high,medium,low";
-      }
-  }
-
-
-  /**
    * Retrieves the QOP (quality-of-protection) from the specified
    * configuration.
    *

--
Gitblit v1.10.0