gnu.crypto.keyring
Interface IPublicKeyring
- IKeyring
- GnuPublicKeyring
public interface IPublicKeyring
An interface for keyrings that contain trusted (by the owner) public
credentials (incl. certificates).
Version:
IKeyring
boolean | containsCertificate(String alias) - Tests if this keyring contains a certificate entry with the specified
alias .
|
Certificate | getCertificate(String alias) - Returns a certificate that has the given
alias , or
null if this keyring has no such entry.
|
void | putCertificate(String alias, Certificate cert) - Adds a certificate in this keyring, with the given
alias .
What happens if there is already a certificate entry with this alias?
|
containsCertificate
public boolean containsCertificate(String alias)
Tests if this keyring contains a certificate entry with the specified
alias
.
alias
- The alias of the certificate to check.
true
if this keyring contains a certificate entry
that has the given alias
; false
otherwise.
getCertificate
public Certificate getCertificate(String alias)
Returns a certificate that has the given alias
, or
null
if this keyring has no such entry.
alias
- The alias of the certificate to find.
- The certificate with the designated
alias
, or
null
if none found.
putCertificate
public void putCertificate(String alias,
Certificate cert)
Adds a certificate in this keyring, with the given
alias
.
What happens if there is already a certificate entry with this alias?
alias
- The alias of this certificate entry.cert
- The certificate.
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.