Reading encrypted pages with REBOL???
[1/5] from: ralph:abooks at: 28-Sep-2000 10:30
One of our customers using the /Command order forms I wrote
(https://abooks.safeserver.com/orders/command.html), wanted to read the form
into REBOL, i.e.:
a: read https://abooks.safeserver.com/orders/command.html
It never occurred to me that anyone would want to (since the forms were
designed for browsers) and, of course, it doesn't work since REBOL evidently
cannot read encrypted web pages yet. Or can it? Is there a way to access the
https format?
Thanks,
--Ralph Roberts
[2/5] from: doug:vos:eds at: 28-Sep-2000 11:02
No, we use https:// all the time for many EDS web sites
but No, rebol cannot use read on https:// or
you cannot use load/markup https://
Also, https:// can be used for all types of html data,
not just e-commerce credit-card entry forms.
However, you can use:
read or
load/markup http:// which is very useful for "re-purposing data"
Holger has commented on this before, and it sounds
like it will "be-a-while" before rebol/core has the
ability to read https:// (secure pages).
[3/5] from: petr:krenzelok:trz:cz at: 28-Sep-2000 18:27
----- Original Message -----
From: <[doug--vos--eds--com]>
To: <[list--rebol--com]>
Sent: Thursday, September 28, 2000 5:02 PM
Subject: [REBOL] Reading encrypted pages with REBOL??? Re:
> No, we use https:// all the time for many EDS web sites
> but No, rebol cannot use read on https:// or
<<quoted lines omitted: 7>>
> like it will "be-a-while" before rebol/core has the
> ability to read https:// (secure pages).
IIRC the reason is size of SSL protocol - several times of size of Core :-)
Maybe /Serve will solve it for you ...
-pekr-
[4/5] from: ptretter:charter at: 28-Sep-2000 15:13
I am very interested in this subject as I to prefer some functions with
HTTPS. Until then I use my IIS server for all HTTPS fucntions. Anybody got
the scoop on this as its important in my opinion for RT overall stradegy.
[5/5] from: chris::double::tab::co::nz at: 2-Oct-2000 9:30
> IIRC the reason is size of SSL protocol - several times of size of
> Core :-)
>
Using OpenSSL (http://www.openssl.org) it is not too difficult to add
SSL support to an existing sockets package. I added SSL support to my
Lisp Socket package in very few lines [1]. This included using SSL
through a generic proxy. I've also done the same with Dylan, adding
SSL support to the existing Dylan sockets library [2].
If you can call call/link external libraries to include OpenSSL
(Rebol/Command for example) you could might be able to add the support
yourself in a few hours.
Note that I've only done this on Windows - not other OS's - so it may
be more involved than that.
The basic steps once you've got a socket connected using the standard
OS calls were to use the OpenSSL calls:
method = sslv23_client_method();
ctx = ssl_ctx_new(method);
handle = ssl_new(ctx);
ssl_set_fd( handle, socket_descriptor);
ssl_connect( handle );
Once the above is done you use the ssl_write and ssl_read functions
instead of the OS send and recv functions, passing the 'handle' above,
not the socket descriptor:
ssl_write(handle, buffer, length);
ssl_read(handle, buffer, length);
When closing the socket you first need to do some SSL cleanup:
ssl_shutdown(handle);
closesocket(socket_descriptor);
ssl_free(handle);
ssl_ctx_free(ctx);
That's all there is too it. The source to my Lisp version is at my
site if anyone wants to try a REBOL vesion.
[1] http://www.double.co.nz/cl
[2] http://www.double.co.nz/dylan
Chris.
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted