diff options
author | Parménides GV <parmegv@sdf.org> | 2014-07-10 08:57:19 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-07-10 08:57:19 +0200 |
commit | 0a5c95eb01344aeccc3e3ed848166b6c02bedff9 (patch) | |
tree | 71d4ec041fd0162a8bef4b0b1ef9581b7e6511f3 /app/src/release/java/se/leap | |
parent | fccf31f212eeec368b84d86cfb3775c815fdaa2b (diff) | |
parent | a23c12674abd836b3abd4feeaf057236cfd0ca27 (diff) |
Merge branch 'bug/Certificate-expiration-#5821' into develop
Diffstat (limited to 'app/src/release/java/se/leap')
-rw-r--r-- | app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java index cdac8197..625125d8 100644 --- a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java +++ b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java @@ -43,6 +43,7 @@ import java.security.cert.CertificateEncodingException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.security.interfaces.RSAPrivateKey; +import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -190,6 +191,7 @@ public class ProviderAPI extends IntentService { receiver.send(LOGOUT_FAILED, Bundle.EMPTY); } } else if (action.equalsIgnoreCase(DOWNLOAD_CERTIFICATE)) { + Log.d(TAG, "action.equalsIgnoreCase(DOWNLOAD_CERTIFICATE)"); if(updateVpnCertificate()) { receiver.send(CORRECTLY_DOWNLOADED_CERTIFICATE, Bundle.EMPTY); } else { @@ -943,7 +945,7 @@ public class ProviderAPI extends IntentService { X509Certificate certCert = ConfigHelper.parseX509CertificateFromString(certificateString); certificateString = Base64.encodeToString( certCert.getEncoded(), Base64.DEFAULT); getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).edit().putString(EIP.CERTIFICATE, "-----BEGIN CERTIFICATE-----\n"+certificateString+"-----END CERTIFICATE-----").commit(); - + getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).edit().putString(EIP.DATE_FROM_CERTIFICATE, EIP.certificate_date_format.format(Calendar.getInstance().getTime())).commit(); return true; } catch (CertificateException e) { // TODO Auto-generated catch block |