Method: PKCS11::Session#C_CreateObject
- Defined in:
- lib/pkcs11/session.rb
#C_CreateObject(template = {}) ⇒ PKCS11::Object Also known as: create_object
Creates a new Object based on given template.
If #C_CreateObject is used to create a key object, the key object will have its CKA_LOCAL attribute set to false. If that key object is a secret or private key then the new key will have the CKA_ALWAYS_SENSITIVE attribute set to false, and the CKA_NEVER_EXTRACTABLE attribute set to false.
Only session objects can be created during a read-only session. Only public objects can be created unless the normal user is logged in.
152 153 154 155 |
# File 'lib/pkcs11/session.rb', line 152 def C_CreateObject(template={}) handle = @pk.C_CreateObject(@sess, to_attributes(template)) Object.new @pk, @sess, handle end |