- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: GnuPG not working when in BATCH
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 01:24 PM
09-05-2011 01:24 PM
GnuPG not working when in BATCH
A client has a command procedure to pull encrypted files from an ftp site and then decrypt them They now want to do this on a nightly basis and tried putting their procedure in a resubmitting BATCH job.
Interactively, their command procedure works to decrypt the files with this line doing the PGP decryption:
$ PIPE gpg -v --no-tty --passphrase-fd 0 --output "file.csv" --decrypt "file^.csv.pgp" < PASSPHRASE.TXT
However, in BATCH, the 'gpg' command seem to go into an infinite loop.
I thinking something is confusing the'gpg --passphrase-fd 0..." in batch mode.
Please, no lectures about the PASSPHRASE in a file...
- Tags:
- GNUPG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 02:26 PM
09-05-2011 02:26 PM
Re: GnuPG not working when in BATCH
FWIW, I founf that just trying to use GPG in batch is the problem:
$ SET PROCESS/PARSE_STYLE=EXTENDED
$ @SYS$COMMON:[GnuPG]GnuPG_SETUP.COM
$ GPG == "$SYS$COMMON:[GNUPG.GNUPG-1_4_11A_VMS.G10.ALPHAL]GPG.EXE
$ GPGV == "$SYS$COMMON:[GNUPG.GNUPG-1_4_11A_VMS.G10.ALPHAL]GPGV.EXE
$ gpg -?
Infinite loop!
$ gpg --version
gpg (GnuPG) 1.4.11a
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 03:07 PM
09-05-2011 03:07 PM
Re: GnuPG not working when in BATCH
Are you running your the HP GnuPG port, Mr Schweda's port, your own port, or some other port?
If you're not running Mr Schweda's port, start there. Failing that, maybe try your own port?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 03:52 PM
09-05-2011 03:52 PM
Re: GnuPG not working when in BATCH
The GnuPG on the HP site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 04:03 PM
09-05-2011 04:03 PM
Re: GnuPG not working when in BATCH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 04:07 PM
09-05-2011 04:07 PM
Re: GnuPG not working when in BATCH
I stand corrected:
$SYS$COMMON:[GNUPG.GNUPG-1_4_11A_VMS.G10.ALPHAL]GPG.EXE
-------------------------------------------------^^^^^^^^
I looked at the HP site and that version is 1.4.7.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 04:12 PM
09-05-2011 04:12 PM
Re: GnuPG not working when in BATCH
Definitely Steven M. Schweda's build... as per SYS$COMMON:[GNUPG.GNUPG-1_4_11A_VMS.VMS]VMS_NOTES.TXT...
When reporting problems, especially build problems, with GnuPG for
VMS, it is often useful to reveal precise compiler, run-time library,
and VMS version information. The program DECC_VER.C (included in the
kit) is intended to make that easier.
------------------------------------------------------------------------
Steven M. Schweda sms@antinode.info
382 South Warwick Street (+1) 651-699-9818
Saint Paul MN 55105-2547
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 08:41 PM
09-05-2011 08:41 PM
Re: GnuPG not working when in BATCH
> When reporting problems, [...]
While it's always gratifying to see one's advice quoted, it can be
even more satisfying when it's followed.
> However, in BATCH, the 'gpg' command seem to go into an infinite loop.
Apparently something does. I'd never tried:
pipe gpg --passphrase-fd 0 ... < pp.txt
but it does seem to loop. What did work for me were things like:
pp_symb = "Pass Phrase"
pipe write sys$output pp_symb | gpg --passphrase-fd 0 ...
and:
pipe type pp.txt | gpg --passphrase-fd 0 ...
Both seem satisfactory in and out of batch mode.
When I get bored enough, I might look into what's happening in the
"pipe gpg --passphrase-fd 0 ... < file" case. I should be able to add a
usage note on the Web page, if nothing else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2011 09:28 PM
09-05-2011 09:28 PM
Re: GnuPG not working when in BATCH
Brian,
Maybe instead of using PIPE input redirection, try DEFINE/USER. For example:
$ DEFINE/USER SYS$INPUT PASSPHRASE.TXT
$ gpg ....
or possibly:
$ DEFINE/USER SYS$COMMAND PASSPHRASE.TXT
$ gpg ....
With Unix utilities I've sometimes found it necessary to redirect SYS$COMMAND when running in batch mode:
$ DEFINE/USER SYS$COMMAND NL:
$ PIPE gpg... < PASSPHRASE.TXT
Never quite understood why. It may have something to do with the assumptions about input streams and the differences between Unix and VMS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2011 03:59 AM
09-06-2011 03:59 AM
Re: GnuPG not working when in BATCH
Brian,
this works for us.
$ pipe ty <Passphrase_File> | GPG --output 'Decr_File' --decrypt 'Encr_File'
Dave.