Skip to contentSkip to conversation

vnc: fix vnc client authentication

PATCH In review Wolfgang Bumiller 2 participants 2 messages Jul 14, 2015 – Jul 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vnc: fix vnc client authentication

Commit 800567a61 updated the code to the generic crypto API and mixed up encrypt and decrypt functions in procotol_client_auth_vnc.
(Used to be: deskey(key, EN0) which encrypts, and was changed to qcrypto_cipher_decrypt in 800567a61.) Changed it to qcrypto_cipher_encrypt now.

---
 ui/vnc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/vnc.c +1 -1
index 94e4f19..1483958 100644
@@ -2551,7 +2551,7 @@ static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len)
         goto reject;
     }
 
-    if (qcrypto_cipher_decrypt(cipher,
+    if (qcrypto_cipher_encrypt(cipher,
                                vs->challenge,
                                response,
                                VNC_AUTH_CHALLENGE_SIZE,
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Wolfgang Bumiller

Commit 800567a61 updated the code to the generic crypto API and mixed up encrypt and decrypt functions in procotol_client_auth_vnc.
(Used to be: deskey(key, EN0) which encrypts, and was changed to qcrypto_cipher_decrypt in 800567a61.) Changed it to qcrypto_cipher_encrypt now.

---
 ui/vnc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/vnc.c +0 -0
index 94e4f19..1483958 100644

ui/vnc.c static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len) · line 2557

Quoted 8 lines
ui/vnc.c +1 -1
@@ -2551,7 +2551,7 @@ static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len)
         goto reject;
     }
 
-    if (qcrypto_cipher_decrypt(cipher,
+    if (qcrypto_cipher_encrypt(cipher,
                                vs->challenge,
                                response,
                                VNC_AUTH_CHALLENGE_SIZE,

I see its already merged while i was on holiday, but none the less

Thanks for fixing my stupid typo.

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|