Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pkcs11-tool): add support for RSA OAEP encryption #3175

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(pkcs11-tool): allow encryption with public keys
  • Loading branch information
AlexandreGonzalo committed Jun 11, 2024
commit 413c1a216e080fa6ec124135b27f00ad0936eb9c
8 changes: 5 additions & 3 deletions src/tools/pkcs11-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,9 +1385,11 @@ int main(int argc, char * argv[])
find_object_flags(session, mf_flags, &object,
opt_object_id_len ? opt_object_id : NULL,
opt_object_id_len, 0);
} else if (!find_object(session, CKO_SECRET_KEY, &object,
opt_object_id_len ? opt_object_id : NULL, opt_object_id_len, 0))
util_fatal("Secret key not found");
} else if (!find_object(session, CKO_PUBLIC_KEY, &object,
opt_object_id_len ? opt_object_id : NULL, opt_object_id_len, 0))
if (!find_object(session, CKO_SECRET_KEY, &object,
opt_object_id_len ? opt_object_id : NULL, opt_object_id_len, 0))
util_fatal("Public/Secret key not found");
}

if (do_verify) {
Expand Down