vnc-auth-vencrypt.c (494cb81741f867319f11ecfa0949168baf9f01d7) | vnc-auth-vencrypt.c (4769a881cbe1130e7ba4650471ef37e2cf998a9c) |
---|---|
1/* 2 * QEMU VNC display driver: VeNCrypt authentication setup 3 * 4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws> 5 * Copyright (C) 2006 Fabrice Bellard 6 * Copyright (C) 2009 Red Hat, Inc 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy --- 51 unchanged lines hidden (view full) --- 60 vnc_write(vs, err, sizeof(err)); 61 } 62 vnc_client_error(vs); 63 } 64} 65 66static void vnc_tls_handshake_io(void *opaque); 67 | 1/* 2 * QEMU VNC display driver: VeNCrypt authentication setup 3 * 4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws> 5 * Copyright (C) 2006 Fabrice Bellard 6 * Copyright (C) 2009 Red Hat, Inc 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy --- 51 unchanged lines hidden (view full) --- 60 vnc_write(vs, err, sizeof(err)); 61 } 62 vnc_client_error(vs); 63 } 64} 65 66static void vnc_tls_handshake_io(void *opaque); 67 |
68static int vnc_start_vencrypt_handshake(struct VncState *vs) | 68static int vnc_start_vencrypt_handshake(VncState *vs) |
69{ 70 int ret; 71 72 if ((ret = gnutls_handshake(vs->tls.session)) < 0) { 73 if (!gnutls_error_is_fatal(ret)) { 74 VNC_DEBUG("Handshake interrupted (blocking)\n"); 75 if (!gnutls_record_get_direction(vs->tls.session)) 76 qemu_set_fd_handler(vs->csock, vnc_tls_handshake_io, NULL, vs); --- 21 unchanged lines hidden (view full) --- 98 99 start_auth_vencrypt_subauth(vs); 100 101 return 0; 102} 103 104static void vnc_tls_handshake_io(void *opaque) 105{ | 69{ 70 int ret; 71 72 if ((ret = gnutls_handshake(vs->tls.session)) < 0) { 73 if (!gnutls_error_is_fatal(ret)) { 74 VNC_DEBUG("Handshake interrupted (blocking)\n"); 75 if (!gnutls_record_get_direction(vs->tls.session)) 76 qemu_set_fd_handler(vs->csock, vnc_tls_handshake_io, NULL, vs); --- 21 unchanged lines hidden (view full) --- 98 99 start_auth_vencrypt_subauth(vs); 100 101 return 0; 102} 103 104static void vnc_tls_handshake_io(void *opaque) 105{ |
106 struct VncState *vs = (struct VncState *)opaque; | 106 VncState *vs = (VncState *)opaque; |
107 108 VNC_DEBUG("Handshake IO continue\n"); 109 vnc_start_vencrypt_handshake(vs); 110} 111 112 113 114#define NEED_X509_AUTH(vs) \ --- 63 unchanged lines hidden --- | 107 108 VNC_DEBUG("Handshake IO continue\n"); 109 vnc_start_vencrypt_handshake(vs); 110} 111 112 113 114#define NEED_X509_AUTH(vs) \ --- 63 unchanged lines hidden --- |