mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
Move ssh_match_group() from misc.c to match.c
ssh_match_group() has been moved from misc.c to match.c, because it fits better with other match_*() functions in match.c The name of the function has also been changed from "ssh_match_group" to "match_group" to be consistent with the naming of the other match.c functions. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
committed by
Sahana Prasad
parent
21627509f5
commit
d41a0aaa13
@@ -170,8 +170,8 @@ SSH_PACKET_CALLBACK(ssh_packet_newkeys)
|
||||
|
||||
/* Check if signature from server matches user preferences */
|
||||
if (session->opts.wanted_methods[SSH_HOSTKEYS]) {
|
||||
rc = ssh_match_group(session->opts.wanted_methods[SSH_HOSTKEYS],
|
||||
sig->type_c);
|
||||
rc = match_group(session->opts.wanted_methods[SSH_HOSTKEYS],
|
||||
sig->type_c);
|
||||
if (rc == 0) {
|
||||
ssh_set_error(session,
|
||||
SSH_FATAL,
|
||||
@@ -277,10 +277,14 @@ SSH_PACKET_CALLBACK(ssh_packet_ext_info)
|
||||
if (cmp == 0) {
|
||||
/* TODO check for NULL bytes */
|
||||
SSH_LOG(SSH_LOG_PACKET, "Extension: %s=<%s>", name, value);
|
||||
if (ssh_match_group(value, "rsa-sha2-512")) {
|
||||
|
||||
rc = match_group(value, "rsa-sha2-512");
|
||||
if (rc == 1) {
|
||||
session->extensions |= SSH_EXT_SIG_RSA_SHA512;
|
||||
}
|
||||
if (ssh_match_group(value, "rsa-sha2-256")) {
|
||||
|
||||
rc = match_group(value, "rsa-sha2-256");
|
||||
if (rc == 1) {
|
||||
session->extensions |= SSH_EXT_SIG_RSA_SHA256;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user