1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-26 05:07:40 +00:00

shuffled some files around

This commit is contained in:
kepler155c@gmail.com
2019-07-01 17:22:19 -04:00
parent 61a26d7c55
commit 9e85a0dae1
8 changed files with 33 additions and 17 deletions

View File

@@ -13,7 +13,9 @@ local function trustConnection(socket)
if not password then
socket:write({ msg = 'No password has been set' })
else
data = Crypto.decrypt(data, password)
pcall(function()
data = Crypto.decrypt(data, password)
end)
if data and data.pk and data.dh == socket.dhost then
local trustList = Util.readTable('usr/.known_hosts') or { }
trustList[data.dh] = data.pk