| | |
| | | // output stream. |
| | | if (encrypt) |
| | | { |
| | | String cipherAlgorithm = cryptoManager.getPreferredCipherTransformation(); |
| | | backupProperties.put(BACKUP_PROPERTY_CIPHER_ALGORITHM, cipherAlgorithm); |
| | | |
| | | try |
| | | { |
| | | outputStream |
| | | = cryptoManager.getCipherOutputStream(outputStream); |
| | | } |
| | | catch (Exception e) |
| | | catch (CryptoManager.CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | |
| | | } |
| | | |
| | | Message message = ERR_JEB_BACKUP_CANNOT_GET_CIPHER.get( |
| | | cipherAlgorithm, stackTraceToSingleLineString(e)); |
| | | e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message, e); |
| | | } |
| | |
| | | // input stream. |
| | | if (encrypt) |
| | | { |
| | | String cipherAlgorithm = |
| | | backupProperties.get(BACKUP_PROPERTY_CIPHER_ALGORITHM); |
| | | |
| | | try |
| | | { |
| | | inputStream = cryptoManager.getCipherInputStream(inputStream); |
| | | } |
| | | catch (Exception e) |
| | | catch (CryptoManager.CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | |
| | | } |
| | | |
| | | Message message = ERR_JEB_BACKUP_CANNOT_GET_CIPHER.get( |
| | | cipherAlgorithm, stackTraceToSingleLineString(e)); |
| | | e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message, e); |
| | | } |
| | |
| | | // input stream. |
| | | if (encrypt) |
| | | { |
| | | String cipherAlgorithm = |
| | | backupProperties.get(BACKUP_PROPERTY_CIPHER_ALGORITHM); |
| | | |
| | | try |
| | | { |
| | | inputStream = cryptoManager.getCipherInputStream(inputStream); |
| | | } |
| | | catch (Exception e) |
| | | catch (CryptoManager.CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | |
| | | } |
| | | |
| | | Message message = ERR_JEB_BACKUP_CANNOT_GET_CIPHER.get( |
| | | cipherAlgorithm, stackTraceToSingleLineString(e)); |
| | | e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message, e); |
| | | } |