java.lang.Objectjava.security.cert.Certificate
public abstract class Certificate
Abstract class for managing a variety of identity certificates. An identity certificate is a binding of a principal to a public key which is vouched for by another principal. (A principal represents an entity such as an individual user, a group, or a corporation.)
This class is an abstraction for certificates that have different formats but important common uses. For example, different types of certificates, such as X.509 and PGP, share general certificate functionality (like encoding and verifying) and some types of information (like a public key).
X.509, PGP, and SDSI certificates can all be implemented by subclassing the Certificate class, even though they contain different sets of information, and they store and retrieve the information in different ways.
X509Certificate,
CertificateFactory,
Serialized Form| Nested Class Summary | |
|---|---|
protected static class |
Certificate.CertificateRep
Alternate Certificate class for serialization. |
| Constructor Summary | |
|---|---|
protected |
Certificate(String type)
Creates a certificate of the specified type. |
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Compares this certificate for equality with the specified object. |
abstract byte[] |
getEncoded()
Returns the encoded form of this certificate. |
abstract PublicKey |
getPublicKey()
Gets the public key from this certificate. |
String |
getType()
Returns the type of this certificate. |
int |
hashCode()
Returns a hashcode value for this certificate from its encoded form. |
abstract String |
toString()
Returns a string representation of this certificate. |
abstract void |
verify(PublicKey key)
Verifies that this certificate was signed using the private key that corresponds to the specified public key. |
abstract void |
verify(PublicKey key,
String sigProvider)
Verifies that this certificate was signed using the private key that corresponds to the specified public key. |
protected Object |
writeReplace()
Replace the Certificate to be serialized. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Certificate(String type)
type - the standard name of the certificate type.
See Appendix A in the
Java Cryptography Architecture API Specification & Reference
for information about standard certificate types.| Method Detail |
|---|
public final String getType()
public boolean equals(Object other)
other object is an
instanceof Certificate, then
its encoded form is retrieved and compared with the
encoded form of this certificate.
other - the object to test for equality with this certificate.
Object.hashCode(),
Hashtablepublic int hashCode()
Object.equals(java.lang.Object),
Hashtable
public abstract byte[] getEncoded()
throws CertificateEncodingException
CertificateEncodingException - if an encoding error occurs.public abstract void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
key - the PublicKey used to carry out the verification.
NoSuchAlgorithmException - on unsupported signature
algorithms.
InvalidKeyException - on incorrect key.
NoSuchProviderException - if there's no default provider.
SignatureException - on signature errors.
CertificateException - on encoding errors.public abstract void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
key - the PublicKey used to carry out the verification.sigProvider - the name of the signature provider.
NoSuchAlgorithmException - on unsupported signature
algorithms.
InvalidKeyException - on incorrect key.
NoSuchProviderException - on incorrect provider.
SignatureException - on signature errors.
CertificateException - on encoding errors.public abstract String toString()
public abstract PublicKey getPublicKey()
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException - if a new object representing
this Certificate could not be createdCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)