axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaime Hablutzel Egoavil <hablutz...@gmail.com>
Subject Re: optimization for ws_get_*_from_file methods
Date Thu, 09 Feb 2012 14:19:04 GMT
Yes, and when there goes a PEM encoded cert with Windows sstyle newlines
the only error got in the log is that the certificate couldnĀ“t be read, it
is absolutely impossible to get to know that the problem are the windows
newlines without debugging the code.
Will this get fixed?

On Thu, Feb 9, 2012 at 8:11 AM, Nandika Jayawardana <jayawark@gmail.com>wrote:

> Actually ws_get_key_from_file and ws_get_cert_from_file are local to
> WSF/PHP while oxs_utils come from rampart. You are right and actually it
> needs to work on both platforms.
>
> Regards
> Nandika
>
>
> On Thu, Feb 9, 2012 at 6:37 PM, Nandika Jayawardana <jayawark@gmail.com>wrote:
>
>> Hi Jaime,
>>
>> There functions are local to wsf/php and not part of Axis2/C.
>>
>> Regards
>> Nandika
>>
>>
>> On Wed, Feb 8, 2012 at 9:52 PM, Jaime Hablutzel Egoavil <
>> hablutzel1@gmail.com> wrote:
>>
>>> Hi, I have been having a lot of problems trying to make my web service
>>> work with these methods from  WSF/PHP and the problem seems to be the
>>> underlying Axis2/C Library
>>>
>>>  $my_cert = ws_get_cert_from_file("../keys/my.cert");
>>>
>>>>  $my_key = ws_get_key_from_file("../keys/my.key");
>>>>
>>>> It simply didn't work and the log only said that there was a problem
>>>> reading certificates... after debugging C code I found that the library
>>>> isn't working with Windows style line endings and my PEM files have been
>>>> generated on windows... by now I had to change line endings using dos2unix
>>>> but I took me two days to find it out... maybe you could add support for
>>>> Windows style line endings...
>>>>
>>>> The specific method I found problematic was:
>>>>
>>>> oxs_util_get_newline_removed_string
>>>>
>>>> around
>>>>
>>>>   while(len > 0)
>>>>     {
>>>>         size_t i = 0;
>>>>
>>>>         /* scan buffer until the next newline character and skip it */
>>>>         axis2_char_t *pos = (axis2_char_t*)strchr(input, '\n');
>>>>         if(pos)
>>>>         {
>>>>             i = pos - input;
>>>>         }
>>>>         else
>>>>         {
>>>>             i = len;
>>>>         }
>>>>
>>>> where only \n is being processed and not \r
>>>>
>>>> What do you say?
>>>
>>>
>>>
>>> --
>>> Jaime Hablutzel - 9-9956-3299
>>>
>>> (tildes omitidas intencionalmente)
>>>
>>
>>
>


-- 
Jaime Hablutzel - 9-9956-3299

(tildes omitidas intencionalmente)

Mime
View raw message