Skip to content

Commit

Permalink
Lots of Android changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberphone committed Apr 15, 2019
1 parent c0637bd commit 7c08856
Show file tree
Hide file tree
Showing 15 changed files with 327 additions and 173 deletions.
18 changes: 16 additions & 2 deletions library/androidrefsrc/android/content/Context.java
@@ -1,7 +1,21 @@
package android.content;

import java.io.InputStream;
import java.io.OutputStream;

public class Context {

static int MODE_PRIVATE = 0;
public static int MODE_PRIVATE = 0;

public String getContentResolver() {
return null;
}

}
public InputStream openFileInput(String file) {
return null;
}

public OutputStream openFileOutput(String file, int mode) {
return null;
}
}
12 changes: 11 additions & 1 deletion library/androidrefsrc/android/provider/Settings.java
Expand Up @@ -2,4 +2,14 @@

public class Settings {

}
public static class Secure {

public static String ANDROID_ID = "does't matter here";

public static String getString(String whatever, String yes) {
return null;
}

}

}
@@ -1,5 +1,38 @@
package android.security.keystore;

import java.math.BigInteger;
import java.security.spec.ECGenParameterSpec;
import java.security.spec.AlgorithmParameterSpec;
import java.util.Date;

import javax.security.auth.x500.X500Principal;

public class KeyGenParameterSpec {

}
public static class Builder {
public Builder(String a, int b) {

}

public Builder setAlgorithmParameterSpec(AlgorithmParameterSpec g) {
return this;
}
public Builder setDigests(int alg) {
return this;
}
public Builder setCertificateSerialNumber(BigInteger serial) {
return this;
}
public Builder setCertificateNotBefore(Date date) {
return this;
}
public Builder setCertificateSubject(X500Principal name) {
return this;
}
public AlgorithmParameterSpec build() {
return null;
}

}

}
Expand Up @@ -2,4 +2,12 @@

public class KeyProperties {

}
public static String KEY_ALGORITHM_EC = "EC";
public static String KEY_ALGORITHM_RSA = "RSA";

public static int PURPOSE_SIGN = 2;
public static int PURPOSE_VERIFY = 4;

public static int DIGEST_SHA256 = 256;

}
@@ -0,0 +1,11 @@
package android.support.test;

import android.content.Context;

public class InstrumentationRegistry {

public static Context getTargetContext() {
return null;
}

}
Expand Up @@ -141,13 +141,25 @@ public class SKSReferenceImplementation implements SecureKeyStore, Serializable
static final String SKS_UPDATE_URL = null; // Change here to test or disable
static final boolean SKS_DEVICE_PIN_SUPPORT = false; // Change here to test or disable
static final boolean SKS_BIOMETRIC_SUPPORT = false; // Change here to test or disable
static final boolean SKS_RSA_EXPONENT_SUPPORT = true; // Change here to test or disable

///////////////////////////////////////////////////////////////////////////////////
// Default RSA support
///////////////////////////////////////////////////////////////////////////////////
static final boolean SKS_RSA_EXPONENT_SUPPORT = false;
static final short[] SKS_DEFAULT_RSA_SUPPORT = {2048};

//#else
static final String SKS_VENDOR_DESCRIPTION = "SKS Reference - Java Emulator Edition";
static final String SKS_UPDATE_URL = null; // Change here to test or disable
static final boolean SKS_DEVICE_PIN_SUPPORT = true; // Change here to test or disable
static final boolean SKS_BIOMETRIC_SUPPORT = true; // Change here to test or disable

///////////////////////////////////////////////////////////////////////////////////
// Default RSA support
///////////////////////////////////////////////////////////////////////////////////
static final boolean SKS_RSA_EXPONENT_SUPPORT = true; // Change here to test or disable
static final short[] SKS_DEFAULT_RSA_SUPPORT = {1024, 2048};

//#endif
static final int MAX_LENGTH_CRYPTO_DATA = 16384;
static final int MAX_LENGTH_EXTENSION_DATA = 65536;
Expand Down

0 comments on commit 7c08856

Please sign in to comment.