W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2000

RE: Use of SSL

From: Arora Meenakshi <marora@redcreek.com>
Date: Thu, 18 May 2000 11:01:16 -0700
Message-ID: <B74EBB896D29D211A43E00805F650DF20119B86D@mail.redcreek.com>
To: "'Kallweit, Heiner'" <Heiner.Kallweit@commerzbank.com>
Cc: "'www-lib@w3.org'" <www-lib@w3.org>
hello 
i tried this way also , i.e just added the initialization /termintaion
statements & tried to 
load the foll. url: https://investing.schwab.com/trading/start
but i always get the foll. error....
Fatal Error: SSLWRITE operation failed (WinSock reported error=0)

Now my code consists of just the foll. statements:
    HTProfile_newPreemptiveClient("TestApp", "1.0");
    HTSSLhttps_init(YES);
    HTPrint_setCallback(printer);
    HTTrace_setCallback(tracer);
    HTSetTraceMessageMask("sop");
    HTRequest_setOutputFormat(request, WWW_RAW);
    HTRequest_addConnection(request, "close", "");
    char * cwd = HTGetCurrentDirectoryURL();
    char * absolute_url = HTParse(url, cwd, PARSE_ALL);
    chunk = HTLoadToChunk(absolute_url, request);
    char * string = HTChunk_toCString(chunk);
    HTSSLhttps_terminate();
    HTProfile_delete();

Am i still missing something......
Also , the secureget example of the glue code itself is not working .... may
be i have the wrong glue code ...but i downloaded it yesterday only from the
libwww site....:-( 

the foll. is the error dump
----------------------------------------

HTTP........ Looking for `https://investing.schwab.com/trading/start'
HTHost parse Looking up `investing.schwab.com' on port 443
Event....... Created event 00D77620 with context 00D776B0, priority 20, and
time
out -1
Event....... Created event 00D775E0 with context 00D776B0, priority 20, and
time
out -1
Event....... Created event 00D775A0 with context 00D776B0, priority 20, and
time
out -1
Event....... Created event 00D77560 with context 00D776B0, priority 20, and
time
out -1
Event....... Created event 00D77520 with context 00D776B0, priority 20, and
time
out -1
Event....... Created event 00D774E0 with context 00D776B0, priority 20, and
time
out -1
Host info... added `investing.schwab.com' with host 00D776B0 to list
00D77940
Host connect Grabbing lock on Host 00D776B0 with 00D77A10
Host info... Added Net 00D77A10 (request 00D51280) to pipe on Host 00D776B0,
1 r
equests made, 1 requests in pipe, 0 pending
HTHost...... No ActivateRequest callback handler registered
HTHost 00D776B0 going to state TCP_CHANNEL.
HTHost 00D776B0 going to state TCP_DNS.
Looking up investing.schwab.com
DNS Add..... `investing.schwab.com' with 1 home(s) to 00D772E0
ParseInet... as port 443 on 162.93.205.133 with 1 homes
HTHost 00D776B0 going to state TCP_NEED_SOCKET.
Socket...... Created 624
Net Manager. Increasing active sockets to 1, 0 persistent sockets
Socket...... Turned off Nagle's algorithm
Socket...... Blocking socket
Channel..... Hash value is 21
Channel..... Added 00D78E40 to list 00D78EA0
HTSSLWriter. Created 00D78DC0
Socket...... TCP send buffer size is 8192 for socket 624
Contacting investing.schwab.com
HTHost 00D776B0 going to state TCP_NEED_CONNECT.
HTHost 00D776B0 going to state TCP_CONNECTED.
HTHost 00D776B0 connected.
Host connect Unlocking Host 00D776B0
HTTP........ Force flush on preemptive load
StreamStack. Raw output...
Tee......... Created stream 00D78CA0 with resolver 002E49C0
HTTP........ Dumping response to `w3chttp.out'
Tee......... Created stream 00D78C20 with resolver 002E49C0
HTTP........ Dumping request to `w3chttp.out'
Host Event.. FLUSH passed to `https://investing.schwab.com/trading/start'
HTTP........ Generating HTTP/1.x Request Headers
HTTP........ Generating General Headers
Buffer...... Flushing 00D78D60
HTSSL New... Created new SSL Object 00D78940
HTSSL....... Setting up 00D78940 on socket 624
HTSSL....... New reference count = 1
SSL_connect: before/connect initialization
SSL_connect: SSLv3 write client hello A
SSL_connect: failed in SSLv3 read server hello A
HTSSLWriter. SSL returned 1
Error....... Add  73    Severity: 1     Parameter: `WinSock reported
error=0'
Where: `SSLWRITE'
HTSSL....... Closing SSL Object 00D78940
HTTP Clean.. Called with status -1, net 00D77A10
Net Object.. Delete 00D77A10 and call AFTER filters
Host info... Remove 00D77A10 from pipe
Host Object. closing socket 624
Channel..... Semaphore set to 0 for channel 00D78E40
Channel..... Delete 00D78E40 with semaphore 0
HTSSLReader. Free 01370060
HTSSLReader. FREEING....
HTSSLWriter. FREEING....
Net Manager. Decreasing active sockets to 0, 0 persistent sockets
Channel..... Deleted 00D78E40, socket 624
Host info... removed host 00D776B0 as persistent
Net Object.. Check for pending Net objects
Net Object.. Freeing object 00D77A10
Response.... Created 00D78E10
Net After... calling 003B33B8 (request 00D51280, response 00D78E10, status
-1, c
ontext 00000000)
Net After... calling 00562D08 (request 00D51280, response 00D78E10, status
-1, c
ontext 00000000)
Fatal Error: SSLWRITE operation failed (WinSock reported error=0)
Load End.... Request ended with code -1
------------------------------------------------

any suggestions!!!!!!!!!!!!!!!! 

thanx 
meenakshi


-----Original Message-----
From: Kallweit, Heiner [mailto:Heiner.Kallweit@commerzbank.com]
Sent: Thursday, May 18, 2000 12:47 AM
To: 'www-lib@w3.org'
Subject: Use of SSL


Hi,

there seems to be some confusion about the use of SSL with Libwww.
At first: Install OpenSSL and the Gluecode.
Then insert the initialization- and termination-calls into your program.
(HTSSLhttps_init and HTSSLhttps_terminate)
SSL is implemented via filters for "https://*". So, if you add filters for
"http://*" you also have to add those filters for "https://*".
Then the use of SSL is, as Olga just said again, totally transparent.
You don't need code like the following (recently posted).
>    HTProfile_newPreemptiveClient((LPCTSTR)AfxGetAppName(), VERSION); 
>    HTProtocol_add("https", "buffered_tcp", 443, YES, HTLoadHTTP, NULL); 

Heiner Kallweit
Andersen Consulting
Received on Thursday, 18 May 2000 14:01:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:36 GMT