Phil Murray
Phil Murray

Reputation: 6554

Running Network Associates PGP Command line from SSIS

I'm using Network Associates PGP 6.5.8 Command line utility to decrypt an incoming file for import in an SSIS job. This is party of a very old legacy system so I can't change the decryption methodology.

Manual passphrase :

If I create a new Execute Process Task in SSIS and pass the below command line arguments then PGP asks for a passpharse to unlock the secret key. Manually providing the passphrase allows PGP to successfully decrypt the file.

-o L:\xxxx\xxxxx\MyFile_decrypted.xml L:\xxxx\xxxxx\MyFile_Encrypted.xml +pubring=L:\pgp\keyring\pubring.pkr +secring=L:\pgp\keyring\secring.skr +force

enter image description here

Automated Passphrase :

Looking at the documentation, as below, I need to provide the passkey using the --passphrase argument

enter image description here

enter image description here

Changing the arguments to add the passphrase

-o L:\xxxx\xxxxx\MyFile_decrypted.xml L:\xxxx\xxxxx\MyFile_Encrypted.xml +pubring=L:\pgp\keyring\pubring.pkr +secring=L:\pgp\keyring\secring.skr +force --passphrase abcdef

The problem I have is that I need to provide the key as part of the command line arguments and so far this is not working. If I run through SSIS I get a process error, the process exit code was "5" while the expected was "0". Running directly via the command line provides a similar failure.

What is the correct syntax for providing the passphrase argument?

Upvotes: 0

Views: 290

Answers (1)

Phil Murray
Phil Murray

Reputation: 6554

Looks like I had a newer version of the documentation.

The documentation for 6.5.x passes the passphrase using the -z argument.

-z Identifies the passphrase on the command line. ( From Page 13 )

Changing my arguments as below resolved the issue.

-o L:\xxxx\xxxxx\MyFile_decrypted.xml L:\xxxx\xxxxx\MyFile_Encrypted.xml +pubring=L:\pgp\keyring\pubring.pkr +secring=L:\pgp\keyring\secring.skr +force -z abcdef

Upvotes: 0

Related Questions