org.ccnx.ccn.io.content.X509CertificateObject Class Reference

A CCNNetworkObject subclass specialized for reading and writing X509Certificates. More...

List of all members.

Public Member Functions

 X509CertificateObject (ContentName name, X509Certificate data, SaveType saveType, CCNHandle handle) throws IOException
 Write constructor.
 X509CertificateObject (ContentName name, X509Certificate data, SaveType saveType, PublisherPublicKeyDigest publisher, KeyLocator locator, CCNHandle handle) throws IOException
 Write constructor.
 X509CertificateObject (ContentName name, CCNHandle handle) throws ContentDecodingException, IOException
 Read constructor.
 X509CertificateObject (ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws ContentDecodingException, IOException
 Read constructor.
 X509CertificateObject (ContentObject firstBlock, CCNHandle handle) throws ContentDecodingException, IOException
 Read constructor if you already have a block.
 X509CertificateObject (ContentName name, X509Certificate data, PublisherPublicKeyDigest publisher, KeyLocator locator, CCNFlowControl flowControl) throws IOException
 Internal constructor used by low-level network operations.
 X509CertificateObject (ContentName name, PublisherPublicKeyDigest publisher, CCNFlowControl flowControl) throws ContentDecodingException, IOException
 Internal constructor used by low-level network operations.
 X509CertificateObject (ContentObject firstSegment, CCNFlowControl flowControl) throws ContentDecodingException, IOException
 Internal constructor used by low-level network operations.
 X509CertificateObject (CCNNetworkObject<?extends X509Certificate > other)
 Copy constructor.
ContentType contentType ()
X509Certificate certificate () throws ContentNotReadyException, ContentGoneException, ErrorStateException
PublisherPublicKeyDigest publicKeyDigest () throws ContentNotReadyException, ContentGoneException, ErrorStateException
boolean equalsCertificate (X509Certificate otherCertificate) throws ContentNotReadyException, ContentGoneException, ErrorStateException, CertificateEncodingException
 Many cryptographic providers don't implement equals() correctly.
boolean equalsCertificate (X509CertificateObject otherCertificateObject) throws ContentNotReadyException, ContentGoneException, ErrorStateException, CertificateEncodingException

Protected Member Functions

X509Certificate readObjectImpl (InputStream input) throws ContentDecodingException, IOException
void writeObjectImpl (OutputStream output) throws ContentEncodingException, IOException

Detailed Description

A CCNNetworkObject subclass specialized for reading and writing X509Certificates.

X509Certificates are Serializable. So we could use a subclass of CCNSerializableObject to serialize them to CCN. But, we want to control their on-the-wire data format -- using their serialization interface, the output will contain metadata only readable via the Java serialization interface. We want to write raw encoded certificates. So have to override the serialization behavior.

While traditional X.509 certificates are somewhat odd in a CCNx context, sometimes we need to interface with protocols that will only accept those as a credential format. Think of them as a particular way of packaging keys.

This class also serves as an example of how to write a CCNNetworkObject subclass that needs to implement its own serialization.


Constructor & Destructor Documentation

org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentName  name,
X509Certificate  data,
SaveType  saveType,
CCNHandle  handle 
) throws IOException

Write constructor.

Parameters:
name 
data 
handle 
Exceptions:
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentName  name,
X509Certificate  data,
SaveType  saveType,
PublisherPublicKeyDigest  publisher,
KeyLocator  locator,
CCNHandle  handle 
) throws IOException

Write constructor.

Parameters:
name 
data 
publisher 
locator 
handle 
Exceptions:
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentName  name,
CCNHandle  handle 
) throws ContentDecodingException, IOException

Read constructor.

Parameters:
name 
handle 
Exceptions:
ContentDecodingException 
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentName  name,
PublisherPublicKeyDigest  publisher,
CCNHandle  handle 
) throws ContentDecodingException, IOException

Read constructor.

Parameters:
name 
publisher 
handle 
Exceptions:
ContentDecodingException 
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentObject  firstBlock,
CCNHandle  handle 
) throws ContentDecodingException, IOException

Read constructor if you already have a block.

Parameters:
firstBlock 
handle 
Exceptions:
ContentDecodingException 
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentName  name,
X509Certificate  data,
PublisherPublicKeyDigest  publisher,
KeyLocator  locator,
CCNFlowControl  flowControl 
) throws IOException

Internal constructor used by low-level network operations.

Don't use unless you know what you are doing.

Parameters:
name name under which to save data
data data to save when save() is called; or null if the next call will be updateInBackground()
publisher key (identity) to use to sign the content (null for default)
locator key locator to use to tell people where to find our key, should match publisher, (null for default for key)
flowControl flow controller to use for network output
Exceptions:
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentName  name,
PublisherPublicKeyDigest  publisher,
CCNFlowControl  flowControl 
) throws ContentDecodingException, IOException

Internal constructor used by low-level network operations.

Don't use unless you know what you are doing.

Parameters:
name name under which to save data
data data to save when save() is called; or null if the next call will be updateInBackground()
publisher key (identity) to use to sign the content (null for default)
locator key locator to use to tell people where to find our key, should match publisher, (null for default for key)
flowControl flow controller to use for network output
Exceptions:
IOException 
org.ccnx.ccn.io.content.X509CertificateObject.X509CertificateObject ( ContentObject  firstSegment,
CCNFlowControl  flowControl 
) throws ContentDecodingException, IOException

Internal constructor used by low-level network operations.

Don't use unless you know what you are doing.

Parameters:
name name under which to save data
data data to save when save() is called; or null if the next call will be updateInBackground()
publisher key (identity) to use to sign the content (null for default)
locator key locator to use to tell people where to find our key, should match publisher, (null for default for key)
flowControl flow controller to use for network output
Exceptions:
IOException 

Member Function Documentation

boolean org.ccnx.ccn.io.content.X509CertificateObject.equalsCertificate ( X509Certificate  otherCertificate  )  throws ContentNotReadyException, ContentGoneException, ErrorStateException, CertificateEncodingException

Many cryptographic providers don't implement equals() correctly.

Exceptions:
ContentGoneException 
ContentNotReadyException 
ErrorStateException 
CertificateEncodingException 

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