qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Error when attempting to perform TLS NBD connection
@ 2016-04-05 20:01 Alex Bligh
  2016-04-06  9:09 ` Daniel P. Berrange
  2016-04-06 11:13 ` Daniel P. Berrange
  0 siblings, 2 replies; 9+ messages in thread
From: Alex Bligh @ 2016-04-05 20:01 UTC (permalink / raw)
  To: qemu-devel, Daniel P. Berrange; +Cc: Alex Bligh

When I attempt to connect via TLS like this (using today's qemu master):

   ./qemu-img info --object tls-creds-x509,id=tls0,dir=../certs,endpoint=client --image-opts driver=nbd,host=127.0.0.1,port=6666,export=foo,tls-creds=tls0

(command line from Daniel over IRC)

I get the rather opaque error:

   qemu-img: Unable to initialize certificate

and with the patch I sent through I get the not much less opaque error:

   qemu-img: Unable to initialize certificate: ASN1 parser: Element was not found.

gdb indicates this is crypto/tlscredsx509.c:399 where gnutls_x509_crt_init(&cert) fails.

I generated the certificates EXACTLY as per:
   http://qemu.weilnetz.de/qemu-doc.html#vnc_005fgenerate_005fcert
(also from Daniel over IRC)

and the certificates work fine with gnutls-cli and gnutls-server

I am compiling on and running on Ubuntu Trusty 14.04, and have an up to date
(for 14.04) gnutls installed.

$ dpkg --list | fgrep libgnutls26
ii libgnutls26:amd64  2.12.23-12ubuntu2.4 amd64 GNU TLS library - runtime library

All the certificates are at:
  https://gist.github.com/abligh/96425e20fb423d847b8fd4ead298efed
(no there's nothing secret there)

Any ideas?

-- 
Alex Bligh

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-06 12:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-05 20:01 [Qemu-devel] Error when attempting to perform TLS NBD connection Alex Bligh
2016-04-06  9:09 ` Daniel P. Berrange
2016-04-06  9:11   ` Daniel P. Berrange
2016-04-06  9:22     ` Alex Bligh
2016-04-06  9:27       ` Daniel P. Berrange
2016-04-06  9:17   ` Alex Bligh
2016-04-06 11:13 ` Daniel P. Berrange
2016-04-06 11:40   ` Alex Bligh
2016-04-06 12:18     ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).