Botan 3.8.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 400 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 405 of file x509_ext.h.

405: m_point(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 encode_into().

Referenced by 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(), Botan::PSS_Params::PSS_Params(), 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 762 of file x509_ext.cpp.

762 {
763 ber.start_sequence()
764 .start_context_specific(0)
765 .decode_optional_implicit(m_point,
766 ASN1_Type(0),
770 .end_cons()
771 .end_cons();
772}
ASN1_Type
Definition asn1_obj.h:44

References Botan::Constructed, Botan::ContextSpecific, decode_from(), 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().

Referenced by decode_from().

◆ 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 744 of file x509_ext.cpp.

744 {
745 const auto uris = m_point.uris();
746
747 if(uris.empty()) {
748 throw Not_Implemented("Empty CRL_Distribution_Point encoding not implemented");
749 }
750
751 for(const auto& uri : uris) {
752 der.start_sequence()
755 .add_object(ASN1_Type(6), ASN1_Class::ContextSpecific, uri)
756 .end_cons()
757 .end_cons()
758 .end_cons();
759 }
760}

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

Referenced by encode_into().

◆ point()

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

Definition at line 407 of file x509_ext.h.

407{ return m_point; }

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