Source Code Cross Referenced for Certificate.java in  » 6.0-JDK-Modules » j2me » java » security » 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 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)Certificate.java	1.38 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;
029:
030:        import java.io.*;
031:        import java.util.Date;
032:
033:        /**
034:         * <p>This is an interface of abstract methods for managing a
035:         * variety of identity certificates.
036:         * An identity certificate is a guarantee by a principal that
037:         * a public key is that of another principal.  (A principal represents
038:         * an entity such as an individual user, a group, or a corporation.)
039:         *
040:         * <p>In particular, this interface is intended to be a common
041:         * abstraction for constructs that have different formats but
042:         * important common uses.  For example, different types of
043:         * certificates, such as X.509 certificates and PGP certificates,
044:         * share general certificate functionality (the need to encode and
045:         * decode certificates) and some types of information, such as a
046:         * public key, the principal whose key it is, and the guarantor
047:         * guaranteeing that the public key is that of the specified
048:         * principal. So an implementation of X.509 certificates and an
049:         * implementation of PGP certificates can both utilize the Certificate
050:         * interface, even though their formats and additional types and
051:         * amounts of information stored are different.
052:         *
053:         * <p><b>Important</b>: This interface is useful for cataloging and
054:         * grouping objects sharing certain common uses. It does not have any
055:         * semantics of its own. In particular, a Certificate object does not
056:         * make any statement as to the <i>validity</i> of the binding. It is
057:         * the duty of the application implementing this interface to verify
058:         * the certificate and satisfy itself of its validity.
059:         *
060:         * @version 	1.31, 02/02/00
061:         * @author Benjamin Renaud 
062:         * @deprecated A new certificate handling package is created in the Java 2 platform.
063:         *             This Certificate interface is entirely deprecated and
064:         *             is here to allow for a smooth transition to the new
065:         *             package.
066:         * @see java.security.cert.Certificate
067:         */
068:        public interface Certificate {
069:
070:            /** 
071:             * Returns the guarantor of the certificate, that is, the principal
072:             * guaranteeing that the public key associated with this certificate
073:             * is that of the principal associated with this certificate. For X.509
074:             * certificates, the guarantor will typically be a Certificate Authority
075:             * (such as the United States Postal Service or Verisign, Inc.).
076:             *
077:             * @return the guarantor which guaranteed the principal-key
078:             * binding.
079:             */
080:            public abstract Principal getGuarantor();
081:
082:            /**
083:             * Returns the principal of the principal-key pair being guaranteed by
084:             * the guarantor.
085:             *
086:             * @return the principal to which this certificate is bound.  
087:             */
088:            public abstract Principal getPrincipal();
089:
090:            /**
091:             * Returns the key of the principal-key pair being guaranteed by
092:             * the guarantor.
093:             * 
094:             * @return the public key that this certificate certifies belongs
095:             * to a particular principal.  
096:             */
097:            public abstract PublicKey getPublicKey();
098:
099:            /**
100:             * Encodes the certificate to an output stream in a format that can
101:             * be decoded by the <code>decode</code> method.
102:             *
103:             * @param stream the output stream to which to encode the
104:             * certificate.
105:             *
106:             * @exception KeyException if the certificate is not
107:             * properly initialized, or data is missing, etc.
108:             *
109:             * @exception IOException if a stream exception occurs while
110:             * trying to output the encoded certificate to the output stream.
111:             *
112:             * @see #decode 
113:             * @see #getFormat
114:             */
115:            public abstract void encode(OutputStream stream)
116:                    throws KeyException, IOException;
117:
118:            /**
119:             * Decodes a certificate from an input stream. The format should be
120:             * that returned by <code>getFormat</code> and produced by 
121:             * <code>encode</code>.
122:             *
123:             * @param stream the input stream from which to fetch the data
124:             * being decoded.
125:             * 
126:             * @exception KeyException if the certificate is not properly initialized,
127:             * or data is missing, etc.
128:             *
129:             * @exception IOException if an exception occurs while trying to input
130:             * the encoded certificate from the input stream.
131:             *
132:             * @see #encode 
133:             * @see #getFormat
134:             */
135:            public abstract void decode(InputStream stream)
136:                    throws KeyException, IOException;
137:
138:            /**
139:             * Returns the name of the coding format. This is used as a hint to find
140:             * an appropriate parser. It could be "X.509", "PGP", etc. This is
141:             * the format produced and understood by the <code>encode</code>
142:             * and <code>decode</code> methods.
143:             * 
144:             * @return the name of the coding format.
145:             */
146:            public abstract String getFormat();
147:
148:            /**
149:             * Returns a string that represents the contents of the certificate.
150:             *
151:             * @param detailed whether or not to give detailed information
152:             * about the certificate
153:             * 
154:             * @return a string representing the contents of the certificate
155:             */
156:            public String toString(boolean detailed);
157:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.