Re: SSL Client with libsoup?



On 05/30/2009 02:29 PM, Jaakko Pasanen wrote:
> Why I am asking this, is that I am currently trying to add HTTPS support
> for client program which uses libsoup for sending messages over HTTP.

Just use https URLs instead of http ones, and it will just work.

libsoup doesn't have much support for doing anything "clever" with SSL,
like popping up "OMG I don't recognize this certificate what should I
do?" dialogs. Some day it might... there are bugs in bugzilla about
this. But I'm kind of not a big fan of SSL these days, so I'm not
personally very inspired to hack on that.

The one thing you can do is point libsoup to a file containing SSL
certificates, via the SOUP_SESSION_SSL_CA_FILE property on SoupSession,
and then it will use the CA certificates in that file to validate any
SSL certificates that it receives, and it will reject any SSL
connections that it can't validate from those CAs. But still, there's no
way to interact with the user about it; it just changes the behavior
from "accept all certificates" to "accept only certificates that are
valid according to this file".

-- Dan


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