Botan 3.9.0
Crypto and TLS for C&
|
Helper class to build the Attribute / CK_ATTRIBUTE structures. More...
#include <p11_object.h>
Public Member Functions | |
template<typename TAlloc> | |
void | add_binary (AttributeType attribute, const std::vector< uint8_t, TAlloc > &binary) |
void | add_binary (AttributeType attribute, const uint8_t *value, size_t length) |
void | add_bool (AttributeType attribute, bool value) |
void | add_class (ObjectClass object_class) |
template<std::integral T> | |
void | add_numeric (AttributeType attribute, T value) |
void | add_string (AttributeType attribute, std::string_view value) |
AttributeContainer ()=default | |
AttributeContainer (AttributeContainer &&other)=default | |
AttributeContainer (const AttributeContainer &other)=delete | |
BOTAN_FUTURE_EXPLICIT | AttributeContainer (ObjectClass object_class) |
const std::vector< Attribute > & | attributes () const |
size_t | count () const |
Attribute * | data () const |
AttributeContainer & | operator= (AttributeContainer &&other)=default |
AttributeContainer & | operator= (const AttributeContainer &other)=delete |
virtual | ~AttributeContainer ()=default |
Protected Member Functions | |
void | add_attribute (AttributeType attribute, const uint8_t *value, Ulong size) |
Add an attribute with the given value and size to the attribute collection m_attributes |
Helper class to build the Attribute / CK_ATTRIBUTE structures.
Definition at line 28 of file p11_object.h.
|
default |
References AttributeContainer(), and BOTAN_FUTURE_EXPLICIT.
Referenced by AttributeContainer(), AttributeContainer(), AttributeContainer(), Botan::PKCS11::ObjectProperties::ObjectProperties(), operator=(), and operator=().
Botan::PKCS11::AttributeContainer::AttributeContainer | ( | ObjectClass | object_class | ) |
object_class | the class type of this container |
Definition at line 14 of file p11_object.cpp.
References add_class().
|
virtualdefault |
|
default |
References AttributeContainer().
|
delete |
References AttributeContainer().
|
protected |
Add an attribute with the given value and size to the attribute collection m_attributes
Definition at line 40 of file p11_object.cpp.
References data().
Referenced by add_binary(), add_bool(), add_class(), add_numeric(), and add_string().
|
inline |
Add a binary attribute (e.g. CKA_ID / AttributeType::Id).
attribute | attribute type |
binary | binary attribute value to add |
Definition at line 80 of file p11_object.h.
References add_binary().
void Botan::PKCS11::AttributeContainer::add_binary | ( | AttributeType | attribute, |
const uint8_t * | value, | ||
size_t | length ) |
Add a binary attribute (e.g. CKA_ID / AttributeType::Id).
attribute | attribute type |
value | binary attribute value to add |
length | size of the binary attribute value in bytes |
Definition at line 30 of file p11_object.cpp.
References add_attribute().
Referenced by add_binary(), Botan::PKCS11::Object::search(), Botan::PKCS11::Object::search(), Botan::PKCS11::CertificateProperties::set_check_value(), Botan::PKCS11::SecretKeyProperties::set_check_value(), Botan::PKCS11::CertificateProperties::set_end_date(), Botan::PKCS11::KeyProperties::set_end_date(), Botan::PKCS11::KeyProperties::set_id(), Botan::PKCS11::DataObjectProperties::set_object_id(), Botan::PKCS11::CertificateProperties::set_public_key_info(), Botan::PKCS11::PrivateKeyProperties::set_public_key_info(), Botan::PKCS11::PublicKeyProperties::set_public_key_info(), Botan::PKCS11::CertificateProperties::set_start_date(), Botan::PKCS11::KeyProperties::set_start_date(), Botan::PKCS11::PrivateKeyProperties::set_subject(), Botan::PKCS11::PublicKeyProperties::set_subject(), and Botan::PKCS11::DataObjectProperties::set_value().
void Botan::PKCS11::AttributeContainer::add_bool | ( | AttributeType | attribute, |
bool | value ) |
Add a bool attribute (e.g. CKA_SENSITIVE / AttributeType::Sensitive).
attribute | attribute type |
value | boolean value to add |
Definition at line 35 of file p11_object.cpp.
References add_attribute(), Botan::PKCS11::False, and Botan::PKCS11::True.
Referenced by Botan::PKCS11::PrivateKeyProperties::set_always_authenticate(), Botan::PKCS11::SecretKeyProperties::set_always_authenticate(), Botan::PKCS11::StorageObjectProperties::set_copyable(), Botan::PKCS11::PrivateKeyProperties::set_decrypt(), Botan::PKCS11::SecretKeyProperties::set_decrypt(), Botan::PKCS11::KeyProperties::set_derive(), Botan::PKCS11::StorageObjectProperties::set_destroyable(), Botan::PKCS11::PublicKeyProperties::set_encrypt(), Botan::PKCS11::SecretKeyProperties::set_encrypt(), Botan::PKCS11::PrivateKeyProperties::set_extractable(), Botan::PKCS11::SecretKeyProperties::set_extractable(), Botan::PKCS11::StorageObjectProperties::set_modifiable(), Botan::PKCS11::StorageObjectProperties::set_private(), Botan::PKCS11::PrivateKeyProperties::set_sensitive(), Botan::PKCS11::SecretKeyProperties::set_sensitive(), Botan::PKCS11::PrivateKeyProperties::set_sign(), Botan::PKCS11::SecretKeyProperties::set_sign(), Botan::PKCS11::PrivateKeyProperties::set_sign_recover(), Botan::PKCS11::StorageObjectProperties::set_token(), Botan::PKCS11::CertificateProperties::set_trusted(), Botan::PKCS11::PublicKeyProperties::set_trusted(), Botan::PKCS11::SecretKeyProperties::set_trusted(), Botan::PKCS11::PrivateKeyProperties::set_unwrap(), Botan::PKCS11::SecretKeyProperties::set_unwrap(), Botan::PKCS11::PublicKeyProperties::set_verify(), Botan::PKCS11::SecretKeyProperties::set_verify(), Botan::PKCS11::PublicKeyProperties::set_verify_recover(), Botan::PKCS11::PublicKeyProperties::set_wrap(), Botan::PKCS11::SecretKeyProperties::set_wrap(), Botan::PKCS11::PrivateKeyProperties::set_wrap_with_trusted(), and Botan::PKCS11::SecretKeyProperties::set_wrap_with_trusted().
void Botan::PKCS11::AttributeContainer::add_class | ( | ObjectClass | object_class | ) |
Add a class attribute (CKA_CLASS / AttributeType::Class).
object_class | class attribute to add |
Definition at line 18 of file p11_object.cpp.
References add_attribute(), and Botan::PKCS11::Class.
Referenced by AttributeContainer().
|
inline |
Add a numeric attribute (e.g. CKA_MODULUS_BITS / AttributeType::ModulusBits).
attribute | attribute type |
value | numeric value to add |
Definition at line 97 of file p11_object.h.
References add_attribute().
Referenced by Botan::PKCS11::CertificateProperties::CertificateProperties(), Botan::PKCS11::DomainParameterProperties::DomainParameterProperties(), Botan::PKCS11::KeyProperties::KeyProperties(), and Botan::PKCS11::CertificateProperties::set_category().
void Botan::PKCS11::AttributeContainer::add_string | ( | AttributeType | attribute, |
std::string_view | value ) |
Add a string attribute (e.g. CKA_LABEL / AttributeType::Label).
attribute | attribute type |
value | string value to add |
Definition at line 24 of file p11_object.cpp.
References add_attribute().
Referenced by Botan::PKCS11::Object::search(), Botan::PKCS11::Object::search(), Botan::PKCS11::DataObjectProperties::set_application(), and Botan::PKCS11::StorageObjectProperties::set_label().
|
inline |
Definition at line 45 of file p11_object.h.
Referenced by Botan::PKCS11::Object::search(), Botan::PKCS11::Object::search(), and Botan::PKCS11::Object::search().
|
inline |
Definition at line 51 of file p11_object.h.
Referenced by Botan::PKCS11::Object::copy(), and Botan::PKCS11::Object::Object().
|
inline |
Definition at line 48 of file p11_object.h.
Referenced by add_attribute(), Botan::PKCS11::Object::copy(), and Botan::PKCS11::Object::Object().
|
default |
References AttributeContainer().
|
delete |
References AttributeContainer().