Skip to content

Commit

Permalink
Fix error throwing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Alawaji214 authored Aug 15, 2024
1 parent 8842e3a commit 2243987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkcs11/src/backend/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn create_key_from_template(

let key_class = if let Some(ref key_class) = parsed.key_class {
let key_class = *key_class;
if key_class == ObjectKind::Other && key_class == ObjectKind::PublicKey {
if key_class == ObjectKind::Other || key_class == ObjectKind::PublicKey {
return Err(Error::ObjectClassNotSupported);
}
key_class
Expand Down

0 comments on commit 2243987

Please sign in to comment.