/[classpath]/classpath/java/security/Certificate.java
ViewVC logotype

Diff of /classpath/java/security/Certificate.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mark, Tue Jan 22 22:27:00 2002 UTC revision 1.5 by ericb, Fri Mar 29 08:30:51 2002 UTC
# Line 1  Line 1 
1  /* Certificate.java -- Interface for modeling digital certificates  /* Certificate.java -- deprecated interface for modeling digital certificates
2     Copyright (C) 1998 Free Software Foundation, Inc.     Copyright (C) 1998, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 42  import java.io.OutputStream; Line 42  import java.io.OutputStream;
42  import java.io.IOException;  import java.io.IOException;
43    
44  /**  /**
45   * This interface models a digital certificate which verifies the   * This interface models a digital certificate which verifies the
46   * authenticity of a party.  This class simply allows certificate   * authenticity of a party.  This class simply allows certificate
47   * information to be queried, it does not guarantee that the certificate   * information to be queried, it does not guarantee that the certificate
48   * is valid.   * is valid.
  * <p>  
  * This class is deprecated in favor of the new java.security.cert package.  
  * It exists for backward compatibility only.  
  *  
  * @deprecated  
49   *   *
50   * @version 0.0   * <p>This class is deprecated in favor of the new java.security.cert package.
51     * It exists for backward compatibility only.
52   *   *
53   * @author Aaron M. Renn (arenn@urbanophile.com)   * @author Aaron M. Renn (arenn@urbanophile.com)
54     * @since 1.1
55     * @deprecated use {@link java.security.cert} instead
56     * @status updated to 1.4
57   */   */
58  public interface Certificate  public interface Certificate
59  {  {
   
60    /**    /**
61     * This method returns the <code>Principal</code> that is guaranteeing     * This method returns the <code>Principal</code> that is guaranteeing
62     * this certificate.     * this certificate.
63     *     *
64     * @return The <code>Principal</code> guaranteeing the certificate     * @return the <code>Principal</code> guaranteeing the certificate
65       * @deprecated this entire interface is deprecated
66     */     */
67    public abstract Principal getGuarantor();    Principal getGuarantor();
68    
69    /**    /**
70     * This method returns the <code>Principal</code> being guaranteed by     * This method returns the <code>Principal</code> being guaranteed by
71     * this certificate.     * this certificate.
72     *     *
73     * @return The <code>Principal</code> guaranteed by this certificate.     * @return the <code>Principal</code> guaranteed by this certificate
74       * @deprecated this entire interface is deprecated
75     */     */
76    public abstract Principal getPrincipal();    Principal getPrincipal();
77    
78    /**    /**
79     * This method returns the public key for the <code>Principal</code> that     * This method returns the public key for the <code>Principal</code> that
80     * is being guaranteed.     * is being guaranteed.
81     *     *
82     * @return The <code>PublicKey</code> of the <code>Principal</code> being guaranteed     * @return the <code>PublicKey</code> of the Principal being guaranteed
83       * @deprecated this entire interface is deprecated
84     */     */
85    public abstract PublicKey getPublicKey();    PublicKey getPublicKey();
   
   /**  
    * This method returns the encoding format of the certificate (e.g., "PGP",  
    * "X.509").  This format is used by the <code>encode</code. and  
    * <code>decode</code> methods.  
    *  
    * @return The encoding format being used  
    */  
   public abstract String getFormat();  
86    
87    /**    /**
88     * This method writes the certificate to an <code>OutputStream</code> in     * This method writes the certificate to an <code>OutputStream</code> in
89     * a format that can be understood by the <code>decode</code> method.     * a format that can be understood by the <code>decode</code> method.
90     *     *
91     * @param out The <code>OutputStream</code> to write to.     * @param out the <code>OutputStream</code> to write to
92     *     * @throws KeyException if there is a problem with the certificate
93     * @exception KeyException If there is a problem with the internals of this certificate     * @throws IOException if an error occurs writing to the stream
94     * @exception IOException If an error occurs writing to the stream.     * @see #decode(InputStream)
95       * @see #getFormat()
96       * @deprecated this entire interface is deprecated
97     */     */
98    public abstract void    void encode(OutputStream out) throws KeyException, IOException;
     encode(OutputStream out) throws KeyException, IOException;  
99    
100    /**    /**
101     * This method reads an encoded certificate from an <code>InputStream</code>.     * This method reads an encoded certificate from an <code>InputStream</code>.
102     *     *
103     * @param in The <code>InputStream</code> to read from.     * @param in the <code>InputStream</code> to read from
104       * @throws KeyException if there is a problem with the certificate data
105       * @throws IOException if an error occurs reading from the stream
106       * @see #encode(OutputStream)
107       * @see #getFormat()
108       * @deprecated this entire interface is deprecated
109       */
110      void decode(InputStream in) throws KeyException, IOException;
111    
112      /**
113       * This method returns the encoding format of the certificate (e.g., "PGP",
114       * "X.509").  This format is used by the <code>encode</code> and
115       * <code>decode</code> methods.
116     *     *
117     * @param KeyException If there is a problem with the certificate data     * @return the encoding format being used
118     * @param IOException If an error occurs reading from the stream.     * @deprecated this entire interface is deprecated
119     */     */
120    public abstract void    String getFormat();
     decode(InputStream in) throws KeyException, IOException;  
121    
122    /**    /**
123     * This method returns a <code>String</code> representation of the contents     * This method returns a <code>String</code> representation of the contents
124     * of this certificate.     * of this certificate.
125     *     *
126     * @param detail <code>true</code> to provided detailed information about this certificate, <code>false</code> otherwise     * @param detail true to provided more detailed information
127       * @return the string representation
128       * @deprecated this entire interface is deprecated
129     */     */
130    public abstract String toString(boolean detail);    String toString(boolean detail);
131  }  } // interface Certificate

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26