Package io.jans.fido2.androind
Class AndroidKeyUtils
- java.lang.Object
-
- io.jans.fido2.androind.AndroidKeyUtils
-
@ApplicationScoped public class AndroidKeyUtils extends Object
Taken from https://github.com/googlesamples/android-key-attestation/blob/master/server/src/main/java/com/android/example/KeyAttestationExample.java
-
-
Field Summary
Fields Modifier and Type Field Description static int
ATTESTATION_CHALLENGE_INDEX
static int
ATTESTATION_SECURITY_LEVEL_INDEX
static int
ATTESTATION_VERSION_INDEX
static int
EXPECTED_ATTESTATION_VERSION
static int
HW_AUTH_FINGERPRINT
static int
HW_AUTH_PASSWORD
static String
KEY_DESCRIPTION_OID
static int
KEYMASTER_SECURITY_LEVEL_INDEX
static int
KM_ALGORITHM_EC
static int
KM_ORIGIN_GENERATED
static int
KM_PURPOSE_SIGN
static int
KM_SECURITY_LEVEL_SOFTWARE
static int
KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT
static int
KM_TAG_ALGORITHM
static int
KM_TAG_AUTH_TIMEOUT
static int
KM_TAG_KEY_SIZE
static int
KM_TAG_ORIGIN
static int
KM_TAG_PURPOSE
static int
KM_TAG_ROLLBACK_RESISTANT
static int
KM_TAG_USER_AUTH_TYPE
static int
SW_ENFORCED_INDEX
static int
TEE_ENFORCED_INDEX
-
Constructor Summary
Constructors Constructor Description AndroidKeyUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
bigIntegerToInt(BigInteger bigInt)
org.bouncycastle.asn1.ASN1Sequence
extractAttestationSequence(X509Certificate attestationCert)
static int
getIntegerFromAsn1(org.bouncycastle.asn1.ASN1Encodable asn1Value)
-
-
-
Field Detail
-
KEY_DESCRIPTION_OID
public static final String KEY_DESCRIPTION_OID
- See Also:
- Constant Field Values
-
ATTESTATION_VERSION_INDEX
public static final int ATTESTATION_VERSION_INDEX
- See Also:
- Constant Field Values
-
ATTESTATION_SECURITY_LEVEL_INDEX
public static final int ATTESTATION_SECURITY_LEVEL_INDEX
- See Also:
- Constant Field Values
-
KEYMASTER_SECURITY_LEVEL_INDEX
public static final int KEYMASTER_SECURITY_LEVEL_INDEX
- See Also:
- Constant Field Values
-
ATTESTATION_CHALLENGE_INDEX
public static final int ATTESTATION_CHALLENGE_INDEX
- See Also:
- Constant Field Values
-
SW_ENFORCED_INDEX
public static final int SW_ENFORCED_INDEX
- See Also:
- Constant Field Values
-
TEE_ENFORCED_INDEX
public static final int TEE_ENFORCED_INDEX
- See Also:
- Constant Field Values
-
KM_TAG_PURPOSE
public static final int KM_TAG_PURPOSE
- See Also:
- Constant Field Values
-
KM_TAG_ALGORITHM
public static final int KM_TAG_ALGORITHM
- See Also:
- Constant Field Values
-
KM_TAG_KEY_SIZE
public static final int KM_TAG_KEY_SIZE
- See Also:
- Constant Field Values
-
KM_TAG_USER_AUTH_TYPE
public static final int KM_TAG_USER_AUTH_TYPE
- See Also:
- Constant Field Values
-
KM_TAG_AUTH_TIMEOUT
public static final int KM_TAG_AUTH_TIMEOUT
- See Also:
- Constant Field Values
-
KM_TAG_ORIGIN
public static final int KM_TAG_ORIGIN
- See Also:
- Constant Field Values
-
KM_TAG_ROLLBACK_RESISTANT
public static final int KM_TAG_ROLLBACK_RESISTANT
- See Also:
- Constant Field Values
-
KM_PURPOSE_SIGN
public static final int KM_PURPOSE_SIGN
- See Also:
- Constant Field Values
-
KM_ALGORITHM_EC
public static final int KM_ALGORITHM_EC
- See Also:
- Constant Field Values
-
HW_AUTH_PASSWORD
public static final int HW_AUTH_PASSWORD
- See Also:
- Constant Field Values
-
HW_AUTH_FINGERPRINT
public static final int HW_AUTH_FINGERPRINT
- See Also:
- Constant Field Values
-
KM_ORIGIN_GENERATED
public static final int KM_ORIGIN_GENERATED
- See Also:
- Constant Field Values
-
KM_SECURITY_LEVEL_SOFTWARE
public static final int KM_SECURITY_LEVEL_SOFTWARE
- See Also:
- Constant Field Values
-
KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT
public static final int KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT
- See Also:
- Constant Field Values
-
EXPECTED_ATTESTATION_VERSION
public static final int EXPECTED_ATTESTATION_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIntegerFromAsn1
public static int getIntegerFromAsn1(org.bouncycastle.asn1.ASN1Encodable asn1Value) throws Exception
- Throws:
Exception
-
bigIntegerToInt
public static int bigIntegerToInt(BigInteger bigInt) throws Exception
- Throws:
Exception
-
extractAttestationSequence
public org.bouncycastle.asn1.ASN1Sequence extractAttestationSequence(X509Certificate attestationCert) throws Exception, IOException
- Throws:
Exception
IOException
-
-