good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
chat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
tinode
chat
Commits
46052f92
Commit
46052f92
authored
Oct 15, 2018
by
or-else
Browse files
Options
Downloads
Patches
Plain Diff
remove inconsistency between keygen and tinode.conf
parent
9512c58f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
keygen/keygen.go
+2
-1
2 additions, 1 deletion
keygen/keygen.go
with
2 additions
and
1 deletion
keygen/keygen.go
+
2
−
1
View file @
46052f92
...
...
@@ -64,7 +64,6 @@ func generate(sequence, isRoot int, hmacSaltB64 string) int {
log
.
Println
(
"Failed to generate HMAC salt"
,
err
)
return
1
}
hmacSaltB64
=
base64
.
URLEncoding
.
EncodeToString
(
hmacSalt
)
}
else
{
var
err
error
hmacSalt
,
err
=
base64
.
URLEncoding
.
DecodeString
(
hmacSaltB64
)
...
...
@@ -77,6 +76,8 @@ func generate(sequence, isRoot int, hmacSaltB64 string) int {
return
1
}
}
// Make sure the salt is base64std encoded: tinode.conf requires std encoding.
hmacSaltB64
=
base64
.
StdEncoding
.
EncodeToString
(
hmacSalt
)
// [1:algorithm version][4:appid][2:key sequence][1:isRoot]
data
[
0
]
=
1
// default algorithm
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment