On Mar 4, 1:42 pm, Nelson Bolyard <[EMAIL PROTECTED]>
wrote:
> D3|\||\|!$ wrote, On 2008-03-03 21:57:
>
> > Hi All!!!
>
> > I wrote an SSL server similar to selfserv.c
> > SSL_ConfigServerSessionIDCache is reinitializing the
> > Server_Certificate_Nickname string to "", due to which the application
> > is not able to find out the certificate or the private key in the
> > database..
>
> Well, the SSL_ConfigServerSessionIDCache in NSS doesn't have any access
> to the server certificate nickname, and cannot harm it,


I know this fact: I have gone through its source code.. But still, the
variable holding the certificate nickname string gets initialized to
null character as soon as SSL_ConfigServerSessionIDCache is called(and
which returns SUCCESS..)


>so this must be a problem unique to your implementation of that function.


I have used the EXACT sequence of functions for initialization and
configuration as done by selfserv... and had been getting it to work
properly till now(when the code ran in C...). I have implemented my
own versions for other things though.. So I think that there is
something else that I am unaware of...


> > I wrote its equivalent client application working similar to the
> > tstclnt.c
> > I tested the application with my own compiled selfserv.c
> > The PR_Connect function in the client is failing with PR_GetError
> > throwing up error -5934(PR_IN_PROGRESS_ERROR) The API's description of
> > it is: "Operation is still in progress (probably a non-blocking
> > connect)"
>
> It sounds to me like you are unfamiliar with the operation of non-blocking
> sockets.  I strongly recommend that you get a book that teaches about
> sockets programming, including non-blocking sockets, and study it.
>
> I might suggest Richard Stevens' multi-volume book entitled "Unix network
> programming".  Don't let the word Unix in the title throw you off.
> Sockets on Windows are essentially the same as on Unix (especially when
> used through NSPR). I don't know of any book that focused on Windows that
> is nearly as complete as Stevens' book.


I haven't read UNP though.. but I do know what non-blocking sockets
are!! :-))


> > On the other hand, the PR_Accept on the server side is returning
> > SUCCESS(!!! :-o). So I cannot figure out what has gone wrong with my
> > application.
>
> selfserv uses blocking sockets.


Oh!!! I thought it was non-blocking.... I'll look into it right away..


> > Earlier I had this same code in C and all the stuff was working
> > properly but now I've converted it into C++ code and there are
> > problems popping up...
>
> An obvious way to find the problem is to step/trace through both
> implementations of tstclnt, yours and NSS's, and see how and where in
> the code they differ in behavior.
>
> /Nelson


Yeah!! I've already debugged the thing and the first place where they
differ in behaviour is when PR_Connect fails(Same initialization and
configuration)... :-((  Except for the fact that bulky configuration
sequences are split between a few function calls...

Warm Regards,
D3|\||\|!$
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to