History

Merge tag 'v6.6-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu: "Fix a 6.5 regression in crypto/asymmetric_keys" * tag 'v6.6-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: KEYS: asymmetric: Fix sign/verify on pkcs1pad without a hash

Linus Torvalds committed 3 years ago

Commit f1de9ac2 parents 5722119 b1195031 file · +2 −3Browse files

Unified · Split

crypto/asymmetric_keys/public_key.c+2−3
@@ -81,14 +81,13 @@ software_key_determine_akcipher(const struct public_key *pkey, · 80 unmodified lines
8181 * RSA signatures usually use EMSA-PKCS1-1_5 [RFC3447 sec 8.2].
8282 */
8383 if (strcmp(encoding, "pkcs1") == 0) {
84+ *sig = op == kernel_pkey_sign ||
85+ op == kernel_pkey_verify;
8486 if (!hash_algo) {
85− *sig = false;
8687 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
8788 "pkcs1pad(%s)",
8889 pkey->pkey_algo);
8990 } else {
90− *sig = op == kernel_pkey_sign ||
91− op == kernel_pkey_verify;
9291 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
9392 "pkcs1pad(%s,%s)",
9493 pkey->pkey_algo, hash_algo);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t