summaryrefslogtreecommitdiffstats
path: root/amtterm.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2022-04-11 10:03:47 +0200
committerGerd Hoffmann <kraxel@redhat.com>2022-04-22 14:52:30 +0200
commit67c81a2a3490f53ba26411b031c164e583d8c695 (patch)
treea00a07052ca196b518817d94ea6b9ec080a8d80f /amtterm.c
parentc264e4319195e2cc7b2b77194abc610ff08baafd (diff)
downloadamtterm-67c81a2a3490f53ba26411b031c164e583d8c695.tar.gz
Merge branch 'ssl'
Diffstat (limited to 'amtterm.c')
-rw-r--r--amtterm.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/amtterm.c b/amtterm.c
index b6c7538..a69f58c 100644
--- a/amtterm.c
+++ b/amtterm.c
@@ -179,10 +179,18 @@ static void usage(FILE *fp)
" -h print this text\n"
" -v verbose (default)\n"
" -q quiet\n"
+ " -L use legacy authentication\n"
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS)
+ " -C cacert enable SSL and use PEM cacert file\n"
+#endif
" -u user username (default: admin)\n"
" -p pass password (default: $AMT_PASSWORD)\n"
"\n"
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS)
+ "By default port 16994 (SSL: 16995) is used.\n"
+#else
"By default port 16994 is used.\n"
+#endif
"If no password is given " APPNAME " will ask for one.\n"
"\n"
"-- \n"
@@ -209,7 +217,7 @@ int main(int argc, char *argv[])
snprintf(r.pass, sizeof(r.pass), "%s", h);
for (;;) {
- if (-1 == (c = getopt(argc, argv, "hvqu:p:")))
+ if (-1 == (c = getopt(argc, argv, "hvqu:p:LC:")))
break;
switch (c) {
case 'v':
@@ -225,6 +233,14 @@ int main(int argc, char *argv[])
snprintf(r.pass, sizeof(r.pass), "%s", optarg);
memset(optarg,'*',strlen(optarg)); /* rm passwd from ps list */
break;
+ case 'L':
+ r.legacy = 1;
+ break;
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS)
+ case 'C':
+ r.cacert = optarg;
+ break;
+#endif
case 'h':
usage(stdout);