diff options
author | Endi S. Dewata <edewata@redhat.com> | 2016-04-11 18:18:52 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2016-04-12 16:27:20 +0200 |
commit | 8e291fba835f6640a262e01333aa58cf9bd5220f (patch) | |
tree | 86ce2d93290760c078fcf34f7d8d5cd9db0f2246 /base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java | |
parent | 5847a485a16471f6c3a2a7552b719df3aec909df (diff) | |
download | pki-8e291fba835f6640a262e01333aa58cf9bd5220f.tar.gz pki-8e291fba835f6640a262e01333aa58cf9bd5220f.tar.xz pki-8e291fba835f6640a262e01333aa58cf9bd5220f.zip |
Fixed exception handling in CertUtil.
The CertUtil.createLocalCert() has been modified to re-throw the
exception instead of ignoring it.
https://fedorahosted.org/pki/ticket/1654
Diffstat (limited to 'base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java')
-rw-r--r-- | base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java | 7 |
1 files changed, 2 insertions, 5 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 7aeee7e9f..e2b014f35 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 @@ -84,7 +84,6 @@ import org.mozilla.jss.crypto.EncryptionAlgorithm; import org.mozilla.jss.crypto.IVParameterSpec; import org.mozilla.jss.crypto.IllegalBlockSizeException; import org.mozilla.jss.crypto.InternalCertificate; -import org.mozilla.jss.crypto.InvalidKeyFormatException; import org.mozilla.jss.crypto.KeyGenAlgorithm; import org.mozilla.jss.crypto.KeyGenerator; import org.mozilla.jss.crypto.KeyWrapAlgorithm; @@ -3055,8 +3054,7 @@ public class ConfigurationUtils { cr.addCertificateRecord(record); } - public static int handleCerts(Cert cert) throws IOException, EBaseException, CertificateException, - NotInitializedException, TokenException, InvalidKeyException { + public static int handleCerts(Cert cert) throws Exception { String certTag = cert.getCertTag(); String subsystem = cert.getSubsystem(); String nickname = cert.getNickname(); @@ -3491,8 +3489,7 @@ public class ConfigurationUtils { } public static void createAdminCertificate(String certRequest, String certRequestType, String subject) - throws InvalidBERException, IOException, InvalidKeyException, InvalidKeyFormatException, - NoSuchAlgorithmException, SignatureException, NoSuchProviderException, EBaseException { + throws Exception { IConfigStore cs = CMS.getConfigStore(); X509Key x509key = null; if (certRequestType.equals("crmf")) { |