scclib
Stable Cloud Computing C++ Library
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
scc::crypto::ExtBase Struct Reference

X.509 extensions. More...

#include <cert.h>

Inheritance diagram for scc::crypto::ExtBase:
Inheritance graph
[legend]
Collaboration diagram for scc::crypto::ExtBase:
Collaboration graph
[legend]

Public Member Functions

 ExtBase (bool crit=false)
 
virtual std::string name () const
 Return the name of the extension.
 
virtual std::string str (bool=false) const
 Print to string, optionally printing the value.
 
virtual void parse ()
 Parse value into the the local sub-class data.
 
virtual void dump ()
 Dump sub-class data into the value.
 
virtual bool implemented () const
 Is this implemented (sub-classed)? More...
 
BasePtr dump_seq ()
 Dump the extension into an Extension sequence.
 

Static Public Member Functions

static ExtBasePtr create (BasePtr)
 Create an extension. More...
 
static oid_value find_oid (ExtType)
 Find the oid associated with the extension type.
 

Public Attributes

oid_value oid
 The oid of the extension.
 
bool critical
 Is the extension marked critical? If a CRL contains a critical extension that cannot be processed, it must not be used to determine the status of certificates.
 
BasePtr value
 Parsed extension value.
 

Detailed Description

X.509 extensions.

From https://tools.ietf.org/html/rfc5280#section-4.1

Extension ::= SEQUENCE { extnID OBJECT IDENTIFIER, critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING – contains the DER encoding of an ASN.1 value – corresponding to the extension type identified – by extnID }

Definition at line 620 of file cert.h.

Member Function Documentation

◆ create()

static ExtBasePtr scc::crypto::ExtBase::create ( BasePtr  )
static

Create an extension.

Parameters
seqExtension sequence. Throws exception if this sequence is not of the Extension type. Parses the extension sequence, calls parse() for the sub-class, and returns sub-class pointer.

◆ implemented()

virtual bool scc::crypto::ExtBase::implemented ( ) const
inlinevirtual

Is this implemented (sub-classed)?

If an extension is marked critical, but is unrecognized, it is not recommended for the service to proceed using the certificate.

Reimplemented in scc::crypto::ExtExtendedKeyUsage, scc::crypto::ExtKeyUsage, scc::crypto::ExtBasicConstraints, scc::crypto::ExtIssuerAlternativeName, scc::crypto::ExtSubjectKeyIdentifier, scc::crypto::ExtAuthorityKeyIdentifier, and scc::crypto::ExtSubjectAlternativeName.

Definition at line 641 of file cert.h.


The documentation for this struct was generated from the following file: