Non-Zero return code on successful decryption?

seidls at seidls at
Tue Nov 4 17:39:43 CET 2003


I'm not quite sure what you are looking for with your question.

What I can tell you is that in the shell script I am running, I check to
return code produced from gpg.  If this code is not zero, the script will
die and cause the team to get paged.

In the case originally describe, we were page and had to look into why the
particular file did not decrypt.  Running the same gpg command from the
command prompt appeared to run without issue (ie the file was decrypted).
What I was trying to determine by posting here is why the return code of 2
was issued, even though I could manually decrypt the file.

Can you please explain in more detail what would cause the gpg:
block_filter: 1st length byte missing message?   Did something not encrypt
fine on the sender side?  Was there an issue during the transmission of the
file?  What else can be done to determine the cause?

Thanks Everyone.

Scott Seidl
Electronic Communication Services
seidls at
Tel) 920-592-2163

This document, and any attachments therein, contains proprietary and
confidential information that may not be disclosed without the prior
written permission of Schneider National, Inc. and its subsidiaries.
Unauthorized use or misuse of this information and its contents is strictly
prohibited. Schneider National, Inc. vigorously protects its rights.

                      carl w spitzer                                                                                                   
                      <cwsiv_home1 at juno        To:       seidls at                                                          
                      .com>                    cc:       gnupg-users at                                                         
                                               Fax to:                                                                                 
                      11/03/2003 02:19         Subject:  Re: Non-Zero return code on successful decryption?                            

Solaris is a form of *nix.  Return codes are issued so that scripts
running programs can make decisions based on how a particular program
completes its run.

Does Solaris use negative logic generally in tests?

           o                     _______________________________
         o      _____            |     CWSIV_HOME1 at JUNO.COM    |
       .][__n_n_|DD[  ====_____  | M A R K L I N   T R A I N S |
     >   (________|__|_[_________]_|___________________________|
    _/oo OOOOO oo`  ooo   ooo  'o!o!o                 o!o!o`

On Fri, 31 Oct 2003 11:01:47 -0600 seidls at writes:
>I have an automated script that will decrypt files that are sent to us
>FTP.  One file that was received today the file would decrypt without
>issue, but gpg would return with a non zero return code.  It was
>that the file could be decrypted from the output sent to the status-fd
>file, and from manually decrypting the file.
>I am using gpg 1.2.1 on a solaris box.
>Does anyone know why this non-zero return code was issued??
>script command
>gpg --options ${gpgoptfle} -o ${outputfile} <${inputfile} 2<${pass} 3>
>script command excuted (with set -x turned on)
>gpg --options /opt/mailbox/scripts/gpg.options -o
>0< /opt/mailbox/fawork/pgpwork/FILE1.330431088~24535 2<
>/opt/mailbox/etc/gpgdefaultkey + es=2
>[[ 2 != 0 ]]
>status-fd file output
>[GNUPG:] ENC_TO AF7F6D910EABD565 16 0

The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit to sign up today!

More information about the Gnupg-users mailing list