You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Bradley Beddoes <be...@intient.com> on 2007/02/22 11:09:10 UTC

[Axis2C] Creating an SSL client - trunk

Hi,
I have been playing with a trunk build the past few days and have 
managed to get everything working quite nicely with http connections.

However with https connections I can't seem to make my client perform an 
operation. I have followed the SSL client instructions online exactly 
and they did not help at all. The correct transport is enabled in axis2.xml

So far I have been getting the following output from my client logging 
(from axis2_env_t structure) "Stub invoke FAILED: Error code: 82 :: 
Input stream is NULL in msg_ctx". Additionally for completeness the echo 
sample also described online has the exact same output when attempting 
to execute it.

Following the code through I believe that the environment variable 
described in the online document is not even consulted, looking at 
things further I am now attempting to set the following in my client:
AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT", 
"/path/to/my/cert.pem");

This is currently causing me a segfault which I am still investigating. 
While I continue looking at this can anyone shed some light on why this 
might be occurring and what to do to fix?

Bradley

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2C] Creating an SSL client - trunk

Posted by Nandika Jayawardana <ja...@gmail.com>.
 Hi Bradley,

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);
regards
Nandika

---------- Forwarded message ----------
From: Bradley Beddoes <be...@intient.com>
Date: Feb 22, 2007 2:09 AM
Subject: [Axis2C] Creating an SSL client - trunk
To: axis-c-user@ws.apache.org

Hi,
I have been playing with a trunk build the past few days and have
managed to get everything working quite nicely with http connections.

However with https connections I can't seem to make my client perform an
operation. I have followed the SSL client instructions online exactly
and they did not help at all. The correct transport is enabled in axis2.xml

So far I have been getting the following output from my client logging
(from axis2_env_t structure) "Stub invoke FAILED: Error code: 82 ::
Input stream is NULL in msg_ctx". Additionally for completeness the echo
sample also described online has the exact same output when attempting
to execute it.

Following the code through I believe that the environment variable
described in the online document is not even consulted, looking at
things further I am now attempting to set the following in my client:
AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT",
"/path/to/my/cert.pem");

This is currently causing me a segfault which I am still investigating.
While I continue looking at this can anyone shed some light on why this
might be occurring and what to do to fix?

Bradley

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org

[ANN]VTD-XML 2.0

Posted by Jimmy Zhang <jz...@ximpleware.com>.
 The VTD-XML project team is proud to announce the release of 
version 2.0 of VTD-XML, the next generation XML parser/indexer.
The new features introduced in this version are:

* VTD+XML version 1.0: the world's first true native XML index 
that is simple, general-purpose and back-compatible with XML. 
* NodeRecorder Class that saves VTDNav's cursor location for 
later sequential access.
* Overwrite capability
* Lexically comparisons between VTD and strings

 To download the software, please go to 
http://sourceforge.net/project/showfiles.php?group_id=110612

 To read the latest benchmark report please go to
http://vtd-xml.sf.net/benchmark1.html

 To get the latest API overview
http://www.ximpleware.com/vtd-xml_intro.pdf


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2C] Creating an SSL client - trunk

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dinesh Premalal wrote:
> Dumindu,
>               I think list reject attachments, could you please attach 
> patch to a jira.
I do not think the list reject attachments, probably he forgot to 
attach. Anyway +1 for attaching in Jira and sending the link to the issue.
Samisa...


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2C] Creating an SSL client - trunk

Posted by Dinesh Premalal <xy...@gmail.com>.
Dumindu,
              I think list reject attachments, could you please attach patch
to a jira.

thanks,
Dinesh
On 2/22/07, Dumindu Pallewela <du...@wso2.com> wrote:
>
> Hi Bradley,
>
> I have attached a patch to correct the documentation. it has not been
> committed yet.
>
> 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.
>
> Regards,
> Dumindu.
>
>
>
> Bradley Beddoes wrote:
> > Hi,
> > I have been playing with a trunk build the past few days and have
> > managed to get everything working quite nicely with http connections.
> >
> > However with https connections I can't seem to make my client perform
> > an operation. I have followed the SSL client instructions online
> > exactly and they did not help at all. The correct transport is enabled
> > in axis2.xml
> >
> > So far I have been getting the following output from my client logging
> > (from axis2_env_t structure) "Stub invoke FAILED: Error code: 82 ::
> > Input stream is NULL in msg_ctx". Additionally for completeness the
> > echo sample also described online has the exact same output when
> > attempting to execute it.
> >
> > Following the code through I believe that the environment variable
> > described in the online document is not even consulted, looking at
> > things further I am now attempting to set the following in my client:
> > AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT",
> > "/path/to/my/cert.pem");
> >
> > This is currently causing me a segfault which I am still
> > investigating. While I continue looking at this can anyone shed some
> > light on why this might be occurring and what to do to fix?
> >
> > Bradley
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
Dinesh Premalal
dinesh@wso2.com
WSO2, Inc.; http://www.wso2.com/
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

Re: [Axis2C] Creating an SSL client - trunk

Posted by Bradley Beddoes <be...@intient.com>.
Dumindu,
You wouldn't believe but I just this second figured out that I was 
missing the setup of the property value then I switched back to email 
and read your reply. (As you can see I was stupidly passing the string 
directly to the SET_PROPERTY function - its very late here in Aus right 
now and I missed that oversight after looking at this a couple hours 
now), but that I was infact correct in my debugging session that 
SERVER_CERT wasn't being set so time well spent, at least it gave me a 
good excuse to get really into the axis2/c codebase.

Thanks so much to both yourself Nandika for your replies.

regards,
Bradley
-- 
Bradley Beddoes
Lead Software Architect

http://intient.com
Intient - "Open Source, Open Standards"


Dumindu Pallewela wrote:
> Hi Bradley,
> 
> I have attached a patch to correct the documentation. it has not been 
> committed yet.
> 
> 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.
> 
> Regards,
> Dumindu.
> 
> 
> 
> Bradley Beddoes wrote:
>> Hi,
>> I have been playing with a trunk build the past few days and have 
>> managed to get everything working quite nicely with http connections.
>>
>> However with https connections I can't seem to make my client perform 
>> an operation. I have followed the SSL client instructions online 
>> exactly and they did not help at all. The correct transport is enabled 
>> in axis2.xml
>>
>> So far I have been getting the following output from my client logging 
>> (from axis2_env_t structure) "Stub invoke FAILED: Error code: 82 :: 
>> Input stream is NULL in msg_ctx". Additionally for completeness the 
>> echo sample also described online has the exact same output when 
>> attempting to execute it.
>>
>> Following the code through I believe that the environment variable 
>> described in the online document is not even consulted, looking at 
>> things further I am now attempting to set the following in my client:
>> AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT", 
>> "/path/to/my/cert.pem");
>>
>> This is currently causing me a segfault which I am still 
>> investigating. While I continue looking at this can anyone shed some 
>> light on why this might be occurring and what to do to fix?
>>
>> Bradley
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 


-- 
Bradley Beddoes
Lead Software Architect

http://intient.com
Intient - "Open Source, Open Standards"

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2C] Creating an SSL client - trunk

Posted by Dumindu Pallewela <du...@wso2.com>.
Hi Bradley,

I have attached a patch to correct the documentation. it has not been 
committed yet.

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.

Regards,
Dumindu.



Bradley Beddoes wrote:
> Hi,
> I have been playing with a trunk build the past few days and have 
> managed to get everything working quite nicely with http connections.
>
> However with https connections I can't seem to make my client perform 
> an operation. I have followed the SSL client instructions online 
> exactly and they did not help at all. The correct transport is enabled 
> in axis2.xml
>
> So far I have been getting the following output from my client logging 
> (from axis2_env_t structure) "Stub invoke FAILED: Error code: 82 :: 
> Input stream is NULL in msg_ctx". Additionally for completeness the 
> echo sample also described online has the exact same output when 
> attempting to execute it.
>
> Following the code through I believe that the environment variable 
> described in the online document is not even consulted, looking at 
> things further I am now attempting to set the following in my client:
> AXIS2_OPTIONS_SET_PROPERTY(options, env, "SERVER_CERT", 
> "/path/to/my/cert.pem");
>
> This is currently causing me a segfault which I am still 
> investigating. While I continue looking at this can anyone shed some 
> light on why this might be occurring and what to do to fix?
>
> Bradley
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org