# HG changeset patch # User Daniel Atallah # Date 1188270948 0 # Node ID d5ecaf5bce930a6eaf15ebb7811d12a60e3ef0d5 # Parent 2f0960548c1dca85d877ea2f6860382854aa6727 Fix the win32 build for the cert SoC branch merge. diff -r 2f0960548c1d -r d5ecaf5bce93 Makefile.mingw --- a/Makefile.mingw Tue Aug 28 03:14:54 2007 +0000 +++ b/Makefile.mingw Tue Aug 28 03:15:48 2007 +0000 @@ -51,6 +51,7 @@ silc.dll \ silcclient.dll \ softokn3.dll \ + smime3.dll \ ssl3.dll #build an expression for `find` to use to ignore the above files diff -r 2f0960548c1d -r d5ecaf5bce93 libpurple/Makefile.mingw --- a/libpurple/Makefile.mingw Tue Aug 28 03:14:54 2007 +0000 +++ b/libpurple/Makefile.mingw Tue Aug 28 03:15:48 2007 +0000 @@ -33,6 +33,7 @@ accountopt.c \ blist.c \ buddyicon.c \ + certificate.c \ cipher.c \ cmds.c \ connection.c \ diff -r 2f0960548c1d -r d5ecaf5bce93 libpurple/certificate.c --- a/libpurple/certificate.c Tue Aug 28 03:14:54 2007 +0000 +++ b/libpurple/certificate.c Tue Aug 28 03:15:48 2007 +0000 @@ -28,9 +28,9 @@ #include +#include "internal.h" #include "certificate.h" #include "debug.h" -#include "internal.h" #include "request.h" #include "signals.h" #include "util.h" @@ -670,8 +670,13 @@ /* Attempt to point at the appropriate system path */ if (NULL == x509_ca_syspath) { +#ifdef _WIN32 + x509_ca_syspath = g_build_filename(DATADIR, + "ca-certs", NULL); +#else x509_ca_syspath = g_build_filename(DATADIR, "purple", "ca-certs", NULL); +#endif } /* Populate the certificates pool from the system path */ @@ -1771,7 +1776,7 @@ gchar *cn; time_t activation, expiration; /* Length of these buffers is dictated by 'man ctime_r' */ - gchar activ_str[26], expir_str[26]; + gchar *activ_str, *expir_str; gchar *secondary; /* Pull out the SHA1 checksum */ @@ -1788,27 +1793,29 @@ /* TODO: Check the times against localtime */ /* TODO: errorcheck? */ g_assert(purple_certificate_get_times(crt, &activation, &expiration)); - ctime_r(&activation, activ_str); - ctime_r(&expiration, expir_str); - + activ_str = g_strdup(ctime(&activation)); + expir_str = g_strdup(ctime(&expiration)); + /* Make messages */ secondary = g_strdup_printf(_("Common name: %s\n\n" "Fingerprint (SHA1): %s\n\n" "Activation date: %s\n" "Expiration date: %s\n"), cn, sha_asc, activ_str, expir_str); - + /* Make a semi-pretty display */ purple_notify_info( NULL, /* TODO: Find what the handle ought to be */ _("Certificate Information"), "", secondary); - + /* Cleanup */ g_free(cn); g_free(secondary); g_free(sha_asc); + g_free(activ_str); + g_free(expir_str); g_byte_array_free(sha_bin, TRUE); } diff -r 2f0960548c1d -r d5ecaf5bce93 libpurple/plugins/ssl/Makefile.mingw --- a/libpurple/plugins/ssl/Makefile.mingw Tue Aug 28 03:14:54 2007 +0000 +++ b/libpurple/plugins/ssl/Makefile.mingw Tue Aug 28 03:15:48 2007 +0000 @@ -18,6 +18,7 @@ $(NSS_TOP)/lib/nss3.dll \ $(NSS_TOP)/lib/nssckbi.dll \ $(NSS_TOP)/lib/softokn3.dll \ + $(NSS_TOP)/lib/smime3.dll \ $(NSS_TOP)/lib/ssl3.dll \ $(NSPR_TOP)/lib/nspr4.dll \ $(NSPR_TOP)/lib/plc4.dll \ @@ -59,7 +60,8 @@ -lpurple \ -lnss3 \ -lnspr4 \ - -lssl3 + -lssl3 \ + -lsmime3 include $(PIDGIN_COMMON_RULES) diff -r 2f0960548c1d -r d5ecaf5bce93 libpurple/sslconn.c --- a/libpurple/sslconn.c Tue Aug 28 03:14:54 2007 +0000 +++ b/libpurple/sslconn.c Tue Aug 28 03:15:48 2007 +0000 @@ -297,7 +297,9 @@ /* Although purple_ssl_is_supported will do the initialization on command, SSL plugins tend to register CertificateSchemes as well as providing SSL ops. */ - g_assert(ssl_init()); + if (!ssl_init()) { + purple_debug_error("sslconn", "Unable to initialize SSL.\n"); + } } void diff -r 2f0960548c1d -r d5ecaf5bce93 pidgin/Makefile.mingw --- a/pidgin/Makefile.mingw Tue Aug 28 03:14:54 2007 +0000 +++ b/pidgin/Makefile.mingw Tue Aug 28 03:15:48 2007 +0000 @@ -56,10 +56,11 @@ PIDGIN_C_SRC = \ gtkaccount.c \ gtkblist.c \ + gtkcertmgr.c \ + gtkcellrendererexpander.c \ + gtkcellrendererprogress.c \ gtkconn.c \ gtkconv.c \ - gtkcellrendererexpander.c \ - gtkcellrendererprogress.c \ gtkdebug.c \ gtkdialogs.c \ gtkdnd-hints.c \ diff -r 2f0960548c1d -r d5ecaf5bce93 pidgin/win32/nsis/pidgin-installer.nsi --- a/pidgin/win32/nsis/pidgin-installer.nsi Tue Aug 28 03:14:54 2007 +0000 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Tue Aug 28 03:15:48 2007 +0000 @@ -692,6 +692,9 @@ DeleteRegValue HKLM "${STARTUP_RUN_KEY}" "Pidgin" ; Remove Language preference info (TODO: check if NSIS removes this) + Delete "$INSTDIR\ca-certs\Equifax_Secure_CA.pem" + Delete "$INSTDIR\ca-certs\Verisign_RSA_Secure_Server_CA.pem" + RMDir "$INSTDIR\ca-certs" RMDir /r "$INSTDIR\locale" RMDir /r "$INSTDIR\pixmaps" RMDir /r "$INSTDIR\perlmod" @@ -763,6 +766,7 @@ Delete "$INSTDIR\plds4.dll" Delete "$INSTDIR\silc.dll" Delete "$INSTDIR\silcclient.dll" + Delete "$INSTDIR\smime3.dll" Delete "$INSTDIR\softokn3.dll" Delete "$INSTDIR\ssl3.dll" Delete "$INSTDIR\${PIDGIN_UNINST_EXE}" diff -r 2f0960548c1d -r d5ecaf5bce93 share/ca-certs/Makefile.mingw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/ca-certs/Makefile.mingw Tue Aug 28 03:15:48 2007 +0000 @@ -0,0 +1,21 @@ +# +# Makefile.mingw +# +# Description: Makefile for win32 (mingw) version of Pidgin ca-certs +# + +PIDGIN_TREE_TOP := ../.. +include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak + +datadir := $(PIDGIN_INSTALL_DIR) +include ./Makefile.am +cacertsdir := $(PIDGIN_INSTALL_DIR)/ca-certs + +.PHONY: install + +install: + if test '$(cacerts_DATA)'; then \ + mkdir -p $(cacertsdir); \ + cp $(cacerts_DATA) $(cacertsdir); \ + fi; +