[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] Suppress Interactive HSM Installation



Please review the following patch which addresses the following issue:

Note:  Code was tested; previous section was commented out to appease pycharm from reporting unreachable code.


From e1f7857b3bb3dee74aea8420c28a0221669e91ed Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen redhat com>
Date: Mon, 15 Jun 2015 19:01:49 -0600
Subject: [PATCH] Suppress interactive HSM installation

- PKI TRAC Ticket #1417 - Interactive pkispawn of CA with HSM fails
---
 base/server/sbin/pkispawn | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/base/server/sbin/pkispawn b/base/server/sbin/pkispawn
index d153c03..99b0a93 100755
--- a/base/server/sbin/pkispawn
+++ b/base/server/sbin/pkispawn
@@ -226,21 +226,26 @@ def main(argv):
                 sign='?', case_sensitive=False).lower()
 
             if use_hsm == 'y' or use_hsm == 'yes':
-                parser.set_property(config.pki_subsystem,
-                                    'pki_hsm_enable',
-                                    'True')
-                modulename = parser.read_text(
-                    'HSM Module Name (e. g. - nethsm)', allow_empty=False)
-                parser.set_property(config.pki_subsystem,
-                                    'pki_hsm_modulename',
-                                    modulename)
-                libfile = parser.read_text(
-                    'HSM Lib File ' +
-                    '(e. g. - /opt/nfast/toolkits/pkcs11/libcknfast.so)',
-                    allow_empty=False)
-                parser.set_property(config.pki_subsystem,
-                                    'pki_hsm_libfile',
-                                    libfile)
+                # XXX:  Suppress interactive HSM installation
+                print "Interactive HSM installation is currently unsupported."
+                sys.exit(0)
+
+                # TBD:  Interactive HSM installation
+                # parser.set_property(config.pki_subsystem,
+                #                     'pki_hsm_enable',
+                #                     'True')
+                # modulename = parser.read_text(
+                #     'HSM Module Name (e. g. - nethsm)', allow_empty=False)
+                # parser.set_property(config.pki_subsystem,
+                #                     'pki_hsm_modulename',
+                #                     modulename)
+                # libfile = parser.read_text(
+                #     'HSM Lib File ' +
+                #     '(e. g. - /opt/nfast/toolkits/pkcs11/libcknfast.so)',
+                #     allow_empty=False)
+                # parser.set_property(config.pki_subsystem,
+                #                     'pki_hsm_libfile',
+                #                     libfile)
             print
 
             print "Directory Server:"
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]