aboutsummaryrefslogtreecommitdiffstats
path: root/hs20
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-03-11 22:29:36 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-11 23:09:22 (GMT)
commit39b420f7b12b152f879d1bb8a5267b9a838e04dc (patch)
treeccd69be264a9819d4089ac5414acba8c8388d488 /hs20
parentc0d701a34763e74e45700f72f516c52b526dd7cd (diff)
downloadhostap-39b420f7b12b152f879d1bb8a5267b9a838e04dc.zip
hostap-39b420f7b12b152f879d1bb8a5267b9a838e04dc.tar.gz
hostap-39b420f7b12b152f879d1bb8a5267b9a838e04dc.tar.bz2
HS 2.0R2: Add parse_cert command for debugging purposes
This hs20-osu-client client command can be used to parse a DER encoded X.509v3 certificate with the logotype extensions and id-wfa-hotspot-friendlyName values shown in detail. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hs20')
-rw-r--r--hs20/client/osu_client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c
index 1a48592..2175fc3 100644
--- a/hs20/client/osu_client.c
+++ b/hs20/client/osu_client.c
@@ -2945,6 +2945,7 @@ static void usage(void)
"- dl_polupd_ca <PPS> <CA file>\n"
"- dl_aaa_ca <PPS> <CA file>\n"
"- browser <URL>\n"
+ "- parse_cert <X.509 certificate (DER)>\n"
"- osu_select <OSU info directory> [CA cert]\n");
}
@@ -3172,6 +3173,15 @@ int main(int argc, char *argv[])
argv[optind + 1]);
ret = hs20_web_browser(argv[optind + 1]);
wpa_printf(MSG_INFO, "Web browser result: %d", ret);
+ } else if (strcmp(argv[optind], "parse_cert") == 0) {
+ if (argc - optind < 2) {
+ usage();
+ exit(0);
+ }
+
+ wpa_debug_level = MSG_MSGDUMP;
+ http_parse_x509_certificate(ctx.http, argv[optind + 1]);
+ wpa_debug_level = MSG_INFO;
} else {
wpa_printf(MSG_INFO, "Unknown command '%s'", argv[optind]);
}