feature: Adds (semi-broken) public key authentication.
This commit is contained in:
parent
5e0c7af53c
commit
19aadc20c0
1 changed files with 2 additions and 2 deletions
|
@ -111,8 +111,8 @@ server.on("connection", client => {
|
||||||
if (
|
if (
|
||||||
rawKey.username == auth.username &&
|
rawKey.username == auth.username &&
|
||||||
auth.key.algo == key.type &&
|
auth.key.algo == key.type &&
|
||||||
checkValue(auth.key.data, key.getPublicSSH()) ||
|
auth.key.data == key.getPublicSSH() &&
|
||||||
(auth.signature && key.verify(auth.blob as Buffer, auth.signature, auth.key.algo))
|
auth.signature && key.verify(auth.blob as Buffer, auth.signature, auth.key.algo)
|
||||||
) {
|
) {
|
||||||
console.log(" -- VERIFIED PUBLIC KEY --");
|
console.log(" -- VERIFIED PUBLIC KEY --");
|
||||||
userData.username = rawKey.username;
|
userData.username = rawKey.username;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue