jsdsi.util
Class Loader

java.lang.Object
  extended byjsdsi.util.Loader

public class Loader
extends java.lang.Object

NOTE: This class is purely used for testing purposes and creates invalid certificates with fake signatures.

Creates a set of certificates from a flat text file for testing. Each certificate appears on its own line. Blank lines are allowed, but comments are not.

Name certs are specified as follows:
ISSUER name -> SUBJECT [names...]

For example,
ALICE friends -> BOB
BOB my-friends -> BOB sister
BOB sister -> CAROL

Note that we use uppercase for keys and lowercase for names for clarity, but this is not required. However, lines are case-sensitive, so "BOB" is different from "Bob".

Auth certs are specified as follows:
ISSUER [!|+]tag -> SUBJECT [names...]
where ! means the permission "tag" cannot be delegated, while "+" means that it can.

For example,
ALICE !read -> BOB
BOB +write -> BOB my-friends

Version:
$Revision: 1.2.2.2 $ $Date: 2005/11/08 03:12:52 $
Author:
Sameer Ajmani, Sean Radford

Constructor Summary
Loader(java.lang.String filename, CertificateDAO dao)
          Creates a new Loader from a given filename.
 
Method Summary
 java.util.Set getCerts()
          Returns the certs of this Loader.
 java.security.cert.CertStore getCertStore()
          Returns the cert store of this Loader.
 java.util.Collection getKeys()
          Returns the keys of this Loader.
 java.util.Set getNames()
          Returns the names of this Loader.
 java.util.Set getTags()
          Returns the tags of this Loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Loader

public Loader(java.lang.String filename,
              CertificateDAO dao)
       throws java.io.IOException
Creates a new Loader from a given filename.

Parameters:
filename - filename to read the certificates from.
dao - to use for the CertStore
Throws:
java.io.IOException - if an error occurs reading the file filename.
Method Detail

getCertStore

public java.security.cert.CertStore getCertStore()
Returns the cert store of this Loader.

Returns:
the cert store of this Loader.

getKeys

public java.util.Collection getKeys()
Returns the keys of this Loader.

Returns:
the keys of this Loader.

getCerts

public java.util.Set getCerts()
Returns the certs of this Loader.

Returns:
the certs of this Loader.

getNames

public java.util.Set getNames()
Returns the names of this Loader.

Returns:
the names of this Loader.

getTags

public java.util.Set getTags()
Returns the tags of this Loader.

Returns:
the tags of this Loader.


Copyright © 2002-2006 JSDSI. All Rights Reserved.