A KeyLocator specifies where a content consumer or intermediary can find the public key necessary to verify a piece of content. More...
Public Types | |
| enum | KeyLocatorType { NAME, KEY, CERTIFICATE } |
KeyLocator(name) must allow for a complete name -- i.e. More... | |
Public Member Functions | |
| KeyLocator (ContentName name) | |
| Make a KeyLocator containing only a name. | |
| KeyLocator (ContentName name, PublisherID publisher) | |
| Make a KeyLocator containing a key name and the desired publisher. | |
| KeyLocator (ContentName name, PublisherPublicKeyDigest publisher) | |
| Make a KeyLocator containing a key name and the desired publisher. | |
| KeyLocator (KeyName keyName) | |
| Make a KeyLocator specifying a KeyName -- a structure combining the name at which to find the key and authentication information by which to verify it. | |
| KeyLocator (PublicKey key) | |
| Make a KeyLocator containing an explicit public key. | |
| KeyLocator (X509Certificate certificate) | |
| Make a KeyLocator containing an explicit X509Certificate. | |
| KeyLocator | clone () |
| Implement Cloneable. | |
| KeyLocator () | |
| For use by decoders. | |
| PublicKey | key () |
| Get the key if present. | |
| KeyName | name () |
| Get the KeyName if present. | |
| X509Certificate | certificate () |
| Get the certificate if present. | |
| KeyLocatorType | type () |
| Return the type of data stored in this KeyLocator - KEY, CERTIFICATE, or NAME. | |
| int | hashCode () |
| boolean | equals (Object obj) |
| void | decode (XMLDecoder decoder) throws ContentDecodingException |
| Decode this object as the top-level item in a new XML document, reading it from a network buffer. | |
| byte[] | getEncoded () |
| void | encode (XMLEncoder encoder) throws ContentEncodingException |
| Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement. | |
| long | getElementLabel () |
| Allow the encoder/decoder to retrieve the top-level element name programmatically. | |
| boolean | validate () |
| Make sure all of the necessary fields are filled in prior to attempting to encode. | |
| String | toString () |
| Default toString() implementation simply prints the text encoding of the object. | |
| ContentName | getContentName () |
| Enables a KeyLocator to be used directly in a ContentName builder. | |
Protected Member Functions | |
| KeyLocator (KeyName name, PublicKey key, X509Certificate certificate) | |
| Internal constructor. | |
Protected Attributes | |
| KeyName | _keyName |
| PublicKey | _key |
| X509Certificate | _certificate |
A KeyLocator specifies where a content consumer or intermediary can find the public key necessary to verify a piece of content.
It might include the key itself, a certificate containing the key, or a CCN name pointing to a location where the key can be found.
KeyLocator(name) must allow for a complete name -- i.e.
a name and authentication information.
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | ContentName | name | ) |
Make a KeyLocator containing only a name.
| name | the name |
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | ContentName | name, | |
| PublisherID | publisher | |||
| ) |
Make a KeyLocator containing a key name and the desired publisher.
| name | the key name | |
| publisher | the desired publisher |
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | ContentName | name, | |
| PublisherPublicKeyDigest | publisher | |||
| ) |
Make a KeyLocator containing a key name and the desired publisher.
| name | the key name | |
| publisher | the desired publisher |
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | KeyName | keyName | ) |
Make a KeyLocator specifying a KeyName -- a structure combining the name at which to find the key and authentication information by which to verify it.
| keyName | the KeyName to use to retrieve and authenticate the key |
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | PublicKey | key | ) |
Make a KeyLocator containing an explicit public key.
| key | the key |
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | X509Certificate | certificate | ) |
Make a KeyLocator containing an explicit X509Certificate.
| certificate | the certificate |
| org.ccnx.ccn.protocol.KeyLocator.KeyLocator | ( | KeyName | name, | |
| PublicKey | key, | |||
| X509Certificate | certificate | |||
| ) | [protected] |
Internal constructor.
| name | ||
| key | ||
| certificate |
| X509Certificate org.ccnx.ccn.protocol.KeyLocator.certificate | ( | ) |
Get the certificate if present.
| void org.ccnx.ccn.protocol.KeyLocator.decode | ( | XMLDecoder | decoder | ) | throws ContentDecodingException [virtual] |
Decode this object as the top-level item in a new XML document, reading it from a network buffer.
Reads document start and end. Assumes default encoding.
| buf | input stream to read from |
| ContentDecodingException | if there is an error decoding the content Decode this object as the top-level item in a new XML document, reading it from a network buffer. Reads document start and end. |
| buf | input stream to read from | |
| codec | the codec to use; must be recognized by XMLCodecFactory |
| ContentDecodingException | if there is an error decoding the content |
| decoder | the decoder being used; encapsulates state including the codec being used as well as the input source and current offset |
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
| void org.ccnx.ccn.protocol.KeyLocator.encode | ( | XMLEncoder | encoder | ) | throws ContentEncodingException [virtual] |
Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement.
Writes just the object itself, higher-level processes have handled start and end document if need be. Allows object to be written using the same code whether it is a top-level element written alone, or nested inside another element.
| encoder | the encoder being used; encapsulates state including the codec being used as well as the output destination and current offset |
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
| ContentName org.ccnx.ccn.protocol.KeyLocator.getContentName | ( | ) |
Enables a KeyLocator to be used directly in a ContentName builder.
Implements org.ccnx.ccn.protocol.ContentNameProvider.
| long org.ccnx.ccn.protocol.KeyLocator.getElementLabel | ( | ) | [virtual] |
Allow the encoder/decoder to retrieve the top-level element name programmatically.
This allows subclasses to rename elements without changing their encoder/decoders.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
| PublicKey org.ccnx.ccn.protocol.KeyLocator.key | ( | ) |
Get the key if present.
| KeyName org.ccnx.ccn.protocol.KeyLocator.name | ( | ) |
| String org.ccnx.ccn.protocol.KeyLocator.toString | ( | ) |
Default toString() implementation simply prints the text encoding of the object.
This demonstrates how to force use of the text encoding.
Reimplemented from org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
| KeyLocatorType org.ccnx.ccn.protocol.KeyLocator.type | ( | ) |
Return the type of data stored in this KeyLocator - KEY, CERTIFICATE, or NAME.
| boolean org.ccnx.ccn.protocol.KeyLocator.validate | ( | ) | [virtual] |
Make sure all of the necessary fields are filled in prior to attempting to encode.
All implementations of encode(XMLEncoder) should call this for their classes prior to encoding.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
1.6.3