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