#include <PolicyConstraints.h>
PolicyConstraintsSyntax ::= SEQUENCE { requireExplicitPolicy [0] SkipCerts OPTIONAL, inhibitPolicyMapping [1] SkipCerts 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 43 of file PolicyConstraints.h.
Public Member Functions | |
CPKIFPolicyConstraints () | |
CPKIFPolicyConstraints (const bool &criticality, const CPKIFBufferPtr &ext) | |
virtual | ~CPKIFPolicyConstraints () |
const CPKIFOIDPtr | oid () const |
bool | RequireExplicitPolicyPresent () const |
void | SetRequireExplicitPolicyPresent (bool) |
int | RequireExplicitPolicy () const |
void | SetRequireExplicitPolicy (int) |
bool | InhibitPolicyMappingPresent () const |
void | SetInhibitPolicyMappingPresent (bool) |
int | InhibitPolicyMapping () const |
void | SetInhibitPolicyMapping (int) |
CPKIFBufferPtr | value () const |
Static Public Attributes | |
static char | extOID [] = "2.5.29.36" |
CPKIFPolicyConstraints::CPKIFPolicyConstraints | ( | ) |
Interface: External
Default constructor
Definition at line 51 of file PolicyConstraints.cpp.
CPKIFPolicyConstraints::CPKIFPolicyConstraints | ( | const bool & | criticality, | |
const CPKIFBufferPtr & | ext | |||
) |
Interface: External
This constructor is internally invoked; it will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the extension cannot be parsed.
std::bad_alloc | Interface: External |
std::bad_alloc |
Definition at line 101 of file PolicyConstraints.cpp.
References CACASNWRAPPER_CREATE.
CPKIFPolicyConstraints::~CPKIFPolicyConstraints | ( | ) | [virtual] |
Interface: External
The function destroys an instance of CPKIFPolicyConstraints.
Definition at line 137 of file PolicyConstraints.cpp.
const CPKIFOIDPtr CPKIFPolicyConstraints::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.
Reimplemented from CPKIFX509Extension.
Definition at line 256 of file PolicyConstraints.cpp.
References extOID.
bool CPKIFPolicyConstraints::RequireExplicitPolicyPresent | ( | ) | const |
Interface: External
This function returns a Boolean indicating whether the require explicit policy component is present in a policy constraints extension.
Definition at line 153 of file PolicyConstraints.cpp.
Referenced by operator<<(), and value().
void CPKIFPolicyConstraints::SetRequireExplicitPolicyPresent | ( | bool | b | ) |
Interface: External
This function sets whether the require explicit policy component is present in a policy constraints extension.
Definition at line 165 of file PolicyConstraints.cpp.
Referenced by SetRequireExplicitPolicy().
int CPKIFPolicyConstraints::RequireExplicitPolicy | ( | ) | const |
Interface: External
This function returns a Boolean indicating the require explicit policy value from a policy constraints extension.
Definition at line 179 of file PolicyConstraints.cpp.
Referenced by operator<<(), and value().
void CPKIFPolicyConstraints::SetRequireExplicitPolicy | ( | int | skipCerts | ) |
Interface: External
This function sets require explicit policy value from a policy constraints extension.
Definition at line 191 of file PolicyConstraints.cpp.
References SetRequireExplicitPolicyPresent().
bool CPKIFPolicyConstraints::InhibitPolicyMappingPresent | ( | ) | const |
Interface: External
This function returns a Boolean indicating whether the inhibit policy mapping component is present in a policy constraints extension.
Definition at line 205 of file PolicyConstraints.cpp.
Referenced by operator<<(), and value().
void CPKIFPolicyConstraints::SetInhibitPolicyMappingPresent | ( | bool | b | ) |
Interface: External
This function sets whether the inhibit policy mapping component is present in a policy constraints extension.
Definition at line 217 of file PolicyConstraints.cpp.
Referenced by SetInhibitPolicyMapping().
int CPKIFPolicyConstraints::InhibitPolicyMapping | ( | ) | const |
Interface: External
This function returns a Boolean indicating the inhibit policy mapping value from a policy constraints extension.
Definition at line 231 of file PolicyConstraints.cpp.
Referenced by operator<<(), and value().
void CPKIFPolicyConstraints::SetInhibitPolicyMapping | ( | int | skipCerts | ) |
Interface: External
This function sets inhibit policy mapping value from a policy constraints extension.
Definition at line 242 of file PolicyConstraints.cpp.
References SetInhibitPolicyMappingPresent().
CPKIFBufferPtr CPKIFPolicyConstraints::value | ( | ) | const [virtual] |
Interface: External
This function returns a smart pointer to a CPKIFBuffer object containing value of the extension.
Reimplemented from CPKIFX509Extension.
Definition at line 272 of file PolicyConstraints.cpp.
References CACASNWRAPPER_CREATE, InhibitPolicyMapping(), InhibitPolicyMappingPresent(), RequireExplicitPolicy(), and RequireExplicitPolicyPresent().
char CPKIFPolicyConstraints::extOID = "2.5.29.36" [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.36".
Definition at line 54 of file PolicyConstraints.h.
Referenced by oid(), and CPKIFPolicyConstraintsFactory::refOID().