summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cmscore/security
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-06-05 12:16:51 -0400
committerEndi Sukma Dewata <edewata@redhat.com>2012-06-05 14:46:08 -0500
commit4a012010233b0a5fd613c9d7734ee01be64e3834 (patch)
tree53affd70c3c2b5d0d909641f847b938e80e874c7 /base/common/src/com/netscape/cmscore/security
parentc2128339ba046ceb7ab32954ae07dbb4b41d4e73 (diff)
downloadpki-4a012010233b0a5fd613c9d7734ee01be64e3834.tar.gz
pki-4a012010233b0a5fd613c9d7734ee01be64e3834.tar.xz
pki-4a012010233b0a5fd613c9d7734ee01be64e3834.zip
Fixes for NULL_RETURN cases review comments
Diffstat (limited to 'base/common/src/com/netscape/cmscore/security')
-rw-r--r--base/common/src/com/netscape/cmscore/security/CertificateInfo.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/common/src/com/netscape/cmscore/security/CertificateInfo.java b/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
index 040abc3c2..fef733a11 100644
--- a/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
+++ b/base/common/src/com/netscape/cmscore/security/CertificateInfo.java
@@ -187,10 +187,10 @@ public abstract class CertificateInfo {
if (algm == null) {
String hashtype = (String) mProperties.get(ConfigConstants.PR_HASH_TYPE);
-
- algm = KeyCertUtil.getSigningAlgorithm(getKeyAlgorithm(), hashtype);
+ String key = getKeyAlgorithm();
+ algm = KeyCertUtil.getSigningAlgorithm(key, hashtype);
if (algm == null) {
- throw new NoSuchAlgorithmException();
+ throw new NoSuchAlgorithmException("No Algorithm for Key : " + key + " and Hashtype : " + hashtype);
}
mProperties.put(Constants.PR_SIGNATURE_ALGORITHM, algm);
}
@@ -212,7 +212,7 @@ public abstract class CertificateInfo {
} catch (IOException e) {
throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_CERT", e.toString()));
} catch (NoSuchAlgorithmException e) {
- throw new EBaseException(CMS.getUserMessage("CMS_BASE_ALG_NOT_SUPPORTED", ""));
+ throw new EBaseException(CMS.getUserMessage("CMS_BASE_ALG_NOT_SUPPORTED", e.toString()));
}
return certInfo;