tools/btgatt-client: Add option to set BT_SECURITY_FIPS
PATCH 1/1 tools/btgatt-client: Add option to set BT_SECURITY_FIPS
Need for GAP/SEC/SEM/BI-10-C
--- tools/btgatt-client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tools/btgatt-client.c +4 -2
@@ -1492,8 +1492,8 @@ static void usage(void)"\t-d, --dest <addr>\t\tSpecify the destination address\n" "\t-t, --type [random|public] \tSpecify the LE address type\n" "\t-m, --mtu <mtu> \t\tThe ATT MTU to use\n" -"\t-s, --security-level <sec> \tSet security level (low|" -"medium|high)\n" +"\t-s, --security-level <sec> \tSet security level (low|medium|" +"high|fips)\n" "\t-v, --verbose\t\t\tEnable extra logging\n" "\t-h, --help\t\t\tDisplay help\n"); }
@@ -1537,6 +1537,8 @@ int main(int argc, char *argv[]) sec =BT_SECURITY_MEDIUM ; else if (strcmp(optarg, "high") == 0) sec =BT_SECURITY_HIGH ; + else if (strcmp(optarg, "fips") == 0) + sec =BT_SECURITY_FIPS ; else {fprintf (stderr,"Invalid security level\n" );return EXIT_FAILURE ;
Signature · 1 line
2.20.1
Hi Łukasz,
tools/btgatt-client.c static void usage(void) · line 1493
Quoted 12 lines · On Friday, 8 May 2020 15:23:49 CEST Łukasz Rymanowski wrote:
Need for GAP/SEC/SEM/BI-10-C
--- tools/btgatt-client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)tools/btgatt-client.c +0
-0@@ -1492,8 +1492,8 @@ static void usage(void)"\t-d, --dest <addr>\t\tSpecify the destination address\n" "\t-t, --type [random|public] \tSpecify the LE address
type\n"
tools/btgatt-client.c static void usage(void)
Quoted 3 lines
tools/btgatt-client.c +0
-2"\t-m, --mtu <mtu> \t\tThe ATT MTU to use\n" -"\t-s, --security-level <sec> \tSet security level (low|" -
"medium|high)\n"
tools/btgatt-client.c static void usage(void) · line 1495
Quoted 1 line
tools/btgatt-client.c +1
-0+ "\t-s, --security-level <sec> \tSet security level (low|
medium|"
tools/btgatt-client.c static void usage(void) · line 1496
Quoted 1 line
tools/btgatt-client.c +1
-0+
"high|fips)\n"
tools/btgatt-client.c int main(int argc, char *argv[]) · line 1543
Quoted 11 lines
tools/btgatt-client.c +2
-0"\t-v, --verbose\t\t\tEnable extra logging\n" "\t-h, --help\t\t\tDisplay help\n"); }@@ -1537,6 +1537,8 @@ int main(int argc, char *argv[]) sec =BT_SECURITY_MEDIUM ; else if (strcmp(optarg, "high") == 0) sec =BT_SECURITY_HIGH ; + else if (strcmp(optarg, "fips") == 0) + sec =BT_SECURITY_FIPS ; else { fprintf(stderr, "Invalid security
level\n");
tools/btgatt-client.c int main(int argc, char *argv[]) · line 1544
Quoted 1 line
tools/btgatt-client.c +0
-0return EXIT_FAILURE ;
Patch applied, thanks.
Signature · 2 lines
pozdrawiam Szymon Janc