|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable rice.post.PostClient rice.post.security.pknoi.PKnoISecurityModule
public class PKnoISecurityModule
This class is the security module which implements the PKnoI (web of trust) based security system.
Field Summary | |
---|---|
static java.lang.String |
MODULE_NAME
The name of the module |
Constructor Summary | |
---|---|
PKnoISecurityModule(Post post)
Constructor for PKnoISecurityModule. |
Method Summary | |
---|---|
void |
addPrivate(PKnoIPostCertificate cert,
Continuation command)
This method should be called when this user wishes to record a non-verified certificate for later use. |
void |
addPublic(PKnoIPostCertificate cert,
Continuation command)
This method should be called when this user wishes to "vouch" for the user with the provided certificate. |
boolean |
canVerify(PostCertificate certificate)
This method returns whether or not this module is able to verify the given certificate. |
void |
findChains(PKnoIPostCertificate source,
PKnoIPostCertificate destination,
int len,
Continuation command)
This method will attempt to find all chains of length up to len, and return a PKnoIChain[] to the continuation once all chains have been completed. |
static PKnoIPostCertificate |
generate(PostUserAddress address,
java.security.PublicKey key)
Static method for generating a ceritificate from a user and public key |
void |
getContentHashReferences(Continuation command)
This method is periodically invoked by Post in order to get a list of all handles under which the application has live objects. |
void |
getLogs(Continuation command)
This method is periodically invoked by Post in order to get a list of all mutable data which the application is interested in. |
java.lang.String |
getName()
Gets the unique name of the SecurityModule object |
void |
notificationReceived(NotificationMessage nm,
Continuation command)
This method is how the Post object informs the clients that there is an incoming notification. |
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 rice.post.PostClient |
---|
getAddress |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String MODULE_NAME
Constructor Detail |
---|
public PKnoISecurityModule(Post post)
post
- The local post serviceMethod Detail |
---|
public static PKnoIPostCertificate generate(PostUserAddress address, java.security.PublicKey key)
address
- The address of the userkey
- The public key of the user
java.lang.SecurityException
- If the certificate generation has a problempublic java.lang.String getName()
getName
in interface SecurityModule
public boolean canVerify(PostCertificate certificate)
canVerify
in interface SecurityModule
certificate
- The certificate in question
public void verify(PostCertificate certificate, Continuation command) throws java.lang.SecurityException
verify
in interface SecurityModule
certificate
- The certificate to verifycommand
- The command to run once the result is available
java.lang.SecurityException
- If the certificate verification has a problempublic void notificationReceived(NotificationMessage nm, Continuation command)
notificationReceived
in class PostClient
nm
- The incoming notification.command
- THe command to return whether or not the notification should be accepted (Boolean true or false)public void getContentHashReferences(Continuation command)
getContentHashReferences
in class PostClient
public void getLogs(Continuation command)
getLogs
in class PostClient
public void findChains(PKnoIPostCertificate source, PKnoIPostCertificate destination, int len, Continuation command)
destination
- the certificate to look forsource
- The starting userlen
- The maximum chains length to findcommand
- The command to return the result opublic void addPublic(PKnoIPostCertificate cert, Continuation command)
cert
- The certificate to vouch forcommand
- The command to run with the success/failurepublic void addPrivate(PKnoIPostCertificate cert, Continuation command)
cert
- The certificate to addcommand
- The command to run with the success/failure
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |