/pidgin/main: 21ef99aa6390: Fix merge issues from c3e87cb60c02
Daniel Atallah
datallah at pidgin.im
Fri Oct 3 11:14:18 EDT 2014
Changeset: 21ef99aa6390d410386b1fca2438bcdd6dc9a747
Author: Daniel Atallah <datallah at pidgin.im>
Date: 2014-10-03 11:14 -0400
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/21ef99aa6390
Description:
Fix merge issues from c3e87cb60c02
diffstat:
libpurple/plugins/ssl/ssl-nss.c | 64 ++++++++++++++++------------------------
libpurple/win32/global.mak | 32 +++++++++++++++++++-
2 files changed, 56 insertions(+), 40 deletions(-)
diffs (163 lines):
diff --git a/libpurple/plugins/ssl/ssl-nss.c b/libpurple/plugins/ssl/ssl-nss.c
--- a/libpurple/plugins/ssl/ssl-nss.c
+++ b/libpurple/plugins/ssl/ssl-nss.c
@@ -923,7 +923,7 @@ x509_check_name (PurpleCertificate *crt,
}
static gboolean
-x509_times (PurpleCertificate *crt, time_t *activation, time_t *expiration)
+x509_times (PurpleCertificate *crt, gint64 *activation, gint64 *expiration)
{
CERTCertificate *crt_dat;
PRTime nss_activ, nss_expir;
@@ -949,49 +949,37 @@ x509_times (PurpleCertificate *crt, time
if (activation) {
*activation = nss_activ;
-#if SIZEOF_TIME_T == 4
- /** Hack to deal with dates past the 32-bit barrier.
- Handling is different for signed vs unsigned 32-bit types.
- */
- if (*activation != nss_activ) {
- if (nss_activ < 0) {
- purple_debug_warning("nss",
- "Setting Activation Date to epoch to handle pre-epoch value\n");
- *activation = 0;
- } else {
- purple_debug_error("nss",
- "Activation date past 32-bit barrier, forcing invalidity\n");
- return FALSE;
- }
- }
-#endif
}
if (expiration) {
*expiration = nss_expir;
-#if SIZEOF_TIME_T == 4
- if (*expiration != nss_expir) {
- if (*expiration < nss_expir) {
- if (*expiration < 0) {
- purple_debug_warning("nss",
- "Setting Expiration Date to 32-bit signed max\n");
- *expiration = PR_INT32_MAX;
- } else {
- purple_debug_warning("nss",
- "Setting Expiration Date to 32-bit unsigned max\n");
- *expiration = PR_UINT32_MAX;
- }
- } else {
- purple_debug_error("nss",
- "Expiration date prior to unix epoch, forcing invalidity\n");
- return FALSE;
- }
- }
-#endif
}
return TRUE;
}
+static GByteArray *
+x509_get_der_data(PurpleCertificate *crt)
+{
+ CERTCertificate *crt_dat;
+ SECItem *dercrt;
+ GByteArray *data;
+
+ crt_dat = X509_NSS_DATA(crt);
+ g_return_val_if_fail(crt_dat, NULL);
+
+ dercrt = SEC_ASN1EncodeItem(NULL, NULL, crt_dat,
+ SEC_ASN1_GET(SEC_SignedCertificateTemplate));
+ g_return_val_if_fail(dercrt != NULL, FALSE);
+
+ data = g_byte_array_sized_new(dercrt->len);
+ memcpy(data->data, dercrt->data, dercrt->len);
+ data->len = dercrt->len;
+
+ SECITEM_FreeItem(dercrt, PR_TRUE);
+
+ return data;
+}
+
static PurpleCertificateScheme x509_nss = {
"x509", /* Scheme name */
N_("X.509 Certificates"), /* User-visible scheme name */
@@ -1007,9 +995,8 @@ static PurpleCertificateScheme x509_nss
x509_check_name, /* Check subject name */
x509_times, /* Activation/Expiration time */
x509_importcerts_from_file, /* Multiple certificate import function */
+ x509_get_der_data, /* Binary DER data */
- NULL,
- NULL,
NULL
};
@@ -1026,6 +1013,7 @@ static PurpleSslOps ssl_ops =
/* padding */
NULL,
NULL,
+ NULL,
NULL
};
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -75,6 +75,7 @@ GCCWARNINGS ?= -Waggregate-return -Wcast
CC_HARDENING_OPTIONS ?= -Wstack-protector -fwrapv -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security -fstack-protector-all --param ssp-buffer-size=1
LD_HARDENING_OPTIONS ?= -Wl,--dynamicbase -Wl,--nxcompat
+TAG := @$(PURPLE_TOP)/tag.sh
# parse the version number from the configure.ac file if it is newer
#m4_define([purple_major_version], [2])
@@ -116,18 +117,45 @@ DLL_LD_FLAGS += -Wl,--enable-auto-image-
ifeq "$(origin CC)" "default"
CC := gcc.exe
endif
-GMSGFMT ?= $(WIN32_DEV_TOP)/gettext-0.17/bin/msgfmt
+# comment out the next line to make output more verbose
+CC := $(TAG) "auto" $(CC)
+
+GMSGFMT ?= $(GETTEXT_TOP)/bin/msgfmt
MAKENSIS ?= makensis.exe
PERL ?= perl
WINDRES ?= windres
STRIP ?= strip
-INTLTOOL_MERGE ?= $(WIN32_DEV_TOP)/intltool_0.40.4-1_win32/bin/intltool-merge
+INTLTOOL_MERGE ?= $(INTLTOOL_TOP)/bin/intltool-merge
MONO_SIGNCODE ?= signcode
GPG_SIGN ?= gpg
+GLIB_GENMARSHAL ?= $(GTK_BIN)/glib-genmarshal
+GLIB_MKENUMS ?= $(GTK_BIN)/glib-mkenums
PIDGIN_COMMON_RULES := $(PURPLE_TOP)/win32/rules.mak
PIDGIN_COMMON_TARGETS := $(PURPLE_TOP)/win32/targets.mak
MINGW_MAKEFILE := Makefile.mingw
+MAKE_at := @
+
+USE_VV ?= 1
+
+ifeq "$(USE_VV)" "1"
+VV_LIBS := \
+ -lgstreamer-0.10 \
+ -lgstvideo-0.10 \
+ -lgstinterfaces-0.10 \
+ -lfarstream-0.1
+VV_INCLUDE_PATHS := \
+ -I$(GSTREAMER_TOP)/include/gstreamer-0.10 \
+ -I$(GSTREAMER_TOP)/include/farstream-0.1 \
+ -I$(LIBXML2_TOP)/include/libxml2
+VV_LIB_PATHS := \
+ -L$(GSTREAMER_TOP)/lib
+DEFINES += -DUSE_GSTREAMER -DUSE_VV
+else
+VV_LIBS :=
+VV_INCLUDE_PATHS :=
+VV_LIB_PATHS :=
+endif
INSTALL_PIXMAPS ?= 1
INSTALL_SSL_CERTIFICATES ?= 1
More information about the Commits
mailing list