diff libpurple/plugins/ssl/ssl-gnutls.c @ 20332:3a9709bfde65

applied changes from 4d50bf3b08569aa2108a9f5da47fb1548d0c7dd9 through 525a410c03e7e16535f3fe683f9651283109265d applied changes from 525a410c03e7e16535f3fe683f9651283109265d through d4b316d73ebaf93803ca2642e78b8821c3b5d5c7
author Luke Schierer <lschiere@pidgin.im>
date Fri, 19 Oct 2007 18:27:12 +0000
parents 3b459f294dc1
children 3cc856ca2338
line wrap: on
line diff
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Fri Oct 19 18:24:58 2007 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Fri Oct 19 18:27:12 2007 +0000
@@ -884,7 +884,7 @@
 	gnutls_x509_crt crt_dat;
 	/* GnuTLS time functions return this on error */
 	const time_t errval = (time_t) (-1);
-
+	gboolean success = TRUE;
 
 	g_return_val_if_fail(crt, FALSE);
 	g_return_val_if_fail(crt->scheme == &x509_gnutls, FALSE);
@@ -893,16 +893,16 @@
 
 	if (activation) {
 		*activation = gnutls_x509_crt_get_activation_time(crt_dat);
+		if (*activation == errval)
+			success = FALSE;
 	}
 	if (expiration) {
 		*expiration = gnutls_x509_crt_get_expiration_time(crt_dat);
+		if (*expiration == errval)
+			success = FALSE;
 	}
 
-	if (*activation == errval || *expiration == errval) {
-		return FALSE;
-	}
-
-	return TRUE;
+	return success;
 }
 
 /* X.509 certificate operations provided by this plugin */