ajanta.util
Class Ticketing

java.lang.Object
  |
  +--ajanta.util.Ticketing
Direct Known Subclasses:
AgentTicketing

public class Ticketing
extends java.lang.Object

Base ticketing class.This object take care of create and verify ticket. Imporantly it stores the challeges send to the other.


Field Summary
protected  java.security.Signature caller_dsa
           
protected  java.util.Hashtable challenges
           
 
Constructor Summary
Ticketing(ajanta.naming.URN name, java.security.PrivateKey k)
          Constructor
 
Method Summary
 int getChallenge(ajanta.naming.URN callee, ajanta.util.ContextObject context)
          register nonce for initial challenge, so that it can be used for verification
 ajanta.util.Ticket getTicket(ajanta.naming.URN caller, int nonce, ajanta.util.ContextObject context)
          Gets a ticket for the caller
 boolean verifyTicket(ajanta.util.Ticket t, java.security.PublicKey vk)
          verifies a ticket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

challenges

protected java.util.Hashtable challenges

caller_dsa

protected java.security.Signature caller_dsa
Constructor Detail

Ticketing

public Ticketing(ajanta.naming.URN name,
                 java.security.PrivateKey k)
Constructor

Parameters:
name - - the ticket granter
k - - private key of the ticket granter who will sign the ticket
Method Detail

getChallenge

public int getChallenge(ajanta.naming.URN callee,
                        ajanta.util.ContextObject context)
register nonce for initial challenge, so that it can be used for verification

Parameters:
callee - - to whom the initial challenge is sent
Returns:
- the ramdom nonce for the callee

getTicket

public ajanta.util.Ticket getTicket(ajanta.naming.URN caller,
                                    int nonce,
                                    ajanta.util.ContextObject context)
Gets a ticket for the caller

Parameters:
caller - for whom the ticket will be issued
nonce - the challenge provoded by the caller

verifyTicket

public boolean verifyTicket(ajanta.util.Ticket t,
                            java.security.PublicKey vk)
                     throws java.rmi.RemoteException,
                            java.security.InvalidKeyException,
                            java.security.SignatureException
verifies a ticket

Parameters:
t - - the ticket which would be verified.
vk - - the public key of the ticket granter
java.rmi.RemoteException
java.security.InvalidKeyException
java.security.SignatureException