Using the PGP Task
The PGP Task is an SSIS control flow task that can be used to perform encryption actions on a file.
The task includes the following two pages to configure what action to take.
- Error Handling
The General page of the Compression Task allows you to specify the general settings of the component.
The PGP Task can take one of four actions: Encrypt, Decrypt, CreateSignature and VerifySignature.
- Encrypt: Encrypt a file using a public key. It can be decrypted using a corresponding private key.
- Decrypt: Decrypt an encrypted file using a private key.
- CreateSignature: Create a signature file from a source file and a private key that can be used verify that the file has not changed.
- VerifySignature: Verify that a source file has not changed using a signature file and a public key.
- Source File Path
The Source File Path is the file that you want to take action on. For the Encrypt, CreateSignature and VerifySignature actions it will be any type of file. For the Decrypt action this will need to be an encrypted file.
- Signature File Path
The Signature File Path specifies the location of a file signature that will be used to verify the source file. This property is only used for the VerfiySignature action.
- Destination Path
This is the path for any output file that will be created, the type will depend on the action being taken. For the Encrypt action this will be an encrypted file. For the decrypt action this will be the path to the unencrypted file. For the CreateSignature method this will be a signature file.
- Overwrite Existing Items
The Overwrite Existing Items property determines if any output file created should overwrite an existing item in the same location.
- Public Key Location
The Public Key Location specifies the location of the public key that will be used.
- Public Key Id
A public key file can contain multiple keys if it is a key ring. The Public Key Id field allows you to select the specific key to use.
- Private Key Location
The Private Key Location specifies the location of the private key that will be used.
- Private Key Password
The Private Key Password is used in conjunction with the private key as an extra layer of security.
- Generate New Key Pair
If you do not have an existing public/private key pair, you can generate a new one using the Generate New Key Pair button. This will launch a dialog that will let you specify the public key identifier, public key path, private key path and private key pass phrase. Keys will immediately be generated at the specified paths.
- Expression Editor
If you would like to set the paths for some of the above properties from a variable, the Expression Editor button can help you do this. This button will launch the SSIS Property Expressions Editor. Here you can select a property, and set its expression to a variable, or any other type of expression.
Error Handling page
The error handling page provides options for handling errors with the PGP Task.
- Continue On Error
Determines if the task should continue or stop when an error is encountered.
- Verify Signature
The Verify Signature properties provide options for what to do with signature verification results. The options are to either Raise Error on Verify Failure, or Output Result to a Variable. If the Output Result to Variable option is selected a combo box will allow the selection of a boolean datatype variable.