[PD1] minor change
This commit is contained in:
parent
b8efcf19b7
commit
0fa940f853
1 changed files with 4 additions and 4 deletions
|
@ -50,12 +50,12 @@ func LoadKeyStore(keyStorePath string, password string) KeyStore {
|
||||||
|
|
||||||
var privKey *rsa.PrivateKey
|
var privKey *rsa.PrivateKey
|
||||||
|
|
||||||
certFile, err := os.ReadFile(keyStorePath)
|
keystoreBytes, err := os.ReadFile(keyStorePath)
|
||||||
if err != nil {
|
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 {
|
if err != nil {
|
||||||
log.Panicln("PKCS12 key store couldn't be decoded")
|
log.Panicln("PKCS12 key store couldn't be decoded")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue