summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/pkidestroy
diff options
context:
space:
mode:
Diffstat (limited to 'base/deploy/src/pkidestroy')
-rwxr-xr-xbase/deploy/src/pkidestroy17
1 files changed, 7 insertions, 10 deletions
diff --git a/base/deploy/src/pkidestroy b/base/deploy/src/pkidestroy
index c54ba9a78..2d0b5d285 100755
--- a/base/deploy/src/pkidestroy
+++ b/base/deploy/src/pkidestroy
@@ -33,6 +33,7 @@ try:
import random
import socket
import string
+ import struct
import time
from time import strftime as date
from pki.deployment import pkiconfig as config
@@ -69,19 +70,12 @@ def main(argv):
config.pki_certificate_timestamp =\
date('%Y-%m-%d %H:%M:%S', time.localtime(ticks))
+ # Obtain the architecture bit-size
+ config.pki_architecture = struct.calcsize("P") * 8
+
# Retrieve hostname
config.pki_hostname = socket.gethostname()
- # Generate a random 'pin' for use as the security database password
- pin_low = 100000000000
- pin_high = 999999999999
- config.pki_pin = random.randint(pin_low, pin_high)
-
- # Generate a one-time pin to be used prior to configuration
- config.pki_one_time_pin =\
- ''.join(random.choice(string.ascii_letters + string.digits)\
- for x in range(20))
-
# Initialize 'pretty print' for objects
pp = pprint.PrettyPrinter(indent=4)
@@ -131,6 +125,9 @@ def main(argv):
extra=config.PKI_INDENTATION_LEVEL_0)
# Override PKI configuration file values with 'custom' command-line values.
+ if not config.pki_admin_domain_name is None:
+ config.pki_common_dict['pki_admin_domain_name'] =\
+ config.pki_admin_domain_name
if not config.pki_instance_name is None:
config.pki_common_dict['pki_instance_name'] =\
config.pki_instance_name