Double check

This commit is contained in:
M66B
2021-07-16 15:05:54 +02:00
parent 3d07d3e3a8
commit c35643865f
11 changed files with 227 additions and 196 deletions

View File

@@ -20,14 +20,11 @@ package eu.faircode.email;
*/
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.text.TextUtils;
import android.util.Pair;
import androidx.preference.PreferenceManager;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERIA5String;
@@ -77,11 +74,8 @@ public class Bimi {
static Pair<Bitmap, Boolean> get(
Context context, String domain, String selector, int scaleToPixels)
throws IOException {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean bimi_vmc = prefs.getBoolean("bimi_vmc", false);
Bitmap bitmap = null;
boolean verified = !bimi_vmc;
boolean verified = false;
// Get DNS record
String txt = selector + "._bimi." + domain;
@@ -146,7 +140,7 @@ public class Bimi {
// Certificate link
case "a": {
if (!bimi_vmc)
if (verified)
continue;
String a = values.get(tag);