diff options
author | Daniel Atallah <datallah@pidgin.im> | 2007-10-09 20:12:48 +0000 |
---|---|---|
committer | Daniel Atallah <datallah@pidgin.im> | 2007-10-09 20:12:48 +0000 |
commit | 7f270b9849703ea0c4cae1d92cba96e8279be930 (patch) | |
tree | 06fabcf196dcc285a8e1c90198d97bbe3c07fd4d | |
parent | b9b58a5a6bfa4bdc56cc294665e13821aefc5e5b (diff) | |
download | pidgin-7f270b9849703ea0c4cae1d92cba96e8279be930.tar.gz |
Fix CID 318
-rw-r--r-- | libpurple/plugins/ssl/ssl-gnutls.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libpurple/plugins/ssl/ssl-gnutls.c b/libpurple/plugins/ssl/ssl-gnutls.c index c1f3869a1b..8c3aa45c3f 100644 --- a/libpurple/plugins/ssl/ssl-gnutls.c +++ b/libpurple/plugins/ssl/ssl-gnutls.c @@ -884,7 +884,7 @@ x509_times (PurpleCertificate *crt, time_t *activation, time_t *expiration) 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 @@ x509_times (PurpleCertificate *crt, time_t *activation, time_t *expiration) 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 */ |