]>
gcc.gnu.org Git - gcc.git/blob - libjava/java/security/cert/X509CRLEntry.java
1 /* X509CRLEntry.java --- X.509 Certificate Revocation List Entry
2 Copyright (C) 1999 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java
.security
.cert
;
40 import java
.math
.BigInteger
;
41 import java
.util
.Date
;
44 Abstract class for entries in the CRL (Certificate Revocation
45 List). The ASN.1 definition for <I>revokedCertificates</I> is
47 revokedCertificates SEQUENCE OF SEQUENCE {
48 userCertificate CertificateSerialNumber,
50 crlEntryExtensions Extensions OPTIONAL
51 -- if present, shall be v2
54 CertificateSerialNumber ::= INTEGER
58 generalTime GeneralizedTime }
60 Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
62 Extension ::= SEQUENCE {
63 extnID OBJECT IDENTIFIER,
64 critical BOOLEAN DEFAULT FALSE,
65 extnValue OCTET STRING }
67 For more information consult rfc2459.
69 @author Mark Benvenuto
73 public abstract class X509CRLEntry
implements X509Extension
77 Creates a new X509CRLEntry
83 Compares this X509CRLEntry to other. It checks if the
84 object if instanceOf X509CRLEntry and then checks if
85 the encoded form( the inner SEQUENCE) matches.
87 @param other An Object to test for equality
89 @return true if equal, false otherwise
91 public boolean equals(Object other
)
93 if( other
instanceof X509CRLEntry
) {
95 X509CRLEntry xe
= (X509CRLEntry
) other
;
96 if( getEncoded().length
!= xe
.getEncoded().length
)
99 byte b1
[] = getEncoded();
100 byte b2
[] = xe
.getEncoded();
102 for( int i
= 0; i
< b1
.length
; i
++ )
106 } catch( CRLException crle
) {
115 Returns a hash code for this X509CRLEntry in its encoded
118 @return A hash code of this class
120 public int hashCode()
122 return super.hashCode();
126 Gets the DER ASN.1 encoded format for this CRL Entry,
129 @return byte array containg encoded form
131 @throws CRLException if an error occurs
133 public abstract byte[] getEncoded() throws CRLException
;
136 Gets the serial number for <I>userCertificate</I> in
139 @return the serial number for this X509CRLEntry.
141 public abstract BigInteger
getSerialNumber();
145 Gets the revocation date in <I>revocationDate</I> for
148 @return the revocation date for this X509CRLEntry.
150 public abstract Date
getRevocationDate();
154 Checks if this X509CRLEntry has extensions.
156 @return true if it has extensions, false otherwise
158 public abstract boolean hasExtensions();
162 Returns a string that represents this X509CRLEntry.
164 @return a string representing this X509CRLEntry.
166 public abstract String
toString();
This page took 0.046574 seconds and 5 git commands to generate.