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

david_page
05.58.2007 e6a7ecfc71d6b0144a6366cd2520e2f03846b033
opends/src/server/org/opends/server/backends/SchemaBackend.java
@@ -51,9 +51,6 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.CipherOutputStream;
import javax.crypto.Mac;
import org.opends.server.api.AlertGenerator;
@@ -4314,13 +4311,12 @@
    // output stream.
    if (encrypt)
    {
      String cipherAlgorithm = cryptoManager.getPreferredCipherAlgorithm();
      String cipherAlgorithm = cryptoManager.getPreferredCipherTransformation();
      backupProperties.put(BACKUP_PROPERTY_CIPHER_ALGORITHM, cipherAlgorithm);
      Cipher cipher;
      try
      {
        cipher = cryptoManager.getPreferredCipher(Cipher.ENCRYPT_MODE);
        outputStream
                = cryptoManager.getCipherOutputStream(outputStream);
      }
      catch (Exception e)
      {
@@ -4334,8 +4330,6 @@
        throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                     message, e);
      }
      outputStream = new CipherOutputStream(outputStream, cipher);
    }
@@ -4710,11 +4704,10 @@
                                     message);
      }
      Cipher cipher;
      try
      {
        cipher = DirectoryServer.getCryptoManager().getCipher(cipherAlgorithm,
                                                         Cipher.DECRYPT_MODE);
        inputStream = DirectoryServer.getCryptoManager()
                                         .getCipherInputStream(inputStream);
      }
      catch (Exception e)
      {
@@ -4723,8 +4716,6 @@
        throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                     message, e);
      }
      inputStream = new CipherInputStream(inputStream, cipher);
    }
    // Now wrap the resulting input stream in a zip stream so that we can read