diff options
author | Phil Pennock <pdp@exim.org> | 2012-05-17 16:18:34 -0400 |
---|---|---|
committer | Phil Pennock <pdp@exim.org> | 2012-05-17 16:18:34 -0400 |
commit | 4fe99a6c7949056e1bf27f146ad604061b6a3669 (patch) | |
tree | 3af876bed814cfb8cb3b1b01a2166ae115117265 /test/src | |
parent | 2c17bb02e213012d5d98ebac506a67b23b2cf693 (diff) |
More GnuTLS cleanups/fixes.
Decided "unknown (reason)" in tls_peerdn was wrong, stripped that, added
replacement guard.
Moved cipherbuf construction to where it makes more sense, where peerdn
is extracted, so that setting the exim vars gets back closer to just
some pointer switching.
Fix missing failure check after handshake in client.
Fix tls.c tls_ungetc() and friends by pointing watermark vars at state
content.
Regenerated test-suite D-H params so we don't have too small values,
which was causing connection rejections.
Test-suite output where new test cert info is logged (there will be a
couple more, when I fix a lingering problem with tls_peerdn being unset
in client log-lines).
Give test-suite client command some --help.
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/client.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/test/src/client.c b/test/src/client.c index 6a083d055..d9ad8139f 100644 --- a/test/src/client.c +++ b/test/src/client.c @@ -361,13 +361,14 @@ return session; * Main Program * *************************************************/ -/* Usage: client - <IP address> - <port> - [<outgoing interface>] - [<cert file>] - [<key file>] -*/ +const char * const HELP_MESSAGE = "\n\ +Usage: client\n\ + <IP address>\n\ + <port>\n\ + [<outgoing interface>]\n\ + [<cert file>]\n\ + [<key file>]\n\ +\n"; int main(int argc, char **argv) { @@ -403,6 +404,13 @@ unsigned char *inptr = inbuffer; while (argc >= argi + 1 && argv[argi][0] == '-') { + if (strcmp(argv[argi], "-help") == 0 || + strcmp(argv[argi], "--help") == 0 || + strcmp(argv[argi], "-h") == 0) + { + printf(HELP_MESSAGE); + exit(0); + } if (strcmp(argv[argi], "-tls-on-connect") == 0) { tls_on_connect = 1; |