summaryrefslogtreecommitdiff
path: root/pam_ssh_agent_auth-0.10.4-rsasha2.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-02 04:02:17 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-02 04:02:17 +0000
commit24b6ed9bc1ef1538b8f3e254b30b1006f5e4d78f (patch)
treee2725d205951345a1c853965086be06d6a6cbf59 /pam_ssh_agent_auth-0.10.4-rsasha2.patch
parentc7ba49a1e66ed27d507eafa4da2b81838a2afa64 (diff)
automatic import of openssh
Diffstat (limited to 'pam_ssh_agent_auth-0.10.4-rsasha2.patch')
-rw-r--r--pam_ssh_agent_auth-0.10.4-rsasha2.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/pam_ssh_agent_auth-0.10.4-rsasha2.patch b/pam_ssh_agent_auth-0.10.4-rsasha2.patch
new file mode 100644
index 0000000..c8815bb
--- /dev/null
+++ b/pam_ssh_agent_auth-0.10.4-rsasha2.patch
@@ -0,0 +1,19 @@
+diff -up openssh-8.7p1/pam_ssh_agent_auth-pam_ssh_agent_auth-0.10.4/userauth_pubkey_from_id.c.rsasha2 openssh-8.7p1/pam_ssh_agent_auth-pam_ssh_agent_auth-0.10.4/userauth_pubkey_from_id.c
+--- openssh-8.7p1/pam_ssh_agent_auth-pam_ssh_agent_auth-0.10.4/userauth_pubkey_from_id.c.rsasha2 2022-07-15 15:08:12.865585410 +0200
++++ openssh-8.7p1/pam_ssh_agent_auth-pam_ssh_agent_auth-0.10.4/userauth_pubkey_from_id.c 2022-07-15 15:16:25.164282372 +0200
+@@ -87,8 +87,13 @@ userauth_pubkey_from_id(const char *ruse
+ (r = sshbuf_put_string(b, pkblob, blen)) != 0)
+ fatal("%s: buffer error: %s", __func__, ssh_err(r));
+
+- if (ssh_agent_sign(id->ac->fd, id->key, &sig, &slen, sshbuf_ptr(b), sshbuf_len(b), NULL, 0) != 0)
+- goto user_auth_clean_exit;
++ if (sshkey_type_plain(id->key->type) == KEY_RSA
++ && ssh_agent_sign(id->ac->fd, id->key, &sig, &slen, sshbuf_ptr(b), sshbuf_len(b), "rsa-sha2-256", 0) == 0) {
++ /* Do nothing */
++ } else {
++ if (ssh_agent_sign(id->ac->fd, id->key, &sig, &slen, sshbuf_ptr(b), sshbuf_len(b), NULL, 0) != 0)
++ goto user_auth_clean_exit;
++ }
+
+ /* test for correct signature */
+ if (sshkey_verify(id->key, sig, slen, sshbuf_ptr(b), sshbuf_len(b), NULL, 0, NULL) == 0)