mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
chore: fix some errors detected by staticcheck (#3089)
* chore: fix some errors detected by staticcheck * feat: remove `rand.Seed()` usage for possibly using "fastrand64" runtime to avoid locking ref: https://pkg.go.dev/math/rand#Seed
This commit is contained in:
@ -3,7 +3,7 @@ package tls
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/xtls/xray-core/main/commands/base"
|
||||
"github.com/xtls/xray-core/transport/internet/tls"
|
||||
@ -30,12 +30,11 @@ func executeCertChainHash(cmd *base.Command, args []string) {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
certContent, err := ioutil.ReadFile(*input)
|
||||
certContent, err := os.ReadFile(*input)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
certChainHashB64 := tls.CalculatePEMCertChainSHA256Hash(certContent)
|
||||
fmt.Println(certChainHashB64)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user