Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

reuse code from go-libp2p-tls #18

Closed
Stebalien opened this issue Jun 21, 2018 · 6 comments · Fixed by #67
Closed

reuse code from go-libp2p-tls #18

Stebalien opened this issue Jun 21, 2018 · 6 comments · Fixed by #67
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/enhancement A net-new feature or improvement to an existing feature status/deferred Conscious decision to pause or backlog

Comments

@Stebalien
Copy link
Member

Given that QUIC is using the standard golang TLS config type, it would be awesome if we could extract this code out into a new library and then re-use the same handshake for TLS over TCP. Something like:

type Identity tls.Config

func NewIdentity(privKey ic.PrivKey) (*Identity, error) { return generateConfig(privKey) }

// for dialing
func (i *Identity) ConfigForPeer(remote ic.PubKey) (*tls.Config, error) {
  // clone the config and set the validator.
}

func KeyFromChain([]*x509...) (ic.PubKey, error) { ... }

(and any other useful helper functions you can think of)

@marten-seemann
Copy link
Collaborator

I like this idea. I thought about that before, but decided to leave this code as part of the QUIC package for now, since QUIC provides us with an easy way to roll out new versions of the handshake protocol. We’ll have to solve that separately if we want to reuse this code.

@bigs bigs added kind/enhancement A net-new feature or improvement to an existing feature exp/wizard Extensive knowledge (implications, ramifications) required status/deferred Conscious decision to pause or backlog labels Sep 18, 2018
@Stebalien Stebalien added exp/expert Having worked on the specific codebase is important and removed exp/wizard Extensive knowledge (implications, ramifications) required labels Nov 21, 2018
@Stebalien
Copy link
Member Author

@marten-seemann this is a low-effort issue that would have an extremely high impact (allowing us to add TLS support with almost no effort). Is there any chance we can up the priority on this?

@marten-seemann
Copy link
Collaborator

Sure!

@marten-seemann marten-seemann changed the title Break TLS config code out into a separate package. reuse code from go-libp2p-tls Jul 2, 2019
@marten-seemann marten-seemann added exp/wizard Extensive knowledge (implications, ramifications) required and removed exp/expert Having worked on the specific codebase is important labels Jul 2, 2019
@carsonfarmer
Copy link

carsonfarmer commented Jul 4, 2019

What's the latest on this work? We're very interested in #60. Happy to provide additional use-cases, or even PRs/code help.

@raulk
Copy link
Member

raulk commented Jul 4, 2019

I believe go-libp2p-tls is ready. We need to update go-libp2p-quic-transport to use it. Is that correct, @marten-seemann?

@Stebalien
Copy link
Member Author

See #60 (comment). Basically, hard to integrate our quic library as-is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/enhancement A net-new feature or improvement to an existing feature status/deferred Conscious decision to pause or backlog
Projects
None yet
5 participants