|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--wtanaka.praya.Recipient
|
+--wtanaka.praya.gale.LocationRecipient
A recipient targeted at a particular dangermouse location. This recipient is not "fully resolved." Call resolve() to get an instance of ResolvedLocationRecipient
Return to
or the Praya Homepage
Location,
ResolvedLocationRecipient, Serialized Form| Field Summary | |
private java.util.Hashtable |
fields
|
private static java.lang.String |
ID_LABEL
|
private Location[] |
m_ids
|
| Fields inherited from class wtanaka.praya.Recipient |
m_protocol, TYPE_BOOLEAN, TYPE_STRING |
| Constructor Summary | |
LocationRecipient(Protocol galeClient,
Location[] ids)
Constructor |
|
| Method Summary | |
java.lang.String |
getDescription()
A short string which describes where something addressed to this recipient will go, assuming that the caller is aware of the context of the recipient. |
java.util.Hashtable |
getFieldNames()
Returns an table of names->field contents of fields for insertion into a field enabled editor. |
java.lang.String |
getFullDescription()
A string which describes where something addressed to this recipient will go. |
private GaleClient |
getParent()
|
ResolvedRecipient |
resolve()
Looks up the keys associated with this Location in order to find which locations to actually send to. |
java.lang.String |
toString()
|
Recipient |
withNewFields(java.util.Hashtable newFields)
Returns a new recipient with the given fields. |
| Methods inherited from class wtanaka.praya.Recipient |
equals, getProtocol, hashCode |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private Location[] m_ids
private java.util.Hashtable fields
private static final java.lang.String ID_LABEL
| Constructor Detail |
public LocationRecipient(Protocol galeClient,
Location[] ids)
| Method Detail |
private GaleClient getParent()
public java.lang.String getDescription()
RecipientgetDescription in class Recipientpublic java.lang.String getFullDescription()
RecipientgetFullDescription in class Recipientpublic java.util.Hashtable getFieldNames()
RecipientgetFieldNames in class Recipientpublic Recipient withNewFields(java.util.Hashtable newFields)
RecipientwithNewFields in class Recipientwtanaka.praya.RecipientnewFields - this is the map from string to FilledField
public ResolvedRecipient resolve()
throws CannotResolveException
(1) Given a location, e.g. "pub.gale@ofb.net", construct the list of candidate key names for this location: pub.gale@ofb.net pub.*@ofb.net *@ofb.net There will always be N+1 candidate key names for a location with N local parts (e.g., "pub" and "gale").
(2) In parallel, look up each of these candidate key names. Each candidate key will either return a positive reply, a negative reply, or no reply (timeout, treated equivalently to negative reply). If no positive replies are received, the location does not exist and an error should be reported. If more than one positive reply is received, one may be picked at random (alternatively an error may be reported).
(3) In this positive key reply, look for the key.redirect field. If it exists, its value must be merged with the key name and the original location to produce a new location. First, count the number of components in the local part of the key name, excluding any trailing '*'. Remove that many components from the beginning of the local part of the original location. Also remove the domain from the original location. You will be left with zero or more components from the end of the local part of the original location. Append this string to the local part of the location stored in the key.redirect fragment. The location thus produced is the merged location. Go to step (1) and repeat the process with the merged location. Use the merged location rather than the original location for all further purposes when dealing with this message (such as category generation, UI presentation, etc).
(4) If there is no key.redirect, then the key MUST contain either one or more key.member fields; or the three fields rsa.modulus, rsa.bits, and rsa.exponent; or both key.member and the rsa fields. If there is no key.member field present, then encrypt the puff using this public key. If both types of fields are present, the puff must be encrypted to this public key as well as the keys specified in the key.member field(s). If key.member is present but not the rsa fields, then encrypt only to the keys listed in the key.member fragments.
(5) Each key.member field has a value whose contents are another key name, or the empty string. If the empty string is found, this means that the puff should not be encrypted; processing may terminate here. Otherwise, construct the set of keys named in the key.member fields. Look up each of these keys in parallel, starting from step (2). Each request must terminate with either a valid public key, or the empty string. When the transitive closure is complete, the result will be either the empty string or a set of public keys. If it is the empty string, do not encrypt the puff; otherwise, encrypt the puff to this list of keys.
This is a graph traversal; there may be cycles and shared structures. If a key contains a key.redirect fragment, the fragment is to be ignored during this graph traversal.
resolve in class Recipientpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||