From e1a98e795689d23f3bb75f4ffc6fc76d00e9c147 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 3 Jul 2013 16:27:36 +0200 Subject: [PATCH] android: Add information about transmitted data if EAP-TNC is selected --- .../res/layout/profile_detail_view.xml | 5 +++ .../android/res/values-de/strings.xml | 3 ++ .../android/res/values-pl/strings.xml | 3 ++ .../android/res/values-ru/strings.xml | 3 ++ .../android/res/values-ua/strings.xml | 3 ++ src/frontends/android/res/values/strings.xml | 3 ++ .../android/ui/VpnProfileDetailActivity.java | 37 +++++++++++++++++++ 7 files changed, 57 insertions(+) diff --git a/src/frontends/android/res/layout/profile_detail_view.xml b/src/frontends/android/res/layout/profile_detail_view.xml index 801ced69be..91cd345ffc 100644 --- a/src/frontends/android/res/layout/profile_detail_view.xml +++ b/src/frontends/android/res/layout/profile_detail_view.xml @@ -65,6 +65,11 @@ android:spinnerMode="dropdown" android:entries="@array/vpn_types" /> + + Bitte geben Sie hier Ihren Benutzernamen ein Kein CA-Zertifikat ausgewählt Bitte wählen Sie eines aus oder aktivieren Sie Automatisch wählen + EAP-TNC kann Ihre Privatsphäre beeinträchtigen + Gerätedaten werden an den Gateway-Betreiber gesendet + <p>Trusted Network Connect (TNC) erlaubt Gateway-Betreibern den Gesundheitszustand von Endgeräten zu prüfen.</p><p>Dazu kann der Betreiber Daten verlangen, wie etwa eine eindeutige Identifikationsnummer, eine Liste der installierten Pakete, Systemeinstellungen oder kryptografische Prüfsummen von Dateien.</p><b>Solche Daten werden nur übermittelt nachdem die Identität des Gateways geprüft wurde.</b> CA-Zertifikate diff --git a/src/frontends/android/res/values-pl/strings.xml b/src/frontends/android/res/values-pl/strings.xml index 18f886f3f7..7aa9c51a7f 100644 --- a/src/frontends/android/res/values-pl/strings.xml +++ b/src/frontends/android/res/values-pl/strings.xml @@ -69,6 +69,9 @@ Wprowadź swoją nazwę użytkownika Nie wybrano żadnego certyfikatu CA Wybierz lub uaktywnij jeden Wybierz automatycznie + EAP-TNC may affect your privacy + Device data is sent to the gateway operator + <p>Trusted Network Connect (TNC) allows gateway operators to assess the health of a client device.</p><p>For that purpose the gateway operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the gateway\'s identity.</b> Certyfikaty CA diff --git a/src/frontends/android/res/values-ru/strings.xml b/src/frontends/android/res/values-ru/strings.xml index fdb72b5491..3838485afe 100644 --- a/src/frontends/android/res/values-ru/strings.xml +++ b/src/frontends/android/res/values-ru/strings.xml @@ -66,6 +66,9 @@ Пожалуйста введите имя пользователя Не выбран сертификат CA Пожалуйста выберите один Выбрать автоматически + EAP-TNC may affect your privacy + Device data is sent to the gateway operator + <p>Trusted Network Connect (TNC) allows gateway operators to assess the health of a client device.</p><p>For that purpose the gateway operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the gateway\'s identity.</b> Сертификаты CA diff --git a/src/frontends/android/res/values-ua/strings.xml b/src/frontends/android/res/values-ua/strings.xml index 7c9e124e32..df016ff8ff 100644 --- a/src/frontends/android/res/values-ua/strings.xml +++ b/src/frontends/android/res/values-ua/strings.xml @@ -67,6 +67,9 @@ Введіть ім\'я користувача тут Не вибрано сертифікат CA Будь ласка виберіть один Вибрати автоматично + EAP-TNC may affect your privacy + Device data is sent to the gateway operator + <p>Trusted Network Connect (TNC) allows gateway operators to assess the health of a client device.</p><p>For that purpose the gateway operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the gateway\'s identity.</b> Сертифікати CA diff --git a/src/frontends/android/res/values/strings.xml b/src/frontends/android/res/values/strings.xml index 94d246416d..1809489690 100644 --- a/src/frontends/android/res/values/strings.xml +++ b/src/frontends/android/res/values/strings.xml @@ -69,6 +69,9 @@ Please enter your username here No CA certificate selected Please select one or activate Select automatically + EAP-TNC may affect your privacy + Device data is sent to the gateway operator + <p>Trusted Network Connect (TNC) allows gateway operators to assess the health of a client device.</p><p>For that purpose the gateway operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the gateway\'s identity.</b> CA certificates diff --git a/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java b/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java index 91e521cf44..baad9611d4 100644 --- a/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java +++ b/src/frontends/android/src/org/strongswan/android/ui/VpnProfileDetailActivity.java @@ -28,6 +28,8 @@ import org.strongswan.android.logic.TrustedCertificateManager; import android.app.Activity; import android.app.AlertDialog; +import android.app.Dialog; +import android.app.DialogFragment; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -36,6 +38,7 @@ import android.os.Bundle; import android.security.KeyChain; import android.security.KeyChainAliasCallback; import android.security.KeyChainException; +import android.text.Html; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -73,6 +76,7 @@ public class VpnProfileDetailActivity extends Activity private TwoLineListItem mSelectUserCert; private CheckBox mCheckAuto; private TwoLineListItem mSelectCert; + private TwoLineListItem mTncNotice; @Override public void onCreate(Bundle savedInstanceState) @@ -90,6 +94,7 @@ public class VpnProfileDetailActivity extends Activity mName = (EditText)findViewById(R.id.name); mGateway = (EditText)findViewById(R.id.gateway); mSelectVpnType = (Spinner)findViewById(R.id.vpn_type); + mTncNotice = (TwoLineListItem)findViewById(R.id.tnc_notice); mUsernamePassword = (ViewGroup)findViewById(R.id.username_password_group); mUsername = (EditText)findViewById(R.id.username); @@ -117,6 +122,16 @@ public class VpnProfileDetailActivity extends Activity } }); + mTncNotice.getText1().setText(R.string.tnc_notice_title); + mTncNotice.getText2().setText(R.string.tnc_notice_subtitle); + mTncNotice.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) + { + new TncNoticeDialog().show(VpnProfileDetailActivity.this.getFragmentManager(), "TncNotice"); + } + }); + mSelectUserCert.setOnClickListener(new SelectUserCertOnClickListener()); mCheckAuto.setOnCheckedChangeListener(new OnCheckedChangeListener() { @@ -225,6 +240,7 @@ public class VpnProfileDetailActivity extends Activity { mUsernamePassword.setVisibility(mVpnType.getRequiresUsernamePassword() ? View.VISIBLE : View.GONE); mUserCertificate.setVisibility(mVpnType.getRequiresCertificate() ? View.VISIBLE : View.GONE); + mTncNotice.setVisibility(mVpnType.getEnableBYOD() ? View.VISIBLE : View.GONE); if (mVpnType.getRequiresCertificate()) { @@ -536,4 +552,25 @@ public class VpnProfileDetailActivity extends Activity updateCredentialView(); } } + + /** + * Dialog with notification message if EAP-TNC is used. + */ + public static class TncNoticeDialog extends DialogFragment + { + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) + { + return new AlertDialog.Builder(getActivity()) + .setTitle(R.string.tnc_notice_title) + .setMessage(Html.fromHtml(getString(R.string.tnc_notice_details))) + .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int id) + { + dialog.dismiss(); + } + }).create(); + } + } } -- 2.47.2