about summary refs log tree commit diff
path: root/extra/palaver/notify.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--extra/palaver/notify.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/extra/palaver/notify.c b/extra/palaver/notify.c
index c6a745c..36e4ae1 100644
--- a/extra/palaver/notify.c
+++ b/extra/palaver/notify.c
@@ -693,9 +693,10 @@ int main(int argc, char *argv[]) {
 	const char *host = NULL;
 	const char *port = "6697";
 	const char *pass = NULL;
+	const char *trust = NULL;
 	const char *user = "pounce-palaver";
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "!NPc:d:k:p:su:vw:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "!NPc:d:k:p:st:u:vw:"));) {
 		switch (opt) {
 			break; case '!': insecure = true;
 			break; case 'N': noPreview = true;
@@ -705,6 +706,7 @@ int main(int argc, char *argv[]) {
 			break; case 'k': priv = optarg;
 			break; case 'p': port = optarg;
 			break; case 's': sensitive = true;
+			break; case 't': trust = optarg;
 			break; case 'u': user = optarg;
 			break; case 'v': verbose = true;
 			break; case 'w': pass = optarg;
@@ -757,6 +759,11 @@ int main(int argc, char *argv[]) {
 	}
 
 	int error;
+	if (trust) {
+		tls_config_insecure_noverifyname(config);
+		error = tls_config_set_ca_file(config, trust);
+		if (error) errx(EX_NOINPUT, "%s: %s", trust, tls_config_error(config));
+	}
 	if (cert) {
 		error = tls_config_set_keypair_file(config, cert, (priv ? priv : cert));
 		if (error) {
ogheader'>2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe