Search in sources :

Example 1 with Asn1Octets

use of com.android.hotspot2.asn1.Asn1Octets in project android_frameworks_base by AOSPA.

the class SPVerifier method getExtension.

private static Asn1Object getExtension(X509Certificate certificate, String extension) throws GeneralSecurityException, IOException {
    byte[] data = certificate.getExtensionValue(extension);
    if (data == null) {
        return null;
    }
    Asn1Octets octetString = (Asn1Octets) Asn1Decoder.decode(ByteBuffer.wrap(data)).iterator().next();
    Asn1Constructed sequence = castObject(Asn1Decoder.decode(ByteBuffer.wrap(octetString.getOctets())).iterator().next(), Asn1Constructed.class);
    Log.d(OSUManager.TAG, "Extension " + extension + ": " + sequence);
    return sequence;
}
Also used : Asn1Constructed(com.android.hotspot2.asn1.Asn1Constructed) Asn1Octets(com.android.hotspot2.asn1.Asn1Octets)

Example 2 with Asn1Octets

use of com.android.hotspot2.asn1.Asn1Octets in project android_frameworks_base by crdroidandroid.

the class SPVerifier method getExtension.

private static Asn1Object getExtension(X509Certificate certificate, String extension) throws GeneralSecurityException, IOException {
    byte[] data = certificate.getExtensionValue(extension);
    if (data == null) {
        return null;
    }
    Asn1Octets octetString = (Asn1Octets) Asn1Decoder.decode(ByteBuffer.wrap(data)).iterator().next();
    Asn1Constructed sequence = castObject(Asn1Decoder.decode(ByteBuffer.wrap(octetString.getOctets())).iterator().next(), Asn1Constructed.class);
    Log.d(OSUManager.TAG, "Extension " + extension + ": " + sequence);
    return sequence;
}
Also used : Asn1Constructed(com.android.hotspot2.asn1.Asn1Constructed) Asn1Octets(com.android.hotspot2.asn1.Asn1Octets)

Example 3 with Asn1Octets

use of com.android.hotspot2.asn1.Asn1Octets in project platform_frameworks_base by android.

the class SPVerifier method getExtension.

private static Asn1Object getExtension(X509Certificate certificate, String extension) throws GeneralSecurityException, IOException {
    byte[] data = certificate.getExtensionValue(extension);
    if (data == null) {
        return null;
    }
    Asn1Octets octetString = (Asn1Octets) Asn1Decoder.decode(ByteBuffer.wrap(data)).iterator().next();
    Asn1Constructed sequence = castObject(Asn1Decoder.decode(ByteBuffer.wrap(octetString.getOctets())).iterator().next(), Asn1Constructed.class);
    Log.d(OSUManager.TAG, "Extension " + extension + ": " + sequence);
    return sequence;
}
Also used : Asn1Constructed(com.android.hotspot2.asn1.Asn1Constructed) Asn1Octets(com.android.hotspot2.asn1.Asn1Octets)

Example 4 with Asn1Octets

use of com.android.hotspot2.asn1.Asn1Octets in project android_frameworks_base by DirtyUnicorns.

the class SPVerifier method getExtension.

private static Asn1Object getExtension(X509Certificate certificate, String extension) throws GeneralSecurityException, IOException {
    byte[] data = certificate.getExtensionValue(extension);
    if (data == null) {
        return null;
    }
    Asn1Octets octetString = (Asn1Octets) Asn1Decoder.decode(ByteBuffer.wrap(data)).iterator().next();
    Asn1Constructed sequence = castObject(Asn1Decoder.decode(ByteBuffer.wrap(octetString.getOctets())).iterator().next(), Asn1Constructed.class);
    Log.d(OSUManager.TAG, "Extension " + extension + ": " + sequence);
    return sequence;
}
Also used : Asn1Constructed(com.android.hotspot2.asn1.Asn1Constructed) Asn1Octets(com.android.hotspot2.asn1.Asn1Octets)

Example 5 with Asn1Octets

use of com.android.hotspot2.asn1.Asn1Octets in project android_frameworks_base by ResurrectionRemix.

the class SPVerifier method getExtension.

private static Asn1Object getExtension(X509Certificate certificate, String extension) throws GeneralSecurityException, IOException {
    byte[] data = certificate.getExtensionValue(extension);
    if (data == null) {
        return null;
    }
    Asn1Octets octetString = (Asn1Octets) Asn1Decoder.decode(ByteBuffer.wrap(data)).iterator().next();
    Asn1Constructed sequence = castObject(Asn1Decoder.decode(ByteBuffer.wrap(octetString.getOctets())).iterator().next(), Asn1Constructed.class);
    Log.d(OSUManager.TAG, "Extension " + extension + ": " + sequence);
    return sequence;
}
Also used : Asn1Constructed(com.android.hotspot2.asn1.Asn1Constructed) Asn1Octets(com.android.hotspot2.asn1.Asn1Octets)

Aggregations

Asn1Constructed (com.android.hotspot2.asn1.Asn1Constructed)5 Asn1Octets (com.android.hotspot2.asn1.Asn1Octets)5