aescrypt_keygen exit code

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
tremolux66
Posts: 2
Joined: Wed Sep 14, 2016 5:12 am

aescrypt_keygen exit code

Post 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.
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: aescrypt_keygen exit code

Post 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
tremolux66
Posts: 2
Joined: Wed Sep 14, 2016 5:12 am

Re: aescrypt_keygen exit code

Post by tremolux66 »

The exit code fix works great - thanks for the quick response!
Post Reply