Page 1 of 1

aescrypt_keygen exit code

Posted: Sat Mar 11, 2017 4:10 am
by tremolux66
To get the keyfile feature, we're using the Linux version of AES Crypt (v3.10) compiled for Cygwin x86 on Windows 7. When we run aescrypt_keygen, the program seems to complete successfully (no error messages) but the exit code is 255 (-1). In looking over the main program, unless there's an error that executes a return -1, it looks like it's just using whatever value is left in the rc variable following the getopt() loop as the "normal" exit.

I'm writing a custom GUI-based app that uses ShellExecuteWait() to run aescrypt_keygen (actually, bash.exe -c '...') and currently can't tell whether the command succeeded or not. I looked at the newest source (v3.12) and no major differences in aescrypt_keygen.c:main() jumped out at me.

Any ideas what's causing this? Suggestions for a workaround? I can devise a fix, but I don't want to stray from the official source unless absolutely necessary.

Re: aescrypt_keygen exit code

Posted: Sat Mar 11, 2017 11:50 pm
by paulej
Indeed, that was a trivial bug. I've fixed it in this release:
https://www.aescrypt.com/download/v3/li ... t-3.13.tgz

Re: aescrypt_keygen exit code

Posted: Tue Mar 21, 2017 3:32 am
by tremolux66
The exit code fix works great - thanks for the quick response!