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)

  1. INPUTFILE="c:\Folder\file.txt"

  2. INPUTFILE="c:\Folder\*.txt"

Specifies the path and file name of the files to be verified.This can be a fully qualified path and file name (preferred) or a single file (requires use of the File System - Change folder activity). Wildcard characters (for example, * or ?) may be used to specify all files matching a certain mask. Multiple files and/or file masks can be specified 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

(Empty)

  1. OUTPUTFILE="c:\Folder\file.txt"

  2. OUTPUTFILE="c:\DestFolder\

Specifies the destination folder and (optional) file name of the files to be digitally signed. Folders that do not exist will be automatically created at runtime.

Public Keyring File

Text

Yes

(Empty)

PUBKEYRINGPATH="c:\Folder\File.pkr"

Specifies the path and file name of the PGP, OpenPGP or GnuPG Public Keyring file. Entering a valid Public Keyring file along with a matching Secret Keyring file will populate the Signatures tab with the appropriate signature information.

NOTE: Automate is equipped with the OpenPGP engine which is installed on the system during Automate installation.    

Secret Keyring File

Text

Yes

(Empty)

 

SECKEYRINGPATH="c:\Folder\File.skr"

Specifies the path and file name of the PGP, OpenPGP or GnuPG secret keyring file. Entering a valid Public Keyring file along with a matching Secret Keyring file will populate the Signatures tab with the appropriate signature information.

NOTE: Automate is equipped with the OpenPGP engine which is installed on the system during Automate installation.    

Create and populate dataset

Text

No

(Empty)

OUTPUTDATASET="theDataset"

Allows entry of a dataset name in which to populate signatures and verification results. More on the fields that this dataset creates can be found below under Datasets.

Options

Property

Type

Required

Default

Markup

Description

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 subfolder parameter is selected.

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.

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, denotes that the "archive" attribute of the source file should be 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.

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).

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:

  • 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.

Signatures

Property

Type

Required

Default

Markup

Description

Signatures

No

No

(empty)

KEYID="Test2 &lt;test2@test.com&gt"

Allows the selection of a signature to verify. Existing signatures will be populated in this section which includes the following details:

  • User - The name or email address specified in the signature.

  • Key - The signature algorithm.

  • Bits - The signature strength measured in bits.

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.

 

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 (i.e. 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:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description: Verify files "C:\Temp2\SignedFile".Save verified signatures in dataset "theDataset".Save verified files at "C:\Temp2\theFile3".Auto verify using all keys in keyring. Include subfolders. Overwrite existing files. Only if newer.

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" />