diff options
author | Fraser Tweedale <ftweedal@redhat.com> | 2016-03-31 12:46:03 +1100 |
---|---|---|
committer | Fraser Tweedale <ftweedal@redhat.com> | 2016-04-14 16:07:16 +1000 |
commit | 6d72a9c7fc067df42a3259fc5ea87b65e94f76ad (patch) | |
tree | a7ad9fd5b73724d19f7deee6856149f416c0c30c /base/common/src | |
parent | e832349f8846ab398b17b98ebe9862bc700d1b7f (diff) | |
download | pki-6d72a9c7fc067df42a3259fc5ea87b65e94f76ad.tar.gz pki-6d72a9c7fc067df42a3259fc5ea87b65e94f76ad.tar.xz pki-6d72a9c7fc067df42a3259fc5ea87b65e94f76ad.zip |
Lightweight CAs: add exceptions for missing signing key or cert
Add the CAMissingCertException and CAMissingKeyException classes and
throw when signing unit initialisation fails due to a missing
object. In CertificateAuthority, store the exception if it occurs
for possible re-throwing later. Also add the private 'hasKeys'
field for internal use.
Part of: https://fedorahosted.org/pki/ticket/1625
Diffstat (limited to 'base/common/src')
-rw-r--r-- | base/common/src/com/netscape/certsrv/ca/CAMissingCertException.java | 15 | ||||
-rw-r--r-- | base/common/src/com/netscape/certsrv/ca/CAMissingKeyException.java | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/ca/CAMissingCertException.java b/base/common/src/com/netscape/certsrv/ca/CAMissingCertException.java new file mode 100644 index 000000000..49c5063f2 --- /dev/null +++ b/base/common/src/com/netscape/certsrv/ca/CAMissingCertException.java @@ -0,0 +1,15 @@ +package com.netscape.certsrv.ca; + +/** + * Exception to throw when a (sub-)CA's signing certificate is not + * (yet) present in the local NSSDB. + */ +public class CAMissingCertException extends ECAException { + + private static final long serialVersionUID = 7261805480088539689L; + + public CAMissingCertException(String msgFormat) { + super(msgFormat); + } + +} diff --git a/base/common/src/com/netscape/certsrv/ca/CAMissingKeyException.java b/base/common/src/com/netscape/certsrv/ca/CAMissingKeyException.java new file mode 100644 index 000000000..8f5e1e72a --- /dev/null +++ b/base/common/src/com/netscape/certsrv/ca/CAMissingKeyException.java @@ -0,0 +1,15 @@ +package com.netscape.certsrv.ca; + +/** + * Exception to throw when a (sub-)CA's signing key is not (yet) + * present in the local NSSDB. + */ +public class CAMissingKeyException extends ECAException { + + private static final long serialVersionUID = -364157165997677925L; + + public CAMissingKeyException(String msgFormat) { + super(msgFormat); + } + +} |