For the latest news and information visit The GNU Crypto project

## gnu.crypto.keyring
Interface IPublicKeyring

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).

See Also:
  `IKeyring`

Field Summary

Fields inherited from interface gnu.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.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`.

  Parameters:
    `alias` - The alias of the certificate to check.
  Returns:
    `true` if this keyring contains a certificate entry that has the given `alias`; `false` otherwise.

### 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.

  Parameters:
    `alias` - The alias of the certificate to find.
  Returns:
    The certificate with the designated `alias`, or `null` if none found.

### 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?

  Parameters:
    `alias` - The alias of this certificate entry.
    `cert` - The certificate.

For the latest news and information visit The GNU Crypto project

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.