mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
pki_gcrypt: Do not compare private parts when comparing public keys
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
6d5ac15a51
commit
1f66414805
@@ -1518,8 +1518,10 @@ int pki_key_compare(const ssh_key k1,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_bignum_cmp(k1->ecdsa, k2->ecdsa, "d") != 0) {
|
if (what == SSH_KEY_CMP_PRIVATE) {
|
||||||
return 1;
|
if (_bignum_cmp(k1->ecdsa, k2->ecdsa, "d") != 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user