hi Philippe,
Thanx for the reply.
Im aware of the fact that the Net.lib is required to be loaded before we use
SslLib.lib.
But the problem im facing is that SysLibLoad is failing. The error i got is
'sysErrLibNotFound'. Perhaps the library isnt there on my machine? How do i
get it?
Also, in the code that u have shown me , 'SysLibLoad' is used after all :-)
"
 if(g_prefs.enableSsl)
     {
      err = SysLibFind (kSslDBName, &SslLibRefnum);
   if (err )
   {
    err=SysLibLoad             (kSslLibType,kSslLibCreator,&SslLibRefnum);
   }
"
Rakesh.


"Philippe Fischer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> you don't need the SysLibLoad function cause it's a part of  PalmOS. I
think
> this Function is for custom libs. If you want to communicate over a SSL
> socket you also need the NetLib. I 've done somethink like this:
>
> ________________________________________________________________________
> err = SysLibFind ("Net.lib", &AppNetRefnum);
>  if (!err )
>  {
>      /* If the library is not loaded, load the library*/
>      error = NetLibOpen (AppNetRefnum, &ifErr);
>      if (!error)
>      {
>       outputTextHandle=AppendStringToHandle("Net.lib opened
> successfully\n",outputTextHandle);
>     /*    the outputTextHandle function just generates an output an the
> screen.    */
>
>      }
>      else if (error == netErrAlreadyOpen)
>      {
>       outputTextHandle=AppendStringToHandle("Net.lib already
> open\n",outputTextHandle);
>
>      }
>      else
>      {
>       outputTextHandle=AppendStringToHandle("Error opening
> Net.lib\n",outputTextHandle);
>
>      }
>   }
>   else
>   {
>
>   outputTextHandle=AppendStringToHandle("Net.lib not found !!
> \n",outputTextHandle);
>
>  }
> if(g_prefs.enableSsl)
>     {
>      err = SysLibFind (kSslDBName, &SslLibRefnum);
>   if (err )
>   {
>    err=SysLibLoad (kSslLibType,kSslLibCreator,&SslLibRefnum);
>   }
>   if(!err)
>   {
>       /* If the library is not loaded, load the library*/
>       error = SslLibOpen (SslLibRefnum);
>       if (error == errNone)
>       {
>        outputTextHandle=AppendStringToHandle("SSL Lib opened
> successfully\n",outputTextHandle);
>
>       }
>  /*     else if (error == netErrAlreadyOpen)
>       {
>        outputTextHandle=AppendStringToHandle("SSL Lib already
> open\n",outputTextHandle);
>
>       }
>  */     else
>       {
>        outputTextHandle=AppendStringToHandle("Error opening ssl
> lib\n",outputTextHandle);
>
>    }
>   }
>   else
>   {
>
>    outputTextHandle=AppendStringToHandle("SSL lib not found !!
> \n",outputTextHandle);
>
>   }
>
>   SslLibCreate (SslLibRefnum,&contextTemplate);
>   SslContextCreate(SslLibRefnum,contextTemplate,&context);
> _____________________________________________________________________
>
> then you need to create a NetLib socket and add it to the ssl context with
> SslContextSet_Socket(SslLibRefnum,context,netLibSocket). And finaly you
can
> send data over the socket with  bytesSent=SslWrite(SslLibRefnum, context,
> dataBuffer, bytesToSend,&error)  or read data with
> bytesRead=SslWrite(SslLibRefnum, context, dataBuffer, bytesToRead,&error).
> I hope this summary of my code helps you.
>
> Best regards Philippe.
>
>
>
> ----- Original Message ----- 
> From: "Rakesh Pai" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Friday, November 07, 2003 7:43 AM
> Subject: using SSL on Palm OS
>
>
> > Hi,
> > Im trying to make a SSL connection to a server using the SSL Api's
> > on Palm OS 5.2. The documentation that i could find isnt really
> > helping me. For example,
> >   SysLibLoad(kSslLibType, kSslLibCreator, &libRef ); says one sample
> > code. What is the libtype and libcreater param for SslLib.lib? and is
> > there an SslLib.lib?. I couldnt find SslLib.lib on my machine.
> > Also, once i send a request using the Ssl API's...how can i read the
> > raw data from the data received for me to extract some information?
> > Any help will be appreciated.
> >
> > Thanx.
> >
> > -- 
> > "Reality is an Illusion, although a persistent one"
> > ~Albert Einstein~
> >
> >
> >
> > -- 
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> >
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to