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 and ansiwen committed Aug 16, 2024
1 parent cb311f6 commit a44281a
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 a44281a

Please sign in to comment.