20160527

MARSSx86 오류
MARSSx86을 Ubuntu 16.04 LTS에서 빌드했더니 오류가 발생했다.

qemu/libqemu_common.a(vnc-tls.o): In function `vnc_tls_client_setup':
vnc-tls.c:(.text+0x35f): undefined reference to `gnutls_kx_set_priority'
vnc-tls.c:(.text+0x37a): undefined reference to `gnutls_certificate_type_set_priority'
vnc-tls.c:(.text+0x395): undefined reference to `gnutls_protocol_set_priority'

우선 gnutls_anon_server_credentials를 gnutls_anon_server_credentials_t로 변경해야 한다. 다음 패치 파일을 참고해 qemu/ui/vnc-tls.c 파일을 수정한다 ([PATCH 1/3] Avoid the use of deprecated gnutls gnutls_*_set, Qemu-devel).

---
 ui/vnc-tls.c |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c
index dec626c..33a5d8c 100644
--- a/ui/vnc-tls.c
+++ b/ui/vnc-tls.c
@@ -286,10 +286,6 @@ int vnc_tls_validate_certificate(struct VncState *vs)
 
 int vnc_tls_client_setup(struct VncState *vs,
                          int needX509Creds) {
-    static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
-    static const int protocol_priority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, 
GNUTLS_SSL3, 0 };
-    static const int kx_anon[] = {GNUTLS_KX_ANON_DH, 0};
-    static const int kx_x509[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, 
GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0};
 
     VNC_DEBUG("Do TLS setup\n");
     if (vnc_tls_initialize() < 0) {
@@ -310,21 +306,7 @@ int vnc_tls_client_setup(struct VncState *vs,
             return -1;
         }
 
-        if (gnutls_kx_set_priority(vs->tls.session, needX509Creds ? kx_x509 : 
kx_anon) < 0) {
-            gnutls_deinit(vs->tls.session);
-            vs->tls.session = NULL;
-            vnc_client_error(vs);
-            return -1;
-        }
-
-        if (gnutls_certificate_type_set_priority(vs->tls.session, 
cert_type_priority) < 0) {
-            gnutls_deinit(vs->tls.session);
-            vs->tls.session = NULL;
-            vnc_client_error(vs);
-            return -1;
-        }
-
-        if (gnutls_protocol_set_priority(vs->tls.session, protocol_priority) < 
0) {
+        if (gnutls_priority_set_direct(vs->tls.session, needX509Creds ? 
"NORMAL" : "NORMAL:+ANON-DH", NULL) < 0) {
             gnutls_deinit(vs->tls.session);
             vs->tls.session = NULL;
             vnc_client_error(vs);
-- 

Reference: [PATCH 1/3] Avoid the use of deprecated gnutls gnutls_*_set, Qemu-devel, https://lists.gnu.org/archive/html/qemu-devel/2011-07/msg00278.html

Advertisements
Tagged with: , , , , , , , ,
Posted in 1) Memo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

누적 방문자 수
  • 103,570 hits
%d bloggers like this: