Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.crypto.keyring
Interface IPublicKeyring  view IPublicKeyring download IPublicKeyring.java

All Superinterfaces:
IKeyring
All Known Implementing Classes:
GnuPublicKeyring

public interface IPublicKeyring
extends IKeyring

An interface for keyrings that contain trusted (by the owner) public credentials (incl. certificates).


Field Summary
 
Fields inherited from interface gnu.javax.crypto.keyring.IKeyring
KEYRING_DATA_IN, KEYRING_DATA_OUT, KEYRING_PASSWORD
 
Method Summary
 boolean containsCertificate(java.lang.String alias)
          Tests if this keyring contains a certificate entry with the specified alias.
 java.security.cert.Certificate getCertificate(java.lang.String alias)
          Returns a certificate that has the given alias, or null if this keyring has no such entry.
 void putCertificate(java.lang.String alias, java.security.cert.Certificate cert)
          Adds a certificate in this keyring, with the given alias.
 
Methods inherited from interface gnu.javax.crypto.keyring.IKeyring
add, aliases, containsAlias, get, load, remove, reset, size, store
 

Method Detail

containsCertificate

public boolean containsCertificate(java.lang.String alias)

Tests if this keyring contains a certificate entry with the specified alias.


getCertificate

public java.security.cert.Certificate getCertificate(java.lang.String alias)

Returns a certificate that has the given alias, or null if this keyring has no such entry.


putCertificate

public void putCertificate(java.lang.String alias,
                           java.security.cert.Certificate cert)

Adds a certificate in this keyring, with the given alias.

What happens if there is already a certificate entry with this alias?