Skip to content

Commit

Permalink
Merge pull request #1 from EventInfra/master
Browse files Browse the repository at this point in the history
Tested and verified 33c3 configuration
  • Loading branch information
eqvinox authored Dec 25, 2016
2 parents 7bdcfe4 + 359fb87 commit ca08e5b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
Binary file modified android/res/drawable-hdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/res/drawable-hdpi/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions android/res/layout/logon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
android:layout_width="fill_parent"
android:layout_height="200dp"
android:scaleType="fitCenter"
android:contentDescription="@string/EMF_LOGO"
android:src="@drawable/emflogo"
android:contentDescription="@string/LOGO"
android:src="@drawable/logo"
android:padding="0dp" />

<TextView
Expand Down
Binary file modified android/res/raw/cacert.der
Binary file not shown.
4 changes: 2 additions & 2 deletions android/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">EMF2016 Wifi Setup</string>
<string name="app_name">33c3 Wifi Setup</string>

<string name="TITLE_LOGON">Please logon</string>
<string name="Username">username@realm</string>
Expand All @@ -18,5 +18,5 @@
<string name="EXIT_TITLE">Exit</string>

<string name="ABOUT_CONTENT">This small helper app creates a Wifi connection entry for the Electromagnetic Field 2016 network. It configures the correct SSL CA and subject name match, making it a little more secure than a hand-created entry.</string>
<string name="EMF_LOGO">Electromagnetic Field Logo</string>
<string name="LOGO">33c3 Logo</string>
</resources>
15 changes: 10 additions & 5 deletions android/src/tf/nox/wifisetup/WifiSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public class WifiSetup extends Activity {
private static final String INT_PRIVATE_KEY = "private_key";
private static final String INT_PRIVATE_KEY_ID = "key_id";
private static final String INT_SUBJECT_MATCH = "subject_match";
private static final String INT_ALTSUBJECT_MATCH = "altsubject_match";
private static final String INT_PASSWORD = "password";
private static final String INT_IDENTITY = "identity";
private static final String INT_ANONYMOUS_IDENTITY = "anonymous_identity";
Expand All @@ -115,6 +116,8 @@ public class WifiSetup extends Activity {
private CheckBox check5g;
private Button btn;
private String subject_match;
private String altsubject_match;

private String realm;
private String ssid;
private boolean busy = false;
Expand Down Expand Up @@ -253,18 +256,19 @@ private void saveWifiConfig() {
}

if (check5g.isChecked()) {
ssid = "emfcamp";
ssid = "33C3";
} else {
ssid = "emfcamp-legacy";
ssid = "33C3-legacy";
}
subject_match = "/C=GB/CN=radius.emf.camp";
subject_match = "/CN=radius.c3noc.net";
altsubject_match = "DNS:radius.c3noc.net";

s_username = username.getText().toString();
s_password = password.getText().toString();
realm = "";
if (s_username.equals("") && s_password.equals("")) {
s_username = "emfdroid";
s_password = "emfdroid";
s_username = "33c3";
s_password = "33c3";
} else {
if (s_username.indexOf("@") >= 0) {
int idx = s_username.indexOf("@");
Expand Down Expand Up @@ -315,6 +319,7 @@ private void saveWifiConfig() {
// Enterprise Settings
HashMap<String,String> configMap = new HashMap<String,String>();
configMap.put(INT_SUBJECT_MATCH, subject_match);
configMap.put(INT_ALTSUBJECT_MATCH, altsubject_match);
configMap.put(INT_ANONYMOUS_IDENTITY, "anonymous" + realm);
configMap.put(INT_IDENTITY, s_username);
configMap.put(INT_PASSWORD, s_password);
Expand Down

0 comments on commit ca08e5b

Please sign in to comment.