Add support for RFC9987 messages without openssh suffix

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
Merge-Request: <https://gitlab.com/libssh/libssh-mirror/-/merge_requests/836>
This commit is contained in:
Jakub Jelen
2026-06-01 13:04:13 +02:00
parent 615142a87a
commit ae4191aa3e
2 changed files with 5 additions and 2 deletions

View File

@@ -954,7 +954,8 @@ SSH_PACKET_CALLBACK(channel_rcv_request)
return SSH_PACKET_USED;
}
if (strcmp(request, "auth-agent-req@openssh.com") == 0) {
if (strcmp(request, "auth-agent-req") == 0 ||
strcmp(request, "auth-agent-req@openssh.com") == 0) {
int status;
SAFE_FREE(request);
@@ -1119,6 +1120,7 @@ int ssh_channel_open_auth_agent(ssh_channel channel)
return SSH_ERROR;
}
/* FIXME use "auth-agent" from RFC9987 when it gets addoption */
return channel_open(channel,
"auth-agent@openssh.com",
WINDOW_DEFAULT,

View File

@@ -1496,7 +1496,8 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open)
goto end;
}
if (strcmp(type_c, "auth-agent@openssh.com") == 0) {
if (strcmp(type_c, "auth-agent") == 0 ||
strcmp(type_c, "auth-agent@openssh.com") == 0) {
msg->channel_request_open.type = SSH_CHANNEL_AUTH_AGENT;
goto end;
}