Commit Graph

14 Commits

Author SHA1 Message Date
Nicolas Williams
96b7ea671d gss: Fix warnings 2022-01-14 17:39:05 -06:00
Nicolas Williams
65caff79a3 gss-token: Fix leak 2022-01-14 17:39:05 -06:00
Nicolas Williams
5f63215d0d Always perform == or != operation on cmp function result
Although not required to address bad code generation in
some versions of gcc 9 and 10, a coding style that requires
explicit comparison of the result to zero before use is
both clearer and would have avoided the generation of bad
code.

This change converts all use of cmp function usage from

```
    if (strcmp(a, b) || !strcmp(c, d)) ...
```

to

```
    if (strcmp(a, b) != 0 || strcmp(c, d)) == 0
```

for all C library cmp functions and related:

 - strcmp(), strncmp()
 - strcasecmp(), strncasecmp()
 - stricmp(), strnicmp()
 - memcmp()

Change-Id: Ic60c15e1e3a07e4faaf10648eefe3adae2543188
2021-11-24 22:30:44 -05:00
Nicolas Williams
8ed48bc54d gss-token: Fix exit code 2021-11-17 17:27:40 -06:00
Robert Crowston
9b46d6436f Only #include <malloc.h> if it is available.
e.g., OpenBSD does not provide this header.
2021-09-07 12:49:19 +10:00
Roland C. Dowdeswell
6ccb21827b gss-token: initialise input buffer to empty 2021-08-07 08:40:20 +10:00
Roland C. Dowdeswell
dcac4e1ff9 gss-token: implement -m to specify what mech to use. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
4336c944e0 gss-token: turn initiator and acceptor into loops. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
0055c1c80b gss-token: implement -S to split tokens up on output. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
9693bdb272 gss-token: restructure and refactor the code a bit. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
ca59ee0ddd Add flags and options missing from upstream gss-token. 2020-10-12 21:55:51 +01:00
Nicolas Williams
d1a2652090 bx509: CSRF protection for /bnegotiate 2019-12-09 20:13:33 -06:00
Nicolas Williams
d4a319d57d gss: fix gss-token accept bug 2019-12-06 18:32:15 -06:00
Nicolas Williams
c1841f2f67 gssapi: Import elric1's gss-token 2019-11-19 23:00:41 -06:00