ePOST API

rice.post.security.ca
Class CASecurityModule

java.lang.Object
  extended by rice.post.security.ca.CASecurityModule
All Implemented Interfaces:
SecurityModule

public class CASecurityModule
extends java.lang.Object
implements SecurityModule

This class is the security module which implements the PKI (CA) based security system.

Version:
$Id: CASecurityModule.java 2326 2005-03-14 23:04:14Z amislove $
Author:
amislove

Field Summary
static java.lang.String MODULE_NAME
          The name of the module
 
Constructor Summary
CASecurityModule(java.security.PublicKey caKey)
          Constructor for CASecurityModule.
 
Method Summary
 boolean canVerify(PostCertificate certificate)
          This method returns whether or not this module is able to verify the given certificate.
static CAPostCertificate generate(PostUserAddress address, java.security.PublicKey key, java.security.PrivateKey caKey)
          Static method for generating a ceritificate from a user, public key, and the CA's private key
 java.lang.String getName()
          Gets the unique name of the SecurityModule object
 void verify(PostCertificate certificate, Continuation command)
          This method verifies the provided ceritifcate, and returns the result to the continuation (either True or False).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODULE_NAME

public static java.lang.String MODULE_NAME
The name of the module

Constructor Detail

CASecurityModule

public CASecurityModule(java.security.PublicKey caKey)
Constructor for CASecurityModule.

Parameters:
caKey - The well-known public key of the certificate authority
Method Detail

generate

public static CAPostCertificate generate(PostUserAddress address,
                                         java.security.PublicKey key,
                                         java.security.PrivateKey caKey)
                                  throws java.lang.SecurityException
Static method for generating a ceritificate from a user, public key, and the CA's private key

Parameters:
address - The address of the user
key - The public key of the user
caKey - The private key of the certificate authority
Returns:
A certificate for the user
Throws:
java.lang.SecurityException - If the certificate generation has a problem

getName

public java.lang.String getName()
Gets the unique name of the SecurityModule object

Specified by:
getName in interface SecurityModule
Returns:
The Name value

canVerify

public boolean canVerify(PostCertificate certificate)
This method returns whether or not this module is able to verify the given certificate.

Specified by:
canVerify in interface SecurityModule
Parameters:
certificate - The certificate in question
Returns:
Whether or not this module can verify the certificate

verify

public void verify(PostCertificate certificate,
                   Continuation command)
            throws java.lang.SecurityException
This method verifies the provided ceritifcate, and returns the result to the continuation (either True or False).

Specified by:
verify in interface SecurityModule
Parameters:
certificate - The certificate to verify
command - The command to run once the result is available
Throws:
java.lang.SecurityException - If the certificate verification has a problem

ePOST API

Copyright © 2001-2005 - Rice Pastry.