org.glite.security.util
Class TrustDirHandler

java.lang.Object
  extended by org.glite.security.util.TrustDirHandler

public class TrustDirHandler
extends java.lang.Object

The class that handles the trust directory, currently provides a method to list all the CA certificates.

Author:
Joni Hahkala

Field Summary
 java.util.regex.Pattern caPattern
          The CA file pattern
 
Constructor Summary
TrustDirHandler(java.lang.String dir)
          Generates a new handler for the trust directory.
 
Method Summary
 java.io.File[] getCAs()
          Lists the CA files.
 void init()
          Reads the directory as a preparation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caPattern

public final java.util.regex.Pattern caPattern
The CA file pattern

Constructor Detail

TrustDirHandler

public TrustDirHandler(java.lang.String dir)
Generates a new handler for the trust directory.

Parameters:
dir - The directory containing the trust anchors, crls and namespace files.
Method Detail

init

public void init()
          throws java.io.IOException
Reads the directory as a preparation.

Throws:
java.io.IOException

getCAs

public java.io.File[] getCAs()
Lists the CA files.

Returns:
the array of files matching the CA file pattern ".*\.[0-9]*"