mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
26.14.2007 39ee9286999c0faf5e78ab2a68d69d10c7600ff9
opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
@@ -82,8 +82,7 @@
   */
  private static final DebugTracer TRACER = getTracer();
  // The attribute type that will be used to map the certificate's fingerprint.
  private AttributeType fingerprintAttributeType;
  // The DN of the configuration entry for this certificate mapper.
  private DN configEntryDN;
@@ -121,18 +120,6 @@
    configEntryDN = configuration.dn();
    // Get the attribute type that will be used to hold the fingerprint.
    String attrName = configuration.getFingerprintAttribute();
    fingerprintAttributeType =
         DirectoryServer.getAttributeType(toLowerCase(attrName), false);
    if (fingerprintAttributeType == null)
    {
      Message message =
          ERR_FCM_NO_SUCH_ATTR.get(String.valueOf(configEntryDN), attrName);
      throw new ConfigException(message);
    }
    // Get the algorithm that will be used to generate the fingerprint.
    switch (configuration.getFingerprintAlgorithm())
    {
@@ -164,7 +151,7 @@
         throws DirectoryException
  {
    FingerprintCertificateMapperCfg config = currentConfig;
    AttributeType fingerprintAttributeType = this.fingerprintAttributeType;
    AttributeType fingerprintAttributeType = config.getFingerprintAttribute();
    String fingerprintAlgorithm = this.fingerprintAlgorithm;
    // Make sure that a peer certificate was provided.
@@ -289,23 +276,9 @@
                      FingerprintCertificateMapperCfg configuration,
                      List<Message> unacceptableReasons)
  {
    // If we've gotten to this point, then the configuration should be
    // acceptable.
    boolean configAcceptable = true;
    DN cfgEntryDN = configuration.dn();
    // Make sure that the fingerprint attribute is defined in the server schema.
    String attrName = configuration.getFingerprintAttribute();
    AttributeType newFingerprintType =
                       DirectoryServer.getAttributeType(toLowerCase(attrName),
                                       false);
    if (newFingerprintType == null)
    {
      unacceptableReasons.add(ERR_FCM_NO_SUCH_ATTR.get(
              String.valueOf(cfgEntryDN),
              attrName));
      configAcceptable = false;
    }
    return configAcceptable;
  }
@@ -322,23 +295,6 @@
    ArrayList<Message> messages            = new ArrayList<Message>();
    // Make sure that the fingerprint attribute is defined in the server schema.
    String attrName = configuration.getFingerprintAttribute();
    AttributeType newFingerprintType =
                       DirectoryServer.getAttributeType(toLowerCase(attrName),
                                       false);
    if (newFingerprintType == null)
    {
      if (resultCode == ResultCode.SUCCESS)
      {
        resultCode = ResultCode.NO_SUCH_ATTRIBUTE;
      }
      messages.add(ERR_FCM_NO_SUCH_ATTR.get(
              String.valueOf(configEntryDN), attrName));
    }
    // Get the algorithm that will be used to generate the fingerprint.
    String newFingerprintAlgorithm = null;
    switch (configuration.getFingerprintAlgorithm())
@@ -354,9 +310,8 @@
    if (resultCode == ResultCode.SUCCESS)
    {
      fingerprintAttributeType = newFingerprintType;
      fingerprintAlgorithm     = newFingerprintAlgorithm;
      currentConfig            = configuration;
      fingerprintAlgorithm = newFingerprintAlgorithm;
      currentConfig        = configuration;
    }