diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2012-06-15 10:28:40 -0400 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-06-20 09:33:31 -0500 |
commit | d5d0b91bc5597eec19520cee74569e9ddacc2090 (patch) | |
tree | 414a43625acd2e3f44c39cdd87912e5c562930e7 /base/kra/src | |
parent | 4880d86856d183d4ba3fb0291519353ac238af5d (diff) | |
download | pki-d5d0b91bc5597eec19520cee74569e9ddacc2090.tar.gz pki-d5d0b91bc5597eec19520cee74569e9ddacc2090.tar.xz pki-d5d0b91bc5597eec19520cee74569e9ddacc2090.zip |
Fixes for Coverity Issues of type Null Returns - Part 3
Diffstat (limited to 'base/kra/src')
-rw-r--r-- | base/kra/src/com/netscape/kra/RecoveryService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/kra/src/com/netscape/kra/RecoveryService.java b/base/kra/src/com/netscape/kra/RecoveryService.java index 19d6b5157..1b5781ca0 100644 --- a/base/kra/src/com/netscape/kra/RecoveryService.java +++ b/base/kra/src/com/netscape/kra/RecoveryService.java @@ -450,6 +450,9 @@ public class RecoveryService implements IService { // create p12 X509Certificate x509cert = request.getExtDataInCert(ATTR_USER_CERT); + if (x509cert == null) { + throw new EKRAException(CMS.getUserMessage("CMS_KRA_PKCS12_FAILED_1","Missing Certificate")); + } String pwd = (String) params.get(ATTR_TRANSPORT_PWD); // add certificate @@ -587,6 +590,9 @@ public class RecoveryService implements IService { // create p12 X509Certificate x509cert = request.getExtDataInCert(ATTR_USER_CERT); + if (x509cert == null) { + throw new EKRAException(CMS.getUserMessage("CMS_KRA_PKCS12_FAILED_1","Missing Certificate")); + } String pwd = (String) params.get(ATTR_TRANSPORT_PWD); // add certificate |