+2002-06-28 Bernhard Reiter <bernhard@intevation.de>
+
+ * gpgmeplug.c: new macro days_to_seconds().
+ this also fixes the dividing factor.
+ (signatureCertificateDaysLeftToExpiry)
+ (preceiverCertificateDaysLeftToExpiry): using the new macro
+
+ (caCertificateDaysLeftToExpiry)
+ (rootCertificateDaysLeftToExpiry): using new macro in deactivated code.
+
+
2002-06-27 Steffen Hansen <steffen@hrhansen.dk>
* gpgmeplug.c: Fixed pattern related bug.
#include "cryptplug.h"
+#define days_from_seconds(x) ((x)/86400)
+
+
typedef struct {
const char* bugURL;
const char* signatureKeyCertificate;
time_t expire_time = gpgme_key_get_ulong_attr(
rKey,GPGME_ATTR_EXPIRE, NULL, 0 );
time_t cur_time = time (NULL);
- daysLeft = expire_time - cur_time;
- // convert seconds into days
- daysLeft /= 43200;
+ daysLeft = days_from_seconds(expire_time - cur_time);
gpgme_key_release( rKey );
}
}
NULL, 0 );
time_t cur_time = time (NULL);
- daysLeft = expire_time - cur_time;
- // convert seconds into days
- daysLeft /= 43200;
+ daysLeft = days_from_seconds(expire_time - cur_time);
gpgme_key_release( rKey );
}
}
NULL, 0 );
time_t cur_time = time (NULL);
- daysLeft = expire_time - cur_time;
- // convert seconds into days
- daysLeft /= 43200;
+ daysLeft = days_from_seconds(expire_time - cur_time);
gpgme_key_release( rKey );
}
}
time_t expire_time = gpgme_key_get_ulong_attr(
rKey,GPGME_ATTR_EXPIRE, NULL, 0 );
time_t cur_time = time (NULL);
- daysLeft = expire_time - cur_time;
- // convert seconds into days
- daysLeft /= 43200;
+ daysLeft = days_from_seconds(expire_time - cur_time);
gpgme_key_release( rKey );
}
}