Client Crash Reading TLS Cert: VS2k8 Compile XP64 - Solution

Moderator: Project members

Post Reply
Message
Author
tateu
450 Internal Error
Posts: 38
Joined: 2004-11-13 01:19

Client Crash Reading TLS Cert: VS2k8 Compile XP64 - Solution

#1 Post by tateu » 2009-09-06 09:24

This may be an easy fix that everyone knows...but it took me several frustrating hours to figure out, so I thought I should post about it just in case anyone else ever runs into it.

I am using my own version 3.2.7.1 compiled with wxWidgets 2.8.10 using Visual Studio 2008 Express on XP64. It would crash loading the verify certificate dialog for TLS servers. The official release version does not crash when tested on the same servers. It turned out to be "cert.GetActivationTime().FormatDate().c_str()" inside of the function "CVerifyCertDialog::DisplayCert" in the file verifycertdialog.cpp that caused the crash. I went round and round looking for a solution a few days ago. I finally gave up and threw in a quick hack fix (checking wxDateTime::GetCurrentYear, ::GetCurrentMonth and ::GetDay for valid ranges and only calling FormatDate if they were legal - GetDay was returning a number around 2^16). Today, I decided to give it one more go and finally traced it to the fact that time_t is being defined to a 64-bit number on my system. Lo and behold...I put "_USE_32BIT_TIME_T" in the Filezilla Preprocessor Definitions, recompiled and no more crashes.

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Client Crash Reading TLS Cert: VS2k8 Compile XP64 - Solution

#2 Post by botg » 2009-09-06 11:34

You're using an unsupported non-default compiler to build FileZilla. But it seems you didn't also compile all its dependencies, namely GnuTLS, using that very same compiler. You need to recompile GnuTLS.

Post Reply