1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-14 06:17:13 +00:00

security updates

This commit is contained in:
kepler155c@gmail.com
2019-06-29 16:35:33 -04:00
parent 69522e61d4
commit e75a357209
15 changed files with 147 additions and 119 deletions

View File

@@ -27,15 +27,16 @@ if not password then
end
print('connecting...')
local socket, msg = Socket.connect(remoteId, 19)
local trustId = '01c3ba27fe01383a03a1785276d99df27c3edcef68fbf231ca'
local socket, msg = Socket.connect(remoteId, 19, { identifier = trustId })
if not socket then
error(msg)
end
local publicKey = Security.getPublicKey()
local identifier = Security.getIdentifier()
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, SHA.compute(password)))
socket:write(Crypto.encrypt({ pk = identifier, dh = os.getComputerID() }, SHA.compute(password)))
local data = socket:read(2)
socket:close()