R2 SSL Error
Hi! >> about REBOL/View 2.7.8.3.1 1-Jan-2011 Copyright 2000-2011 REBOL Technologies. All rights reserved. REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM >> read https://rebolforum.com connecting to: rebolforum.com ** Command Error: SSL Error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version ** Where: build-port ** Near: system/words/set-modes port/sub-port [secure: true] how it fix?
posted by: Sergey_Vl 21-Jan-2022/5:10:19-8:00
Sadly, Rebol 2 cannot read HTTPS. It can do plain old HTTP: read http://rebolforum.com == {
posted by: Sunanda 21-Jan-2022/11:47:47-8:00
>> ? system/schemes/https SYSTEM/SCHEMES/HTTPS is an object of value: scheme word! HTTPS host none! none port-id integer! 443 ... passive none! none cache-size integer! 5 user-agent string! "REBOL View 2.7.8.3.1" >> read https://ya.ru connecting to: ya.ru == { The potential of R2 seems so great that the lack of source code can be compensated by thoughtful architecture and opportunities :) Opensource R3 and Red are less complete (alpha) and much more demanding on OS and hardware.
posted by: Sergey_Vl 22-Jan-2022/20:03:04-8:00
Yes, you could write your own HTTPS implementation, but that is very advanced work. You could also write a binding to some existing HTTPS library, but that is fairly advanced work and may be hard to do in R2. And it would introduce a dependency, possibly OS-dependent.
posted by: Kaj 23-Jan-2022/13:39:49-8:00
"...some existing HTTPS library..." are using: ...for HTTPS "curl" >> tmp: copy "" call/output "curl -s https://rebolforum.com" tmp tmp: to-block tmp == [ bgcolor="#FFFFFF"> ...for E-mail whit proxy (https://www.stunnel.org). But a solution without using external programs would be much better.
posted by: Sergey_Vl 24-Jan-2022/4:03:18-8:00
Yes, that's the easiest way. If you don't need high performance, it works. I'm currently using cURL that way in the Meta compiler client. I once wrote a binding for R3 to LibCURL. That's the next step up to make it less primitive. Potentially, LibCURL can be linked in statically in R3, but not R2.
posted by: Kaj 24-Jan-2022/8:27:54-8:00
LibCURL/OpenSSL can be "linked in dynamic" for R2? Some like "curllib: load/library decompress #{789CE53C6B77E..."
posted by: Sergey_Vl 24-Jan-2022/17:00:40-8:00
You need to load it by file name, and then bind the functions in the library,
posted by: Kaj 25-Jan-2022/18:46:06-8:00
>> ? system/components/ssl SYSTEM/COMPONENTS/SSL is an object of value: Title string! "Secure Socket Layer" Date date! 17-Jan-2002/22:45:19 Name word! ssl Version tuple! 1.4.0 File file! %comp-ssl.r ... it turns out SSL is written on Rebol? If "yes" is it possible to "update" it? Does anyone have a "comp-ssl.r" file?
posted by: Sergey_Vl 5-Feb-2022/20:26:35-8:00
I think that's just metadata so R2 knows which features it has. I would expect comp-ssl.r to be high-level code that calls low-level C code. It's probably possible to write a new HTTPS scheme, it may even be possible to replace the existing handler, if you don't need speed it may be possible to write it in REBOL, but as I said, that's advanced work. Many people have wanted it for a long time, but nobody has done it.
posted by: Kaj 6-Feb-2022/16:47:56-8:00
|