Botan 3.6.1
Crypto and TLS for C&
Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point Class Referencefinal

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point:
Botan::ASN1_Object

Public Member Functions

std::vector< uint8_t > BER_encode () const
 
void decode_from (BER_Decoder &) override
 
 Distribution_Point (const AlternativeName &name=AlternativeName())
 
void encode_into (DER_Encoder &) const override
 
const AlternativeNamepoint () const
 

Detailed Description

Definition at line 399 of file x509_ext.h.

Constructor & Destructor Documentation

◆ Distribution_Point()

Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::Distribution_Point ( const AlternativeName & name = AlternativeName())
inlineexplicit

Definition at line 404 of file x509_ext.h.

404: m_point(name) {}
std::string name

Member Function Documentation

◆ BER_encode()

std::vector< uint8_t > Botan::ASN1_Object::BER_encode ( ) const
inherited

Return the encoding of this object. This is a convenience method when just one object needs to be serialized. Use DER_Encoder for complicated encodings.

Definition at line 19 of file asn1_obj.cpp.

19 {
20 std::vector<uint8_t> output;
21 DER_Encoder der(output);
22 this->encode_into(der);
23 return output;
24}
virtual void encode_into(DER_Encoder &to) const =0

References Botan::ASN1_Object::encode_into().

Referenced by Botan::PSS_Params::decode_from(), Botan::Certificate_Store_In_SQL::find_all_certs(), Botan::Certificate_Store_In_SQL::find_cert(), Botan::X509_Certificate::fingerprint(), Botan::Certificate_Store_In_SQL::insert_cert(), Botan::X509_Object::PEM_encode(), and Botan::Certificate_Store_In_SQL::revoke_cert().

◆ decode_from()

void Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::decode_from ( BER_Decoder & from)
overridevirtual

Decode whatever this object is from from

Parameters
fromthe BER_Decoder that will be read from

Implements Botan::ASN1_Object.

Definition at line 767 of file x509_ext.cpp.

767 {
768 ber.start_sequence()
769 .start_context_specific(0)
770 .decode_optional_implicit(m_point,
771 ASN1_Type(0),
775 .end_cons()
776 .end_cons();
777}
ASN1_Type
Definition asn1_obj.h:44

References Botan::Constructed, Botan::ContextSpecific, Botan::BER_Decoder::decode_optional_implicit(), Botan::BER_Decoder::end_cons(), Botan::Sequence, Botan::BER_Decoder::start_context_specific(), and Botan::BER_Decoder::start_sequence().

◆ encode_into()

void Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::encode_into ( DER_Encoder & to) const
overridevirtual

Encode whatever this object is into to

Parameters
tothe DER_Encoder that will be written to

Implements Botan::ASN1_Object.

Definition at line 749 of file x509_ext.cpp.

749 {
750 const auto uris = m_point.uris();
751
752 if(uris.empty()) {
753 throw Not_Implemented("Empty CRL_Distribution_Point encoding not implemented");
754 }
755
756 for(const auto& uri : uris) {
757 der.start_sequence()
760 .add_object(ASN1_Type(6), ASN1_Class::ContextSpecific, uri)
761 .end_cons()
762 .end_cons()
763 .end_cons();
764 }
765}
const std::set< std::string > & uris() const
Return the set of URIs included in this alternative name.
Definition pkix_types.h:146

References Botan::DER_Encoder::add_object(), Botan::ContextSpecific, Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::start_cons(), Botan::DER_Encoder::start_sequence(), and Botan::AlternativeName::uris().

◆ point()

const AlternativeName & Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point::point ( ) const
inline

Definition at line 406 of file x509_ext.h.

406{ return m_point; }

Referenced by Botan::Cert_Extension::CRL_Issuing_Distribution_Point::get_point().


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