You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Fred Preston <PR...@uk.ibm.com> on 2005/02/01 11:47:15 UTC

Fw: SSL exception




Hi Vince,
      It looks like you may have a conflict of DLLs.  Make sure that you
are only building Axis3 DLLs.  You can make sure that you have the correct
DLLs by compiling the following code (currently written for Windows) and
then run it from the command line in the same directory as the DLLs as
follows:-

>WhatAmI HTTPChannel.dll
LibraryName: HTTPChannel
Built: ddd mmm dd hh:mm:ss yyyy
TCPIP: Built with IPV6
>
>WhatAmI HTTPSSLChannel.dll
LibraryName: HTTPSSLChannel (OpenSSL)
Built: ddd mmm dd hh:mm:ss yyyy
TCPIP: Built with IPV6
>
>WhatAmI HTTPSSLChannel.dll
LibraryName: HTTPTransport
Built: ddd mmm dd hh:mm:ss yyyy

If you get a 'Information is not available' message, then you know you have
an inconsistency.

Here is the code:-
#include <windows.h>
#include <stdio.h>

int main( int argc, char* argv[])
{
      if( argc == 2 && strlen( argv[1]) > 0)
      {
            HMODULE hLib = LoadLibrary( argv[1]);

            FARPROC fp = GetProcAddress( hLib, "WhatAmI");

            if( fp != NULL)
            {
                  char szInfo[1024];

                  strcpy( szInfo, (char *) fp());

                  printf( "%s\n", szInfo);
            }
            else
            {
                  printf( "Information is not available\n");
            }

            FreeLibrary( hLib);
      }
      else
      {
            printf( "Usage: WhatAmI <DLLName>\n");
      }

      return 0;
}

Regards,

Fred Preston.



                                                                                                                                       
                      "Jairam,                                                                                                         
                      Roopnaraine"             To:       "Apache AXIS C Developers List" <ax...@ws.apache.org>                    
                      <Roopnaraine.Jair        cc:                                                                                     
                      am@ca.com>               Subject:  RE: SSL exception                                                             
                                                                                                                                       
                      31/01/05 21:27                                                                                                   
                      Please respond to                                                                                                
                      "Apache AXIS C                                                                                                   
                      Developers List"                                                                                                 
                                                                                                                                       



Ok I was finally able to build this. I pulled the source from the tree
on 1/28/2004 (Friday) and was able to build all the necessary dll's

I set up the axis.conf file as the following:

ClientLogPath:D:\myclient\Debug\AxisLog.log
Transport_http:D:\myclient\Debug\HTTPTransport.dll
XMLParser:D:\myclient\Debug\AxisXMLParser.dll
Channel_HTTP_SSL:D:\myclient\Debug\HTTPSSLChannel.dll
Channel_HTTP:D:\myclient\Debug\HTTPChannel.dll

Now when I debug it fails in the init call

if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER))
             return pReturn;

Am I doing something wrong I tried everything and can't seem to get ssl
working ahahahaah.

Please help me :(

Vince.

-----Original Message-----
From: Fred Preston [mailto:PRESTONF@uk.ibm.com]
Sent: Thursday, January 27, 2005 5:51 AM
To: Apache AXIS C Developers List
Subject: RE: SSL exception





Hi Vince,
      Axis3 should build without problem (HTTPTransport.DLL,
HTTPChannel.DLL and HTTPSSLChannel.DLL (OpenSSL) should be in obj/bin
after
the build).  There was some changes to the build scripts yesterday and
it
could be you did a refresh in-between fixes.  It is definitely stable
now
because I've just downloaded from CVS, built (using the ant scripts) and
run some tests without problems.  You cannot mix-n-match components from
Axis2 and Axis3 so I would have expected what you tried to have failed.
Try again and see what happens.

Regards,

Fred Preston.





                      "Jairam,

                      Roopnaraine"             To:       "Apache AXIS C
Developers List" <ax...@ws.apache.org>
                      <Roopnaraine.Jair        cc:

                      am@ca.com>               Subject:  RE: SSL
exception


                      26/01/05 19:30

                      Please respond to

                      "Apache AXIS C

                      Developers List"






I tried using the latest binary drop which is using Axis3 but it does
not contain HTTPSSLChannel.dll as I had some problems building the
source I went back to use the axis 1.4 release which is using axis2 but
this binary drop does not contain AxisTransport2.dll it just has
AxisTransport.dll so I used that and Axis2SSLChannel.dll as it was
already built and changed http to https, but it crashes somewhere in
AXISTRANSPORT! 00efd94f().

Please help :)

Vince.

-----Original Message-----
From: Fred Preston [mailto:PRESTONF@uk.ibm.com]
Sent: Tuesday, January 25, 2005 5:22 AM
To: Apache AXIS C Developers List
Subject: Re: SSL exception





Hi Roopnaraine,
      If you are using Axis2 transport, then you need to build the
OpenSSLChannel files in transport/axis2/ssl.  This will produce an
additional library called something like Axis2SSLChannel.dll (filename
will
vary slightly depending on platform).  Once you have built the SSL
library
you need to tell the client by adding an additional line to your
configuration file (i.e.
Channel_ssl:<directorypath>/Axis2SSLChannel.dll).
To use SSL change your http URL from HTTP to HTTPS and AxisClient will
redirect your message through the SSLChannel library.  I'm not sure
which
libraries are needed on which platform, but for Windows it is
ssleay32.lib
and libeay32.lib and for Linux and AIX, you will require crypto.so and
ssl.so.

      We are in the process of moving to Axis3 transport
(HTTPTransport.dll
or libhttp_transport.so depending on platform) which is very similar to
Axis2, but requires an additional definition in the config file.  Here
are
the differences:-

#Old - Axis2
 ClientLogPath:C:\Build\ws-axis\c\bin\ClientLog.log
Transport_http:C:\Build\ws-axis\c\bin\AxisTransport2.dll
     XMLParser:C:\Build\ws-axis\c\bin\AxisXMLParser.dll
   Channel_ssl:C:\Build\ws-axis\c\bin\Axis2SSLChannel.dll

#New - HTTP
   ClientLogPath:C:\Build\ws-axis\c\bin\ClientLog.log
  Transport_http:C:\Build\ws-axis\c\bin\HTTPTransport.dll
       XMLParser:C:\Build\ws-axis\c\bin\AxisXMLParser.dll
Channel_HTTP_SSL:C:\Build\ws-axis\c\bin\HTTPSSLChannel.dll
    Channel_HTTP:C:\Build\ws-axis\c\bin\HTTPChannel.dll

      If you are using Axis3 transport, then you need to build the files
in
transport/axis3, transport/axis3/HTTPChannel and
transport/axis3/HTTPSSLChannel (on windows, these will produce
HTTPTransport.dll, HTTPChannel.dll and HTTPSSLChannel.dll and on
non-windows platforms will produce libhttp_transport.so,
libhttp_channel.so
and libhttp_channelssl.so).

      NB: If you are using ANT to build your environment, then you will
require the environment variable OPENSSL_HOME to be set to the base
directory of your OpenSSL installation before doing a build.

Regards,

Fred Preston.

                      "Jairam,

                      Roopnaraine"             To:       "Apache AXIS C
User List" <ax...@ws.apache.org>
                      <Roopnaraine.Jair        cc:
<ax...@ws.apache.org>

                      am@ca.com>               Subject:  SSL exception

                      24/01/05 22:56

                      Please respond to "Apache AXIS C Developers List"


I'm trying code my client to use ssl, but I'm getting an exception each
time I connect.

|-----------------------------------------------------------------------
---|
|Warning - The configuration file was not found (/axiscpp.conf).
|
|Exception : AxisSSLChannelException:OpenSSL Error code is:
|
|error:140790E5:SSL ro
|
|utines:SSL23_WRITE:ssl handshake failure
|
|-----------------------------------------------------------------------
---|

All you have to do to get your client code to use ssl is to change http
to https and have the following files:

ssleay32.dll
xsec_1_1_0.dll
libeay32.dll
Axis2SSLChannel.dll

in your client directory or path right?

Vince.