summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2016-03-17 10:59:19 +0100
committerEndi S. Dewata <edewata@redhat.com>2016-03-18 22:29:12 +0100
commit1b15c725b6e9c5d9057b66e0a2806a7813a8d61b (patch)
tree033e632a31eb24c5fa71c94cbe7cd2b14cbdcdc8
parent2e02c078fb57fa806d3ff2bf7a1ed2df34966acc (diff)
downloadpki-1b15c725b6e9c5d9057b66e0a2806a7813a8d61b.tar.gz
pki-1b15c725b6e9c5d9057b66e0a2806a7813a8d61b.tar.xz
pki-1b15c725b6e9c5d9057b66e0a2806a7813a8d61b.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
-rw-r--r--base/common/python/pki/cli/pkcs12.py26
-rw-r--r--base/common/python/pki/nssdb.py4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertAddCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertExportCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertFindCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12CertRemoveCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ExportCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12ImportCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyFindCLI.java4
-rw-r--r--base/java-tools/src/com/netscape/cmstools/pkcs12/PKCS12KeyRemoveCLI.java4
-rw-r--r--base/server/python/pki/server/__init__.py8
-rw-r--r--base/server/python/pki/server/cli/ca.py24
-rw-r--r--base/server/python/pki/server/cli/kra.py12
-rw-r--r--base/server/python/pki/server/cli/ocsp.py14
-rw-r--r--base/server/python/pki/server/cli/tks.py12
-rw-r--r--base/server/python/pki/server/cli/tps.py12
16 files changed, 72 insertions, 72 deletions
diff --git a/base/common/python/pki/cli/pkcs12.py b/base/common/python/pki/cli/pkcs12.py
index aa04582f7..2ab603225 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])
@@ -204,7 +204,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])
@@ -233,7 +233,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 8d0f96711..43a97146d 100644
--- a/base/common/python/pki/nssdb.py
+++ b/base/common/python/pki/nssdb.py
@@ -522,7 +522,7 @@ class NSSDatabase(object):
cmd.extend([
'pkcs12-import',
- '--pkcs12', pkcs12_file,
+ '--pkcs12-file', pkcs12_file,
'--pkcs12-password-file', password_file
])
@@ -560,7 +560,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 114a6e461..b046f177e 100644
--- a/base/server/python/pki/server/__init__.py
+++ b/base/server/python/pki/server/__init__.py
@@ -202,7 +202,7 @@ class PKISubsystem(object):
cmd.extend([
'pkcs12-cert-add',
- '--pkcs12', pkcs12_file,
+ '--pkcs12-file', pkcs12_file,
'--pkcs12-password-file', pkcs12_password_file,
])
@@ -250,7 +250,7 @@ class PKISubsystem(object):
cmd.extend([
'pkcs12-export',
- '--pkcs12', pkcs12_file,
+ '--pkcs12-file', pkcs12_file,
'--pkcs12-password-file', pkcs12_password_file,
nickname
])
@@ -269,7 +269,7 @@ class PKISubsystem(object):
cmd.extend([
'pkcs12-cert-del',
- '--pkcs12', pkcs12_file,
+ '--pkcs12-file', pkcs12_file,
'--pkcs12-password-file', pkcs12_password_file,
nickname
])
@@ -579,7 +579,7 @@ class PKIInstance(object):
cmd.extend([
'pkcs12-cert-add',
- '--pkcs12', pkcs12_file,
+ '--pkcs12-file', pkcs12_file,
'--pkcs12-password-file', pkcs12_password_file,
])
diff --git a/base/server/python/pki/server/cli/ca.py b/base/server/python/pki/server/cli/ca.py
index 54eabe299..dbf8239f4 100644
--- a/base/server/python/pki/server/cli/ca.py
+++ b/base/server/python/pki/server/cli/ca.py
@@ -68,12 +68,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):
@@ -323,12 +323,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 ba1bf5a97..cba3e234b 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 45d7fca83..c32e8ded6 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 2bdfce84a..0bcf748c3 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 731b9720c..f40223ddb 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):