Skip to content

Commit

Permalink
Update KeyStoreHelper.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mohappsdev authored Apr 22, 2020
1 parent 517e9eb commit 7bfad79
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ private static void createKeysJBMR2(Context context, String alias)
kpGenerator.initialize(spec);
kpGenerator.generateKeyPair();
}


//this is for API 23 only
private static void setLocale(Context context, Locale locale) {
Resources resources = context.getResources();
Configuration configuration = resources.getConfiguration();
Expand Down Expand Up @@ -165,7 +166,7 @@ public static boolean isSigningKey(String alias) {
* Returns the private key signature on JBMR2+ or else null.
*/
public static String getSigningKey(String alias) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
KeyStore.PrivateKeyEntry keyEntry = getPrivateKeyEntry(alias);
if (keyEntry == null) {
return null;
Expand Down Expand Up @@ -323,4 +324,4 @@ public interface SecurityConstants {
String SIGNATURE_SHA256withRSA = "SHA256withRSA";
String SIGNATURE_SHA512withRSA = "SHA512withRSA";
}
}
}

0 comments on commit 7bfad79

Please sign in to comment.