Fixed message ed25519 usage
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2830b4f879
commit
b0522a8abc
2
api.go
2
api.go
|
@ -1,7 +1,7 @@
|
|||
package dns_api
|
||||
|
||||
import (
|
||||
"crypto/ed25519"
|
||||
"git.gammaspectra.live/givna.me/dns-api/ed25519"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -2,10 +2,10 @@ package dns_api
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/ed25519"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.gammaspectra.live/givna.me/dns-api/ed25519"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
@ -57,8 +57,7 @@ func CreateSignatureMessage(method string, host string, requestUrl *url.URL, pri
|
|||
return nil, err
|
||||
}
|
||||
|
||||
publicKey := make([]byte, ed25519.PublicKeySize)
|
||||
copy(publicKey, privateKey[ed25519.PublicKeySize:])
|
||||
publicKey := privateKey.Public().(ed25519.PublicKey)
|
||||
|
||||
newRequestUrl.Query().Set(KeyPublicKey, hex.EncodeToString(publicKey))
|
||||
newRequestUrl.Query().Set(KeyExpiration, strconv.FormatInt(expirationTime.UTC().Unix(), 10))
|
||||
|
|
Loading…
Reference in a new issue