-
Notifications
You must be signed in to change notification settings - Fork 719
Open
Labels
lockedThis thread is locked, and won't automatically be closedThis thread is locked, and won't automatically be closedwindows
Description
Decrypting my file fails with bad decrypt: wrong final block length
.
I used travis encrypt-file file
under Windows to encrypt my file without problems.
Also I added the generated decryption command to the before_install:
section:
openssl aes-256-cbc -K $encrypted_048ea30036f2_key -iv $encrypted_048ea30036f2_iv -in file.enc -out file -d
(Also tried the --add
option of travis encrypt-file
)
Here are parts of the build log:
[...]
$ export encrypted_048ea30036f2_key=[secure]
$ export encrypted_048ea30036f2_iv=[secure]
[...]
$ openssl aes-256-cbc -K $encrypted_048ea30036f2_key -iv $encrypted_048ea30036f2_iv -in file.enc -out file -d
bad decrypt
139709116544672:error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length:evp_enc.c:532:
The command "openssl aes-256-cbc -K $encrypted_048ea30036f2_key -iv $encrypted_048ea30036f2_iv -in file.enc -out file -d" failed and exited with 1 during .
Your build has been stopped.
Any suggestions?
imjasonmiller, tivac and motiz88
Metadata
Metadata
Assignees
Labels
lockedThis thread is locked, and won't automatically be closedThis thread is locked, and won't automatically be closedwindows
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
BanzaiMan commentedon Sep 3, 2015
Could you try steps with
travis encrypt-file -r OWNER/REPO file
?lukeIam commentedon Sep 3, 2015
sure - but got the same problem with the same message
Some more information about the project:
we need a new build system so I'm trying out Travis CI.
-> the
.travis.yml
only exists in a brachtravisTest
in my fork lukeIam/Vocaluxe.Travis is enabled for this fork and was successfully building, before I added the encrypted file.
The log of the last build can be found here:
https://travis-ci.org/lukeIam/Vocaluxe/builds/78612690
BanzaiMan commentedon Sep 4, 2015
I just remembered. You cannot encrypt more than 1 file, because the second invocation nullifies the first. This is documented. http://docs.travis-ci.com/user/encrypting-files/#Encrypting-multiple-files
lukeIam commentedon Sep 4, 2015
@BanzaiMan Thanks for your time! But I'm afraid I don't get it...
"You cannot encrypt more than 1 file" - I knew this and I've only encrypted a single file and of course I have only one openssl line in my .travis.yml.
The other key/iv pair was from the last attempt and is now deleted.
build log
Or does does the
secure
line of thedeploy
section (github releases), consumes the single possible openssl call, even it does't use a file?BanzaiMan commentedon Sep 4, 2015
@lukeIam In the build you indicated, I see 2 sets of environment variables set by
travis encrypt-file …
command (https://travis-ci.org/lukeIam/Vocaluxe/builds/78612690#L935-L938) This indicates to me that you ran the command twice, and you added those in your repository's settings.In https://travis-ci.org/lukeIam/Vocaluxe/builds/78738939, I see that you've removed one, but perhaps you removed the wrong one.
lukeIam commentedon Sep 4, 2015
@BanzaiMan
I removed all four variables with
travis env unset [...]
and rerantravis encrypt-file
.It recreated $encrypted_a377c9765acb (same variable name).
I started an other try and got the same variable again.
Here is what I executed:
BanzaiMan commentedon Sep 4, 2015
Hmmm. Interesting. Do you have access to another OS (Linux or Mac)? Does this happen there, too?
lukeIam commentedon Sep 4, 2015
I'll install a linux...
cotsog commentedon Sep 4, 2015
Maybe related: we had a report of a user not able to encrypt env variables on Windows.
lukeIam commentedon Sep 4, 2015
On ubuntu 14.04 LTS x64 it worked:
https://travis-ci.org/lukeIam/Vocaluxe/builds/78758729
(The build faild, but this is caused by my deploy script - openssl is working!)
travis encrypt-file
generated a new variable with linux[-]File decryption fails (wrong final block length)[/-][+]File decryption fails (wrong final block length) on Windows[/+]MariadeAnton commentedon Sep 4, 2015
related to @cotsog - it was failing in a Windows 8 machine, using the default Command Prompt and ConEmu x64
16 remaining items
TomeOkin commentedon Apr 17, 2016
I also meet the problem:
The command "openssl aes-256-cbc -K $encrypted_e59b7992228b_key -iv $encrypted_e59b7992228b_iv -in jo.jks.enc -out jo.jks -d" failed and exited with 1 during .
I has try cmd and git shell in win7, but get the same result.
suriyaa commentedon Apr 17, 2016
Got the same problem: https://travis-ci.org/iSCInc/status/builds/123697131! I use Windows 10 - Git Bash, CMD & Powershell.
seayxu commentedon Apr 17, 2016
@TomeOkin @SuriyaaKudoIsc if you don't want to use Linux system,just see this way;I found the reason for this problem is that the Travis encryption generation variable is different from the Linux system in the windows system.So,I suggest you use Linux system do this.
suriyaa commentedon Apr 17, 2016
@seayxu Well... 😅 I can't speak or read in Chinese.
seayxu commentedon Apr 17, 2016
@SuriyaaKudoIsc OK,here is English article
MikeJerred commentedon Apr 21, 2016
+1 Using Windows 8.1 here and got the same error. Encrypting the file on linux (using Google Cloud Shell) works fine
chore(docs): Set up new doc publishing key
snowdream commentedon Jun 12, 2016
This is also happenning on Windows 7 x64 with Git Bash command prompt.
trashier commentedon Jun 29, 2016
This issue still occurs.
nawazdhandala commentedon Aug 2, 2016
+1
Jameskmonger commentedon Aug 3, 2016
Still experiencing this on Windows.
Bosek commentedon Aug 6, 2016
+1 Win10