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

david_page
10.08.2007 0ac4adb276948a8aab3f02d82121f85229e6b613
issue 2440
bin/backup --encrypt and --signHash require online backup
2 files modified
16 ■■■■■ changed files
opends/src/messages/messages/tools.properties 3 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/BackUpDB.java 13 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/tools.properties
@@ -535,6 +535,9 @@
 backups
SEVERE_ERR_RESTOREDB_ERROR_DURING_BACKUP_317=An unexpected error occurred \
 while attempting to restore backup %s from %s:  %s
SEVERE_ERR_BACKUPDB_ENCRYPT_OR_SIGN_REQUIRES_ONLINE_325=The use of the \
 %s argument or the %s argument requires a connection to an online server \
 instance
SEVERE_ERR_BACKUPDB_SIGN_REQUIRES_HASH_326=The use of the %s argument \
 requires that the %s argument is also provided
INFO_DESCRIPTION_NOOP_327=Show what would be done but do not perform any \
opends/src/server/org/opends/server/tools/BackUpDB.java
@@ -354,6 +354,19 @@
      }
    }
    // Encryption or signing requires the ADS backend be available for
    // CryptoManager access to secret key entries. If no connection arguments
    //  are present, infer an offline backup.
    if ((encrypt.isPresent() || signHash.isPresent())
            && ! argParser.connectionArgumentsPresent()) {
      Message message =
              ERR_BACKUPDB_ENCRYPT_OR_SIGN_REQUIRES_ONLINE.get(
                      encrypt.getLongIdentifier(),
                      signHash.getLongIdentifier());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
    }
    // If the signHash option was provided, then make sure that the hash option
    // was given.
    if (signHash.isPresent() && (! hash.isPresent()))