<div dir="ltr">Answering my own question:<div><br></div><div>virsh expects a byte containing '\1' post ssl handshake. Libvirtd sends that but obviously the ssl offloader wouldn't do that.</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On 4 July 2014 14:29, Parthipan <span dir="ltr"><<a href="mailto:lparth@gmail.com" target="_blank">lparth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Hi,<div><br></div><div>I'm trying this setup where an stunnel4 (listening for clients on port 16514) connects to an unencrypted libvirt backend (on port 16509). When I point the virsh client to stunnel4 it hangs.</div>


<div><br></div><div>Looking via tshark:</div><div><br></div><div>1. virsh completes ssl handshake with stunnel4</div><div>2. stunnel4 completes tcp handshake with libvirt.</div><div><br></div><div>and that's all.</div>


<div><br></div><div>When connecting virsh client directly to libvirt (this time encrypted) tshark shows:</div><div><br></div><div>1. virsh completes ssl handshake with libvirt (change cypher spec at the end)</div><div>2. libvirt sends something (I can't decode what libvirt sends, since DH key exchange is used.)</div>


<div><br></div><div>Anyway my question really is, can libvirt be run as an unencrypted backend behind an ssl offloader such as stunnel4? If people do use it like that, then I can look for any setup issues in mine.</div><div>


<br></div><div>My package versions:</div><div>libvirt: 1.2.2-0ubuntu13.1<br></div><div>stunnel4: 3:4.53-1.1ubuntu1</div><div><br></div><div>Thanks</div><div>~parthi</div></div>
</blockquote></div><br></div>