public class PKIStore extends Object implements VOMSTrustStore
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CADIR |
static int |
DEFAULT_TRUST_STORE_REFRESH_PERIOD
The default period, in minutes, used to refresh this trust store.
|
static String |
DEFAULT_VOMSDIR |
static String |
TRUST_STORE_REFRESH_PERIOD_PROPERTY
The property used to set the period, in minutes, that is used to refresh this trust store.
|
static int |
TYPE_CADIR
This PKIStore object will contain data from a CA directory.
|
static int |
TYPE_VOMSDIR
This PKIStore object will contain data from a vomsdir directory.
|
Constructor and Description |
---|
PKIStore() |
PKIStore(int type) |
PKIStore(String dir,
int type)
This is equivalent to PKIStore(dir, type, true)
|
PKIStore(String dir,
int type,
boolean aggressive) |
Modifier and Type | Method and Description |
---|---|
protected void |
addInstance() |
X509Certificate[] |
getAACandidate(X500Principal issuer,
String voName)
Gets an array of candidate issuer certificates for an AC with the
given issuer and belonging to the given VO.
|
Hashtable |
getCAs() |
Hashtable |
getCRLs() |
LSCFile |
getLSC(String voName,
String hostName)
Gets the LSC file corresponding to the given VO, for the given
server.
|
Hashtable |
getNamespaces() |
Hashtable |
getSignings() |
void |
load()
Loads the files from the directory specified in the constructors
|
void |
refresh()
Refreshes the content of the PKIStore object.
|
void |
rescheduleRefresh(int millisec)
Changes the interval between refreshes of the store.
|
void |
setAggressive(boolean b)
Changes the aggressive mode of the store.
|
void |
stopRefresh()
Stop all refreshes.
|
public static final String TRUST_STORE_REFRESH_PERIOD_PROPERTY
public static final int DEFAULT_TRUST_STORE_REFRESH_PERIOD
public static final int TYPE_VOMSDIR
public static final int TYPE_CADIR
public static final String DEFAULT_VOMSDIR
public static final String DEFAULT_CADIR
public PKIStore(String dir, int type, boolean aggressive) throws IOException, CertificateException, CRLException
dir
- -- The directory from which to read the files.
If null or the empty string, this will default
to "/etc/grid-security/certificates" if type is
TYPE_CADIR, or "etc/grid-security/vomsdir" if
type is TYPE_VOMSDIR.type
- -- either TYPE_CADIR for CA certificates,
or TYPE_VOMSDIR for VOMS certificate.aggressive
- -- if true, loading of data will continue even if
a particular file could not be loaded, while if
false loading will stop as soon as an error occur.IOException
- if type is neither TYPE_CADIR nor TYPE_VOMSDIR.CertificateException
- if there are parsing errors while loading
a certificate.CRLException
- if there are parsing errors while loading a CRL.public PKIStore(String dir, int type) throws IOException, CertificateException, CRLException
public PKIStore(int type) throws IOException, CertificateException, CRLException
public PKIStore()
public Hashtable getCAs()
PKIUtils.getHash(X509Certificate cert)
,
PKIUtils.getHash(X500Principal principal)
,
PKIUtils.getHash(X509Principal principal)
,
Vector
public Hashtable getCRLs()
PKIUtils.getHash(X509Certificate cert)
,
PKIUtils.getHash(X500Principal principal)
,
PKIUtils.getHash(X509Principal principal)
,
Vector
public Hashtable getSignings()
SigningPolicy
,
PKIUtils.getHash(X509Certificate cert)
,
PKIUtils.getHash(X500Principal principal)
,
PKIUtils.getHash(X509Principal principal)
,
Vector
public Hashtable getNamespaces()
public void refresh()
public void rescheduleRefresh(int millisec)
millisec
- New interval (in milliseconds)public void stopRefresh()
stopRefresh
in interface VOMSTrustStore
protected void addInstance()
public void setAggressive(boolean b)
b
- -- if true (default) load as much as possible,
otherwise stop loading at the first error.public LSCFile getLSC(String voName, String hostName)
getLSC
in interface VOMSTrustStore
voName
- -- The name of the VO.hostName
- -- The hostName of the issuing server.public X509Certificate[] getAACandidate(X500Principal issuer, String voName)
getAACandidate
in interface VOMSTrustStore
issuer
- The issuer of the AC.voName
- The name of the VO.public void load() throws IOException, CertificateException, CRLException
IOException
- if type is neither TYPE_CADIR nor TYPE_VOMSDIR.CertificateException
- if there are parsing errors while loading
a certificate.CRLException
- if there are parsing errors while loading a CRL.Copyright © 2013. All rights reserved.