secure-file cryptographic error en decrypt

Manuel Ornato's Avatar

Manuel Ornato

03 Apr, 2021 05:19 PM

Hi,
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 https://www.appveyor.com/docs/how-to/secure-files/.
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.

Manuel

  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?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? 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