RE: wwwlib and SSL

Hello Abhinav,

Thanks for the inputs. Could you pl let me know where to get the www-lib
from? Can I simply download it from somewhere?

Thanks once again,
Kaustubh

-----Original Message-----
From: Abhinav Rai [mailto:arai@tibco.com]
Sent: Thursday, April 24, 2003 10:02 PM
To: kaustubh.deshmukh@patni.com
Cc: www-lib@w3.org
Subject: Re: wwwlib and SSL


If you are going to use solaris 2.6, 2.7, 2.8 then you need to install
EGD/PRNGD (Entropy gathering daemon) or install patch from solaris to
support
/dev/random.  Without this you application wont work (also on IBM and HP).
If
you use EGD/PRNGD then you have to add following line in HTSSL_init
 RAND_egd(prngd_socket); (with surrounding ifdef for platform).  You may
also
need to do more work if you plan to user identity with your client code.
For
details on using trusted certs identity, key file. look at openssl examples.

Abhinav

Kaustubh Deshmukh wrote:

> Thanks a lot Vic. How can I get www-lib? Is there a free download for that
> somewhere or we need to buy it?
>
> Appreciate your assistance.
>
> Kaustubh
>
> -----Original Message-----
> From: Vic Bancroft [mailto:bancroft@america.net]
> Sent: Thursday, April 24, 2003 6:17 PM
> To: Kaustubh Deshmukh
> Cc: www-lib@w3.org
> Subject: Re: wwwlib and SSL
>
> On Wed, 23 Apr 2003, Kaustubh Deshmukh wrote:
>
> > We have a requirement where we need to communicate to a socket server
> > through https connection. This needs to be done through a C++
application
> > running on Solaris. Will this be possible using www-lib? How?
>
> You should take a look at http://www.w3.org/Library/Examples/wwwssl.c, in
> particular the following fragment,
>
>     /* Set the SSL protocol method. By default, it is the highest
>        available protocol. Setting it up to SSL_V23 allows the client
>        to negotiate with the server and set up either TSLv1, SSLv3,
>        or SSLv2 */
>     HTSSL_protMethod_set (HTSSL_V23);
>
>     /* Set the certificate verification depth to 2 in order to be able to
>        validate self signed certificates */
>     HTSSL_verifyDepth_set (2);
>
>     /* Register SSL stuff for handling ssl access */
>     HTSSLhttps_init(YES);
>
> Since you are using c++, the libwww function prototypes will need to be
> declared as being external c calls.  For example, around your includes,
>
>   #include <iostream.h>
>
>   extern "C" {
>   #define BOOL int
>   #include <HTChunk.h>
>   }
>
>   void main( int argc, char** argv ) {
>     HTChunk * c = HTChunk_new ( 1024 );
>     int s = HTChunk_size ( c );
>     cout << "Chunk allocated at " << c << ", "
>          << "of size " << s << "." << endl;
>   }
>
> We may do this is to add a decoration to the top of the libwww headers
> like,
>
>     #ifdef __cplusplus
>     extern "C" {
>     #endif
>
> and the corresponding
>
>     #ifdef __cplusplus
>     }
>     #endif
>
> more,
> l8r,
> v
>
> --
> No bugs were harmed in the development of this software.
>
> http://elvis.dlogic.org/~bancroft/tiki

Received on Friday, 25 April 2003 08:34:30 UTC