KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > security > cert > CRL


1 /*
2  * @(#)CRL.java 1.12 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.security.cert;
9
10 /**
11  * This class is an abstraction of certificate revocation lists (CRLs) that
12  * have different formats but important common uses. For example, all CRLs
13  * share the functionality of listing revoked certificates, and can be queried
14  * on whether or not they list a given certificate.
15  * <p>
16  * Specialized CRL types can be defined by subclassing off of this abstract
17  * class.
18  *
19  * @author Hemma Prafullchandra
20  *
21  * @version 1.12, 12/19/03
22  *
23  * @see X509CRL
24  * @see CertificateFactory
25  *
26  * @since 1.2
27  */

28
29 public abstract class CRL {
30
31     // the CRL type
32
private String JavaDoc type;
33
34     /**
35      * Creates a CRL of the specified type.
36      *
37      * @param type the standard name of the CRL type.
38      * See Appendix A in the <a HREF=
39      * "../../../../guide/security/CryptoSpec.html#AppA">
40      * Java Cryptography Architecture API Specification &amp; Reference </a>
41      * for information about standard CRL types.
42      */

43     protected CRL(String JavaDoc type) {
44     this.type = type;
45     }
46
47     /**
48      * Returns the type of this CRL.
49      *
50      * @return the type of this CRL.
51      */

52     public final String JavaDoc getType() {
53     return this.type;
54     }
55
56     /**
57      * Returns a string representation of this CRL.
58      *
59      * @return a string representation of this CRL.
60      */

61     public abstract String JavaDoc toString();
62
63     /**
64      * Checks whether the given certificate is on this CRL.
65      *
66      * @param cert the certificate to check for.
67      * @return true if the given certificate is on this CRL,
68      * false otherwise.
69      */

70     public abstract boolean isRevoked(Certificate JavaDoc cert);
71 }
72
Popular Tags