|
Botan 3.13.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). | |
| 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 926 of file x509_ext.h.
|
strong |
| Enumerator | |
|---|---|
| IPv4 | |
| IPv6 | |
Definition at line 928 of file x509_ext.h.
|
default |
Referenced by validate().
|
inlineexplicit |
Definition at line 1058 of file x509_ext.h.
|
inline |
Add a single IP address to this extension (for the specified SAFI, if any).
Definition at line 1076 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 1083 of file x509_ext.h.
|
inline |
Definition at line 1106 of file x509_ext.h.
Referenced by validate().
|
inlineoverridevirtual |
Make a copy of this extension
Implements Botan::Certificate_Extension.
Definition at line 1062 of file x509_ext.h.
|
inline |
Mark the specified IP version as 'inherit' (for the specified SAFI, if any).
Definition at line 1101 of file x509_ext.h.
|
inlineoverridevirtual |
Return object identifier for this extension
Implements Botan::Certificate_Extension.
Definition at line 1066 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 1093 of file x509_ext.h.
|
inlinestatic |
Definition at line 1064 of file x509_ext.h.
Referenced by oid_of().
|
inline |
The number of IPv4 families contained in the extension.
Definition at line 1109 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 1112 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 2199 of file x509_ext.cpp.
References addr_blocks(), BOTAN_ASSERT_NOMSG, Botan::IPADDR_BLOCKS_ERROR, and IPAddressBlocks().