mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
pki: Fix comparing public key of certificate
When the first key object is a certificate object, this match will
fall through to the generic key comparison that is unable to handle
the ed25519 keys and fails.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 38f3d158f6)
This commit is contained in:
@@ -701,8 +701,8 @@ int ssh_key_cmp(const ssh_key k1,
|
|||||||
ssh_buffer_get_len(k1->cert));
|
ssh_buffer_get_len(k1->cert));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k1->type == SSH_KEYTYPE_ED25519 ||
|
if (ssh_key_type_plain(k1->type) == SSH_KEYTYPE_ED25519 ||
|
||||||
k1->type == SSH_KEYTYPE_SK_ED25519) {
|
ssh_key_type_plain(k1->type) == SSH_KEYTYPE_SK_ED25519) {
|
||||||
return pki_ed25519_key_cmp(k1, k2, what);
|
return pki_ed25519_key_cmp(k1, k2, what);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user