Source Code Cross Referenced for X509CRLEntry.java in  » 6.0-JDK-Modules » j2me » java » security » cert » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.security.cert 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)X509CRLEntry.java	1.18 06/10/10
003:         *
004:         * Copyright  1990-2006 Sun Microsystems, Inc. All Rights Reserved.  
005:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER  
006:         *   
007:         * This program is free software; you can redistribute it and/or  
008:         * modify it under the terms of the GNU General Public License version  
009:         * 2 only, as published by the Free Software Foundation.   
010:         *   
011:         * This program is distributed in the hope that it will be useful, but  
012:         * WITHOUT ANY WARRANTY; without even the implied warranty of  
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  
014:         * General Public License version 2 for more details (a copy is  
015:         * included at /legal/license.txt).   
016:         *   
017:         * You should have received a copy of the GNU General Public License  
018:         * version 2 along with this work; if not, write to the Free Software  
019:         * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
020:         * 02110-1301 USA   
021:         *   
022:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa  
023:         * Clara, CA 95054 or visit www.sun.com if you need additional  
024:         * information or have any questions. 
025:         *
026:         */
027:
028:        package java.security.cert;
029:
030:        import java.math.BigInteger;
031:        import java.util.Date;
032:        import java.util.Set;
033:
034:        /**
035:         * <p>Abstract class for a revoked certificate in a CRL (Certificate
036:         * Revocation List).
037:         *
038:         * The ASN.1 definition for <em>revokedCertificates</em> is:
039:         * <pre>
040:         * revokedCertificates    SEQUENCE OF SEQUENCE  {
041:         *     userCertificate    CertificateSerialNumber,
042:         *     revocationDate     ChoiceOfTime,
043:         *     crlEntryExtensions Extensions OPTIONAL
044:         *                        -- if present, must be v2
045:         * }  OPTIONAL
046:         *<p>
047:         * CertificateSerialNumber  ::=  INTEGER
048:         *<p>
049:         * Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
050:         *<p>
051:         * Extension  ::=  SEQUENCE  {
052:         *     extnId        OBJECT IDENTIFIER,
053:         *     critical      BOOLEAN DEFAULT FALSE,
054:         *     extnValue     OCTET STRING
055:         *                   -- contains a DER encoding of a value
056:         *                   -- of the type registered for use with
057:         *                   -- the extnId object identifier value
058:         * }
059:         * </pre>
060:         *
061:         * @see X509CRL
062:         * @see X509Extension
063:         *
064:         * @author Hemma Prafullchandra
065:         * @version 1.12 00/02/02
066:         */
067:
068:        public abstract class X509CRLEntry implements  X509Extension {
069:
070:            /**
071:             * Compares this CRL entry for equality with the given
072:             * object. If the <code>other</code> object is an
073:             * <code>instanceof</code> <code>X509CRLEntry</code>, then
074:             * its encoded form (the inner SEQUENCE) is retrieved and compared
075:             * with the encoded form of this CRL entry.
076:             *
077:             * @param other the object to test for equality with this CRL entry.
078:             * @return true iff the encoded forms of the two CRL entries
079:             * match, false otherwise.
080:             */
081:            public boolean equals(Object other) {
082:                if (this  == other)
083:                    return true;
084:                if (!(other instanceof  X509CRLEntry))
085:                    return false;
086:                try {
087:                    byte[] this CRLEntry = this .getEncoded();
088:                    byte[] otherCRLEntry = ((X509CRLEntry) other).getEncoded();
089:
090:                    if (this CRLEntry.length != otherCRLEntry.length)
091:                        return false;
092:                    for (int i = 0; i < this CRLEntry.length; i++)
093:                        if (this CRLEntry[i] != otherCRLEntry[i])
094:                            return false;
095:                } catch (CRLException ce) {
096:                    return false;
097:                }
098:                return true;
099:            }
100:
101:            /**
102:             * Returns a hashcode value for this CRL entry from its
103:             * encoded form.
104:             *
105:             * @return the hashcode value.
106:             */
107:            public int hashCode() {
108:                int retval = 0;
109:                try {
110:                    byte[] entryData = this .getEncoded();
111:                    for (int i = 1; i < entryData.length; i++)
112:                        retval += entryData[i] * i;
113:
114:                } catch (CRLException ce) {
115:                    return (retval);
116:                }
117:                return (retval);
118:            }
119:
120:            /**
121:             * Returns the ASN.1 DER-encoded form of this CRL Entry,
122:             * that is the inner SEQUENCE.
123:             *
124:             * @return the encoded form of this certificate
125:             * @exception CRLException if an encoding error occurs.
126:             */
127:            public abstract byte[] getEncoded() throws CRLException;
128:
129:            /**
130:             * Gets the serial number from this X509CRLEntry,
131:             * the <em>userCertificate</em>.
132:             *
133:             * @return the serial number.
134:             */
135:            public abstract BigInteger getSerialNumber();
136:
137:            /**
138:             * Gets the revocation date from this X509CRLEntry,
139:             * the <em>revocationDate</em>.
140:             *
141:             * @return the revocation date.
142:             */
143:            public abstract Date getRevocationDate();
144:
145:            /**
146:             * Returns true if this CRL entry has extensions.
147:             *
148:             * @return true if this entry has extensions, false otherwise.
149:             */
150:            public abstract boolean hasExtensions();
151:
152:            /**
153:             * Returns a string representation of this CRL entry.
154:             *
155:             * @return a string representation of this CRL entry.
156:             */
157:            public abstract String toString();
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.