• Re: Rest Api and TLS not working

    From Rich@21:1/5 to Roderick on Sun Jun 18 13:13:14 2023
    Roderick <hruodr@gmail.com> wrote:

    Small experiment:

    ----------------------------------
    # tclsh
    % package require tls
    1.7.18
    % package require rest
    1.5
    % rest::get https://tcl.tk /
    Unsupported URL type "https"
    % rest::get http://tcl.tk /
    [as expected]
    ---------------------------------

    Why it does not work for https?

    Thanks for any hint.

    Perhaps because you did not follow the directions in the tls docs for registering https as a valid protocol?

    Note from: https://core.tcl-lang.org/tcltls/wiki/Documentation

    HTTPS EXAMPLE

    This example uses a sample server.pem provided with the TLS release,
    courtesy of the OpenSSL project.

    package require http
    package require tls

    http::register https 443 [list ::tls::socket -autoservername true -require true -cadir /etc/ssl/certs]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roderick@21:1/5 to All on Sun Jun 18 12:29:02 2023
    Small experiment:

    ----------------------------------
    # tclsh
    % package require tls
    1.7.18
    % package require rest
    1.5
    % rest::get https://tcl.tk /
    Unsupported URL type "https"
    % rest::get http://tcl.tk /
    [as expected]
    ---------------------------------

    Why it does not work for https?

    Thanks for any hint.

    R.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roderick@21:1/5 to Rich on Sun Jun 18 13:30:02 2023
    On Sun, 18 Jun 2023, Rich wrote:

    Perhaps because you did not follow the directions in the tls docs for registering https as a valid protocol?

    Note from: https://core.tcl-lang.org/tcltls/wiki/Documentation

    HTTPS EXAMPLE

    ...

    Thanks a lot, Rich! That works.

    R.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)