Class OpenPGPKeyException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.bouncycastle.openpgp.PGPException
org.bouncycastle.openpgp.api.exception.OpenPGPKeyException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidEncryptionKeyException
,InvalidSigningKeyException
,KeyPassphraseException
Exception representing an unusable or invalid
OpenPGPKey
or OpenPGPCertificate
.
Note: The term "key" is used to refer to both a certificate and a key.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOpenPGPKeyException
(OpenPGPCertificate.OpenPGPComponentKey componentKey, String message) Something is wrong with an individual component key of a key or certificate.OpenPGPKeyException
(OpenPGPCertificate key, String message) Something is wrong with a key or certificate in general (no particular subkey). -
Method Summary
Modifier and TypeMethodDescriptionReturn the problematic component key.getKey()
Return the problematic key or certificate.Methods inherited from class org.bouncycastle.openpgp.PGPException
getCause, getUnderlyingException
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OpenPGPKeyException
Something is wrong with a key or certificate in general (no particular subkey).- Parameters:
key
- certificate or keymessage
- message
-
OpenPGPKeyException
Something is wrong with an individual component key of a key or certificate.- Parameters:
componentKey
- component keymessage
- message
-
-
Method Details
-
getKey
Return the problematic key or certificate.- Returns:
- key or certificate
-
getComponentKey
Return the problematic component key. Might be null, if the problem affects the entire key or certificate.- Returns:
- component key
-