Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement secure gopher protocol. #6208

Closed
wants to merge 3 commits into from
Closed

Conversation

@parazyd
Copy link
Contributor

@parazyd parazyd commented Nov 15, 2020

This commit introduces a "gophers" handler inside the gopher protocol if
USE_SSL is defined. This protocol is no different than the usual gopher
prococol, with the added TLS encapsulation upon connecting. The protocol
has been adopted in the gopher community, and many people have enabled
TLS in their gopher daemons like geomyidae(8), and clients, like clic(1)
and hurl(1).

I have not implemented test units for this protocol because my knowledge
of Perl is sub-par. However, for someone more knowledgeable it might be
fairly trivial, because the same test that tests the plain gopher
protocol can be used for "gophers" just by adding a TLS listener.

Signed-off-by: parazyd parazyd@dyne.org

@parazyd parazyd force-pushed the parazyd:secure-gopher branch from 735e7ad to 96cd68d Nov 15, 2020
@parazyd
Copy link
Contributor Author

@parazyd parazyd commented Nov 15, 2020

As for manual testing, it can be tested with servers that support TLS:

curl gophers://parazyd.org
@emilengler
Copy link
Contributor

@emilengler emilengler commented Nov 15, 2020

Sorry, I disagree. So far there is no specification for it.
In March this year I brought up a discussion at the Gopher-ML about a specification (https://lists.debian.org/gopher-project/2020/03/msg00005.html)
As long as there isn't anything to agree on this shouldn't be merged in my opinion.

@emilengler
Copy link
Contributor

@emilengler emilengler commented Nov 15, 2020

Ping @sebdeckers, maybe interesting for you?

lib/gopher.c Outdated Show resolved Hide resolved
@sebdeckers
Copy link

@sebdeckers sebdeckers commented Nov 15, 2020

TIMTOWTDI 🤷🏼‍♂️ Been a few months since I looked into that discussion. Has anyone begun the IETF legwork to discuss/propose a Gopher with TLS spec? I've seen a bunch of approaches with pros/cons.

@emilengler
Copy link
Contributor

@emilengler emilengler commented Nov 15, 2020

I would prefer to not do the discussion here, but as far as I know there hasn't been any progress made mostly due to backwards compatibility issues

@parazyd
Copy link
Contributor Author

@parazyd parazyd commented Nov 15, 2020

I would prefer to not do the discussion here, but as far as I know there hasn't been any progress made mostly due to backwards compatibility issues

There are no compatibility issues with my patch and proposal. Daemons like geomyidae already implement this specific proposal.

@parazyd parazyd force-pushed the parazyd:secure-gopher branch from 96cd68d to da82f76 Nov 15, 2020
This commit introduces a "gophers" handler inside the gopher protocol if
USE_SSL is defined. This protocol is no different than the usual gopher
prococol, with the added TLS encapsulation upon connecting. The protocol
has been adopted in the gopher community, and many people have enabled
TLS in their gopher daemons like geomyidae(8), and clients, like clic(1)
and hurl(1).

I have not implemented test units for this protocol because my knowledge
of Perl is sub-par. However, for someone more knowledgeable it might be
fairly trivial, because the same test that tests the plain gopher
protocol can be used for "gophers" just by adding a TLS listener.

Signed-off-by: parazyd <parazyd@dyne.org>
@parazyd parazyd force-pushed the parazyd:secure-gopher branch from da82f76 to a249d89 Nov 15, 2020
@jay jay added the GOPHER label Nov 15, 2020
@bagder
Copy link
Member

@bagder bagder commented Nov 15, 2020

Sorry, I disagree. So far there is no specification for it.
In March this year I brought up a discussion at the Gopher-ML about a specification (https://lists.debian.org/gopher-project/2020/03/msg00005.html)
As long as there isn't anything to agree on this shouldn't be merged in my opinion.

I disagree. For me, even without a URL spec - if there is an adopted URL syntax already with both consumers and providers, that fact puts the code and suggestion in different angle.

@parazyd do you perhaps even already have this TLS version of the URI format documented somewhere for reference?

@bagder
Copy link
Member

@bagder bagder commented Nov 16, 2020

I volunteer to extend the test suite for gophers.

@parazyd
Copy link
Contributor Author

@parazyd parazyd commented Nov 16, 2020

@bagder If it makes sense, could you push to this branch and then we can make it a more complete merge request?

@bagder
Copy link
Member

@bagder bagder commented Nov 16, 2020

Yes, once I have something to show!

bagder added 2 commits Nov 16, 2020
@bagder
Copy link
Member

@bagder bagder commented Nov 16, 2020

One commit that adds support for 'gophers' to the test suite. The second one provides an initial test case: that's test 1200 just updated to do gophers instead.

@bagder
Copy link
Member

@bagder bagder commented Nov 28, 2020

related: you should consider registering the gophers URI scheme at https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

@bagder
Copy link
Member

@bagder bagder commented Dec 14, 2020

coming back to this: now we have a docs/URL-SYNTAX.md document that should be extended to also mention this scheme.

Anything else that needs to be done before we merge?

@parazyd
Copy link
Contributor Author

@parazyd parazyd commented Dec 14, 2020

I think we're all set if that is added :)

@bagder
Copy link
Member

@bagder bagder commented Dec 15, 2020

Thanks!

@bagder bagder closed this in a1f06f3 Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.