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

Alan Young <ayoung-MyOluDGr5eRWk0Htik3J/[email protected]> Mon, 02 Apr 2012 13:03:15 -0700
Newsgroups gmane.comp.gnome.apps.pan.devel
Message-ID <[email protected]>
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.
>
> Cheers.
>
> _______________________________________________
> Pan-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/pan-devel
>
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;