Hi all,
   
  I have followed the installation guide to compile source codes including 
"ENABLE_SSL=1" successfully. It could support http protocol well but failed to 
support https.
   
  I have checked axis-c-user mail list and found some similar articles to 
handle this problem, like:
   
  ************************************************
you can give the certificates as a parameter in axis2.xml

|<parameter name="SERVER_CERT">/path/to/ca/certificate</parameter>||
|||

or as properties set in the code.

eg:
    ssl_ca_file = axis2_property_create(env);
    AXIS2_PROPERTY_SET_VALUE(ssl_ca_file, env,
            axis2_strdup("/home/user/cacert.pem", env));
    AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT", ssl_ca_file);

Note that you have to create a property and set it using the 
AXIS2_OPTIONS_SET_PROPERTY function call.
   
  **************************************************************
  When using AXIS2_OPTIONS_SET_PROPERTY()
first you need to create an axis2_property_t instance and then set it.

eg.

axis2_property_t *ssl_server_cert_prop =
axis2_property_create_with_args(env, 0, AXIS2_TRUE, 0,
AXIS2_STRDUP(cert_filename, env));

AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT",
ssl_server_cert_prop);

  
********************************************************************************
   
  But it failed in my environment, because I can't find some apis and variable 
name at all, like axis2_property_t and AXIS2_OPTIONS_SET_PROPERTY.
   
  I used official version axis2c-src-1.0.0 and changed axis2.xml like:
   
      <transportSender name="https" class="axis2_http_sender">
        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
    </transportSender>
    <parameter name="SERVER_CERT">/path/to/ca/certificate</parameter>
    <!--<parameter 
name="KEY_FILE">/path/to/client/certificate/chain/file</parameter>
    <parameter name="SSL_PASSPHRASE">passphrase</parameter>
    -->
   
  At the same time, I called following apis in my program:
   
      axis2_options_set_soap_version(options, env, AXIOM_SOAP12);
 axis2_options_set_transport_in_protocol(options, env, 
AXIS2_TRANSPORT_ENUM_HTTPS);
   
  But the server I built by myself didn't have any response and get error code 
82, Input stream is NULL in msg_ctx.
   
  What apis should I call to support https and how to config axis2.xml to 
specify pem file both under needing authentication and no needing 
authentication? I am freshman to Axis2/C, so pls. tell me detailedly:)
   
  Thanks a lot.
   
  Kelvin.Lin

 
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

Reply via email to