Skip to content

Commit

Permalink
small changes following review
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Devolder <[email protected]>
  • Loading branch information
keldonin committed Aug 30, 2024
1 parent a9b0fe1 commit 0f70d42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cryptoki/src/session/object_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ impl Session {
}

/// Copy an object
///
/// A template can be provided to change some attributes of the new object, when allowed.
///
/// # Arguments
///
/// * `object` - The [ObjectHandle] used to reference the object to copy
/// * `template` - a reference to a slice of attributes
/// * `template` - new values for any attributes of the object that can ordinarily be modified
/// check out [PKCS#11 documentation](https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/cs01/pkcs11-spec-v3.1-cs01.html#_Toc111203284) for details
///
/// # Returns
///
Expand All @@ -124,7 +126,7 @@ impl Session {
template.len().try_into()?,
&mut object_handle as CK_OBJECT_HANDLE_PTR,
))
.into_result(Function::CreateObject)?;
.into_result(Function::CopyObject)?;
}

Ok(ObjectHandle::new(object_handle))
Expand Down

0 comments on commit 0f70d42

Please sign in to comment.