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
dms3
go-dms3
Commits
d4257f95
Commit
d4257f95
authored
Feb 03, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsrepo: fix output to writer
parent
e24f1692
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
repo/config/init.go
repo/config/init.go
+3
-3
No files found.
repo/config/init.go
View file @
d4257f95
...
...
@@ -83,12 +83,12 @@ func identityConfig(out io.Writer, nbits int) (Identity, error) {
return
ident
,
errors
.
New
(
"Bitsize less than 1024 is considered unsafe."
)
}
out
.
Write
([]
byte
(
fmt
.
S
printf
(
"generating %v-bit RSA keypair..."
,
nbits
)
))
fmt
.
F
printf
(
out
,
"generating %v-bit RSA keypair..."
,
nbits
)
sk
,
pk
,
err
:=
ci
.
GenerateKeyPair
(
ci
.
RSA
,
nbits
)
if
err
!=
nil
{
return
ident
,
err
}
out
.
Write
([]
byte
(
fmt
.
S
printf
(
"done
\n
"
)
))
fmt
.
F
printf
(
out
,
"done
\n
"
)
// currently storing key unencrypted. in the future we need to encrypt it.
// TODO(security)
...
...
@@ -103,6 +103,6 @@ func identityConfig(out io.Writer, nbits int) (Identity, error) {
return
ident
,
err
}
ident
.
PeerID
=
id
.
Pretty
()
fmt
.
P
rintf
(
"peer identity: %s
\n
"
,
ident
.
PeerID
)
fmt
.
Fp
rintf
(
out
,
"peer identity: %s
\n
"
,
ident
.
PeerID
)
return
ident
,
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