1 package org.ejbca.core.protocol.ws.objects; 2 3 import java.util.Date ; 4 5 import org.ejbca.core.model.ca.crl.RevokedCertInfo; 6 7 19 20 public class RevokeStatus { 21 22 23 public static final int NOT_REVOKED = RevokedCertInfo.NOT_REVOKED; 24 public static final int REVOKATION_REASON_UNSPECIFIED = RevokedCertInfo.REVOKATION_REASON_UNSPECIFIED; 25 public static final int REVOKATION_REASON_KEYCOMPROMISE = RevokedCertInfo.REVOKATION_REASON_KEYCOMPROMISE; 26 public static final int REVOKATION_REASON_CACOMPROMISE = RevokedCertInfo.REVOKATION_REASON_CACOMPROMISE; 27 public static final int REVOKATION_REASON_AFFILIATIONCHANGED = RevokedCertInfo.REVOKATION_REASON_AFFILIATIONCHANGED; 28 public static final int REVOKATION_REASON_SUPERSEDED = RevokedCertInfo.REVOKATION_REASON_SUPERSEDED; 29 public static final int REVOKATION_REASON_CESSATIONOFOPERATION = RevokedCertInfo.REVOKATION_REASON_CESSATIONOFOPERATION; 30 public static final int REVOKATION_REASON_CERTIFICATEHOLD = RevokedCertInfo.REVOKATION_REASON_CERTIFICATEHOLD; 31 public static final int REVOKATION_REASON_REMOVEFROMCRL = RevokedCertInfo.REVOKATION_REASON_REMOVEFROMCRL; 32 public static final int REVOKATION_REASON_PRIVILEGESWITHDRAWN = RevokedCertInfo.REVOKATION_REASON_PRIVILEGESWITHDRAWN; 33 public static final int REVOKATION_REASON_AACOMPROMISE = RevokedCertInfo.REVOKATION_REASON_AACOMPROMISE; 34 35 private String issuerDN; 36 private String certificateSN; 37 private Date revocationDate; 38 private int reason; 39 40 41 42 public RevokeStatus(){} 43 44 public RevokeStatus(RevokedCertInfo info, String issuerDN){ 45 certificateSN = info.getUserCertificate().toString(16); 46 this.issuerDN = issuerDN; 47 revocationDate = info.getRevocationDate(); 48 reason = info.getReason(); 49 } 50 51 54 public int getReason() { 55 return reason; 56 } 57 58 61 public void setReason(int reason) { 62 this.reason = reason; 63 } 64 65 68 public Date getRevocationDate() { 69 return revocationDate; 70 } 71 72 75 public void setRevocationDate(Date revocationDate) { 76 this.revocationDate = revocationDate; 77 } 78 79 82 public String getCertificateSN() { 83 return certificateSN; 84 } 85 86 89 public void setCertificateSN(String certificateSN) { 90 this.certificateSN = certificateSN; 91 } 92 93 96 public String getIssuerDN() { 97 return issuerDN; 98 } 99 100 103 public void setIssuerDN(String issuerDN) { 104 this.issuerDN = issuerDN; 105 } 106 107 108 109 } 110 | Popular Tags |