forked from TrueCloudLab/lego
nearlyfreespeech: fix salt
This commit is contained in:
parent
a423bb7411
commit
a7befed6e8
1 changed files with 4 additions and 2 deletions
|
@ -125,9 +125,11 @@ func (c Signer) Sign(uri string, body, login, apiKey string) string {
|
|||
// Workaround for https://golang.org/issue/58605
|
||||
uri = "/" + strings.TrimLeft(uri, "/")
|
||||
|
||||
hashInput := fmt.Sprintf("%s;%s;%s;%s;%s;%02x", login, timestamp, c.saltShaker(), apiKey, uri, bodyHash)
|
||||
salt := c.saltShaker()
|
||||
|
||||
return fmt.Sprintf("%s;%s;%s;%02x", login, timestamp, c.saltShaker(), sha1.Sum([]byte(hashInput)))
|
||||
hashInput := fmt.Sprintf("%s;%s;%s;%s;%s;%02x", login, timestamp, salt, apiKey, uri, bodyHash)
|
||||
|
||||
return fmt.Sprintf("%s;%s;%s;%02x", login, timestamp, salt, sha1.Sum([]byte(hashInput)))
|
||||
}
|
||||
|
||||
func getRandomSalt() []byte {
|
||||
|
|
Loading…
Reference in a new issue