Agent System POND 1.0 (1.7.2000)

PkgAgentSystem.Crypto
Class AgentIdentityExtension

java.lang.Object
  |
  +--java.security.cert.Certificate
        |
        +--PkgAgentSystem.Crypto.AgentIdentity
              |
              +--PkgAgentSystem.Crypto.AgentIdentityExtension

public class AgentIdentityExtension
extends AgentIdentity

Extended identity of an agent. More information may be included, especially concerning the owner, like complete name, address and credit card information. All the information in this is public, so think what you include in it.
The information is stored under a key. Standard keys are defined, but other can be freely used.

Version:
1.0, 1.7.2000
Author:
Michael Sonntag

Field Summary
static String COUNTRY
          Address of the owner: Countrs
static String CREDIT_CARD_EXPIRES
          Creditcard information on the owner: Expiry date
static String CREDIT_CARD_NAME
          Creditcard information on the owner: Issuer
static String CREDIT_CARD_NUMBER
          Creditcard information on the owner: Number
static String CREDIT_CARD_OWNERNAME
          Creditcard information on the owner: Name of owner as on the card
static String EMAIL
          Address of the owner: E-Mail address
static String FIRST_NAME
          First name of the owner
static String LAST_NAME
          Last name of the owner
static String MIDDLE_INITIAL
          Middle initial of the owner
static String PROVINCE
          Address of the owner: Province
static String STREET
          Address of the owner: Street
static String TITLE
          Title of the owner
static String TOWN
          Address of the owner: Town
static String ZIP_CODE
          Address of the owner: ZIP-code
 
Fields inherited from class PkgAgentSystem.Crypto.AgentIdentity
agentPublicKey, agentPublicKeyName, home, id, name, ownerCertificate, ownerName, signAlgorithmAgent, signAlgorithmOwner, signatureAgent, signatureOwner, signed, version
 
Constructor Summary
(package private) AgentIdentityExtension()
           
protected AgentIdentityExtension(String type)
           
  AgentIdentityExtension(String name, String id, URL home, String ownerName)
          Creates a new AgentIdentity which does not include an owner certificate.
  AgentIdentityExtension(String name, String id, URL home, String agentPublicKeyName, PublicKey agentPublicKey, String ownerName, Certificate ownerCertificate)
          Creates a new AgentIdentity which does include an owner certificate and a public key of the agent.
 
Method Summary
 void addInformation(String key, Serializable value)
          Add information to the identity.
protected  void decodeData(byte[] buffer)
          Restores the content of an identity from a buffer.
protected  byte[] getEncodedForSigning()
          Returns the identity in an encoded form in an byte array.
 Object getInformation(String key)
          Retrieves the information for this key from the identity.
 Enumeration getKeys()
          Returns an enumeration of all keys, for which values are stored in this identity
 
Methods inherited from class PkgAgentSystem.Crypto.AgentIdentity
equals, getAgentName, getAgentPublicKeyName, getAgentSignature, getCertificate, getClassificationStatus, getEncoded, getHomeAddress, getID, getOwnerCertificate, getOwnerName, getOwnerSignature, getPublicKey, getRegularCustomerIdentity, hashCode, isSigned, setClassificationStatus, sign, toString, verify, verify, verify
 
Methods inherited from class java.security.cert.Certificate
getType
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIRST_NAME

public static final String FIRST_NAME
First name of the owner

LAST_NAME

public static final String LAST_NAME
Last name of the owner

MIDDLE_INITIAL

public static final String MIDDLE_INITIAL
Middle initial of the owner

TITLE

public static final String TITLE
Title of the owner

STREET

public static final String STREET
Address of the owner: Street

TOWN

public static final String TOWN
Address of the owner: Town

ZIP_CODE

public static final String ZIP_CODE
Address of the owner: ZIP-code

PROVINCE

public static final String PROVINCE
Address of the owner: Province

COUNTRY

public static final String COUNTRY
Address of the owner: Countrs

EMAIL

public static final String EMAIL
Address of the owner: E-Mail address

CREDIT_CARD_OWNERNAME

public static final String CREDIT_CARD_OWNERNAME
Creditcard information on the owner: Name of owner as on the card

CREDIT_CARD_NUMBER

public static final String CREDIT_CARD_NUMBER
Creditcard information on the owner: Number

CREDIT_CARD_EXPIRES

public static final String CREDIT_CARD_EXPIRES
Creditcard information on the owner: Expiry date

CREDIT_CARD_NAME

public static final String CREDIT_CARD_NAME
Creditcard information on the owner: Issuer
Constructor Detail

AgentIdentityExtension

AgentIdentityExtension()

AgentIdentityExtension

protected AgentIdentityExtension(String type)

AgentIdentityExtension

public AgentIdentityExtension(String name,
                              String id,
                              URL home,
                              String ownerName)
Creates a new AgentIdentity which does not include an owner certificate.
Parameters:
name - the name of the agent
id - the unique id of the agent
home - the URL of the home agent-system
ownerName - the name of the owner of the agent
See Also:
AgentIdentity

AgentIdentityExtension

public AgentIdentityExtension(String name,
                              String id,
                              URL home,
                              String agentPublicKeyName,
                              PublicKey agentPublicKey,
                              String ownerName,
                              Certificate ownerCertificate)
Creates a new AgentIdentity which does include an owner certificate and a public key of the agent.
Parameters:
name - the name of the agent
id - the unique id of the agent
home - the URL of the home agent-system
agentPublicKeyName - the name of the public key of the agent. Must be identical to the name used for storing the private key in the key-store of the agent.
agentPublicKey - the public key of the agent
ownerName - the name of the owner of the agent (may be null)
ownerCertificate - the certificate of the owner of the agent
See Also:
AgentIdentity
Method Detail

addInformation

public void addInformation(String key,
                           Serializable value)
                    throws SignatureException
Add information to the identity. Must be done before signing. Setting a key with a value of null will remove this element.
Parameters:
key - the name under which to store the value
value - the value to store (null to delete this key)
Throws:
SignatureException - if the identity is already signed

getInformation

public Object getInformation(String key)
Retrieves the information for this key from the identity. If this key is not contained, null is returned.
Parameters:
key - the key for the value to retrieve
Returns:
the retrieved value or null if this key is not set

getKeys

public Enumeration getKeys()
Returns an enumeration of all keys, for which values are stored in this identity
Returns:
Enumeration of all keys

getEncodedForSigning

protected byte[] getEncodedForSigning()
                               throws CertificateEncodingException
Returns the identity in an encoded form in an byte array. Used for signing the content
Returns:
the array of bytes with the encoded identity
Throws:
CertificateEncodingException - if an error occured during encoding
Overrides:
getEncodedForSigning in class AgentIdentity

decodeData

protected void decodeData(byte[] buffer)
                   throws IOException,
                          CertificateException,
                          NoSuchAlgorithmException
Restores the content of an identity from a buffer. Must be the same data as returned from getEncodedForSigning.
Parameters:
buffer - the array of bytes from which to re-create the identity
cl - the classloader, which should be used to recreate all the objects
Throws:
IOException - if an error occured during deserialization of a field
CertificateException - if the key could not be decoded
NoSuchAlgorithmException - if the algorithm of the key is not available
Overrides:
decodeData in class AgentIdentity
See Also:
AgentIdentityFactory

Agent System POND 1.0 (1.7.2000)

Submit a bug

Copyright 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.