org.ccnx.ccn.impl.security.keys.KeyServer Class Reference

A small class to handle publishing keys to CCNx, without requiring a repository to be present. More...

List of all members.

Public Member Functions

 KeyServer (CCNHandle handle)
 Constructor; uses existing handle.
CCNHandle handle ()
synchronized void initialize () throws IOException
synchronized boolean isInitialized ()
PublicKeyObject serveKey (ContentName keyName, PublicKey keyToPublish, PublisherPublicKeyDigest signingKeyID, KeyLocator signingKeyLocator) throws IOException
 Start serving signed records for this key.
void respondToKeyRequests (ContentName keyPrefix) throws IOException
 Handle cases where people query us with short prefixes.

Protected Attributes

CCNHandle _handle = null
CCNFlowServer _keyServer = null

Detailed Description

A small class to handle publishing keys to CCNx, without requiring a repository to be present.

This class publishes our keys, only if someone asks for them. It doesn't make its own handle, unless really asked to. TODO move to use the default handle, which requires making sure that the caller has the opportunity to provide signing key information to us if they don't want to have it pulled from the default handle.


Constructor & Destructor Documentation

org.ccnx.ccn.impl.security.keys.KeyServer.KeyServer ( CCNHandle  handle  ) 

Constructor; uses existing handle.

Parameters:
handle 

Member Function Documentation

void org.ccnx.ccn.impl.security.keys.KeyServer.respondToKeyRequests ( ContentName  keyPrefix  )  throws IOException

Handle cases where people query us with short prefixes.

The flow controller will suppress duplicate or unnecessary registrations.

Parameters:
keyPrefix 
Exceptions:
IOException 
PublicKeyObject org.ccnx.ccn.impl.security.keys.KeyServer.serveKey ( ContentName  keyName,
PublicKey  keyToPublish,
PublisherPublicKeyDigest  signingKeyID,
KeyLocator  signingKeyLocator 
) throws IOException

Start serving signed records for this key.

We used to check to see if this key was already on the network before publishing it. That was silly -- the interest mechanism would do this for us. Much better way to handle things is to just listen for interests for this key, and only publish it if someone asks (we really want to be the server of last resort, so we should answer late, but don't know how to do that). So we could make an interest handler and then publish the key on first interest (and assume it's cached thereafter?). If the cost of signing is negligable, we can be cheezier. Just publish to our key server, and if someone comes looking, they'll get it. If not....

Parameters:
keyName the key's content name. Will add a version when saving if it doesn't have one already. If it does have a version, will use that one (see below for effect of version on the key locator). (Note that this is not standard behavior for savable network content, which needs its version explicitly set.)
keyToPublish the public key to publish
keyID the publisher id
signingKeyID the key id of the key pair to sign with
signingKeyLocator the key locator to use if we save this key (if it is not already published). If not specified, we look for the default locator for the signing key. If there is none, and we are signing with the same key we are publishing, we build a self-referential key locator, using the name passed in (versioned or not).
Returns:
the published information about this key
Exceptions:
IOException 

The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:42 2011 for Content-Centric Networking in Java by  doxygen 1.6.3