<div>Dear All,</div>
<div> </div>
<div>Please find few minutes from your time and guide us with some pointers if possible.</div>
<div> </div>
<div>We are facing a libvirtd crash when we are trying to connect to qemu by default TLS transport.</div>
<div> </div>
<div># virsh -c qemu+tls://localhost/system version<br>error: authentication failed: TLS handshake failed A TLS packet with unexpected length was received.<br>error: failed to connect to the hypervisor</div>
<div> </div>
<div>I used my own CA and certificates (generated using <a href="http://libvirt.org/remote.html#Remote_libvirtd_configuration">http://libvirt.org/remote.html#Remote_libvirtd_configuration</a> on Redhat PC) on both Kontron PC and our Board (with patched libvirt). Libvirtd.conf was modified so that libvirt is listening all IPs using default IP (so that it was possible to use same certificates on all machines) </div>

<div> </div>
<div>These directories and files created and used.</div>
<div>/etc/pki/CA/cacert.pem<br>/etc/pki/libvirt/private/serverkey.pem<br>/etc/pki/libvirt/servercert.pem<br>/etc/pki/libvirt/private/clientkey.pem <br>/etc/pki/libvirt/clientcert.pem </div>
<div> </div>
<div>TLS connection worked fine with Kontron PC</div>
<div> </div>
<div># virsh -c qemu+tls://localhost/system version<br>Compiled against library: libvir 0.9.5<br>Using library: libvir 0.9.5<br>Using API: QEMU 0.9.5<br>Running hypervisor: QEMU 0.12.1</div>
<div> </div>
<div><font color="#000099">But libvirt crashed on our Board (using libvirt 0.10.2, gnutls-2.10.5-1_WR4.3.x86_64 and libudev-161-4 rpms )</font></div>
<div><font color="#000099"></font> </div>
<div># virsh -c qemu+tls://localhost/system version<br>error: authentication failed: TLS handshake failed A TLS packet with unexpected length was received.<br>error: failed to connect to the hypervisor</div>
<div> </div>
<div>GDB:</div>
<div> </div>
<div>Program received signal SIGABRT, Aborted.<br>0x00007f8591246005 in raise () from /lib64/libc.so.6<br>(gdb) bt<br>#0  0x00007f8591246005 in raise () from /lib64/libc.so.6<br>#1  0x00007f8591248e40 in abort () from /lib64/libc.so.6<br>
#2  0x00007f8592a2fdc5 in ?? () from /lib64/libgcrypt.so.11<br>#3  0x00007f8592a303d5 in ?? () from /lib64/libgcrypt.so.11<br>#4  0x00007f8592a35697 in ?? () from /lib64/libgcrypt.so.11<br>#5  0x00007f8592a3579c in ?? () from /lib64/libgcrypt.so.11<br>
#6  0x00007f8592a30a65 in ?? () from /lib64/libgcrypt.so.11<br>#7  0x00007f8592a30aa9 in ?? () from /lib64/libgcrypt.so.11<br>#8  0x00007f8592a30b19 in ?? () from /lib64/libgcrypt.so.11<br>#9  0x00007f8592a735df in ?? () from /lib64/libgcrypt.so.11<br>
#10 0x00007f8592a7365f in ?? () from /lib64/libgcrypt.so.11<br>#11 0x00007f8592a6025a in ?? () from /lib64/libgcrypt.so.11<br>#12 0x00007f8592a6045a in ?? () from /lib64/libgcrypt.so.11<br>#13 0x00007f8592a3c1ef in ?? () from /lib64/libgcrypt.so.11<br>
#14 0x00007f8592cd9d8c in ?? () from /usr/lib64/libgnutls.so.26<br>#15 0x00007f8592cc5e7a in ?? () from /usr/lib64/libgnutls.so.26<br>#16 0x00007f8592ccddd6 in ?? () from /usr/lib64/libgnutls.so.26<br>#17 0x00007f8592cce67f in ?? () from /usr/lib64/libgnutls.so.26<br>
#18 0x00007f8592ccedaf in ?? () from /usr/lib64/libgnutls.so.26<br>#19 0x00007f8592cbaf85 in ?? () from /usr/lib64/libgnutls.so.26<br>#20 0x00007f8592cb6c55 in ?? () from /usr/lib64/libgnutls.so.26<br>#21 0x00007f8592cb7437 in gnutls_handshake () from /usr/lib64/libgnutls.so.26<br>
#22 0x00007f8593a5961b in virNetTLSSessionHandshake () from /usr/lib64/libvirt.so.0</div>
<div> </div>
<div>Please let us know if it is a known problem. If not, I will raise a new bug for the same. ( Atleast I coulnt find the the known issues )</div>
<div> </div>
<div>Thanks and Regards,</div>
<div>Shree Duth Awasthi.</div>