Re: GTlsCertificate issues - always BadRequest / 400
- From: Dan Winship <danw gnome org>
- To: Bernhard Schuster <schuster bernhard googlemail com>, libsoup-list gnome org
- Subject: Re: GTlsCertificate issues - always BadRequest / 400
- Date: Thu, 10 Oct 2013 09:43:45 -0400
On 10/09/2013 11:07 PM, Bernhard Schuster wrote:
Is anything wrong with the below code? The very last asseration fails
which is kinda weird, if I remove everything ssl related it works just
fine.
cache = cache_new ();
server = soup_server_new (SOUP_SERVER_PORT, (guint)opts.server.port,
SOUP_SERVER_SERVER_HEADER, "eebusrestifier",
SOUP_SERVER_TLS_CERTIFICATE, tlscert,
NULL);
...
g_assert (soup_server_is_https (server)); // FAILS
There's nothing wrong with your code, it's a bug in libsoup.
soup_server_is_https() wasn't updated for the new
SOUP_SERVER_TLS_CERTIFICATE property; it only returns TRUE if you used
the old SOUP_SERVER_SSL_CERT_FILE and SOUP_SERVER_SSL_KEY_FILE
properties. (And as a result of this, when it receives a connection,
it's not expecting https, so it returns 400 Bad Request.)
This will be fixed in libsoup 2.44.1, which comes out next week. And
assuming you are just getting your GTlsCertificate from a file, you can
work around the bug by just using the old SSL properties instead.
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]