|
Botan 3.14.1
Crypto and TLS for C&
|
#include <x509_ext.h>
Classes | |
| struct | TelephoneNumberRangeData |
Public Types | |
| using | DataContainer = std::variant<ASN1_String, RangeContainer> |
| using | RangeContainer = std::vector<TelephoneNumberRangeData> |
| enum | Type : uint8_t { ServiceProviderCode = 0 , TelephoneNumberRange = 1 , TelephoneNumber = 2 } |
Public Member Functions | |
| std::vector< uint8_t > | BER_encode () const |
| void | decode_from (BER_Decoder &from) override |
| void | encode_into (DER_Encoder &to) const override |
| Entry ()=default | |
| const Botan::TelephoneNumber & | number () const |
| const Botan::TelephoneNumberRange & | range () const |
| const std::string & | service_provider_code () const |
| const std::string & | telephone_number () const |
| const RangeContainer & | telephone_number_range () const |
| Type | type () const |
Static Public Member Functions | |
| static Entry | from_service_provider_code (std::string_view spc) |
| static Entry | from_telephone_number (const Botan::TelephoneNumber &tn) |
| static Entry | from_telephone_number_range (const Botan::TelephoneNumberRange &range) |
Definition at line 870 of file x509_ext.h.
| using Botan::Cert_Extension::TNAuthList::Entry::DataContainer = std::variant<ASN1_String, RangeContainer> |
Definition at line 890 of file x509_ext.h.
| using Botan::Cert_Extension::TNAuthList::Entry::RangeContainer = std::vector<TelephoneNumberRangeData> |
Definition at line 889 of file x509_ext.h.
| enum Botan::Cert_Extension::TNAuthList::Entry::Type : uint8_t |
The TNEntry CHOICE alternative; the values are the context specific tags
| Enumerator | |
|---|---|
| ServiceProviderCode | |
| TelephoneNumberRange | |
| TelephoneNumber | |
Definition at line 875 of file x509_ext.h.
|
default |
Default constructor; the entry is only meaningful once decoded
References decode_from(), and encode_into().
Referenced by from_service_provider_code(), from_telephone_number(), and from_telephone_number_range().
|
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 21 of file asn1_obj.cpp.
References encode_into().
Referenced by decode_from(), Botan::PKCS12::export_to(), 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::PSS_Params::PSS_Params().
|
overridevirtual |
Decode whatever this object is from from
| from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 1667 of file x509_ext.cpp.
References Botan::BigInt::bits(), Botan::BigInt::byte_at(), Botan::Constructed, Botan::ContextSpecific, Botan::BER_Decoder::decode(), Botan::fmt(), Botan::TelephoneNumberRange::from(), Botan::TelephoneNumber::from_string(), Botan::BER_Object::get_class(), Botan::BER_Decoder::get_next_object(), Botan::Ia5String, Botan::BigInt::is_negative(), Botan::BER_Decoder::limits(), range(), ServiceProviderCode, Botan::BER_Decoder::start_sequence(), Botan::ASN1_String::tagging(), TelephoneNumber, TelephoneNumberRange, Botan::BER_Object::type_tag(), Botan::ASN1_String::value(), and Botan::BER_Decoder::verify_end().
Referenced by Entry().
|
overridevirtual |
Encode whatever this object is into to
| to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 1644 of file x509_ext.cpp.
References Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::BigInt::from_u64(), Botan::Ia5String, number(), range(), service_provider_code(), ServiceProviderCode, Botan::DER_Encoder::start_explicit(), Botan::DER_Encoder::start_sequence(), TelephoneNumber, TelephoneNumberRange, and Botan::to_string().
Referenced by Entry().
|
static |
Create a service provider code entry, for instance an OCN or SPID
Throws Invalid_Argument if spc is empty or not IA5
Definition at line 1616 of file x509_ext.cpp.
References Entry(), Botan::Ia5String, ServiceProviderCode, and Botan::ASN1_String::value().
|
static |
Create a single telephone number entry
Definition at line 1637 of file x509_ext.cpp.
References Entry(), and TelephoneNumber.
|
static |
Create a telephone number range entry
Throws Invalid_Argument if range holds fewer than two numbers
Definition at line 1627 of file x509_ext.cpp.
| const Botan::TelephoneNumber & Botan::Cert_Extension::TNAuthList::Entry::number | ( | ) | const |
Return the telephone number; throws unless type() is TelephoneNumber
Definition at line 1775 of file x509_ext.cpp.
References BOTAN_STATE_CHECK, TelephoneNumber, and type().
Referenced by encode_into(), and telephone_number().
| const Botan::TelephoneNumberRange & Botan::Cert_Extension::TNAuthList::Entry::range | ( | ) | const |
Return the range; throws unless type() is TelephoneNumberRange
Definition at line 1770 of file x509_ext.cpp.
References BOTAN_STATE_CHECK, TelephoneNumberRange, and type().
Referenced by decode_from(), encode_into(), and from_telephone_number_range().
| const std::string & Botan::Cert_Extension::TNAuthList::Entry::service_provider_code | ( | ) | const |
Return the service provider code; throws unless type() is ServiceProviderCode
Definition at line 1765 of file x509_ext.cpp.
References BOTAN_STATE_CHECK, ServiceProviderCode, and type().
Referenced by encode_into().
| const std::string & Botan::Cert_Extension::TNAuthList::Entry::telephone_number | ( | ) | const |
Return the telephone number as a string; throws unless type() is TelephoneNumber
Definition at line 1798 of file x509_ext.cpp.
References number().
| const TNAuthList::Entry::RangeContainer & Botan::Cert_Extension::TNAuthList::Entry::telephone_number_range | ( | ) | const |
Return the range as a single element list; throws unless type() is TelephoneNumberRange
Definition at line 1790 of file x509_ext.cpp.
References BOTAN_STATE_CHECK, TelephoneNumberRange, and type().
|
inline |
Definition at line 919 of file x509_ext.h.
Referenced by number(), range(), service_provider_code(), and telephone_number_range().