Botan 3.9.0
Crypto and TLS for C&
|
#include <pkix_enums.h>
Public Types | |
enum | Bits : uint16_t { None = 0 , DigitalSignature = 1 << 15 , NonRepudiation = 1 << 14 , KeyEncipherment = 1 << 13 , DataEncipherment = 1 << 12 , KeyAgreement = 1 << 11 , KeyCertSign = 1 << 10 , CrlSign = 1 << 9 , EncipherOnly = 1 << 8 , DecipherOnly = 1 << 7 , NO_CONSTRAINTS = None , DIGITAL_SIGNATURE = DigitalSignature , NON_REPUDIATION = NonRepudiation , KEY_ENCIPHERMENT = KeyEncipherment , DATA_ENCIPHERMENT = DataEncipherment , KEY_AGREEMENT = KeyAgreement , KEY_CERT_SIGN = KeyCertSign , CRL_SIGN = CrlSign , ENCIPHER_ONLY = EncipherOnly , DECIPHER_ONLY = DecipherOnly } |
Public Member Functions | |
bool | compatible_with (const Public_Key &key) const |
bool | empty () const |
bool | includes (Key_Constraints other) const |
bool | includes (Key_Constraints::Bits other) const |
bool | includes_any (auto &&... bits) const |
Key_Constraints () | |
Key_Constraints (const Key_Constraints &other)=default | |
Key_Constraints (Key_Constraints &&other)=default | |
Key_Constraints (Key_Constraints::Bits bits) | |
Key_Constraints (uint32_t bits) | |
Key_Constraints & | operator= (const Key_Constraints &other)=default |
Key_Constraints & | operator= (Key_Constraints &&other)=default |
bool | operator== (const Key_Constraints &) const =default |
void | operator|= (Key_Constraints::Bits other) |
std::string | to_string () const |
uint32_t | value () const |
~Key_Constraints ()=default |
Static Public Member Functions | |
static Key_Constraints | ca_constraints () |
X.509v3 Key Constraints. If updating update copy in ffi.h
Definition at line 112 of file pkix_enums.h.
enum Botan::Key_Constraints::Bits : uint16_t |
Definition at line 114 of file pkix_enums.h.
|
default |
References Key_Constraints().
Referenced by ca_constraints(), includes(), Key_Constraints(), Key_Constraints(), operator=(), operator=(), and operator==().
|
default |
References Key_Constraints().
|
default |
|
inline |
Definition at line 147 of file pkix_enums.h.
|
inlineexplicit |
Definition at line 149 of file pkix_enums.h.
|
inline |
Definition at line 151 of file pkix_enums.h.
|
inlinestatic |
Return typical constraints for a CA certificate.
The reasons for KeyCertSign and CrlSign should be obvious
CAB baseline requirements are that DigitalSignature should be set if the certificate is used to sign OCSP responses.
Definition at line 161 of file pkix_enums.h.
References CrlSign, DigitalSignature, Key_Constraints(), and KeyCertSign.
Referenced by Botan::X509_CA::choose_extensions(), Botan::X509::create_cert_req(), and Botan::X509::create_self_signed_cert().
bool Botan::Key_Constraints::compatible_with | ( | const Public_Key & | key | ) | const |
Check that key constraints are permitted for a specific public key.
key | the public key on which the constraints shall be enforced on |
Definition at line 72 of file key_constraint.cpp.
References CrlSign, DataEncipherment, DecipherOnly, DigitalSignature, EncipherOnly, Botan::Encryption, KeyAgreement, Botan::KeyAgreement, KeyCertSign, Botan::KeyEncapsulation, KeyEncipherment, NonRepudiation, Botan::Signature, and Botan::Asymmetric_Key::supports_operation().
|
inline |
Definition at line 178 of file pkix_enums.h.
Referenced by Botan::X509_Certificate::to_string().
|
inline |
Definition at line 173 of file pkix_enums.h.
References Key_Constraints().
|
inline |
Definition at line 171 of file pkix_enums.h.
Referenced by Botan::X509_Certificate::allowed_usage(), and Botan::X509_Certificate::has_constraints().
|
inline |
Definition at line 176 of file pkix_enums.h.
|
default |
References Key_Constraints().
|
default |
References Key_Constraints().
|
default |
References Key_Constraints().
|
inline |
Definition at line 168 of file pkix_enums.h.
std::string Botan::Key_Constraints::to_string | ( | ) | const |
Definition at line 16 of file key_constraint.cpp.
References CrlSign, DataEncipherment, DecipherOnly, DigitalSignature, EncipherOnly, KeyAgreement, KeyCertSign, KeyEncipherment, None, NonRepudiation, Botan::string_join(), and value().
|
inline |