# HG changeset patch # User Daniel Atallah # Date 1191960768 0 # Node ID 296aaf148aed019a6c3c63cf59f5fa9dd13051af # Parent 6668c0cd4687115c4b388614d744b94ddb4ea00f Fix CID 318 diff -r 6668c0cd4687 -r 296aaf148aed libpurple/plugins/ssl/ssl-gnutls.c --- a/libpurple/plugins/ssl/ssl-gnutls.c Tue Oct 09 19:28:48 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-gnutls.c Tue Oct 09 20:12:48 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 */