secure-file cryptographic error en decrypt

Manuel Ornato's Avatar

Manuel Ornato

03 Apr, 2021 05:19 PM

I have a file I want to decrypt at build time. It used to work fine until today.
Since I had the warning about re-encrypting my file to benefit from the new "salt" option I decided to do so.
I followed the steps in
Then I encrypted my secret and the salt output and added them as "secure" env variables in my appveyor.yml

But now I get >>
appveyor-tools\secure-file -decrypt "%APPVEYOR_BUILD_FOLDER%\xxxxxxx\yyyyyyy.enc" -secret %DECODE_KEY% -salt %DECODE_SALT%
Encountered a cryptographic error while processing the file.
Command exited with code 2
If I add an echo of the environment variables %DECODE_KEY% and %DECODE_SALT% before the secure-file command I can see they both exist and match my original secret and salt. It's not a PR build by the way.
If I RDP into the VM, I see there is a decrypted file that contains garbage.
If I issue the secure-file command manually, it works fine.

So I'm stuck here and don't know what else to check.
Thanks for your help.


  1. Support Staff 1 Posted by Feodor Fitsner on 03 Apr, 2021 08:23 PM

    Feodor Fitsner's Avatar

    Are you downloading the same secure-file executable that was using to encode the file? Have you re-encoded file with key/salt? Try doing the procedure again?

  2. Feodor Fitsner closed this discussion on 03 Jun, 2021 09:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac