]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/old/vencrypt-auth-plain.patch
bump version to 2.9.0-1~rc2+5
[pve-qemu-kvm.git] / debian / patches / old / vencrypt-auth-plain.patch
1 Index: new/ui/vnc-auth-vencrypt.c
2 ===================================================================
3 --- new.orig/ui/vnc-auth-vencrypt.c 2014-07-16 12:01:28.000000000 +0200
4 +++ new/ui/vnc-auth-vencrypt.c 2014-07-16 12:01:28.000000000 +0200
5 @@ -144,6 +144,11 @@
6 vnc_read_when(vs, protocol_client_auth_plain_start, 8);
7 break;
8
9 + case VNC_AUTH_VENCRYPT_PLAIN:
10 + VNC_DEBUG("Start auth PLAIN\n");
11 + vnc_read_when(vs, protocol_client_auth_plain_start, 8);
12 + break;
13 +
14 case VNC_AUTH_VENCRYPT_TLSVNC:
15 case VNC_AUTH_VENCRYPT_X509VNC:
16 VNC_DEBUG("Start TLS auth VNC\n");
17 @@ -228,25 +233,32 @@
18 {
19 int auth = read_u32(data, 0);
20
21 - if (auth != vs->subauth) {
22 + if (auth != vs->subauth && auth != VNC_AUTH_VENCRYPT_PLAIN) {
23 VNC_DEBUG("Rejecting auth %d\n", auth);
24 vnc_write_u8(vs, 0); /* Reject auth */
25 vnc_flush(vs);
26 vnc_client_error(vs);
27 } else {
28 - VNC_DEBUG("Accepting auth %d, setting up TLS for handshake\n", auth);
29 - vnc_write_u8(vs, 1); /* Accept auth */
30 - vnc_flush(vs);
31 -
32 - if (vnc_tls_client_setup(vs, NEED_X509_AUTH(vs)) < 0) {
33 - VNC_DEBUG("Failed to setup TLS\n");
34 - return 0;
35 + if (auth == VNC_AUTH_VENCRYPT_PLAIN) {
36 + vs->subauth = auth;
37 + start_auth_vencrypt_subauth(vs);
38 }
39 -
40 - VNC_DEBUG("Start TLS VeNCrypt handshake process\n");
41 - if (vnc_start_vencrypt_handshake(vs) < 0) {
42 - VNC_DEBUG("Failed to start TLS handshake\n");
43 - return 0;
44 + else
45 + {
46 + VNC_DEBUG("Accepting auth %d, setting up TLS for handshake\n", auth);
47 + vnc_write_u8(vs, 1); /* Accept auth */
48 + vnc_flush(vs);
49 +
50 + if (vnc_tls_client_setup(vs, NEED_X509_AUTH(vs)) < 0) {
51 + VNC_DEBUG("Failed to setup TLS\n");
52 + return 0;
53 + }
54 +
55 + VNC_DEBUG("Start TLS VeNCrypt handshake process\n");
56 + if (vnc_start_vencrypt_handshake(vs) < 0) {
57 + VNC_DEBUG("Failed to start TLS handshake\n");
58 + return 0;
59 + }
60 }
61 }
62 return 0;
63 @@ -261,10 +273,11 @@
64 vnc_flush(vs);
65 vnc_client_error(vs);
66 } else {
67 - VNC_DEBUG("Sending allowed auth %d\n", vs->subauth);
68 + VNC_DEBUG("Sending allowed auths %d %d\n", vs->subauth, VNC_AUTH_VENCRYPT_PLAIN);
69 vnc_write_u8(vs, 0); /* Accept version */
70 - vnc_write_u8(vs, 1); /* Number of sub-auths */
71 + vnc_write_u8(vs, 2); /* Number of sub-auths */
72 vnc_write_u32(vs, vs->subauth); /* The supported auth */
73 + vnc_write_u32(vs, VNC_AUTH_VENCRYPT_PLAIN); /* Alternative supported auth */
74 vnc_flush(vs);
75 vnc_read_when(vs, protocol_client_vencrypt_auth, 4);
76 }