Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-tls
Commits
cc53c4f8
Unverified
Commit
cc53c4f8
authored
Jul 30, 2019
by
Marten Seemann
Committed by
GitHub
Jul 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32 from libp2p/alpn
set an ALPN value in the tls.Config
parents
b3618ca6
5294b2b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
crypto.go
crypto.go
+2
-0
No files found.
crypto.go
View file @
cc53c4f8
...
...
@@ -21,6 +21,7 @@ import (
const
certValidityPeriod
=
100
*
365
*
24
*
time
.
Hour
// ~100 years
const
certificatePrefix
=
"libp2p-tls-handshake:"
const
alpn
string
=
"libp2p"
var
extensionID
=
getPrefixedExtensionID
([]
int
{
1
,
1
})
...
...
@@ -50,6 +51,7 @@ func NewIdentity(privKey ic.PrivKey) (*Identity, error) {
VerifyPeerCertificate
:
func
(
_
[][]
byte
,
_
[][]
*
x509
.
Certificate
)
error
{
panic
(
"tls config not specialized for peer"
)
},
NextProtos
:
[]
string
{
alpn
},
SessionTicketsDisabled
:
true
,
},
},
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment