1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Remove unused VNC authentication utilities.

This commit is contained in:
Simo Kinnunen 2015-10-13 03:59:58 +09:00
parent e68d8564f4
commit 5216eac5ce
2 changed files with 4 additions and 18 deletions

View file

@ -28,7 +28,10 @@ module.exports = syrup.serial()
var log = logger.createLogger('device:plugins:vnc')
function vncAuthHandler(data) {
log.info('VNC authentication attempt using "%s"', data.fingerprint)
log.info(
'VNC authentication attempt using "%s"'
, data.response.toString('hex')
)
var resolver = Promise.defer()

View file

@ -36,23 +36,6 @@ function encrypt(challenge, password) {
module.exports.encrypt = encrypt
function decrypt(challenge, password) {
var key = normalizePassword(password)
, iv = new Buffer(0).fill(0)
// Note: do not call .final(), .update() is the one that gives us the
// desired result.
return crypto.createDecipheriv('des-ecb', key, iv).update(challenge)
}
module.exports.decrypt = decrypt
function format(fingerprint) {
return fingerprint.toString('hex').match(/\w{4}/g).join(':')
}
module.exports.format = format
function verify(response, challenge, password) {
return encrypt(challenge, password).equals(response)
}