From ba7d3fe920347719a8a2d61da8e9175b7f300080 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 19 Oct 2018 19:00:37 +0300 Subject: [PATCH] HS 2.0: Record policy update into users table This makes it easier to track whether a policy update has been successfully completed. Signed-off-by: Jouni Malinen --- hs20/server/spp_server.c | 3 +++ hs20/server/sql.txt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hs20/server/spp_server.c b/hs20/server/spp_server.c index 584a2bde6..e5af4c255 100644 --- a/hs20/server/spp_server.c +++ b/hs20/server/spp_server.c @@ -2262,6 +2262,9 @@ static xml_node_t * hs20_spp_update_response(struct hs20_svc *ctx, "", dmacc); free(val); } + if (oper == POLICY_UPDATE) + db_update_val(ctx, user, realm, "polupd_done", "1", + dmacc); ret = build_spp_exchange_complete( ctx, session_id, "Exchange complete, release TLS connection", NULL); diff --git a/hs20/server/sql.txt b/hs20/server/sql.txt index 8fa019f57..666ef1314 100644 --- a/hs20/server/sql.txt +++ b/hs20/server/sql.txt @@ -55,7 +55,8 @@ CREATE TABLE users( cert_pem TEXT, t_c_timestamp INTEGER, mac_addr TEXT, - last_msk TEXT + last_msk TEXT, + polupd_done TEXT, ); CREATE TABLE wildcards(