forked from TrueCloudLab/frostfs-s3-gw
[#8] Accept directly bytes from gate key file
Signed-off-by: Pavel Korotkov <pkorotkov@gmail.com>
This commit is contained in:
parent
d70fe6410b
commit
1e608634e7
1 changed files with 1 additions and 10 deletions
|
@ -161,14 +161,5 @@ func readAndKeepBody(request *http.Request) (*bytes.Reader, error) {
|
|||
}
|
||||
|
||||
func LoadGateAuthPrivateKey(path string) (hcs.X25519PrivateKey, error) {
|
||||
bytes, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
key := string(bytes)
|
||||
privateKey, _, err := hcs.DecodeKeysFromStrings(&key, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return privateKey, nil
|
||||
return ioutil.ReadFile(path)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue