| /** |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| * |
| */ |
| package org.apache.kerby.x509.type; |
| |
| import org.apache.kerby.asn1.EnumType; |
| import org.apache.kerby.asn1.type.Asn1Enumerated; |
| |
| /** |
| * |
| * <pre> |
| * CRLReason ::= ENUMERATED { |
| * unspecified (0), |
| * keyCompromise (1), |
| * cACompromise (2), |
| * affiliationChanged (3), |
| * superseded (4), |
| * cessationOfOperation (5), |
| * certificateHold (6), |
| * removeFromCRL (8), |
| * privilegeWithdrawn (9), |
| * aACompromise (10) |
| * } |
| * </pre> |
| */ |
| |
| enum CRLReasonEnum implements EnumType { |
| UNSPECIFIED, |
| KEY_COMPROMISE, |
| CA_COMPROMISE, |
| AFFILIATION_CHANGED, |
| SUPERSEDED, |
| CESSATION_OF_OPERATION, |
| CERTIFICATE_HOLD, |
| REMOVE_FROM_CRL, |
| PRIVILEGE_WITH_DRAWN, |
| AA_COMPROMISE; |
| |
| @Override |
| public int getValue() { |
| return ordinal(); |
| } |
| |
| @Override |
| public String getName() { |
| return name(); |
| } |
| } |
| |
| public class CRLReason extends Asn1Enumerated<CRLReasonEnum> { |
| @Override |
| public EnumType[] getAllEnumValues() { |
| return CRLReasonEnum.values(); |
| } |
| } |