# CertificateRevokedException

public class **CertificateRevokedException** extends [CertificateException](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateException.html)  
An exception that indicates an X.509 certificate is revoked. A
`CertificateRevokedException` contains additional information
about the revoked certificate, such as the date on which the
certificate was revoked and the reason it was revoked.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathValidatorException.html`

### Public Constructor Summary

|---|---|
|   | [CertificateRevokedException](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#CertificateRevokedException(java.util.Date,%20java.security.cert.CRLReason,%20javax.security.auth.x500.X500Principal,%20java.util.Map<java.lang.String,%20java.security.cert.Extension>))([Date](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Date.html) revocationDate, [CRLReason](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CRLReason.html) reason, [X500Principal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/x500/X500Principal.html) authority, [Map](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Map.html)\<[String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html), [Extension](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Extension.html)\> extensions) Constructs a `CertificateRevokedException` with the specified revocation date, reason code, authority name, and map of extensions. |

### Public Method Summary

|---|---|
| [X500Principal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/x500/X500Principal.html) | [getAuthorityName](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#getAuthorityName())() Returns the name of the authority that signed the certificate's revocation status information. |
| [Map](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Map.html)\<[String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html), [Extension](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Extension.html)\> | [getExtensions](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#getExtensions())() Returns a map of X.509 extensions containing additional information about the revoked certificate, such as the Invalidity Date Extension. |
| [Date](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Date.html) | [getInvalidityDate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#getInvalidityDate())() Returns the invalidity date, as specified in the Invalidity Date extension of this `CertificateRevokedException`. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getMessage](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#getMessage())() Returns the detail message string of this throwable. |
| [Date](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Date.html) | [getRevocationDate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#getRevocationDate())() Returns the date on which the certificate was revoked. |
| [CRLReason](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CRLReason.html) | [getRevocationReason](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertificateRevokedException.html#getRevocationReason())() Returns the reason the certificate was revoked. |

### Inherited Method Summary

From class [java.lang.Throwable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html)

|---|---|
| synchronized final void | [addSuppressed](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable))([Throwable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html) exception) Appends the specified exception to the exceptions that were suppressed in order to deliver this exception. |
| synchronized [Throwable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html) | [fillInStackTrace](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#fillInStackTrace())() Fills in the execution stack trace. |
| synchronized [Throwable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html) | [getCause](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#getCause())() Returns the cause of this throwable or `null` if the cause is nonexistent or unknown. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getLocalizedMessage](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#getLocalizedMessage())() Creates a localized description of this throwable. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getMessage](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#getMessage())() Returns the detail message string of this throwable. |
| StackTraceElement\[\] | [getStackTrace](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#getStackTrace())() Provides programmatic access to the stack trace information printed by `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#printStackTrace()`. |
| synchronized final [Throwable\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html) | [getSuppressed](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#getSuppressed())() Returns an array containing all of the exceptions that were suppressed, typically by the `try`-with-resources statement, in order to deliver this exception. |
| synchronized [Throwable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html) | [initCause](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#initCause(java.lang.Throwable))([Throwable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html) cause) Initializes the *cause* of this throwable to the specified value. |
| void | [printStackTrace](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#printStackTrace())() Prints this throwable and its backtrace to the standard error stream. |
| void | [printStackTrace](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter))([PrintWriter](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/PrintWriter.html) s) Prints this throwable and its backtrace to the specified print writer. |
| void | [printStackTrace](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintStream))([PrintStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/PrintStream.html) s) Prints this throwable and its backtrace to the specified print stream. |
| void | [setStackTrace](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[]))(StackTraceElement\[\] stackTrace) Sets the stack trace elements that will be returned by `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#getStackTrace()` and printed by `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#printStackTrace()` and related methods. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Throwable.html#toString())() Returns a short description of this throwable. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Constructors

#### public
**CertificateRevokedException**
([Date](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Date.html) revocationDate, [CRLReason](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CRLReason.html) reason, [X500Principal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/x500/X500Principal.html) authority, [Map](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Map.html)\<[String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html), [Extension](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Extension.html)\> extensions)

Constructs a `CertificateRevokedException` with
the specified revocation date, reason code, authority name, and map
of extensions.

##### Parameters

| revocationDate | the date on which the certificate was revoked. The date is copied to protect against subsequent modification. |
| reason | the revocation reason |
| authority | the `X500Principal` that represents the name of the authority that signed the certificate's revocation status information |
| extensions | a map of X.509 Extensions. Each key is an OID String that maps to the corresponding Extension. The map is copied to prevent subsequent modification. |
|---|---|

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if `revocationDate`, `reason`, `authority`, or `extensions` is `null` |
|---|---|

## Public Methods

#### public [X500Principal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/x500/X500Principal.html)
**getAuthorityName**
()

Returns the name of the authority that signed the certificate's
revocation status information.

##### Returns

- the `X500Principal` that represents the name of the authority that signed the certificate's revocation status information

#### public [Map](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Map.html)\<[String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html), [Extension](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Extension.html)\>
**getExtensions**
()

Returns a map of X.509 extensions containing additional information
about the revoked certificate, such as the Invalidity Date
Extension. Each key is an OID String that maps to the corresponding
Extension.

##### Returns

- an unmodifiable map of X.509 extensions, or an empty map if there are no extensions

#### public [Date](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Date.html)
**getInvalidityDate**
()

Returns the invalidity date, as specified in the Invalidity Date
extension of this `CertificateRevokedException`. The
invalidity date is the date on which it is known or suspected that the
private key was compromised or that the certificate otherwise became
invalid. This implementation calls `getExtensions()` and
checks the returned map for an entry for the Invalidity Date extension
OID ("2.5.29.24"). If found, it returns the invalidity date in the
extension; otherwise null. A new Date object is returned each time the
method is invoked to protect against subsequent modification.

##### Returns

- the invalidity date, or `null` if not specified

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getMessage**
()

Returns the detail message string of this throwable.

##### Returns

- the detail message string of this `Throwable` instance (which may be `null`).

#### public [Date](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Date.html)
**getRevocationDate**
()

Returns the date on which the certificate was revoked. A new copy is
returned each time the method is invoked to protect against subsequent
modification.

##### Returns

- the revocation date

#### public [CRLReason](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CRLReason.html)
**getRevocationReason**
()

Returns the reason the certificate was revoked.

##### Returns

- the revocation reason