summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/scriptlets/pkijython.py
diff options
context:
space:
mode:
Diffstat (limited to 'base/deploy/src/scriptlets/pkijython.py')
-rw-r--r--base/deploy/src/scriptlets/pkijython.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/base/deploy/src/scriptlets/pkijython.py b/base/deploy/src/scriptlets/pkijython.py
index 6f71cb88b..4321e0a2a 100644
--- a/base/deploy/src/scriptlets/pkijython.py
+++ b/base/deploy/src/scriptlets/pkijython.py
@@ -581,11 +581,18 @@ class rest_client:
admin_cert_file = os.path.join(
master['pki_client_dir'],
master['pki_client_admin_cert'])
+ admin_cert_bin_file = admin_cert_file + ".der"
javasystem.out.println(log.PKI_JYTHON_ADMIN_CERT_SAVE +\
" " + "'" + admin_cert_file + "'")
FILE = open(admin_cert_file, "w")
FILE.write(admin_cert)
FILE.close()
+ # convert the cert file to binary
+ command = "AtoB "+ admin_cert_file + " " + admin_cert_bin_file
+ javasystem.out.println(log.PKI_JYTHON_ADMIN_CERT_ATOB +\
+ " " + "'" + command + "'")
+ os.system(command)
+
# Since Jython runs under Java, it does NOT support the
# following operating system specific command:
#
@@ -594,11 +601,18 @@ class rest_client:
# config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS)
#
# Emulate it with a system call.
- command = "chmod" + " " + "660" + " " + admin_cert_file
+ command = "chmod" + " 660 " + admin_cert_file
javasystem.out.println(
log.PKI_JYTHON_CHMOD +\
" " + "'" + command + "'")
os.system(command)
+
+ command = "chmod" + " 660 " + admin_cert_bin_file
+ javasystem.out.println(
+ log.PKI_JYTHON_CHMOD +\
+ " " + "'" + command + "'")
+ os.system(command)
+
# Import the Administration Certificate
# into the client NSS security database
command = "certutil" + " " +\
@@ -613,9 +627,8 @@ class rest_client:
master['pki_client_password_conf'] + " " +\
"-d" + " " +\
master['pki_client_database_dir'] + " " +\
- "-a" + " " +\
"-i" + " " +\
- admin_cert_file
+ admin_cert_bin_file
javasystem.out.println(
log.PKI_JYTHON_ADMIN_CERT_IMPORT +\
" " + "'" + command + "'")