1 module hunt.security.cert.CRL; 2 3 import hunt.security.cert.Certificate; 4 5 /** 6 * This class is an abstraction of certificate revocation lists (CRLs) that 7 * have different formats but important common uses. For example, all CRLs 8 * share the functionality of listing revoked certificates, and can be queried 9 * on whether or not they list a given certificate. 10 * <p> 11 * Specialized CRL types can be defined by subclassing off of this abstract 12 * class. 13 * 14 * @author Hemma Prafullchandra 15 * 16 * 17 * @see X509CRL 18 * @see CertificateFactory 19 * 20 * @since 1.2 21 */ 22 23 abstract class CRL { 24 25 // the CRL type 26 private string type; 27 28 /** 29 * Creates a CRL of the specified type. 30 * 31 * @param type the standard name of the CRL type. 32 * See Appendix A in the <a href= 33 * "../../../../technotes/guides/security/crypto/CryptoSpec.html#AppA"> 34 * Java Cryptography Architecture API Specification & Reference </a> 35 * for information about standard CRL types. 36 */ 37 protected this(string type) { 38 this.type = type; 39 } 40 41 /** 42 * Returns the type of this CRL. 43 * 44 * @return the type of this CRL. 45 */ 46 final string getType() { 47 return this.type; 48 } 49 50 /** 51 * Returns a string representation of this CRL. 52 * 53 * @return a string representation of this CRL. 54 */ 55 // abstract string toString(); 56 57 /** 58 * Checks whether the given certificate is on this CRL. 59 * 60 * @param cert the certificate to check for. 61 * @return true if the given certificate is on this CRL, 62 * false otherwise. 63 */ 64 abstract bool isRevoked(Certificate cert); 65 }