feature: Adds (semi-broken) public key authentication.

This commit is contained in:
greysoh 2024-05-09 19:39:16 -04:00
parent 5e0c7af53c
commit 19aadc20c0
No known key found for this signature in database
GPG key ID: FE0F173B8FC01571

View file

@ -111,8 +111,8 @@ server.on("connection", client => {
if (
rawKey.username == auth.username &&
auth.key.algo == key.type &&
checkValue(auth.key.data, key.getPublicSSH()) ||
(auth.signature && key.verify(auth.blob as Buffer, auth.signature, auth.key.algo))
auth.key.data == key.getPublicSSH() &&
auth.signature && key.verify(auth.blob as Buffer, auth.signature, auth.key.algo)
) {
console.log(" -- VERIFIED PUBLIC KEY --");
userData.username = rawKey.username;