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
7852cb4c
Commit
7852cb4c
authored
Feb 10, 2019
by
Marten Seemann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve logging in tests
parent
838d8159
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
transport_test.go
transport_test.go
+3
-2
No files found.
transport_test.go
View file @
7852cb4c
...
...
@@ -26,18 +26,19 @@ var _ = Describe("Transport", func() {
createPeer
:=
func
()
(
peer
.
ID
,
ic
.
PrivKey
)
{
var
priv
ic
.
PrivKey
if
mrand
.
Int
()
%
2
==
0
{
fmt
.
Fprint
ln
(
GinkgoWriter
,
" using an ECDSA key"
)
fmt
.
Fprint
f
(
GinkgoWriter
,
" using an ECDSA key
:
"
)
var
err
error
priv
,
_
,
err
=
ic
.
GenerateECDSAKeyPair
(
rand
.
Reader
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
())
}
else
{
fmt
.
Fprint
ln
(
GinkgoWriter
,
" using an RSA key"
)
fmt
.
Fprint
f
(
GinkgoWriter
,
" using an RSA key
:
"
)
var
err
error
priv
,
_
,
err
=
ic
.
GenerateRSAKeyPair
(
1024
,
rand
.
Reader
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
())
}
id
,
err
:=
peer
.
IDFromPrivateKey
(
priv
)
Expect
(
err
)
.
ToNot
(
HaveOccurred
())
fmt
.
Fprintln
(
GinkgoWriter
,
id
.
Pretty
())
return
id
,
priv
}
...
...
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