]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Import CRL/OCSP/strict flags
authorTobias Brunner <tobias@strongswan.org>
Wed, 20 Jun 2018 15:25:18 +0000 (17:25 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 3 Jul 2018 09:31:41 +0000 (11:31 +0200)
src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnProfileImportActivity.java

index e923473cc4c220b8b7f7870e2ccd6a4e74216989..596926bc3d28875765fab6c0623803155fc60e88 100644 (file)
@@ -475,6 +475,23 @@ public class VpnProfileImportActivity extends AppCompatActivity
                        flags |= VpnProfile.FLAGS_SUPPRESS_CERT_REQS;
                }
 
+               JSONObject revocation = remote.optJSONObject("revocation");
+               if (revocation != null)
+               {
+                       if (!revocation.optBoolean("crl", true))
+                       {
+                               flags |= VpnProfile.FLAGS_DISABLE_CRL;
+                       }
+                       if (!revocation.optBoolean("ocsp", true))
+                       {
+                               flags |= VpnProfile.FLAGS_DISABLE_OCSP;
+                       }
+                       if (revocation.optBoolean("strict", false))
+                       {
+                               flags |= VpnProfile.FLAGS_STRICT_REVOCATION;
+                       }
+               }
+
                JSONObject local = obj.optJSONObject("local");
                if (local != null)
                {