[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Error when attempting to perform TLS NBD connection

From: Daniel P. Berrange
Subject: Re: [Qemu-devel] Error when attempting to perform TLS NBD connection
Date: Wed, 6 Apr 2016 12:13:35 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Apr 05, 2016 at 09:01:10PM +0100, Alex Bligh wrote:
> 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=,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.

So the problem turned out to be that the qemu-img program failed to
call qcrypto_init(), so gnutls had not had its one-time initialization
performed. This doesn't matter for gnutls 3.x but does for anything
older than that. I just copied you on a patch to fix this.

|: 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 :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]