├── android ├── lint.xml ├── res │ ├── raw │ │ ├── cacert.der │ │ └── apache_license_2.0.txt │ ├── values │ │ ├── arrays.xml │ │ └── strings.xml │ ├── drawable-hdpi │ │ ├── icon.png │ │ ├── logo.png │ │ ├── emflogo.png │ │ ├── shalogo.png │ │ └── ccc34c3logo.png │ ├── drawable-ldpi │ │ └── icon.png │ ├── drawable-mdpi │ │ └── icon.png │ ├── drawable │ │ └── rectangle.xml │ ├── menu │ │ └── options_menu.xml │ ├── xml │ │ └── userpreferences.xml │ └── layout │ │ └── logon.xml ├── project.properties ├── android.iml ├── AndroidManifest.xml └── src │ └── tf │ └── nox │ └── wifisetup │ └── WifiSetup.java └── htdocs ├── config.inc.php ├── include ├── certificatestore.inc.php └── ldap.inc.php └── index.php /android/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/res/raw/cacert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/raw/cacert.der -------------------------------------------------------------------------------- /android/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /android/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /android/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /android/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /android/res/drawable-hdpi/emflogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-hdpi/emflogo.png -------------------------------------------------------------------------------- /android/res/drawable-hdpi/shalogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-hdpi/shalogo.png -------------------------------------------------------------------------------- /android/res/drawable-hdpi/ccc34c3logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eqvinox/wifisetup/HEAD/android/res/drawable-hdpi/ccc34c3logo.png -------------------------------------------------------------------------------- /android/res/drawable/rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/res/menu/options_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-21 15 | -------------------------------------------------------------------------------- /android/res/xml/userpreferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 34C3 Wifi Setup 4 | 5 | Please logon 6 | username@realm 7 | password 8 | Create connection entry 9 | 10 | https://twitter.com/c3noc 11 | 12 | This device supports the 5GHz band 13 | (Unfortunately, autodetecting 5GHz support is broken...) 14 | Note: if you have no screen lock, Android refuses to store the security settings! 15 | 16 | 17 | About 18 | Exit 19 | 20 | This small helper app creates a Wifi connection entry for the CCC/EMF/SHA2017 networks. It configures the correct SSL CA and subject name match, making it a little more secure than a hand-created entry. 21 | 34C3 Logo 22 | 23 | -------------------------------------------------------------------------------- /android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /htdocs/config.inc.php: -------------------------------------------------------------------------------- 1 | . 22 | */ 23 | class CertificateStore extends PDO { 24 | 25 | private $dsn; 26 | private $user; 27 | private $pass; 28 | private $assigned_serial; 29 | 30 | public function __construct() { 31 | $in_transaction = false; 32 | 33 | $this->user = SQL_USER; 34 | $this->pass = SQL_PASS; 35 | $this->dsn = SQL_DSN; 36 | parent::__construct($this->dsn, $this->user, $this->pass); 37 | } 38 | 39 | public function assign_serial($username, $device_serial, $device_id, $device_description) { 40 | if (!$this->inTransaction()) { 41 | $this->beginTransaction(); 42 | } 43 | $stm = $this->prepare("INSERT INTO certificates ". 44 | "(id, username, device_serial, device_id, device_description, timestamp) VALUES ". 45 | "(NULL, :username, :device_serial, :device_id, :device_description, NOW())"); 46 | $stm->execute(array(":username" => $username, 47 | ":device_serial" => $device_serial, 48 | ":device_id" => $device_id, 49 | ":device_description" => $device_description)); 50 | $this->assigned_serial = $this->lastInsertId(); 51 | return $this->assigned_serial; 52 | } 53 | 54 | public function store($certificate, $expiry_date) { 55 | $stm = $this->prepare("UPDATE certificates SET certificate=:certificate, expires=:expiry_date WHERE id=:serial"); 56 | $stm->execute(array(":certificate" => $certificate, 57 | ":expiry_date" => gmstrftime("%Y-%m-%d %H:%M:%S", $expiry_date), 58 | ":serial" => $this->assigned_serial)); 59 | 60 | 61 | if ($this->inTransaction()) { 62 | $this->commit(); 63 | } 64 | } 65 | 66 | public function __destruct() { 67 | if ($this->inTransaction()) { 68 | $this->rollBack(); 69 | } 70 | } 71 | 72 | } 73 | ?> 74 | -------------------------------------------------------------------------------- /android/res/layout/logon.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 15 | 16 | 22 | 23 | 31 | 32 | 38 | 39 | 44 | 52 | 61 | 62 | 69 | 70 | 80 | 81 | 82 | 83 | 93 | 94 | 95 |