|
Botan 3.14.1
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 | |
| void | add_address (const IPv4Address &address, std::optional< uint8_t > safi=std::nullopt) |
| Add a single IPv4 address to this extension (for the specified SAFI, if any). | |
| void | add_address (const IPv4Address &min, const IPv4Address &max, std::optional< uint8_t > safi=std::nullopt) |
| Add an IPv4 address range to this extension (for the specified SAFI, if any). | |
| void | add_address (const IPv4Subnet &subnet, std::optional< uint8_t > safi=std::nullopt) |
| Add an IPv4 subnet to this extension (for the specified SAFI, if any). | |
| void | add_address (const IPv6Address &address, std::optional< uint8_t > safi=std::nullopt) |
| Add a single IPv6 address to this extension (for the specified SAFI, if any). | |
| void | add_address (const IPv6Address &min, const IPv6Address &max, std::optional< uint8_t > safi=std::nullopt) |
| Add an IPv6 address range to this extension (for the specified SAFI, if any). | |
| void | add_address (const IPv6Subnet &subnet, std::optional< uint8_t > safi=std::nullopt) |
| Add an IPv6 subnet to this extension (for the specified SAFI, if any). | |
| 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). | |
| size_t | v4_count () const |
| The number of IPv4 families contained in the extension. | |
| size_t | v6_count () const |
| The number of IPv6 families contained in the extension. | |
| void | validate (const X509_Certificate &subject, const std::optional< X509_Certificate > &issuer, const std::vector< X509_Certificate > &cert_path, std::vector< std::set< Certificate_Status_Code > > &cert_status, size_t pos) const override |
Static Public Member Functions | |
| static OID | static_oid () |
IP Address Blocks Extension
RFC 3779 X.509 Extensions for IP Addr
Definition at line 1021 of file x509_ext.h.
|
strong |
| Enumerator | |
|---|---|
| IPv4 | |
| IPv6 | |
Definition at line 1023 of file x509_ext.h.
|
default |
Referenced by validate().
|
inlineexplicit |
Definition at line 1208 of file x509_ext.h.
|
inline |
Add a single IPv4 address to this extension (for the specified SAFI, if any).
Definition at line 1225 of file x509_ext.h.
References add_address().
Referenced by add_address(), add_address(), add_address(), and add_address().
|
inline |
Add an IPv4 address range to this extension (for the specified SAFI, if any).
Definition at line 1235 of file x509_ext.h.
|
inline |
Add an IPv4 subnet to this extension (for the specified SAFI, if any).
Definition at line 1245 of file x509_ext.h.
|
inline |
Add a single IPv6 address to this extension (for the specified SAFI, if any).
Definition at line 1230 of file x509_ext.h.
References add_address().
|
inline |
Add an IPv6 address range to this extension (for the specified SAFI, if any).
Definition at line 1240 of file x509_ext.h.
|
inline |
Add an IPv6 subnet to this extension (for the specified SAFI, if any).
Definition at line 1250 of file x509_ext.h.
|
inline |
Add a single IP address to this extension (for the specified SAFI, if any).
Definition at line 1257 of file x509_ext.h.
References add_address().
|
inline |
Add an IP address range to this extension (for the specified SAFI, if any).
Definition at line 1265 of file x509_ext.h.
References add_address().
|
inline |
Definition at line 1286 of file x509_ext.h.
Referenced by validate().
|
inlineoverridevirtual |
Make a copy of this extension
Implements Botan::Certificate_Extension.
Definition at line 1212 of file x509_ext.h.
|
inline |
Mark the specified IP version as 'inherit' (for the specified SAFI, if any).
Definition at line 1281 of file x509_ext.h.
|
inlineoverridevirtual |
Return object identifier for this extension
Implements Botan::Certificate_Extension.
Definition at line 1216 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 1273 of file x509_ext.h.
|
inlinestatic |
Definition at line 1214 of file x509_ext.h.
Referenced by oid_of().
|
inline |
The number of IPv4 families contained in the extension.
Definition at line 1289 of file x509_ext.h.
Referenced by botan_x509_ext_ip_addr_blocks_get_address(), botan_x509_ext_ip_addr_blocks_get_counts(), and botan_x509_ext_ip_addr_blocks_get_family().
|
inline |
The number of IPv6 families contained in the extension.
Definition at line 1292 of file x509_ext.h.
|
overridevirtual |
Callback visited during path validation.
An extension can implement this callback to inspect the path during path validation.
If an error occurs during validation of this extension, an appropriate status code shall be added to cert_status.
| subject | Subject certificate that contains this extension |
| issuer | Issuer certificate. nullopt for certificates with no available issuer (e.g. non self-signed trust anchors). |
| cert_path | Certificate path which is currently validated |
| cert_status | Certificate validation status codes for subject certificate |
| pos | Position of subject certificate in cert_path |
Reimplemented from Botan::Certificate_Extension.
Definition at line 2581 of file x509_ext.cpp.
References addr_blocks(), BOTAN_ASSERT_NOMSG, Botan::IPADDR_BLOCKS_ERROR, and IPAddressBlocks().