axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nandika Jayawardana <jayaw...@gmail.com>
Subject Re: Setting SSL properties at runtime
Date Sat, 14 May 2011 14:15:52 GMT
axis2_options api is used to set properties dynamically.

You can use following code sample to set configure SSL.

    axutil_property_t *ssl_server_key_prop = NULL;
    axutil_property_t *ssl_client_key_prop = NULL;
    axutil_property_t *passphrase_prop = NULL;
    char *ssl_server_key_filename = NULL;
    char *ssl_client_key_filename = NULL;
    char *passphrase = NULL;

    ssl_server_key_prop = axutil_property_create_with_args (env, 0,
AXIS2_TRUE, 0,
axutil_strdup (env, ssl_server_key_filename));

    axis2_options_set_property (options, env, AXIS2_SSL_SERVER_CERT,
ssl_server_key_prop);

    ssl_client_key_prop = axutil_property_create_with_args (env, 0,
AXIS2_TRUE, 0,
        axutil_strdup (env, ssl_client_key_filename));
    axis2_options_set_property (options, env, AXIS2_SSL_KEY_FILE,
ssl_client_key_prop);

    passphrase_prop = axutil_property_create_with_args (env, 0, AXIS2_TRUE,
0,
        axutil_strdup (env, passphrase));
    axis2_options_set_property (options, env, AXIS2_SSL_PASSPHRASE,
passphrase_prop);

Replace appropriate file name values to the file name pointers.

Regards
Nandika

On Tue, May 10, 2011 at 3:01 AM, Radley Kneeland <radiblast@gmail.com>wrote:

> I came across this page, but it seems to be out of date.
> http://people.apache.org/~dumindu/docs/HowToConfigureSSL.html
>
> What API is used to dynamically set properties into the axis2.xml file at
> runtime?
>

Mime
View raw message