Botan 3.4.0
Crypto and TLS for C&
Public Member Functions | List of all members
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 778 of file x509_ext.cpp.

778 {
779 ber.start_sequence()
780 .start_context_specific(0)
781 .decode_optional_implicit(m_point,
782 ASN1_Type(0),
786 .end_cons()
787 .end_cons();
788}
ASN1_Type
Definition asn1_obj.h:43

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

760 {
761 if(!m_point.get_attributes().contains("URI")) {
762 throw Not_Implemented("Empty CRL_Distribution_Point encoding");
763 }
764
765 const auto range = m_point.get_attributes().equal_range("URI");
766
767 for(auto i = range.first; i != range.second; ++i) {
768 der.start_sequence()
771 .add_object(ASN1_Type(6), ASN1_Class::ContextSpecific, i->second)
772 .end_cons()
773 .end_cons()
774 .end_cons();
775 }
776}
const std::multimap< std::string, std::string, std::less<> > & get_attributes() const
Definition pkix_types.h:131

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

◆ 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: