aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd.eap_user_sqlite
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-11-20 22:47:47 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-20 22:47:47 (GMT)
commitee431d77a51b361b4697f2b737bcf46a1860a6fe (patch)
tree915508b851e41762840dcdbc50b7d821f90fd61c /hostapd/hostapd.eap_user_sqlite
parent6201b052c87b043a240324976c58b71aa6cbdfca (diff)
downloadhostap-ee431d77a51b361b4697f2b737bcf46a1860a6fe.zip
hostap-ee431d77a51b361b4697f2b737bcf46a1860a6fe.tar.gz
hostap-ee431d77a51b361b4697f2b737bcf46a1860a6fe.tar.bz2
Add preliminary support for using SQLite for eap_user database
CONFIG_SQLITE=y option can now be used to allow the eap_user_file text file to be replaced with a SQLite database (eap_user_file=sqlite:/path/to/sqlite.db). hostapd.eap_user_sqlite shows an example of how the database tables can be created for this purpose. This commit does not yet include full functionality of the text file format, but at least basic EAP-TTLS/MSCHAPv2 style authentication mechanisms with plaintext passwords can be used for tests. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/hostapd.eap_user_sqlite')
-rw-r--r--hostapd/hostapd.eap_user_sqlite17
1 files changed, 17 insertions, 0 deletions
diff --git a/hostapd/hostapd.eap_user_sqlite b/hostapd/hostapd.eap_user_sqlite
new file mode 100644
index 0000000..f688327
--- /dev/null
+++ b/hostapd/hostapd.eap_user_sqlite
@@ -0,0 +1,17 @@
+CREATE TABLE users(
+ identity TEXT PRIMARY KEY,
+ methods TEXT,
+ password TEXT,
+ phase2 INTEGER
+);
+
+CREATE TABLE wildcards(
+ identity TEXT PRIMARY KEY,
+ methods TEXT
+);
+
+INSERT INTO users(identity,methods,password,phase2) VALUES ('user','TTLS-MSCHAPV2','password',1);
+INSERT INTO users(identity,methods,password,phase2) VALUES ('DOMAIN\mschapv2 user','TTLS-MSCHAPV2','password',1);
+
+INSERT INTO wildcards(identity,methods) VALUES ('','TTLS,TLS');
+INSERT INTO wildcards(identity,methods) VALUES ('0','AKA');