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

#include <x509_ext.h>

Public Member Functions

const OIDaccess_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 380 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 382 of file x509_ext.h.

385 :
386 m_method(std::move(method)),
387 m_location_tag(location_tag),
388 m_location_class(location_class),
389 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 391 of file x509_ext.h.

391{ 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 1105 of file x509_ext.cpp.

1105 {
1106 if(m_location_class == ASN1_Class::ContextSpecific && m_location_tag == ASN1_Type(6)) {
1107 return std::string(m_location_value.begin(), m_location_value.end());
1108 }
1109 return std::nullopt;
1110}
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 398 of file x509_ext.h.

398{ 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 396 of file x509_ext.h.

396{ 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 405 of file x509_ext.h.

405{ return m_location_value; }

Referenced by AccessDescription().


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