Botan 3.14.1
Crypto and TLS for C&
Botan::Cert_Extension::Authority_Information_Access::AccessDescription Class Referencefinal

#include <x509_ext.h>

Public Member Functions

const OID & access_method () const
 AccessDescription (OID method, ASN1_Type location_tag, ASN1_Class location_class, std::vector< uint8_t > location_value)
std::optional< std::string > location_as_uri_string () const
ASN1_Class location_class () const
ASN1_Type location_tag () const
const std::vector< uint8_t > & location_value () const

Detailed Description

An AccessDescription preserving accessMethod plus a raw view of the accessLocation GeneralName.

AccessDescription  ::=  SEQUENCE {
     accessMethod          OBJECT IDENTIFIER,
     accessLocation        GeneralName }

Definition at line 385 of file x509_ext.h.

Constructor & Destructor Documentation

◆ AccessDescription()

Botan::Cert_Extension::Authority_Information_Access::AccessDescription::AccessDescription ( OID method,
ASN1_Type location_tag,
ASN1_Class location_class,
std::vector< uint8_t > location_value )
inline

Definition at line 387 of file x509_ext.h.

390 :
391 m_method(std::move(method)),
392 m_location_tag(location_tag),
393 m_location_class(location_class),
394 m_location_value(std::move(location_value)) {}

References location_class(), location_tag(), and location_value().

Member Function Documentation

◆ access_method()

const OID & Botan::Cert_Extension::Authority_Information_Access::AccessDescription::access_method ( ) const
inline

Definition at line 396 of file x509_ext.h.

396{ return m_method; }

◆ location_as_uri_string()

std::optional< std::string > Botan::Cert_Extension::Authority_Information_Access::AccessDescription::location_as_uri_string ( ) const

If location is a URI (tag 6 IMPLICIT IA5String), return the string; nullopt otherwise.

Definition at line 1096 of file x509_ext.cpp.

1096 {
1097 if(m_location_class == ASN1_Class::ContextSpecific && m_location_tag == ASN1_Type(6)) {
1098 return std::string(m_location_value.begin(), m_location_value.end());
1099 }
1100 return std::nullopt;
1101}
ASN1_Type
Definition asn1_obj.h:47

References Botan::ContextSpecific.

◆ location_class()

ASN1_Class Botan::Cert_Extension::Authority_Information_Access::AccessDescription::location_class ( ) const
inline

Definition at line 403 of file x509_ext.h.

403{ return m_location_class; }

Referenced by AccessDescription().

◆ location_tag()

ASN1_Type Botan::Cert_Extension::Authority_Information_Access::AccessDescription::location_tag ( ) const
inline

The GeneralName CHOICE tag (the [n] of the access location).

Definition at line 401 of file x509_ext.h.

401{ return m_location_tag; }

Referenced by AccessDescription().

◆ location_value()

const std::vector< uint8_t > & Botan::Cert_Extension::Authority_Information_Access::AccessDescription::location_value ( ) const
inline

The raw value bytes of the accessLocation, without the leading tag/length. For a URI accessLocation this is the IA5String value; for directoryName it is the DER of the Name.

Definition at line 410 of file x509_ext.h.

410{ return m_location_value; }

Referenced by AccessDescription().


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