From 32cc1f8e24972f81873cb33f580af3ad50ec7aa2 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Fri, 1 Jun 2007 03:09:36 +0000 Subject: added ssl key option --- src/wsman.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/wsman.c b/src/wsman.c index 93a7369..91b7796 100644 --- a/src/wsman.c +++ b/src/wsman.c @@ -60,6 +60,7 @@ static const char **wsman_argv = NULL; static int server_port = 0; static char *cainfo = NULL; static char *cert = NULL; +static char *sslkey = NULL; static char *endpoint = NULL; static char *username = NULL; static char *password = NULL; @@ -140,6 +141,8 @@ char wsman_parse_options(int argc, char **argv) "Certificate file to verify the peer", ""}, {"cert", 'A', U_OPTION_ARG_STRING, &cert, "Certificate file. The certificate must be in PEM format.", ""}, + {"sslkey", 'K', U_OPTION_ARG_STRING, &sslkey, + "SSL Key.", ""}, {"username", 'u', U_OPTION_ARG_STRING, &username, "User name", ""}, {"path", 'g', U_OPTION_ARG_STRING, &url_path, @@ -491,6 +494,9 @@ int main(int argc, char **argv) if (cert) { wsman_transport_set_cert(cl, cert); } + if (sslkey) { + wsman_transport_set_cert(cl, sslkey); + } wsman_transport_set_verify_peer(cl, !noverify_peer); wsman_transport_set_verify_host(cl, !noverify_host); wsman_transport_set_timeout(cl, transport_timeout); -- cgit