CPKIFBasicConstraints Class Reference

#include <BasicConstraints.h>

Inheritance diagram for CPKIFBasicConstraints:

Inheritance graph
[legend]
Collaboration diagram for CPKIFBasicConstraints:

Collaboration graph
[legend]

List of all members.


Detailed Description

CPKIFBasicConstraints provides access to information found in a basic constraints extension. The ASN.1 definition is given below:
BasicConstraints ::= SEQUENCE {

cA BOOLEAN DEFAULT FALSE,

pathLenConstraint INTEGER (0..MAX) OPTIONAL }

For details on accessing extensions in a certificate or CRL, see the sections on CPKIFCertificate and CPKIFCRL. PKIF does not provide a means of encoding extensions. This class is used to parse extensions present in encoded objects, e.g. public-key certificates.

TSP-enforcing: No

Definition at line 46 of file BasicConstraints.h.


Public Member Functions

 CPKIFBasicConstraints ()
 CPKIFBasicConstraints (const bool &criticality, const CPKIFBufferPtr &ext)
virtual ~CPKIFBasicConstraints ()
const CPKIFOIDPtr oid () const
bool isCA () const
int pathLength () const
bool pathLengthPresent () const
CPKIFBufferPtr value () const
void SetIsCA (bool b)
void SetPathLength (int pl)

Static Public Attributes

static char extOID [] = "2.5.29.19"

Constructor & Destructor Documentation

CPKIFBasicConstraints::CPKIFBasicConstraints (  ) 

Interface: External

Defaul constructor set isCA = false, pathLengthPresent = false

Returns:
None

Definition at line 49 of file BasicConstraints.cpp.

CPKIFBasicConstraints::CPKIFBasicConstraints ( const bool &  criticality,
const CPKIFBufferPtr &  ext 
)

Interface: External

This constructor is internally invoked; this version will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the extension cannot be parsed. The cA property is initialized to false and the pathLenConstraint property is initialized to absent.

Returns:
None
Exceptions:
std::bad_alloc Interface: External
This constructor is internally invoked; this version will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the extension cannot be parsed. The cA property is initialized to false and the pathLenConstraint property is initialized to absent.

Returns:
None
Exceptions:
std::bad_alloc 

Definition at line 96 of file BasicConstraints.cpp.

References CACASNWRAPPER_CREATE.

CPKIFBasicConstraints::~CPKIFBasicConstraints (  )  [virtual]

Interface: External

The function destroys an instance of CPKIFBasicConstraints.

Returns:
None

Definition at line 120 of file BasicConstraints.cpp.


Member Function Documentation

const CPKIFOIDPtr CPKIFBasicConstraints::oid (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFOID object containing the object identifier associated with this type of extension.

Returns:
A smart pointer to a CPKIFOID object containing the object identifier associated with this type of extension.

Reimplemented from CPKIFX509Extension.

Definition at line 176 of file BasicConstraints.cpp.

References extOID.

bool CPKIFBasicConstraints::isCA (  )  const

Interface: External

This function returns a Boolean value indicating whether the entity associated with the certificate containing the basic constraints extension is a CA or an end entity.

Returns:
A Boolean value indicating whether the entity associated with the certificate containing the basic constraints extension is a CA or an end entity.

Definition at line 151 of file BasicConstraints.cpp.

Referenced by operator<<(), and value().

int CPKIFBasicConstraints::pathLength (  )  const

Interface: External

This function returns an integer containing the path length value from a basic constraints extension. This value is only meaningful when the pathLengthPresent function returns true.

Returns:
An integer containing the path length value from a basic constraints extension.

Definition at line 164 of file BasicConstraints.cpp.

Referenced by operator<<(), and value().

bool CPKIFBasicConstraints::pathLengthPresent (  )  const

Interface: External

A bool indicating if the basic constraints extension contains a path length value.

Returns:
A bool indicating if the basic constraints extension contains a path length value.

Definition at line 139 of file BasicConstraints.cpp.

Referenced by operator<<(), and value().

CPKIFBufferPtr CPKIFBasicConstraints::value (  )  const [virtual]

Interface: External

This function returns a smart pointer to a CPKIFBuffer object containing value of the extension.

Returns:
A smart pointer to a CPKIFBuffer object containing value of the extension.

Reimplemented from CPKIFX509Extension.

Definition at line 192 of file BasicConstraints.cpp.

References CACASNWRAPPER_CREATE, isCA(), pathLength(), and pathLengthPresent().

void CPKIFBasicConstraints::SetIsCA ( bool  b  ) 

Definition at line 240 of file BasicConstraints.cpp.

void CPKIFBasicConstraints::SetPathLength ( int  pl  ) 

Definition at line 246 of file BasicConstraints.cpp.


Member Data Documentation

char CPKIFBasicConstraints::extOID = "2.5.29.19" [static]

The extOID member of each extension class provides a NULL terminated string representation of the object identifier that identifies the extension. The value defined for this class is "2.5.29.19".

Definition at line 57 of file BasicConstraints.h.

Referenced by oid(), and CPKIFBasicConstraintsFactory::refOID().


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:19:52 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6