mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
android: Import the flag to suppress certificate requests
This commit is contained in:
parent
3f0592d0fd
commit
11eb7e0898
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user