|
Botan
2.13.0
Crypto and TLS for C++11
|
#include <p11_object.h>
Public Member Functions | |
| ObjectHandle | copy (const AttributeContainer &modified_attributes) const |
| void | destroy () const |
| Destroys the object. More... | |
| secure_vector< uint8_t > | get_attribute_value (AttributeType attribute) const |
| ObjectHandle | handle () const |
| Module & | module () const |
| Object (Session &session, ObjectHandle handle) | |
| Object (Session &session, const ObjectProperties &obj_props) | |
| Object (const Object &)=default | |
| Object & | operator= (const Object &)=delete |
| Session & | session () const |
| void | set_attribute_value (AttributeType attribute, const secure_vector< uint8_t > &value) const |
Sets the given value for the attribute (using C_SetAttributeValue) More... | |
| virtual | ~Object ()=default |
Static Public Member Functions | |
| template<typename T > | |
| static std::vector< T > | search (Session &session, const std::vector< Attribute > &search_template) |
Searches for all objects of the given type that match search_template More... | |
| template<typename T > | |
| static std::vector< T > | search (Session &session, const std::string &label) |
Searches for all objects of the given type using the label (CKA_LABEL) More... | |
| template<typename T > | |
| static std::vector< T > | search (Session &session, const std::vector< uint8_t > &id) |
Searches for all objects of the given type using the id (CKA_ID) More... | |
| template<typename T > | |
| static std::vector< T > | search (Session &session, const std::string &label, const std::vector< uint8_t > &id) |
Searches for all objects of the given type using the label (CKA_LABEL) and id (CKA_ID) More... | |
| template<typename T > | |
| static std::vector< T > | search (Session &session) |
| Searches for all objects of the given type. More... | |
Protected Member Functions | |
| Object (Session &session) | |
| void | reset_handle (ObjectHandle handle) |
Represents a PKCS#11 object.
Definition at line 633 of file p11_object.h.
| Botan::PKCS11::Object::Object | ( | Session & | session, |
| ObjectHandle | handle | ||
| ) |
Creates an Object from an existing PKCS#11 object
| session | the session the object belongs to |
| handle | handle of the object |
Definition at line 190 of file p11_object.cpp.
| Botan::PKCS11::Object::Object | ( | Session & | session, |
| const ObjectProperties & | obj_props | ||
| ) |
Creates the object
| session | the session in which the object should be created |
| obj_props | properties of this object |
Definition at line 194 of file p11_object.cpp.
References Botan::PKCS11::AttributeContainer::count(), and Botan::PKCS11::AttributeContainer::data().
|
default |
|
virtualdefault |
|
inlineprotected |
Definition at line 708 of file p11_object.h.
| ObjectHandle Botan::PKCS11::Object::copy | ( | const AttributeContainer & | modified_attributes | ) | const |
Copies the object
| modified_attributes | the attributes of the copied object |
Definition at line 218 of file p11_object.cpp.
References Botan::PKCS11::LowLevel::C_CopyObject(), Botan::PKCS11::AttributeContainer::count(), Botan::PKCS11::AttributeContainer::data(), and module().
| void Botan::PKCS11::Object::destroy | ( | ) | const |
Destroys the object.
Definition at line 213 of file p11_object.cpp.
References Botan::PKCS11::LowLevel::C_DestroyObject(), and module().
| secure_vector< uint8_t > Botan::PKCS11::Object::get_attribute_value | ( | AttributeType | attribute | ) | const |
C_GetAttributeValue) Definition at line 200 of file p11_object.cpp.
References Botan::PKCS11::LowLevel::C_GetAttributeValue(), and module().
|
inline |
Definition at line 691 of file p11_object.h.
Referenced by search().
|
inline |
Definition at line 703 of file p11_object.h.
Referenced by copy(), destroy(), get_attribute_value(), and set_attribute_value().
|
inlineprotected |
|
static |
Searches for all objects of the given type that match search_template
Definition at line 725 of file p11_object.h.
References Botan::PKCS11::ObjectFinder::find(), handle(), and T.
|
static |
Searches for all objects of the given type using the label (CKA_LABEL)
Definition at line 739 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_string(), Botan::PKCS11::AttributeContainer::attributes(), Botan::PKCS11::Class, Botan::PKCS11::Label, and session().
|
static |
Searches for all objects of the given type using the id (CKA_ID)
Definition at line 747 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), Botan::PKCS11::AttributeContainer::attributes(), Botan::PKCS11::Class, Botan::PKCS11::Id, and session().
|
static |
Searches for all objects of the given type using the label (CKA_LABEL) and id (CKA_ID)
Definition at line 755 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), Botan::PKCS11::AttributeContainer::add_string(), Botan::PKCS11::AttributeContainer::attributes(), Botan::PKCS11::Class, Botan::PKCS11::Id, Botan::PKCS11::Label, and session().
Searches for all objects of the given type.
Definition at line 764 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::attributes(), Botan::PKCS11::Class, and session().
|
inline |
Definition at line 697 of file p11_object.h.
Referenced by search().
| void Botan::PKCS11::Object::set_attribute_value | ( | AttributeType | attribute, |
| const secure_vector< uint8_t > & | value | ||
| ) | const |
Sets the given value for the attribute (using C_SetAttributeValue)
Definition at line 207 of file p11_object.cpp.
References Botan::PKCS11::LowLevel::C_SetAttributeValue(), and module().
1.8.9.1