Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_Ciphers::Policy Class Reference

This class is used to express an access policy. More...

#include <Policy.h>

Inheritance diagram for CODEX_Ciphers::Policy:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Ciphers::Policy:

Collaboration graph
[legend]
List of all members.

Public Methods

 Policy ()
 Default constructor, for creating an object to be unmarshalled.

 Policy (const Policy &aPol)
 Create Policy from other Policy.

virtual ~Policy ()
 Virtual destructor.

void operator= (const Policy &aPol)
 Assignment operator.

bool verify (const Credentials &credentials) const
 Verify that a Credentials object satisfies the policy.

int marshal (unsigned char **pp) const
 This function creates a serialized representation of the object, which is returned through the argument pp.

void * unmarshal (void *bogus, unsigned char **pp, long length)
 This function takes a serialized representation of the object and recreates the object representation.


Detailed Description

This class is used to express an access policy.

The current version of this class is a trivial acceptance of any Credentials. It is designed to provide an interface for a mechanism such as SDSI or KeyNote.

Deprecated:
Access rights are granted by a private key operation, and this class holds the corresponding public key used to verify that the rights have been granted. The public key is signed by another authority, such as the owner of the access-controlled data.

Definition at line 38 of file Policy.h.


Member Function Documentation

int Policy::marshal unsigned char **    pp const [virtual]
 

This function creates a serialized representation of the object, which is returned through the argument pp.

This must be overridden by the concrete derived class.

Parameters:
pp  Serialized form of the object
Returns:
Length of the marshalled data

Implements CODEX_ASN1::Base.

Definition at line 60 of file Policy.cc.

Referenced by CODEX_Client::Interface::codex_create_policy(), and CODEX_Client::CreateKeyMsg::marshal().

void * Policy::unmarshal void *    bogus,
unsigned char **    pp,
long    length
[virtual]
 

This function takes a serialized representation of the object and recreates the object representation.

This must be overridden by the concrete derived class.

Parameters:
bogus  Included for compatibility with OpenSSL ASN.1 macros
pp  Serialized form of the data
length  Number of bytes of pp to unmarshal
Returns:
success or failure of the unmarshalling

Implements CODEX_ASN1::Base.

Definition at line 66 of file Policy.cc.

References CODEX_ASN1::Base::m_initialized.

Referenced by CODEX_Client::Interface::codex_create_key(), CODEX_Client::Client::createPolicy(), and CODEX_Client::CreateKeyMsg::unmarshal().

bool Policy::verify const Credentials   credentials const
 

Verify that a Credentials object satisfies the policy.

Parameters:
credentials  The credentials presented.
Return values:
true  if the Credentials satisfy this Policy
false  if the Credentials do not satisfy this Policy

Definition at line 54 of file Policy.cc.

Referenced by CODEX_KeyService::ClientMessageVerifier::handler().


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 16:33:04 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18