|
Botan 3.11.0
Crypto and TLS for C&
|
Common attributes of all private keys. 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) |
| const std::vector< Attribute > & | attributes () const |
| size_t | count () const |
| Attribute * | data () const |
| KeyType | key_type () const |
| ObjectClass | object_class () const |
| BOTAN_FUTURE_EXPLICIT | PrivateKeyProperties (KeyType key_type) |
| void | set_allowed_mechanisms (const std::vector< MechanismType > &) |
| void | set_always_authenticate (bool value) |
| void | set_copyable (bool value) |
| void | set_decrypt (bool value) |
| void | set_derive (bool value) |
| void | set_destroyable (bool value) |
| void | set_end_date (Date date) |
| void | set_extractable (bool value) |
| void | set_id (const std::vector< uint8_t > &id) |
| void | set_label (std::string_view label) |
| void | set_modifiable (bool value) |
| void | set_private (bool value) |
| void | set_public_key_info (const std::vector< uint8_t > &pubkey_info) |
| void | set_sensitive (bool value) |
| void | set_sign (bool value) |
| void | set_sign_recover (bool value) |
| void | set_start_date (Date date) |
| void | set_subject (const std::vector< uint8_t > &subject) |
| void | set_token (bool value) |
| void | set_unwrap (bool value) |
| void | set_unwrap_template (const AttributeContainer &) |
| void | set_wrap_with_trusted (bool value) |
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. | |
Common attributes of all private keys.
Definition at line 339 of file p11_object.h.
| Botan::PKCS11::PrivateKeyProperties::PrivateKeyProperties | ( | KeyType | key_type | ) |
| key_type | type of key |
Definition at line 135 of file p11_object.cpp.
References Botan::PKCS11::KeyProperties::key_type(), and Botan::PKCS11::KeyProperties::KeyProperties().
|
protectedinherited |
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().
|
inlineinherited |
Add a binary attribute (e.g. CKA_ID / AttributeType::Id).
| attribute | attribute type |
| binary | binary attribute value to add |
Definition at line 79 of file p11_object.h.
References add_binary().
|
inherited |
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().
|
inherited |
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().
|
inherited |
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().
|
inlineinherited |
Add a numeric attribute (e.g. CKA_MODULUS_BITS / AttributeType::ModulusBits).
| attribute | attribute type |
| value | numeric value to add |
Definition at line 96 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().
|
inherited |
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().
|
inlineinherited |
Definition at line 44 of file p11_object.h.
Referenced by Botan::PKCS11::Object::search(), Botan::PKCS11::Object::search(), and Botan::PKCS11::Object::search().
|
inlineinherited |
Definition at line 50 of file p11_object.h.
Referenced by Botan::PKCS11::Object::copy(), and Botan::PKCS11::Object::Object().
|
inlineinherited |
Definition at line 47 of file p11_object.h.
Referenced by add_attribute(), Botan::PKCS11::Object::copy(), and Botan::PKCS11::Object::Object().
|
inlineinherited |
Definition at line 287 of file p11_object.h.
Referenced by KeyProperties(), Botan::PKCS11::PrivateKeyProperties::PrivateKeyProperties(), Botan::PKCS11::PublicKeyProperties::PublicKeyProperties(), and Botan::PKCS11::SecretKeyProperties::SecretKeyProperties().
|
inlineinherited |
Definition at line 156 of file p11_object.h.
Referenced by Botan::PKCS11::KeyProperties::KeyProperties(), ObjectProperties(), and Botan::PKCS11::StorageObjectProperties::StorageObjectProperties().
|
inlineinherited |
Sets a list of mechanisms allowed to be used with this key Not implemented TODO(Botan4) remove this
Definition at line 281 of file p11_object.h.
|
inline |
| value | If true, the user has to supply the PIN for each use (sign or decrypt) with the key |
Definition at line 369 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::AlwaysAuthenticate.
|
inlineinherited |
| value | if true the object can be copied using C_CopyObject |
Definition at line 184 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Copyable.
|
inline |
| value | true if the key supports decryption |
Definition at line 351 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Decrypt.
|
inlineinherited |
| value | true if key supports key derivation (i.e., if other keys can be derived from this one) |
Definition at line 274 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Derive.
|
inlineinherited |
| value | if true the object can be destroyed using C_DestroyObject |
Definition at line 187 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Destroyable.
|
inlineinherited |
| date | end date for the key |
Definition at line 269 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), and Botan::PKCS11::EndDate.
|
inline |
| value | true if the key is extractable and can be wrapped |
Definition at line 363 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Extractable.
|
inlineinherited |
| id | key identifier for key |
Definition at line 261 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), and Botan::PKCS11::Id.
|
inlineinherited |
| label | description of the object (RFC2279 string) |
Definition at line 169 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_string(), and Botan::PKCS11::Label.
|
inlineinherited |
| value | if true the object can be modified, otherwise it is read-only |
Definition at line 181 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Modifiable.
|
inlineinherited |
| value | if true the object is a private object; otherwise the object is a public object When private, a user may not access the object until the user has been authenticated to the token |
Definition at line 178 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Private.
|
inline |
| pubkey_info | DER-encoding of the SubjectPublicKeyInfo for this public key |
Definition at line 384 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), and Botan::PKCS11::PublicKeyInfo.
|
inline |
| value | true if the key is sensitive |
Definition at line 348 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Sensitive.
|
inline |
| value | true if the key supports signatures where the signature is an appendix to the data |
Definition at line 354 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Sign.
|
inline |
| value | true if the key supports signatures where the data can be recovered from the signature |
Definition at line 357 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::SignRecover.
|
inlineinherited |
| date | start date for the key |
Definition at line 264 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), and Botan::PKCS11::StartDate.
|
inline |
| subject | DER-encoding of the key subject name |
Definition at line 345 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_binary(), and Botan::PKCS11::Subject.
|
inlineinherited |
| value | if true the object is a token object; otherwise the object is a session object |
Definition at line 172 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Token.
|
inline |
| value | true if the key supports unwrapping (i.e., can be used to unwrap other keys) |
Definition at line 360 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::Unwrap.
|
inline |
For wrapping keys The attribute template to apply to any keys unwrapped using this wrapping key. Any user supplied template is applied after this template as if the object has already been created Not implemented TODO(Botan4) remove this function
Definition at line 378 of file p11_object.h.
|
inline |
| value | true if the key can only be wrapped with a wrapping key that has CKA_TRUSTED set to CK_TRUE |
Definition at line 366 of file p11_object.h.
References Botan::PKCS11::AttributeContainer::add_bool(), and Botan::PKCS11::WrapWithTrusted.