leapcode/bitmask_android — pull request #125 by parmegv (2014-07-02 19:27:12+00:00)
Title: Bug/certificate expiration #5821

This makes bitmask android to download a new certificate if the current one is going to expire within 7 days.

To test this, I've used this code on EIP.java

As a global variable: private static int simulate_certificate_expiration = 0;
To artificially make the certificate "obsolete", in private void checkCertValidity():
Log.d(TAG, "simulate certificate expiration = " + simulate_certificate_expiration);
if(simulate_certificate_expiration > 4) {
offset_date.add(Calendar.DATE, 120);
simulate_certificate_expiration = 0;
} else
offset_date.add(Calendar.DATE, 7);
simulate_certificate_expiration++;