Be explicit abot files when managing keys.

This commit is contained in:
Mariano Uvalle 2023-11-12 06:58:55 +00:00
parent 39798f50f7
commit 8fa3d44d67
3 changed files with 10 additions and 10 deletions

View file

@ -37,11 +37,11 @@ type controller struct {
func newHttpHandler() http.Handler {
r := mux.NewRouter()
pbk, err := crypto.LoadPublicKey(config.Default.PublicKeyPath)
pbk, err := crypto.LoadPublicKeyFromFile(config.Default.PublicKeyPath)
if err != nil {
panic("could not load server's public key")
}
pvk, err := crypto.LoadPrivateKey(config.Default.PrivateKeyPath)
pvk, err := crypto.LoadPrivateKeyFromFile(config.Default.PrivateKeyPath)
if err != nil {
panic("could not load server's private key")
}