Re: [pan.git] Reproducible segfault when "saving articles from selected nzb"

walt <[email protected]> Mon, 02 Apr 2012 17:11:57 -0700
Newsgroups gmane.comp.gnome.apps.pan.devel
Message-ID <[email protected]>
On 04/02/2012 01:03 PM, Alan Young wrote:
> Heinrich Mueller wrote:
>> Am 02.04.2012 19:48, schrieb walt:
>>> ** (pan:15522): WARNING **: The certificate is not trusted. ** (pan:15522): WARNING **: The certificate hasn't got a known issuer. ** ERROR **: The certificate's owner does not match hostname 'news.budgetnews.net' ! Trace/breakpoint trap Thanks Heinrich :)
>> I still don't get why pan crashes like this.
>> Can you post a backtrace with gdb? Did you enable special debugging flags for glib?
>> Make a "export G_DEBUG="" " if appropriate.


> I'm not sure, I don't have a bt handy. But I think it was crashing with the g_error below. I did a quick patch like this to work around it. It assumes you have the trust check box marked and if so just issues a warning instead of an error.
>
> --- cert-store.cc.orig 2012-04-01 01:26:55.100783006 -0700
> +++ cert-store.cc 2012-04-01 02:10:31.454124927 -0700
> @@ -139,8 +139,14 @@
>
> if (!gnutls_x509_crt_check_hostname (cert, mydata->hostname_full.c_str()))
> {
> +// if we trust make it warning instead of a abort/error
> +// ? how to print cert's hostname...
> + if (mydata->always_trust)
> + g_warning ("The certificate's owner does not match hostname '%s' !\n", mydata->hos
> + else {
> g_error ("The certificate's owner does not match hostname '%s' !\n", mydata->hostn
> goto _fail;
> + }
> }
> if (fail) goto _fail;

Heh, cool, thanks.  your patch was very corrupted in transmission, but I
resuscitated it slightly :)

My result is that pan no longer exits, but it keeps popping up a very
polished and formal dialog box (maybe from gnome or gtk?) asking me if I
want to accept the cert or not.

I click to accept the cert and a second later another one pops up with the
same question, no idea why.  You seem to be generally on the right track,
though.