aboutsummaryrefslogtreecommitdiff
path: root/src/main/model/pki/crl/Reason.java
blob: e47609e1d920ea473b8d6252c878f1a1b0540731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package model.pki.crl;

/**
 * Identify the reason for revocation.
 */
public enum Reason {
    UNSPECIFIED(0),
    KEY_COMPROMISE(1),
    CA_COMPROMISE(2),
    AFFILIATION_CHANGED(3),
    SUPERSEDED(4),
    CESSATION_OF_OPERATION(5);

    private final int val;

    /**
     * EFFECTS: Init with the specific val.
     * REQUIRES: 0 <= val <= 0xFF
     */
    Reason(int val) {
        this.val = val;
    }

    public int getVal() {
        return val;
    }
}