summaryrefslogtreecommitdiffstats
path: root/base/server
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-07-13 19:09:57 -0400
committerEndi S. Dewata <edewata@redhat.com>2015-07-15 10:23:20 -0400
commit4aa89241e3a0423198cc6dce1f6f193eca74cac6 (patch)
treead996013b1141739d914bc972209dfc082cc377f /base/server
parentfca8dcbaa6a779a7685b935d1e216dbc775093f2 (diff)
downloadpki-4aa89241e3a0423198cc6dce1f6f193eca74cac6.tar.gz
pki-4aa89241e3a0423198cc6dce1f6f193eca74cac6.tar.xz
pki-4aa89241e3a0423198cc6dce1f6f193eca74cac6.zip
Fixed PKCS12Export output.
The PKCS12Export has been modified such that if an error occurs in normal mode it will display the error message and in debug mode it will display the full stack trace. The code has also been refactored such that it can be reused as a library in addition to command-line tool. The code will now throw exceptions instead of exiting to the system. https://fedorahosted.org/pki/ticket/1224
Diffstat (limited to 'base/server')
-rw-r--r--base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
index 7e6c2a3c1..5566e91e9 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
@@ -865,6 +865,8 @@ public class ConfigurationUtils {
BadPaddingException, NotInitializedException, NicknameConflictException, UserCertConflictException,
NoSuchItemOnTokenException, InvalidBERException, IOException {
+ // TODO: refactor into a PKCS #12 utility class
+
byte b[] = new byte[1000000];
FileInputStream fis = new FileInputStream(p12File);
while (fis.available() > 0)
@@ -886,7 +888,7 @@ public class ConfigurationUtils {
Vector<Vector<Object>> pkeyinfo_collection = new Vector<Vector<Object>>();
Vector<Vector<Object>> cert_collection = new Vector<Vector<Object>>();
- CMS.debug("PKCS #12:");
+ CMS.debug("Importing PKCS #12 data");
for (int i = 0; i < safes.getSize(); i++) {