Possible problems(bugs??) in selfserv-tstclnt pair...

"D3|\\||\\|!$" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.nspr
Organization http://groups.google.com
Message-ID <9f9283bc-8690-4018-8a62-16ead7ba7d14@s19g2000prg.googlegroups.com>
Hi All,

I used the selfserv-tstclnt pair as a model to build an SSL client-
server pair written in C: Initially I had been supplying the command
argument -o which caused any problems in the authentication procedure
to be overriden(by enabling the use of a bad certificate handler
callback).

I had generated the certificates with the right attributes but the
ownBadCertHandler callback in tstclnt is returning
PR_IN_PROGRESS_ERROR (-5934L): "Operation is still in progress
(probably a non-blocking connect)". This obviously is not an issue
with the server certificate but rather, has something to do with the
socket configuration... I guess this is because the tstclnt has been
configured as a non-blocking socket and calling PR_Connect is likely
to return this....

Could somebody help me out with it since my SSL client-server is also
returning the same error...

I'm appending the output of tstclnt and selfserv below. selfserv and
tstclnt code can be located at the URLs below.
selfserv: http://lxr.mozilla.org/security/source/security/nss/cmd/selfserv/selfserv.c
tstclnt:   http://lxr.mozilla.org/security/source/security/nss/cmd/tstclnt/tstclnt.c


Warm Regards,
D3|\||\|!$



OUTPUTS:-

For selfserv:

****************************************************************************************************************


selfserv: About to call accept.


selfserv: About to call accept.
selfserv: 0 cache hits; 1 cache misses, 0 cache not reusable
selfserv: SSL version 3.1 using 128-bit RC4 with 128-bit MD5 MAC
selfserv: Server Auth: 1024-bit RSA, Key Exchange: 1024-bit RSA


****************************************************************************************************************


For tstclnt:


****************************************************************************************************************
tstclnt.exe: connecting to IP ADDRESS:PORT NUMBER (address=IP
ADDRESS)
tstclnt.exe: connect: Failure to load dynamic library.
tstclnt.exe: about to call PR_Poll for connect completion!
tstclnt.exe: PR_Poll returned 0x02 for socket out_flags.
tstclnt.exe: ready...
tstclnt.exe: about to call PR_Poll !
tstclnt.exe: PR_Poll returned!
tstclnt.exe: PR_Poll returned 0x00 for stdin out_flags.
tstclnt.exe: PR_Poll returned 0x01 for socket out_flags.
tstclnt.exe: PR_Poll returned 0x01 for socket out_flags.
Bad server certificate: -5934, Operation is still in progress
(probably a non-blocking connect).
tstclnt: SSL version 3.1 using 128-bit RC4 with 128-bit MD5 MAC
tstclnt: Server Auth: 1024-bit RSA, Key Exchange: 1024-bit RSA
subject DN: CN=Dennisian
Server,O=Dennis,L=Dennis,ST=Dennis,C=DennisLand
issuer  DN: CN=Dennis The Menace
0 cache hits; 1 cache misses, 0 cache not reusable
tstclnt.exe: Read from server -1 bytes
tstclnt.exe: about to call PR_Poll !
Hello Server!!! :-)
tstclnt.exe: PR_Poll returned!
tstclnt.exe: PR_Poll returned 0x01 for stdin out_flags.
tstclnt.exe: PR_Poll returned 0x00 for socket out_flags.
tstclnt.exe: stdin read 21 bytes
tstclnt.exe: Writing 21 bytes to server
tstclnt.exe: PR_Poll returned 0x00 for socket out_flags.
tstclnt.exe: about to call PR_Poll !

****************************************************************************************************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.