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 intATTESTATION_CHALLENGE_INDEXstatic intATTESTATION_SECURITY_LEVEL_INDEXstatic intATTESTATION_VERSION_INDEXstatic intEXPECTED_ATTESTATION_VERSIONstatic intHW_AUTH_FINGERPRINTstatic intHW_AUTH_PASSWORDstatic StringKEY_DESCRIPTION_OIDstatic intKEYMASTER_SECURITY_LEVEL_INDEXstatic intKM_ALGORITHM_ECstatic intKM_ORIGIN_GENERATEDstatic intKM_PURPOSE_SIGNstatic intKM_SECURITY_LEVEL_SOFTWAREstatic intKM_SECURITY_LEVEL_TRUSTED_ENVIRONMENTstatic intKM_TAG_ALGORITHMstatic intKM_TAG_AUTH_TIMEOUTstatic intKM_TAG_KEY_SIZEstatic intKM_TAG_ORIGINstatic intKM_TAG_PURPOSEstatic intKM_TAG_ROLLBACK_RESISTANTstatic intKM_TAG_USER_AUTH_TYPEstatic intSW_ENFORCED_INDEXstatic intTEE_ENFORCED_INDEX
-
Constructor Summary
Constructors Constructor Description AndroidKeyUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intbigIntegerToInt(BigInteger bigInt)org.bouncycastle.asn1.ASN1SequenceextractAttestationSequence(X509Certificate attestationCert)static intgetIntegerFromAsn1(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:
ExceptionIOException
-
-