@Deprecated public interface Certificate
这是一个用于管理各种身份证书的抽象方法的接口。身份证明是由一个主要的保证,一个公钥是另一个主体的。(一个主体代表一个实体,如个人用户、集团或公司。)
特别是,这个接口的目的是一个共同的抽象的结构,有不同的格式,但重要的共同用途。例如,不同类型的证书,如X.509证书和PGP证书,共享通用证书功能(需要编码和解码证书)和某些类型的信息,如公共密钥,主要的重点是,和担保人保证公钥是指定主。所以实现X.509证书和PGP证书实现可以利用证书接口,即使它们的格式和额外的类型和数量的信息存储是不同的。
重要:这个界面是有用的分类和分组对象共享某些共同的用途。它没有它自己的任何语义。特别是,证明对象不作任何声明的约束有效性。实现此接口的应用程序的任务是验证证书,并满足其有效性。
Certificate
Modifier and Type | Method and Description |
---|---|
void |
decode(InputStream stream)
过时的。
将输入流中的证书。
|
void |
encode(OutputStream stream)
过时的。
编码的证书中,可以通过
decode 方法解码格式输出流。
|
String |
getFormat()
过时的。
返回编码格式的名称。
|
Principal |
getGuarantor()
过时的。
返回证书的保证人,也就是说,保证与此证书关联的公钥的主要保证是与此证书关联的主体。
|
Principal |
getPrincipal()
过时的。
返回由保证人担保的主密钥对的本金。
|
PublicKey |
getPublicKey()
过时的。
返回由保证人保证的主密钥对的密钥。
|
String |
toString(boolean detailed)
过时的。
返回一个表示证书内容的字符串。
|
Principal getGuarantor()
Principal getPrincipal()
PublicKey getPublicKey()
void encode(OutputStream stream) throws KeyException, IOException
decode
方法解码格式输出流。
stream
-输出流的编码证书。
KeyException
如果证书没有被正确地初始化,或数据丢失,等等。
IOException
如果发生流异常而试图输出到输出流的编码的证书。
decode(java.io.InputStream)
,
getFormat()
void decode(InputStream stream) throws KeyException, IOException
getFormat
和产生的
encode
。
stream
-从中取数据被解码的输入流。
KeyException
如果证书没有被正确地初始化,或数据丢失,等等。
IOException
-如果异常发生在输入编码证书从输入流。
encode(java.io.OutputStream)
,
getFormat()
String getFormat()
encode
和
decode
方法理解。
String toString(boolean detailed)
detailed
是否提供有关证书的详细信息
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.