Cryptography - Verify

Declaration

<AMVERIFY INPUTFILE="text" OUTPUTFILE="text" SUBFOLDERS="Yes/No" OVERWRITE="Yes/No" ISNEWER="Yes/No" PUBKEYRINGPATH="text" SECKEYRINGPATH="text" OUTPUTDATASET="text"><AUTOVERIFY /></AMVERIFY>

Related Topics    

Description

Verifies the signature attached to a file to validate authenticity of the sender.

Practical usage

Used to verify a file for a valid signature and decrypts the file upon proper authentication.

Parameters

General

Property Type Required Default Markup Description
Source Text Yes (Empty)
  • INPUTFILE="c:\source\file.txt"
  • INPUTFILE="c:\source\*.txt"
The path and file name of the files to encrypt. This can be a fully qualified path and file name (preferred) or a single file (requires use of the File System - Change folder activity). You can use wildcard characters (for example, * or ?) to specify all files matching a certain mask. You can specify multiple files and file masks by separating each entry with a pipe character (|) (for example, c:\temp\*.txt|c:\backup\*.bak). See File Masks & Wildcards for more details.
NOTE: Files with invalid paths are ignored at runtime.
Destination Text Yes User
  • OUTPUTFILE="c:\destfile.txt"
  • OUTPUTFILE="c:\dest\
The destination folder and (optional) file name to place the newly encrypted files. Folders that do not exist will be automatically created at runtime.
Create and populate decrypt dataset Text No (Empty) RESULTDATASET="theResult" The name of the dataset to create and populate with results of this activity. More details regarding individual dataset names and return values can be found below under Datasets.
Keyring file(s) - Public Text Yes (Empty) PUBKEYRINGPATH="c:\foldername\file.pkr" Specifies the path and file name of the OpenPGP or PGP public keyring file (.pkr). Entering a valid public keyring file along with a matching secret keyring file populates the Recipient(s) section with the appropriate signature information when pressing the Select recipients button. This parameter is available only if the Encryption type parameter is set to OpenPGP public key or PGP public key.
NOTE: Automate Desktop comes equipped with the OpenPGP engine which is installed on the system during Automate Desktop installation.  
Keyring file(s) - Secret Text Yes (Empty) SECKEYRINGPATH="c:\foldername\file.skr" Specifies the path and file name of the PGP secret keyring file (.skr). Entering a valid public keyring file along with a matching secret keyring file populates the Recipient(s) section with the appropriate signature information when pressing the Select recipients button. This parameter is available only if the Encryption type parameter is set to PGP public key.
NOTE: Automate Desktop comes equipped with the OpenPGP engine which is installed on the system during Automate Desktop installation.  

Signature

Property Type Required Default Markup Description
Auto select verifying keys Yes/No No No AUTOVERIFY="Yes" If selected, specifies that signatures will be auto-selected at runtime. Note that selecting this option overrides all other options.
Extract TAR archive Yes/No No Yes TAR="YES" If selected, TAR archives will be extracted. Disabled by default.

Advanced

Property Type Required Default Markup Description
Use new features (PGP > 6.5.x) Yes/No No Yes USENEWFEATURES="NO" If selected (default), newer PGP features introduced in 6.5.x will be supported.
Use old packets (PGP 2.3.x, 6.5.x) Yes/No No Yes USEOLDPACKETS="YES" If selected, older PGP encryption algorithm will be supported. Disabled by default.
Remove extension (for example, enc) Text No (Empty) REMOVEEXTENSION=".enc" The extension to remove (if any).

File Options

Property Type Required Default Markup Description
Exclude mask Text No (Empty) EXCLUDE="*.txt" Causes this action to omit decrypting files matching the masks specified. Filenames or wildcard masks may be used. Multiple entries may be specified by separating them with a pipe symbol (|). For example: *.txt|*.bak.
Regular expression Yes/No No No RE="YES" If selected, specifies that a regular expression is used in the Exclude Mask field.
Only if newer than Date No (Empty) ISNEWERTHAN="%DateSerial(2007,10,12) + TimeSerial(00,00,00)%" Causes this action to only decrypt files if the source is newer than the date/time specified. If this parameter is left blank or not included, the date of the files will be ignored (excluding Only if newer parameter).
Only if older than Date No (Empty) ISOLDERTHAN="%DateSerial(2007,10,12) + TimeSerial(00,00,00)%" Causes this action to only decrypt files if the source is older than the date/time specified. If this parameter is left blank or not included, the date of the files will be ignored (excluding Only if newer parameter).
Overwrite if exists Yes/No No No OVERWRITE="YES" If selected, specifies that, if destination files already exist, they should be overwritten. The default value is disabled.
Include subfolders Yes/No No No SUBFOLDERS="YES" If selected, specifies that, if present, subfolders should be searched for files matching the mask specified in the Source parameter. The default value is disabled.
Preserve folder structure Yes/No No Yes KEEPFOLDERSTRUCT="NO" If selected, specifies that subfolders found in the source folder should be created in the destination folder, and source files should be decrypted into their respective folders rather than directly into the root of the folder specified in the Destination parameter. Valid only if the Include subfolders parameter is selected.
Only if newer Yes/No No No ISNEWERTHAN="YES" If selected, indicates that only files that are newer than those in the destination folder will overwrite existing files. Valid only if the Overwrite if Exists parameter is selected.
Only if exists in destination Yes/No No No ONLYIFEXIST="YES" If selected, specifies that only files that already exist in the destination will be decrypted from the source. All other files, regardless of whether they match the mask or other parameter settings will be bypassed. Valid only if the Overwrite if Exists parameter is selected.
Overwrite read-only files Yes/No No No OVERWRITEREADONLY="YES" If selected, indicates that already existing files should be overwritten even if the file in the destination is marked with the "read-only" attribute. By default, read only files are not overwritten. Valid only if the Overwrite if Exists parameter is selected.
Overwrite hidden files Yes/No No No OVERWRITEHIDDEN="YES" If selected, specifies that already existing files should be overwritten even if the file in the destination is marked with the "hidden" attribute. By default, hidden files are not overwritten. Valid only if the Overwrite if Exists parameter is selected.
Turn archive attribute off Yes/No No No ARCHIVETURNOFF="YES" If selected, the archive attribute of the source file is switched OFF. The Windows archive attribute is generally used to track whether a file has been backed up. By turning the source file's archive attribute off, this indicates to many backup programs that the file has already been backed up. This parameter is disabled by default.
Match case Yes/No No No MATCHCASE="YES" If selected, the properties set within this activity are case sensitive in relation to the file. This parameter is disabled by deafult.

File Attributes

Property Type Required Default Markup Description
Attributes Text Options No (Empty) ATTRFILTER="+R+A-H" (decrypt read-only & archive files but not hidden files) This group of settings causes the action to filter which files are decrypted based on the attribute settings of the source files. In visual mode, a group of controls are provided to assist in the selection of this parameter. In markup mode, a single text item must be specified that contains the attributes of the files you wish to decrypt. Available options are:
  • R—Read-only: Specifying "+R" causes files with this attribute turned on to be included, "-R" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
  • A—Archive: Specifying "+A" causes files with this attribute turned on to be included, "-A" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
  • S—System: Specifying "+S" causes files with this attribute turned on to be included, "-S" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
  • H—Hidden: Specifying "+R" causes files with this attribute turned on to be included, "-H" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
  • C—Compression: Specifying "+C" causes files with this attribute turned on to be included, "-C" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.

Description

Error Causes

On Error

Additional notes

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).

Name Type Return Value
theDataset.Signature Text

Contains the signature user information. The returned dataset signature may contain the following values:

  • The name associated with the Key
  • No Name - The dataset will return "No Name" if there are empty identifiers for the key (for example, Name, email) in the specified keyring.
  • Unknown Key -The dataset will return "Unknown Key" if the key has no identifier in the available keyring.
theDataset.Validity Text

Contains the signature's verification results. The returned verification results may contain the following values:

  • Valid - Specifies that the key is valid.

  • Invalid - Specifies that the key is invalid.

  • Corrupted - Specifies that the key is corrupt.

  • KeyNotFound - Specifies that there were no valid keys found. This result can occur when a Key/Passphrase combination set does not match the one contained in the keyring.

  • UnknownAlgorithm - Specifies an unknown or unsupported algorithm type.

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

This sample task verifies files, and then creates and populates a dataset with the results.

Copy
<AMCRYPTOGRAPHY ACTIVITY="verify" SUBFOLDERS="YES" OVERWRITE="YES" ISNEWER="YES" INPUTFILE="C:\Temp2\SignedFile" OUTPUTFILE="OUTPUTFILE=&quot;C:\Temp2\theFile3" RESULTDATASET="theDataset" PUBKEYRINGPATH="C:\Temp\pubring.pkr" SECKEYRINGPATH="C:\Temp\secring.skr" />