Botan 3.9.0
Crypto and TLS for C&
|
#include <x509_ext.h>
Classes | |
class | IPAddress |
class | IPAddressChoice |
class | IPAddressFamily |
class | IPAddressOrRange |
Public Types | |
enum class | Version : uint8_t { IPv4 = 4 , IPv6 = 16 } |
Public Member Functions | |
template<Version V> | |
void | add_address (const std::array< uint8_t, static_cast< size_t >(V)> &address, std::optional< uint8_t > safi=std::nullopt) |
Add a single IP address to this extension (for the specified SAFI, if any) | |
template<Version V> | |
void | add_address (const std::array< uint8_t, static_cast< std::size_t >(V)> &min, const std::array< uint8_t, static_cast< std::size_t >(V)> &max, std::optional< uint8_t > safi=std::nullopt) |
Add an IP address range to this extension (for the specified SAFI, if any) | |
const std::vector< IPAddressFamily > & | addr_blocks () const |
std::unique_ptr< Certificate_Extension > | copy () const override |
template<Version V> | |
void | inherit (std::optional< uint8_t > safi=std::nullopt) |
Mark the specified IP version as 'inherit' (for the specified SAFI, if any) | |
IPAddressBlocks ()=default | |
IPAddressBlocks (const std::vector< IPAddressFamily > &blocks) | |
OID | oid_of () const override |
template<Version V> | |
void | restrict (std::optional< uint8_t > safi=std::nullopt) |
Make the extension contain no allowed IP addresses for the specified IP version (and SAFI, if any) | |
void | validate (const X509_Certificate &subject, const X509_Certificate &issuer, const std::vector< X509_Certificate > &cert_path, std::vector< std::set< Certificate_Status_Code > > &cert_status, size_t pos) override |
Static Public Member Functions | |
static OID | static_oid () |
IP Address Blocks Extension
RFC 3779 X.509 Extensions for IP Addr
Definition at line 586 of file x509_ext.h.
|
strong |
Enumerator | |
---|---|
IPv4 | |
IPv6 |
Definition at line 588 of file x509_ext.h.
|
default |
Referenced by validate().
|
inlineexplicit |
Definition at line 718 of file x509_ext.h.
|
inline |
Add a single IP address to this extension (for the specified SAFI, if any)
Definition at line 736 of file x509_ext.h.
References add_address().
Referenced by add_address().
|
inline |
Add an IP address range to this extension (for the specified SAFI, if any)
Definition at line 743 of file x509_ext.h.
|
inline |
Definition at line 766 of file x509_ext.h.
Referenced by validate().
|
inlineoverridevirtual |
Make a copy of this extension
Implements Botan::Certificate_Extension.
Definition at line 722 of file x509_ext.h.
|
inline |
Mark the specified IP version as 'inherit' (for the specified SAFI, if any)
Definition at line 761 of file x509_ext.h.
|
inlineoverridevirtual |
Implements Botan::Certificate_Extension.
Definition at line 726 of file x509_ext.h.
References static_oid().
|
inline |
Make the extension contain no allowed IP addresses for the specified IP version (and SAFI, if any)
Definition at line 753 of file x509_ext.h.
|
inlinestatic |
Definition at line 724 of file x509_ext.h.
Referenced by oid_of().
|
overridevirtual |
Reimplemented from Botan::Certificate_Extension.
Definition at line 1390 of file x509_ext.cpp.
References addr_blocks(), BOTAN_ASSERT_NOMSG, Botan::IPADDR_BLOCKS_ERROR, and IPAddressBlocks().