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;
|
||||
}
|
||||
ParsedVpnProfile profile = new ParsedVpnProfile();
|
||||
Integer flags = 0;
|
||||
|
||||
profile.setUUID(uuid);
|
||||
profile.setName(obj.getString("name"));
|
||||
@@ -475,6 +476,11 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
||||
profile.setRemoteId(remote.optString("id", null));
|
||||
profile.Certificate = decodeBase64(remote.optString("cert", null));
|
||||
|
||||
if (remote.optBoolean("certreq", false))
|
||||
{
|
||||
flags |= VpnProfile.FLAGS_SUPPRESS_CERT_REQS;
|
||||
}
|
||||
|
||||
JSONObject local = obj.optJSONObject("local");
|
||||
if (local != null)
|
||||
{
|
||||
@@ -517,6 +523,7 @@ public class VpnProfileImportActivity extends AppCompatActivity
|
||||
profile.setSelectedApps(excludedApps);
|
||||
profile.setSelectedAppsHandling(SelectedAppsHandling.SELECTED_APPS_EXCLUDE);
|
||||
}
|
||||
profile.setFlags(flags);
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user