#include <ExtendedKeyUsage.h>
ExtKeyUsage ::= SEQUENCE SIZE(1..MAX) OF KeyPurposeIdFor 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: Yes
Definition at line 40 of file ExtendedKeyUsage.h.
Public Member Functions | |
CPKIFExtendedKeyUsage () | |
CPKIFExtendedKeyUsage (const bool &criticality, const CPKIFBufferPtr &ext) | |
virtual | ~CPKIFExtendedKeyUsage () |
void | KeyPurposeIDs (std::vector< CPKIFOIDPtr > &keyPurposeIDs) |
const CPKIFOIDPtr | oid () const |
CPKIFBufferPtr | value () const |
Static Public Attributes | |
static char | extOID [] = "2.5.29.37" |
CPKIFExtendedKeyUsage::CPKIFExtendedKeyUsage | ( | ) |
Interface: External
Default constructor
Definition at line 41 of file ExtendedKeyUsage.cpp.
CPKIFExtendedKeyUsage::CPKIFExtendedKeyUsage | ( | const bool & | criticality, | |
const CPKIFBufferPtr & | ext | |||
) |
Interface: External
This constructor is called by CPKIFExtendedKeyUsageFactory::create(); this version will throw ASN.1 decoder errors if any of the object identifiers cannot be parsed.
ASN.1 | decoder exception Interface: External |
ASN.1 | decoder exception |
Definition at line 84 of file ExtendedKeyUsage.cpp.
References CACASNWRAPPER_CREATE.
CPKIFExtendedKeyUsage::~CPKIFExtendedKeyUsage | ( | ) | [virtual] |
Interface: External
The function destroys an instance of CPKIFExtendedKeyUsage.
Definition at line 110 of file ExtendedKeyUsage.cpp.
void CPKIFExtendedKeyUsage::KeyPurposeIDs | ( | std::vector< CPKIFOIDPtr > & | keyPurposeIDs | ) |
Interface: External
This function returns a list of object identifiers specified in an EKU extension. The CPKIFOID objects are inserted into the vector after the vector has been cleared, i.e. contents in the vector at the time of invocation will be removed. If no object identifier values are present in the instance of CPKIFExtendedKeyUsage, the vector will be empty following execution of this function. Otherwise, the vector will contain one or more objects.
The objects returned by this function are reference counted pointers to an objects held by the instance of CPKIFExtendedKeyUsage and should not be modified. As reference counted objects, the objects may live longer than the CPKIFExtendedKeyUsage instance from which they are retrieved.
keyPurposeIDs | [out] Reference to a vector of smart pointers to CPKIFOID objects to receive the object identifiers specified in an ExtendedKeyUsage extension |
Definition at line 150 of file ExtendedKeyUsage.cpp.
Referenced by operator<<().
const CPKIFOIDPtr CPKIFExtendedKeyUsage::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 126 of file ExtendedKeyUsage.cpp.
References extOID.
CPKIFBufferPtr CPKIFExtendedKeyUsage::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 171 of file ExtendedKeyUsage.cpp.
char CPKIFExtendedKeyUsage::extOID = "2.5.29.37" [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.37".
Definition at line 53 of file ExtendedKeyUsage.h.
Referenced by oid(), and CPKIFExtendedKeyUsageFactory::refOID().