Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

21 May, 2024: Computers section is temporarily disabled for maintenance. It will take several days before it's back.


devel / comp.lang.tcl / Re: FTP over TLS

SubjectAuthor
* FTP over TLSMike Griffiths
+* Re: FTP over TLSAndreas Leitgeb
|`- Re: FTP over TLSMike Griffiths
`* Re: FTP over TLSgreg
 `- Re: FTP over TLSMike Griffiths

1
FTP over TLS

<b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22063&group=comp.lang.tcl#22063

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:41:b0:3f4:d3a6:9598 with SMTP id y1-20020a05622a004100b003f4d3a69598mr4476004qtw.11.1684096216695;
Sun, 14 May 2023 13:30:16 -0700 (PDT)
X-Received: by 2002:a05:620a:f07:b0:74e:8b1:37eb with SMTP id
v7-20020a05620a0f0700b0074e08b137ebmr10188461qkl.4.1684096216471; Sun, 14 May
2023 13:30:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!45.76.7.193.MISMATCH!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 14 May 2023 13:30:16 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=81.99.101.178; posting-account=hbOuAgoAAACCTxHaAgRboJbA2XUYvKy2
NNTP-Posting-Host: 81.99.101.178
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com>
Subject: FTP over TLS
From: mike@keyboardzombie.com (Mike Griffiths)
Injection-Date: Sun, 14 May 2023 20:30:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 22
 by: Mike Griffiths - Sun, 14 May 2023 20:30 UTC

Hi all,

Does anyone have any experience of doing FTP over TLS in TCL? I was naively hoping, when I saw no mention of it in the ftp package docs or wiki page, that it may be as easy as just changing [socket] calls in the ftp package code for ::tls::socket but (with verbose and debug options in the ftp package set) I'm just getting error messages:

error error | Service not available!
error error | Not connected!

after very long timeouts. Anyone have any advice/experience doing this?

(Mike) 39 % package require Tcl
8.6.9
(Mike) 40 % package require ftp
2.4.13
(Mike) 41 % package require tls
1.7.16

Many thanks,

Mike

Re: FTP over TLS

<slrnu641j6.4ls.avl@logic.at>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22070&group=comp.lang.tcl#22070

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: avl@logic.at (Andreas Leitgeb)
Newsgroups: comp.lang.tcl
Subject: Re: FTP over TLS
Date: Mon, 15 May 2023 10:16:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <slrnu641j6.4ls.avl@logic.at>
References: <b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com>
Reply-To: avl@logic.at
Injection-Date: Mon, 15 May 2023 10:16:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="816d6959050300cf36ad599b3de29a69";
logging-data="3186773"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jWKic6sggh/W8xjpxaI5/"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:CDbCV/ql2/UP3egXbnuZ/U3MQiw=
 by: Andreas Leitgeb - Mon, 15 May 2023 10:16 UTC

Mike Griffiths <mike@keyboardzombie.com> wrote:
> Does anyone have any experience of doing FTP over TLS in TCL?

ftp is a rather "complicated" protocol, involving separate connections
for transfer of directory listings or files.

There exist some approaches to wrap that with tls channels, but I must
admit I'm not very experienced with those. My feeling is, that at
very least, you need to make sure to switch "passive" mode off (or was
it on, anyway, be sure to try both ways!)

The "wrong" one of these "passive" settings would require the ftp-server
to open a connection back to you, which pretty surely wouldn't work.

Most likely it would be best to find some other alternative like
"sftp", which is based on ssh and entirely different.

> I was naively hoping, when I saw no mention of it in the ftp package docs
> or wiki page, that it may be as easy as just changing [socket] calls in the
> ftp package code for ::tls::socket but (with verbose and debug options in
> the ftp package set) I'm just getting error messages:

Also, be sure that also the secondary connection (which for correct
passive-mode setting would originate from the client) also gets
tls-wrapped.

Re: FTP over TLS

<ba2591f2-c1a6-4e8f-8958-2c5d6797f955n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22072&group=comp.lang.tcl#22072

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:bc5:b0:61b:5b56:69ce with SMTP id ff5-20020a0562140bc500b0061b5b5669cemr5762903qvb.4.1684148419274;
Mon, 15 May 2023 04:00:19 -0700 (PDT)
X-Received: by 2002:ad4:48c6:0:b0:5ef:5f8d:c8b0 with SMTP id
v6-20020ad448c6000000b005ef5f8dc8b0mr5748052qvx.3.1684148418936; Mon, 15 May
2023 04:00:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 15 May 2023 04:00:18 -0700 (PDT)
In-Reply-To: <slrnu641j6.4ls.avl@logic.at>
Injection-Info: google-groups.googlegroups.com; posting-host=81.99.101.178; posting-account=hbOuAgoAAACCTxHaAgRboJbA2XUYvKy2
NNTP-Posting-Host: 81.99.101.178
References: <b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com> <slrnu641j6.4ls.avl@logic.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ba2591f2-c1a6-4e8f-8958-2c5d6797f955n@googlegroups.com>
Subject: Re: FTP over TLS
From: mike@keyboardzombie.com (Mike Griffiths)
Injection-Date: Mon, 15 May 2023 11:00:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 42
 by: Mike Griffiths - Mon, 15 May 2023 11:00 UTC

On Monday, 15 May 2023 at 11:16:10 UTC+1, Andreas Leitgeb wrote:
> Mike Griffiths <mi...@keyboardzombie.com> wrote:
> > Does anyone have any experience of doing FTP over TLS in TCL?
> ftp is a rather "complicated" protocol, involving separate connections
> for transfer of directory listings or files.
>
> There exist some approaches to wrap that with tls channels, but I must
> admit I'm not very experienced with those. My feeling is, that at
> very least, you need to make sure to switch "passive" mode off (or was
> it on, anyway, be sure to try both ways!)
>
> The "wrong" one of these "passive" settings would require the ftp-server
> to open a connection back to you, which pretty surely wouldn't work.
>
> Most likely it would be best to find some other alternative like
> "sftp", which is based on ssh and entirely different.
> > I was naively hoping, when I saw no mention of it in the ftp package docs
> > or wiki page, that it may be as easy as just changing [socket] calls in the
> > ftp package code for ::tls::socket but (with verbose and debug options in
> > the ftp package set) I'm just getting error messages:
> Also, be sure that also the secondary connection (which for correct
> passive-mode setting would originate from the client) also gets
> tls-wrapped.
Hi Andreas,

Thanks for your reply. For the time being I've gone with using a portable (no install) ftp client with command line behaviour that I can ship with my Tcl code to do the transfers, though if anyone's made a pure-Tcl approach this would still be great to see.

I did try changing all the sockets to tls::socket variants, and a (very light) bit of research before I switched to the ftp.exe approach suggested there may actually be 2 ports in play for implicit ftps so I tried that too, as well as using both passive and active modes, but nothing proved successful, alas...

Kind regards,

Mike

Re: FTP over TLS

<eab5ed8f-7ca6-4203-8890-955d2868f27bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22082&group=comp.lang.tcl#22082

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:105:b0:3ee:be98:9fc9 with SMTP id u5-20020a05622a010500b003eebe989fc9mr11269609qtw.3.1684177714922;
Mon, 15 May 2023 12:08:34 -0700 (PDT)
X-Received: by 2002:a05:620a:1713:b0:759:15da:1b5c with SMTP id
az19-20020a05620a171300b0075915da1b5cmr3723993qkb.7.1684177714647; Mon, 15
May 2023 12:08:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 15 May 2023 12:08:34 -0700 (PDT)
In-Reply-To: <b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.80; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.80
References: <b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eab5ed8f-7ca6-4203-8890-955d2868f27bn@googlegroups.com>
Subject: Re: FTP over TLS
From: gregor.ebbing@googlemail.com (greg)
Injection-Date: Mon, 15 May 2023 19:08:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: greg - Mon, 15 May 2023 19:08 UTC

TclCurl
https://wiki.tcl-lang.org/page/TclCurl

Tcl binding for libcurl, a library for accessing internet resources of various types. Supports FTP, FTPS, , SFTP etc..

Re: FTP over TLS

<590ebec2-b8fd-45e2-86c4-e384ea4c2fd6n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=22083&group=comp.lang.tcl#22083

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:178a:b0:759:41f7:4688 with SMTP id ay10-20020a05620a178a00b0075941f74688mr2151067qkb.14.1684179717418;
Mon, 15 May 2023 12:41:57 -0700 (PDT)
X-Received: by 2002:a05:620a:2449:b0:759:458a:bbea with SMTP id
h9-20020a05620a244900b00759458abbeamr2028175qkn.1.1684179717178; Mon, 15 May
2023 12:41:57 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 15 May 2023 12:41:56 -0700 (PDT)
In-Reply-To: <eab5ed8f-7ca6-4203-8890-955d2868f27bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=81.99.101.178; posting-account=hbOuAgoAAACCTxHaAgRboJbA2XUYvKy2
NNTP-Posting-Host: 81.99.101.178
References: <b10a504b-8231-4b39-b520-8472c0e7c362n@googlegroups.com> <eab5ed8f-7ca6-4203-8890-955d2868f27bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <590ebec2-b8fd-45e2-86c4-e384ea4c2fd6n@googlegroups.com>
Subject: Re: FTP over TLS
From: mike@keyboardzombie.com (Mike Griffiths)
Injection-Date: Mon, 15 May 2023 19:41:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 16
 by: Mike Griffiths - Mon, 15 May 2023 19:41 UTC

On Monday, 15 May 2023 at 20:08:36 UTC+1, greg wrote:
> TclCurl
> https://wiki.tcl-lang.org/page/TclCurl
>
> Tcl binding for libcurl, a library for accessing internet resources of various types. Supports FTP, FTPS, , SFTP etc..
Hi Greg,

Thanks for your reply. I did have a quick look at this and I know I've used it in years gone by, but struggled to find any Win32 binaries for this; it seems to only be source available now; while it's possibly the best Tcl-only approach this unfortunately made it more of a time investment for me to figure out than using an external tool for this project...

Kind regards,

Mike


devel / comp.lang.tcl / Re: FTP over TLS

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor