This commit is contained in:
Родитель
bf2c19cfe2
Коммит
f0dda35be0
|
@ -136,7 +136,7 @@ func unmarshalProtectedSettings(configFolder string, hs handlerSettingsCommon, v
|
|||
|
||||
//back up smime command in case cms fails
|
||||
if err := cmd.Run(); err != nil {
|
||||
errMsg = fmt.Errorf("decrypting protected settings with cms command failed: error=%v stderr=%s \n now decrypting with smime command", err, string(bErr.Bytes()))
|
||||
errMsg = fmt.Errorf("decrypting protected settings with cms command failed: error=%v stderr=%s \n now decrypting with smime command", err, bErr.String())
|
||||
cmd = exec.Command("openssl", "smime", "-inform", "DER", "-decrypt", "-recip", crt, "-inkey", prv)
|
||||
cmd.Stdin = bytes.NewReader(decoded)
|
||||
bOut.Reset()
|
||||
|
@ -144,7 +144,7 @@ func unmarshalProtectedSettings(configFolder string, hs handlerSettingsCommon, v
|
|||
cmd.Stdout = &bOut
|
||||
cmd.Stderr = &bErr
|
||||
if err := cmd.Run(); err != nil {
|
||||
return errors.Wrapf(errMsg, "decrypting protected settings with smime command failed: error=%v stderr=%s", err, string(bErr.Bytes()))
|
||||
return errors.Wrapf(errMsg, "decrypting protected settings with smime command failed: error=%v stderr=%s", err, bErr.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче