[PD1] minor change

This commit is contained in:
Tiago Sousa 2024-04-23 11:14:09 +01:00
parent b8efcf19b7
commit 0fa940f853
Signed by: tiago
SSH key fingerprint: SHA256:odOD9vln9U7qNe1R8o3UCbE3jkQCkr5/q5mgd5hwua0

View file

@ -50,12 +50,12 @@ func LoadKeyStore(keyStorePath string, password string) KeyStore {
var privKey *rsa.PrivateKey
certFile, err := os.ReadFile(keyStorePath)
keystoreBytes, err := os.ReadFile(keyStorePath)
if err != nil {
log.Panicln("Provided certificate couldn't be opened")
log.Panicln("Provided keystorePath couldn't be opened")
}
privKeyInterface, cert, caCerts, err := pkcs12.DecodeChain(certFile, password)
privKeyInterface, cert, caCerts, err := pkcs12.DecodeChain(keystoreBytes, password)
if err != nil {
log.Panicln("PKCS12 key store couldn't be decoded")
}