Hello Thomas,
thanks for your help.
after your recommendations i made changes in src file.
now i can run openssl s_client from win32 in interactive mode and can
read pages with GET (it was impossible before - no problems on linux).
but i cannot read all thing in one cmd line still.
after executing openssl s_client -connect host:port<datafile
(datafile contains GET / HTTP/1.0 and 2 new line chars written by perl
into the file with \n\n) I must press anykey to view full result of
command line......
maybe i must compile demos/ssl/cli.cpp for using command line but i am
not familiar with C unfortunately....
Friday, May 26, 2000, 10:59:02 PM, you wrote:
TR> Modify the s_client code to NOT disconnect when end-of-input is reached
TR> from stdin. Then, using this modified client, you can create a file
TR> with the "GET /document.html HTTP/1.0<cr><ctr>" in it, and do a simple
TR> redirection
TR> $data = `openssl s_client -connect remote.com:443 <datafile`;
TR> The problem with the existing s_client is that it shuts down as
TR> soon as it detects EOF. When running interactively, that's fine.
TR> But when running from command line, the connection is shut down
TR> before the response ever has a chance of arriving.
TR> The change in apps/s_client.c, look for
TR> if ((!c_quiet) && ((i <= 0) || (cbuf[0] == 'Q')))
TR> {
TR> BIO_printf(bio_err,"DONE\n");
TR> goto shut;
TR> }
TR> What we've done in the past is simply add a flag indicating that the
TR> input stream is closed (e.g. STDIN_closed=true;),
TR> Then, earlier on in the same file, where it sets the file descriptor
TR> for the select, modify the "if (read_tty)" to be
TR> "if (read_tty && !STDIN_closed)". Finally, make sure you initialize
TR> STDIN_closed to false initially.
TR> if (tty_on)
TR> {
TR> if (read_tty)
TR> FD_SET(fileno(stdin),&readfds);
TR> if (write_tty)
TR> FD_SET(fileno(stdout),&writefds);
TR> }
TR> Hope this helps.
TR> (Hope I didn't overlook an already existing capability. I'd feel pretty
TR> dumb
TR> if there was one that I missed!)
TR> Cheers, Thomas
TR> Azrael wrote:
>>
>> hi
>>
>> i want to read remote data from other ssl server using perl or others.
>> (without any package)
>> openssl s_client -connect remote.com:443
>> opens connection to host and waits for GET /document.html HTTP/1.0 and
>> 2 Enters.
>>
>> how can i read data from remote page using one command?
>> $data = `openssl s_client -connect remote.com:443 blahblah blah`;
>> or ..........
>> thanks
>>
>> --
>> Best regards,
>> Denaturalist mailto:[EMAIL PROTECTED]
>>
>> ______________________________________________________________________
>> OpenSSL Project http://www.openssl.org
>> User Support Mailing List [EMAIL PROTECTED]
>> Automated List Manager [EMAIL PROTECTED]
--
Best regards,
Denaturalist mailto:[EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]