From 1bbab57b79772b73e27c363b91e908f9e25e5172 Mon Sep 17 00:00:00 2001 From: Klaus Kämpf Date: Mon, 13 Sep 2010 14:59:02 +0200 Subject: Fix --sslkey, add warning about --cacert --- src/wsman.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/wsman.c b/src/wsman.c index 34ecd57..e066c7f 100644 --- a/src/wsman.c +++ b/src/wsman.c @@ -532,7 +532,7 @@ static int wsman_read_client_config(dictionary * ini) if (iniparser_find_entry(ini, "client")) { agent = iniparser_getstr(ini, "client:agent"); server_port = server_port ? - server_port : iniparser_getint(ini, "client:port", 80); + server_port : iniparser_getint(ini, "client:port", 5985); authentication_method = authentication_method ? authentication_method : iniparser_getstr(ini, "client:authentication_method"); @@ -592,7 +592,7 @@ int main(int argc, char **argv) cl = wsmc_create(server, server_port, url_path, - cainfo? "https" : "http", + cainfo ? "https" : "http", username, password); } @@ -618,9 +618,13 @@ int main(int argc, char **argv) } if (cert) { wsman_transport_set_cert(cl, cert); + if (!cainfo) + fprintf(stderr, "Warning: --cacert not set to enable SSL operation\n"); } if (sslkey) { - wsman_transport_set_cert(cl, sslkey); + wsman_transport_set_key(cl, sslkey); + if (!cainfo) + fprintf(stderr, "Warning: --cacert not set to enable SSL operation\n"); } wsman_transport_set_verify_peer(cl, !noverify_peer); wsman_transport_set_verify_host(cl, !noverify_host); -- cgit