<div dir="ltr"><div><div>Hi Christophe,<br><br></div>If adding a ca-file property to OvirtProxy is not acceptable, would you consider adding (something like) the following function to ovirt-proxy.c?<br><br></div>Please note that this is a preliminary variant that I haven't tested much, and may not have enough error checking!<br>
<div><br>void ovirt_proxy_load_ca_cert_file (OvirtProxy *proxy,<br>                                           const gchar *ca_file_name,<br>                                           GError **error)<br>{   <br>    GMappedFile *ca_file = NULL;<br>
    GBytes *bytes = NULL;<br>    gconstpointer ca_data;<br>    gsize cert_length = 0;<br><br>    ca_file = g_mapped_file_new(ca_file_name, FALSE, error);<br>    if (ca_file == NULL) {<br>        goto error;<br>    }<br><br>
    bytes = g_mapped_file_get_bytes(ca_file);<br>    cert_length = g_bytes_get_size(bytes);<br>    ca_data = g_bytes_get_data (bytes, &cert_length);<br>    set_downloaded_ca_cert(proxy, (char*)ca_data, cert_length);<br>
<br>error:<br>    if (ca_file != NULL)<br>        g_object_unref(ca_file);<br><br>    if (bytes != NULL)<br>        g_object_unref(bytes);<br>}<br><br></div><div>Cheers,<br>iordan<br></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Sep 13, 2013 at 12:53 PM, i iordanov <span dir="ltr"><<a href="mailto:iiordanov@gmail.com" target="_blank">iiordanov@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"><div>Hi Christophe,<br><br>I hope this is not too much to ask, but would it be possible for OvirtProxy to have a ca-cert-file property as well as a ca-cert property? This way, supporting the spice-ca-file option as well as the existing aSPICE functionality will be much easier.<br>

<br></div><div>Thanks!<br>iordan<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 12:09 PM, i iordanov <span dir="ltr"><<a href="mailto:iiordanov@gmail.com" target="_blank">iiordanov@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"><div><div><div><div>Hi Christophe,<br><br></div>I read through some govirt code, and I think you're right that gvfs is only used during the fetching of the certificate. If that's the case, I will start by not fetching the CA automatically, but requiring for users to provide it to aSPICE the same way as they have to provide it  for a simple SPICE connection (within the "Import CA" dialog in aSPICE, which is analogous to the  --spice-ca-file option in virt-viewer). I think this will work for most if not all people.<br>


</div><br></div>Thanks again!<br></div>iordan<br><div><div><br></div></div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 1:20 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Iordan,<br>
<div><div><br>
On Thu, Sep 12, 2013 at 01:11:45PM -0400, i iordanov wrote:<br>
> Hi Christophe,<br>
><br>
> It is currently very hard, bordering on impossible to build gvfs for<br>
> Android, because it ends up depending on GTK. The sequence of<br>
> dependencies is:<br>
><br>
> glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 -><br>
> gcr-ui-3 -> GTK<br>
><br>
> The glib guys are arguing that this is not a bug, since it's just a<br>
> dependency that's missing, but I am trying to convince them that the<br>
> low-level glib should not end up depending on a UI library...<br>
><br>
> Hence for the moment, I absolutely cannot use glib network I/O. Can<br>
> you tell me, since you've written libgovirt, do you think it's<br>
> possible to add functionality to *it* rather than writing workarounds<br>
> for client software? I could work around this issue in aSPICE, but<br>
> that would not help for any other client on any other platform that<br>
> doesn't have GTK.<br>
><br>
> Regardless of whether you do agree it's best if govirt either stopped<br>
> relying on glib network file I/O or had an option to use a different<br>
> method, what library would you say would be best suited to replace all<br>
> the network file I/O operations that you have in govirt with a<br>
> download -> local file I/O sequence? Libcurl comes to mind, but<br>
> perhaps libsoup is better suited for the purpose in your opinion?<br>
<br>
</div></div>Could you try what I suggested in<br>
<a href="http://lists.freedesktop.org/archives/spice-devel/2013-September/014430.html" target="_blank">http://lists.freedesktop.org/archives/spice-devel/2013-September/014430.html</a><br>
? I think gvfs is only used if you use the helpers to fetch the<br>
certificate, and the rest of the code is just doing calls into<br>
librest/libsoup which I think are not using gio/gvfs.<br>
If this is a correct, then I think it's not a big issue that you don't have<br>
gvfs on your platform. If it is, I'll have to look where/how it's used to<br>
figure out how to workaround this.<br>
<br>
Hope that helps,<br>
<br>
Christophe<br>
</blockquote></div><br><br clear="all"><br></div></div><div>-- <br>The conscious mind has only one thread of execution.
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>The conscious mind has only one thread of execution.
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>The conscious mind has only one thread of execution.
</div>