FW: SSL related question...

Hello Gurus,

Sorry to bother you. But since last three weeks I am struggling to make SSL
work. Non-SSL version works fine. We have written a program where we make
use of the API's provided by W3C. I might not be able to communicate
properly, but will do the best. We have two issues with SSL based code:
a) Everytime we make a call to connect to a particular http or https...we
make a call to the function:

void IRCLConnection::Init(int pre)
{
  if( pre != RCL_ASYNC && pre != RCL_BLOCKING) return;
  
  // defaule, ignore Init parameter
  if( premptive != pre ) {
    // premptive == current mode, pre == mode switching to 
    if( premptive == RCL_ASYNC ) HTEventTerminate();

    //Now we are into RCL specific Initializations
    // a No Cache (Event Looping) client
    HTSSLhttps_terminate();
    HTProfile_delete();
    if( pre == RCL_ASYNC ) {
      HTPrint("Starting a NoCacheClient\n");
      HTProfile_newNoCacheClient("JH_RCL_EVT", "1.1");
      HTSSLhttps_init(FALSE);
    }
    else {
      HTPrint("Starting a Preemptive Client\n");
      HTProfile_newPreemptiveClient("JH_RCL_BLK", "1.1");
      HTSSLhttps_init(TRUE);
    }

    /* remember the mode switched to */
    premptive = pre;
  } 
};

Issue is when we make a call to HTProfile_newNoCacheClient or
newPreemptiveClient, these two W3C functions load the protocols. Since we
want to add "https" as well, we have to make a call everytime to
HTSSLhttps_init(). And we always call HTProfile_delete() function to unload
the protocols, we also have to call HTSSLhttps_terminate() to unload
"https"; but the teminate function also does more than delete the protocol.
Is it okay to call like this??? Because HTProfile_delete() is called many
times within your W3C code as well, but there we cannot correspondingly call
HTSSLhttps_terminate() since it is your land.

b) The big issue is, when we make a call to http....; we get XML string back
which we parse it by calling <retval = RCL_XMLParseInit(rHandle, xmlstr);>
and everything is perfectly fine.
But when we make a call to https.....;  in a similar way; I don't get the
XML string back. Infact it does not talk to the server either as I am
monitoring the log file as well. So the request somehow does not even reach
the server. One thing I have noticed that while debugging that when it hits
the 'if loop'; (bold'ed below) it does some kind of Writing...Reading...
where it gets back the result set in the case of "http". But in "https", it
goes thru but somehow doesnot bring back anything. 

PUBLIC int HTEventList_dispatch (SOCKET s, HTEventType type, ms_t now)
{
    SockEvents * sockp = SockEvents_get(s, SockEvents_find);
    if (sockp) {
	HTEvent * event = sockp->events[HTEvent_INDEX(type)];

	/* Fixup the timeout */
	if (sockp->timeouts[HTEvent_INDEX(type)])
	    HTTimer_refresh(sockp->timeouts[HTEvent_INDEX(type)], now);

	/*
	**  If we have found an event object for this event then see
	**  is we should call it.
	*/
	if (event && event->priority!=HT_PRIORITY_OFF)
	    return (*event->cbf) (s, event->param, type);
	HTTRACE(THD_TRACE, "Dispatch.... Handler %p NOT called\n" _ sockp);
	return HT_OK;
    }
    HTTRACE(THD_TRACE, "Dispatch.... Bad socket %d\n" _ s);
    return NO;
}

Call Stack:
HTEventList_loop(_HTRequest * 0x00f38430) line 629
IRCLConnection::NewRequest(IRCLConnection * const 0x01661630, char *
0x01770e7d, char * 0x01870060) line 477 + 9 bytes
RCLCAPI::RCL_NASNewRequest(RCLCAPI * const 0x01661630, char * 0x01770e7d,
char * 0x01870060, int 1) line 114 + 17 bytes
RCL_NASNewRequest(unsigned long 23467568, char * 0x01770e7d, char *
0x01870060, int 1) line 49
main(int 2, char * * 0x01770e30) line 110 + 19 bytes
mainCRTStartup() line 206 + 25 bytes
KERNEL32! 77f1b9ea()


I don't know how effective I was in explaining the issue, but any kind of
help will be really appreciatable. One thing to note is that we are using
Snareworks as well in our program.


NOTE: I HAVE ALSO DOWNLOADED 5.3.1 BUT STILL NO CHANGE IN MY RESULT.


Thanks,
Anup Sodhani
Development, Data and Architecture Group, C-4 
Voice: 617-572-4012
Email: asodhani@jhancock.com

-----Original Message-----
From:	Olga Antropova [SMTP:olga@eai.com]
Sent:	Thursday, August 17, 2000 3:55 PM
To:	Sodhani, Anup
Subject:	Re: SSL related question...

Anup,

ssl in wwwlib is not stable It was the first try of how to glue ssl into the
library. I am not maintaining the wwwlib ssl and cannot say what is the
problem.
Basically ssl in wwwlib should be reimplemented to be useful (especially in
commercial applications). In addition to instabilities is doesn't support
proxies.
Sorry for the bad news...

Olga.


"Sodhani, Anup" wrote:

> Hello Olga,
>
> I am having problem using the SSL code. We have written a program which
> makes use of W3C library calls. When using non-ssl functions, my program
is
> able to talk to the Servlet thru Snareworks and gets back XML string which
I
> parse it. But when I use ssl based code; it hangs in the while loop of the
> function call "HTEventList_loop(request)".
>
> Would you be able to help please.
>
> Thanks,
> Anup Sodhani
> Development, Data and Architecture Group, C-4
> Voice: 617-572-4012
> Email: asodhani@jhancock.com

Received on Friday, 25 August 2000 02:52:51 UTC