PcapPlusPlus  Next
pcpp::X509ExtensionType Class Reference

#include <X509Decoder.h>

Public Types

enum  Value : uint8_t {
  BasicConstraints , KeyUsage , ExtendedKeyUsage , SubjectKeyIdentifier ,
  AuthorityKeyIdentifier , SubjectAltName , IssuerAltName , CrlDistributionPoints ,
  AuthorityInfoAccess , CertificatePolicies , PolicyMappings , PolicyConstraints ,
  NameConstraints , InhibitAnyPolicy , CTPrecertificateSCTs , SubjectInfoAccess ,
  FreshestCRL , TLSFeature , OcspNoCheck , SubjectDirectoryAttributes ,
  Unknown
}
 

Public Member Functions

constexpr X509ExtensionType (Value value)
 
std::string toString () const
 
std::string getOidValue () const
 

Static Public Member Functions

static X509ExtensionType fromOidValue (const Asn1ObjectIdentifier &value)
 

Detailed Description

Represents an X.509 extension type

Member Enumeration Documentation

◆ Value

Enumeration of supported X.509 extension types

Enumerator
BasicConstraints 

Basic Constraints - Indicates if the subject is a CA and the maximum path length.

KeyUsage 

Key Usage - Defines the purpose of the key contained in the certificate.

ExtendedKeyUsage 

Extended Key Usage - Indicates one or more purposes for which the certified public key may be used.

SubjectKeyIdentifier 

Subject Key Identifier - Provides a means of identifying certificates that contain a particular public key

AuthorityKeyIdentifier 

Authority Key Identifier - Identifies the public key used to verify the signature on this certificate.

SubjectAltName 

Subject Alternative Name - Allows identities to be bound to the subject of the certificate.

IssuerAltName 

Issuer Alternative Name - Allows additional identities to be associated with the issuer.

CrlDistributionPoints 

CRL Distribution Points - Identifies how CRL information is obtained.

AuthorityInfoAccess 

Authority Information Access - Describes how to access CA information and services.

CertificatePolicies 

Certificate Policies - Contains a sequence of one or more policy terms.

PolicyMappings 

Policy Mappings - Used in CA certificates to indicate that one or more policies can be considered equivalent

PolicyConstraints 

Policy Constraints - Specifies constraints on path validation.

NameConstraints 

Name Constraints - Indicates a name space within which all subject names in subsequent certificates must be located

InhibitAnyPolicy 

Inhibit Any Policy - Indicates that the special anyPolicy OID is not considered an explicit match for other certificate policies

CTPrecertificateSCTs 

Signed Certificate Timestamp - Contains a list of SCTs from Certificate Transparency logs.

SubjectInfoAccess 

Subject Information Access - Describes how to access additional information about the subject.

FreshestCRL 

Freshest CRL - Identifies how delta CRL information is obtained.

TLSFeature 

TLS Feature - Indicates which TLS features are required for the certificate to be used.

OcspNoCheck 

OCSP No Check - Indicates that an OCSP client should trust the certificate for OCSP signing.

SubjectDirectoryAttributes 

Subject Directory Attributes - Conveys identification attributes of the subject.

Unknown 

Unknown or unsupported extension type.

Constructor & Destructor Documentation

◆ X509ExtensionType()

constexpr pcpp::X509ExtensionType::X509ExtensionType ( Value  value)
inlineconstexpr

Construct X509ExtensionType from Value enum

Parameters
[in]valuethe extension type enum value

Member Function Documentation

◆ fromOidValue()

static X509ExtensionType pcpp::X509ExtensionType::fromOidValue ( const Asn1ObjectIdentifier value)
static

Creates an X509ExtensionType from an OID value

Parameters
[in]valueThe ASN.1 object identifier
Returns
The corresponding X509ExtensionType value, or Unknown if no match is found

◆ getOidValue()

std::string pcpp::X509ExtensionType::getOidValue ( ) const
Returns
The OID value of the extension

◆ toString()

std::string pcpp::X509ExtensionType::toString ( ) const
Returns
A string representation of the extension type