diff options
author | Endi S. Dewata <edewata@redhat.com> | 2016-03-17 10:59:19 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2016-04-05 22:45:50 +0200 |
commit | 8267e90f65c427ce30518edcc1889b535c32da83 (patch) | |
tree | a562c8e8dd2507a673dda0f20b7a82c3d329586d | |
parent | 72a71cf51e1486532e8dc4f646c51eda0479734d (diff) | |
download | pki-8267e90f65c427ce30518edcc1889b535c32da83.tar.gz pki-8267e90f65c427ce30518edcc1889b535c32da83.tar.xz pki-8267e90f65c427ce30518edcc1889b535c32da83.zip |
Renamed PKCS #12 options for consistency.
The pki CLI's --pkcs12 options has been renamed to --pkcs12-file
for consistency with pki-server CLI options.
https://fedorahosted.org/pki/ticket/1742
16 files changed, 71 insertions, 71 deletions
diff --git a/base/common/python/pki/cli/pkcs12.py b/base/common/python/pki/cli/pkcs12.py index a57dfd9ba..dc890c1a5 100644 --- a/base/common/python/pki/cli/pkcs12.py +++ b/base/common/python/pki/cli/pkcs12.py @@ -46,23 +46,23 @@ class PKCS12ImportCLI(pki.cli.CLI): super(PKCS12ImportCLI, self).__init__( 'import', 'Import PKCS #12 file into NSS database') - def print_help(self): + def print_help(self): # flake8: noqa print('Usage: pki pkcs12-import [OPTIONS]') print() - print(' --pkcs12 PKCS #12 file containing certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' --no-trust-flags Do not include trust flags') - print(' -v, --verbose Run in verbose mode.') - print(' --debug Run in debug mode.') - print(' --help Show help message.') + print(' --pkcs12-file <path> PKCS #12 file containing certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> containing the PKCS #12 password.') + print(' --no-trust-flags Do not include trust flags') + print(' -v, --verbose Run in verbose mode.') + print(' --debug Run in debug mode.') + print(' --help Show help message.') print() def execute(self, args): try: opts, _ = getopt.gnu_getopt(args, 'v', [ - 'pkcs12=', 'pkcs12-password=', 'pkcs12-password-file=', + 'pkcs12-file=', 'pkcs12-password=', 'pkcs12-password-file=', 'no-trust-flags', 'verbose', 'debug', 'help']) except getopt.GetoptError as e: @@ -76,7 +76,7 @@ class PKCS12ImportCLI(pki.cli.CLI): no_trust_flags = False for o, a in opts: - if o == '--pkcs12': + if o == '--pkcs12-file': pkcs12_file = a elif o == '--pkcs12-password': @@ -133,7 +133,7 @@ class PKCS12ImportCLI(pki.cli.CLI): cmd = ['pkcs12-cert-find'] if pkcs12_file: - cmd.extend(['--pkcs12', pkcs12_file]) + cmd.extend(['--pkcs12-file', pkcs12_file]) if pkcs12_password: cmd.extend(['--pkcs12-password', pkcs12_password]) @@ -206,7 +206,7 @@ class PKCS12ImportCLI(pki.cli.CLI): cmd = ['pkcs12-cert-export'] if pkcs12_file: - cmd.extend(['--pkcs12', pkcs12_file]) + cmd.extend(['--pkcs12-file', pkcs12_file]) if pkcs12_password: cmd.extend(['--pkcs12-password', pkcs12_password]) @@ -235,7 +235,7 @@ class PKCS12ImportCLI(pki.cli.CLI): cmd = ['pkcs12-import'] if pkcs12_file: - cmd.extend(['--pkcs12', pkcs12_file]) + cmd.extend(['--pkcs12-file', pkcs12_file]) if pkcs12_password: cmd.extend(['--pkcs12-password', pkcs12_password]) diff --git a/base/common/python/pki/nssdb.py b/base/common/python/pki/nssdb.py index a6b2fa30f..9bb917fa1 100644 --- a/base/common/python/pki/nssdb.py +++ b/base/common/python/pki/nssdb.py @@ -540,7 +540,7 @@ class NSSDatabase(object): cmd.extend([ 'pkcs12-import', - '--pkcs12', pkcs12_file, + '--pkcs12-file', pkcs12_file, '--pkcs12-password-file', password_file ]) @@ -578,7 +578,7 @@ class NSSDatabase(object): cmd.extend(['pkcs12-export']) cmd.extend([ - '--pkcs12', pkcs12_file, + '--pkcs12-file', pkcs12_file, '--pkcs12-password-file', password_file ]) diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertAddCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertAddCLI.java index ce7b3dd79..c3c5ef489 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertAddCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertAddCLI.java @@ -51,7 +51,7 @@ public class PKCS12CertAddCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -109,7 +109,7 @@ public class PKCS12CertAddCLI extends CLI { String nickname = cmdArgs[0]; - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertExportCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertExportCLI.java index c8ceab757..04e2b7b6f 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertExportCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertExportCLI.java @@ -54,7 +54,7 @@ public class PKCS12CertExportCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -113,7 +113,7 @@ public class PKCS12CertExportCLI extends CLI { String nickname = cmdArgs[0]; - String pkcs12File = cmd.getOptionValue("pkcs12"); + String pkcs12File = cmd.getOptionValue("pkcs12-file"); if (pkcs12File == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertFindCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertFindCLI.java index 8c6fb8845..a97933188 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertFindCLI.java @@ -52,7 +52,7 @@ public class PKCS12CertFindCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -105,7 +105,7 @@ public class PKCS12CertFindCLI extends CLI { System.exit(-1); } - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertRemoveCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertRemoveCLI.java index 9dbf767ef..8f7f11398 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertRemoveCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertRemoveCLI.java @@ -50,7 +50,7 @@ public class PKCS12CertRemoveCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -105,7 +105,7 @@ public class PKCS12CertRemoveCLI extends CLI { String nickname = cmdArgs[0]; - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ExportCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ExportCLI.java index f17251284..52a993125 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ExportCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ExportCLI.java @@ -48,7 +48,7 @@ public class PKCS12ExportCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -96,7 +96,7 @@ public class PKCS12ExportCLI extends CLI { } String[] nicknames = cmd.getArgs(); - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ImportCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ImportCLI.java index bdd8f52bc..ae574d387 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ImportCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ImportCLI.java @@ -48,7 +48,7 @@ public class PKCS12ImportCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -96,7 +96,7 @@ public class PKCS12ImportCLI extends CLI { } String[] nicknames = cmd.getArgs(); - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyFindCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyFindCLI.java index 92b9cf132..0dc39f470 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyFindCLI.java @@ -52,7 +52,7 @@ public class PKCS12KeyFindCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -105,7 +105,7 @@ public class PKCS12KeyFindCLI extends CLI { System.exit(-1); } - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyRemoveCLI.java b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyRemoveCLI.java index d1bdbfa36..19b368765 100644 --- a/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyRemoveCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyRemoveCLI.java @@ -51,7 +51,7 @@ public class PKCS12KeyRemoveCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "pkcs12", true, "PKCS #12 file"); + Option option = new Option(null, "pkcs12-file", true, "PKCS #12 file"); option.setArgName("path"); options.addOption(option); @@ -106,7 +106,7 @@ public class PKCS12KeyRemoveCLI extends CLI { BigInteger keyID = new BigInteger(cmdArgs[0], 16); - String filename = cmd.getOptionValue("pkcs12"); + String filename = cmd.getOptionValue("pkcs12-file"); if (filename == null) { System.err.println("Error: Missing PKCS #12 file."); diff --git a/base/server/python/pki/server/__init__.py b/base/server/python/pki/server/__init__.py index 2c735f0ef..2f0b5bdf0 100644 --- a/base/server/python/pki/server/__init__.py +++ b/base/server/python/pki/server/__init__.py @@ -188,7 +188,7 @@ class PKISubsystem(object): cmd.extend([ 'pkcs12-cert-add', - '--pkcs12', pkcs12_file, + '--pkcs12-file', pkcs12_file, '--pkcs12-password-file', pkcs12_password_file, ]) @@ -236,7 +236,7 @@ class PKISubsystem(object): cmd.extend([ 'pkcs12-export', - '--pkcs12', pkcs12_file, + '--pkcs12-file', pkcs12_file, '--pkcs12-password-file', pkcs12_password_file, nickname ]) @@ -255,7 +255,7 @@ class PKISubsystem(object): cmd.extend([ 'pkcs12-cert-del', - '--pkcs12', pkcs12_file, + '--pkcs12-file', pkcs12_file, '--pkcs12-password-file', pkcs12_password_file, nickname ]) diff --git a/base/server/python/pki/server/cli/ca.py b/base/server/python/pki/server/cli/ca.py index fcc76fa25..fe8ce2bc3 100644 --- a/base/server/python/pki/server/cli/ca.py +++ b/base/server/python/pki/server/cli/ca.py @@ -69,12 +69,12 @@ class CACertChainExportCLI(pki.cli.CLI): def print_help(self): print('Usage: pki-server ca-cert-chain-export [OPTIONS]') print() - print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') - print(' --pkcs12-file PKCS #12 file to store certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' -v, --verbose Run in verbose mode.') - print(' --help Show help message.') + print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') + print(' --pkcs12-file <path> PKCS #12 file to store certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> File containing the PKCS #12 password.') + print(' -v, --verbose Run in verbose mode.') + print(' --help Show help message.') print() def execute(self, args): @@ -324,12 +324,12 @@ class CAClonePrepareCLI(pki.cli.CLI): def print_help(self): print('Usage: pki-server ca-clone-prepare [OPTIONS]') print() - print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') - print(' --pkcs12-file PKCS #12 file to store certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' -v, --verbose Run in verbose mode.') - print(' --help Show help message.') + print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') + print(' --pkcs12-file <path> PKCS #12 file to store certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> File containing the PKCS #12 password.') + print(' -v, --verbose Run in verbose mode.') + print(' --help Show help message.') print() def execute(self, args): diff --git a/base/server/python/pki/server/cli/kra.py b/base/server/python/pki/server/cli/kra.py index c11fda6ab..7dfa680cf 100644 --- a/base/server/python/pki/server/cli/kra.py +++ b/base/server/python/pki/server/cli/kra.py @@ -57,12 +57,12 @@ class KRAClonePrepareCLI(pki.cli.CLI): def print_help(self): print('Usage: pki-server kra-clone-prepare [OPTIONS]') print() - print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') - print(' --pkcs12-file PKCS #12 file to store certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' -v, --verbose Run in verbose mode.') - print(' --help Show help message.') + print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') + print(' --pkcs12-file <path> PKCS #12 file to store certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> File containing the PKCS #12 password.') + print(' -v, --verbose Run in verbose mode.') + print(' --help Show help message.') print() def execute(self, args): diff --git a/base/server/python/pki/server/cli/ocsp.py b/base/server/python/pki/server/cli/ocsp.py index 88fff4330..b913a20c5 100644 --- a/base/server/python/pki/server/cli/ocsp.py +++ b/base/server/python/pki/server/cli/ocsp.py @@ -57,12 +57,12 @@ class OCSPClonePrepareCLI(pki.cli.CLI): def print_help(self): print('Usage: pki-server ocsp-clone-prepare [OPTIONS]') print() - print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') - print(' --pkcs12-file PKCS #12 file to store certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' -v, --verbose Run in verbose mode.') - print(' --help Show help message.') + print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') + print(' --pkcs12-file <path> PKCS #12 file to store certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> File containing the PKCS #12 password.') + print(' -v, --verbose Run in verbose mode.') + print(' --help Show help message.') print() def execute(self, args): @@ -85,7 +85,7 @@ class OCSPClonePrepareCLI(pki.cli.CLI): if o in ('-i', '--instance'): instance_name = a - elif o == '--pkcs12': + elif o == '--pkcs12-file': pkcs12_file = a elif o == '--pkcs12-password': diff --git a/base/server/python/pki/server/cli/tks.py b/base/server/python/pki/server/cli/tks.py index 55b506bde..bf96d9610 100644 --- a/base/server/python/pki/server/cli/tks.py +++ b/base/server/python/pki/server/cli/tks.py @@ -57,12 +57,12 @@ class TKSClonePrepareCLI(pki.cli.CLI): def print_help(self): print('Usage: pki-server tks-clone-prepare [OPTIONS]') print() - print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') - print(' --pkcs12-file PKCS #12 file to store certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' -v, --verbose Run in verbose mode.') - print(' --help Show help message.') + print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') + print(' --pkcs12-file <path> PKCS #12 file to store certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> File containing the PKCS #12 password.') + print(' -v, --verbose Run in verbose mode.') + print(' --help Show help message.') print() def execute(self, args): diff --git a/base/server/python/pki/server/cli/tps.py b/base/server/python/pki/server/cli/tps.py index 54c99a6de..7284eaa84 100644 --- a/base/server/python/pki/server/cli/tps.py +++ b/base/server/python/pki/server/cli/tps.py @@ -57,12 +57,12 @@ class TPSClonePrepareCLI(pki.cli.CLI): def print_help(self): print('Usage: pki-server tps-clone-prepare [OPTIONS]') print() - print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') - print(' --pkcs12-file PKCS #12 file to store certificates and keys.') - print(' --pkcs12-password Password for the PKCS #12 file.') - print(' --pkcs12-password-file File containing the PKCS #12 password.') - print(' -v, --verbose Run in verbose mode.') - print(' --help Show help message.') + print(' -i, --instance <instance ID> Instance ID (default: pki-tomcat).') + print(' --pkcs12-file <path> PKCS #12 file to store certificates and keys.') + print(' --pkcs12-password <password> Password for the PKCS #12 file.') + print(' --pkcs12-password-file <path> File containing the PKCS #12 password.') + print(' -v, --verbose Run in verbose mode.') + print(' --help Show help message.') print() def execute(self, args): |