- /* Path to the MAP server certificate */
- property =axutil_property_create_with_args(this->env, 0, 0, 0, server_cert);
- axis2_options_set_property(options, this->env, AXIS2_SSL_SERVER_CERT, property);
-
+ /* Set path to the MAP server certificate */
+ property =axutil_property_create_with_args(this->env, 0, 0, 0,
+ server_cert);
+ axis2_options_set_property(options, this->env,
+ AXIS2_SSL_SERVER_CERT, property);
+
+ if (key_file)
+ {
+ /* Set path to the MAP client certificate */
+ property =axutil_property_create_with_args(this->env, 0, 0, 0,
+ key_file);
+ axis2_options_set_property(options, this->env,
+ AXIS2_SSL_KEY_FILE, property);
+ }
+ else
+ {
+ /* Set up HTTP Basic MAP client authentication */
+ axis2_options_set_http_auth_info(options, this->env,
+ username, password, "Basic");
+ }
+