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
81 * RSA signatures usually use EMSA-PKCS1-1_5 [RFC3447 sec 8.2].81 * RSA signatures usually use EMSA-PKCS1-1_5 [RFC3447 sec 8.2].
82 */82 */
83 if (strcmp(encoding, "pkcs1") == 0) {83 if (strcmp(encoding, "pkcs1") == 0) {
84 *sig = op == kernel_pkey_sign ||
85 op == kernel_pkey_verify;
84 if (!hash_algo) {86 if (!hash_algo) {
85 *sig = false;
86 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,87 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
87 "pkcs1pad(%s)",88 "pkcs1pad(%s)",
88 pkey->pkey_algo);89 pkey->pkey_algo);
89 } else {90 } else {
90 *sig = op == kernel_pkey_sign ||
91 op == kernel_pkey_verify;
92 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,91 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
93 "pkcs1pad(%s,%s)",92 "pkcs1pad(%s,%s)",
94 pkey->pkey_algo, hash_algo);93 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