Fix pkcs11-tool encryption error Fix #1694
Make sure data being encrypted is less then the modulus. On branch pkcs11-tool-encryption Changes to be committed: modified: ../tools/pkcs11-tool.c
This commit is contained in:
parent
278960bf88
commit
a2dd500624
|
@ -5545,6 +5545,7 @@ static int encrypt_decrypt(CK_SESSION_HANDLE session,
|
|||
printf(" %s: ", p11_mechanism_to_name(mech_type));
|
||||
|
||||
pseudo_randomize(orig_data, sizeof(orig_data));
|
||||
orig_data[0] = 0; /* Make sure it is less then modulus */
|
||||
|
||||
pkey = get_public_key(session, privKeyObject);
|
||||
if (pkey == NULL)
|
||||
|
|
Loading…
Reference in New Issue