# HG changeset patch # User William Ehlhardt # Date 1189655087 0 # Node ID 4f870bb6d3e6c1045a5caa3d7f43454b9eb6cdd0 # Parent 4840b100e14f7127f6a8ff9107eeb237fb1163eb - Fix ssl-nss x509 to properly convert NSPR PRTime to time_t (in English, this means that x509_times works now) diff -r 4840b100e14f -r 4f870bb6d3e6 libpurple/plugins/ssl/ssl-nss.c --- a/libpurple/plugins/ssl/ssl-nss.c Thu Sep 13 03:16:23 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-nss.c Thu Sep 13 03:44:47 2007 +0000 @@ -668,11 +668,14 @@ &nss_activ, &nss_expir), FALSE); + /* NSS's native PRTime type *almost* corresponds to time_t; however, + it measures *microseconds* since the epoch, not seconds. Hence + the funny conversion. */ if (activation) { - *activation = nss_activ; + *activation = nss_activ / 1000000; } if (expiration) { - *expiration = nss_expir; + *expiration = nss_expir / 1000000; } return TRUE;