From 82d93d26029e91c7543d21a38a06fe66d5f77ed8 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 9 Jun 2017 22:19:04 -0400 Subject: [PATCH] move variables in scope --- src/Android/Services/KeyStoreBackedStorageService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Android/Services/KeyStoreBackedStorageService.cs b/src/Android/Services/KeyStoreBackedStorageService.cs index 74a34463b..e884d0b23 100644 --- a/src/Android/Services/KeyStoreBackedStorageService.cs +++ b/src/Android/Services/KeyStoreBackedStorageService.cs @@ -123,13 +123,14 @@ namespace Bit.Android.Services } var gen = KeyPairGenerator.GetInstance(KeyProperties.KeyAlgorithmRsa, AndroidKeyStore); - var start = Calendar.Instance; - var end = Calendar.Instance; - end.Add(CalendarField.Year, 30); var subject = new X500Principal($"CN={KeyAlias}"); if(_oldAndroid) { + var start = Calendar.Instance; + var end = Calendar.Instance; + end.Add(CalendarField.Year, 30); + var spec = new KeyPairGeneratorSpec.Builder(Application.Context) .SetAlias(KeyAlias) .SetSubject(subject)