jsdsi
Class RProver

java.lang.Object
  extended byjsdsi.Prover
      extended byjsdsi.RProver

class RProver
extends Prover

A prover that searches subject-to-issuer. Will only access the CertStore using CompatibleCertSelectors and SubjectCertSelectors.

Version:
$Revision: 1.3 $ $Date: 2004/06/25 19:28:03 $
Author:
Sameer Ajmani
See Also:
CertStore, CompatibleCertSelector, SubjectCertSelector

Nested Class Summary
(package private) static class Prover.ProofFoundException
          Thrown when the Prover finds a proof.
 
Field Summary
(package private)  MultiMap check
          cert -> set of proof(cert)
(package private)  MultiMap compatible
          name -> set of proof(LHS -> name+X)
(package private)  MultiMap issuer
          issuer -> set of proof(issuer -> RHS)
(package private)  java.util.Set loadedCompatible
          Certificates for issuers to local names.
(package private)  java.util.Set loadedReverse
          Certificates from issuers to subject's.
(package private)  Cert provee
          Statement to prove.
(package private)  MultiMap reverse
          subject -> set of proof(LHS -> subject)
(package private)  java.security.cert.CertStore store
          The CertStore used by this Proof.
(package private)  MultiMap value
          name -> set of proof(name -> principal)
 
Constructor Summary
(package private) RProver(Cert c, java.security.cert.CertStore s)
           
 
Method Summary
(package private)  int getNumFetched()
          Returns the number of certificates fetched from the cert-store.
 Proof getProof()
          Returns the proof found by this prover.
(package private)  void insert(Proof p)
          Inserts the certificates of a given Proof to this Proof.
(package private)  void insertCertificates(java.util.Collection certs)
          Provides new certificates for this prover.
(package private)  java.util.Set load(java.util.Set cache, java.lang.Object key, CertSelector sel, MultiMap map)
          If a given set does not contain a given object, all certficates from the cert-store for a given CertSelector will be added to this proof's certificates.
(package private)  java.util.Set loadCompatible(Name n)
          Loads all certificates for a given name-issuer and name-string (local) to thisRProver's certificates.
(package private)  java.util.Set loadReverse(Subject s)
          Loads the certificates for a given subject to this RProver's certificates.
(package private)  Proof makeProof()
          Creates a new Proof.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loadedReverse

java.util.Set loadedReverse
Certificates from issuers to subject's.


loadedCompatible

java.util.Set loadedCompatible
Certificates for issuers to local names.


provee

Cert provee
Statement to prove.


store

java.security.cert.CertStore store
The CertStore used by this Proof.


check

MultiMap check
cert -> set of proof(cert)


value

MultiMap value
name -> set of proof(name -> principal)


compatible

MultiMap compatible
name -> set of proof(LHS -> name+X)


issuer

MultiMap issuer
issuer -> set of proof(issuer -> RHS)


reverse

MultiMap reverse
subject -> set of proof(LHS -> subject)

Constructor Detail

RProver

RProver(Cert c,
        java.security.cert.CertStore s)
See Also:
Prover.Prover(Cert, java.security.cert.CertStore)
Method Detail

makeProof

Proof makeProof()
Description copied from class: Prover
Creates a new Proof.

Specified by:
makeProof in class Prover
Returns:
a new Proof.
See Also:
Prover.makeProof()

loadReverse

java.util.Set loadReverse(Subject s)
                    throws Prover.ProofFoundException
Loads the certificates for a given subject to this RProver's certificates.

Parameters:
s - subject to load certificates for.
Returns:
this RProvers set of certificates for the subject s.
Throws:
ProofFoundException - if a proof is found.
Prover.ProofFoundException

loadCompatible

java.util.Set loadCompatible(Name n)
                       throws Prover.ProofFoundException
Loads all certificates for a given name-issuer and name-string (local) to thisRProver's certificates.

Parameters:
n - name to load the certificates for.
Returns:
a set of certificates from the issuer of n for the local name of n.
Throws:
ProofFoundException - if a proof is found.
Prover.ProofFoundException

insert

void insert(Proof p)
      throws Prover.ProofFoundException
Description copied from class: Prover
Inserts the certificates of a given Proof to this Proof.

Specified by:
insert in class Prover
Parameters:
p - Proof containing certificates to add to this Proof.
Throws:
Prover.ProofFoundException - if a proof is found.
See Also:
Prover.insert(Proof)

getNumFetched

int getNumFetched()
Returns the number of certificates fetched from the cert-store.

Returns:
the number of certificates fetched from the cert-store.

getProof

public final Proof getProof()
Returns the proof found by this prover.

Returns:
the proof found by this prover.

insertCertificates

void insertCertificates(java.util.Collection certs)
                  throws Prover.ProofFoundException
Provides new certificates for this prover. Adds the given certificates to the certificates already used.

Parameters:
certs - certificates to add to the prover.
Throws:
Prover.ProofFoundException - if a proof is found while adding the certificates.

load

java.util.Set load(java.util.Set cache,
                   java.lang.Object key,
                   CertSelector sel,
                   MultiMap map)
             throws Prover.ProofFoundException
If a given set does not contain a given object, all certficates from the cert-store for a given CertSelector will be added to this proof's certificates.

Parameters:
cache - set with objects.
key - key to search in cache.
sel - cert selector to add certificates from to this proof's certificates.
map - multi-map with sets stored for keys.
Returns:
the set stored in map for key if no error occures.
Throws:
Prover.ProofFoundException - if a proof is found.


Copyright © 2002-2004 M.I.T. All Rights Reserved.