android: Import the flag to suppress certificate requests
This commit is contained in:
+7
@@ -463,6 +463,7 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ParsedVpnProfile profile = new ParsedVpnProfile();
|
ParsedVpnProfile profile = new ParsedVpnProfile();
|
||||||
|
Integer flags = 0;
|
||||||
|
|
||||||
profile.setUUID(uuid);
|
profile.setUUID(uuid);
|
||||||
profile.setName(obj.getString("name"));
|
profile.setName(obj.getString("name"));
|
||||||
@@ -475,6 +476,11 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
|||||||
profile.setRemoteId(remote.optString("id", null));
|
profile.setRemoteId(remote.optString("id", null));
|
||||||
profile.Certificate = decodeBase64(remote.optString("cert", null));
|
profile.Certificate = decodeBase64(remote.optString("cert", null));
|
||||||
|
|
||||||
|
if (remote.optBoolean("certreq", false))
|
||||||
|
{
|
||||||
|
flags |= VpnProfile.FLAGS_SUPPRESS_CERT_REQS;
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject local = obj.optJSONObject("local");
|
JSONObject local = obj.optJSONObject("local");
|
||||||
if (local != null)
|
if (local != null)
|
||||||
{
|
{
|
||||||
@@ -517,6 +523,7 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
|||||||
profile.setSelectedApps(excludedApps);
|
profile.setSelectedApps(excludedApps);
|
||||||
profile.setSelectedAppsHandling(SelectedAppsHandling.SELECTED_APPS_EXCLUDE);
|
profile.setSelectedAppsHandling(SelectedAppsHandling.SELECTED_APPS_EXCLUDE);
|
||||||
}
|
}
|
||||||
|
profile.setFlags(flags);
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user