Sign Action

Declaration

<AMSIGN INPUTFILE="text" OUTPUTFILE="text" PUBKEYRINGPATH="text" SECKEYRINGPATH="text"><SIGNATURE KEYID="text" PASSWORD="AM1yokcbeChfwY=aME" /><SIGNATURE KEYID="Please enter (Email or Name) here" PASSWORD="AM1yokcbeChfwY=aME" /></AMSIGN>

See Also

Create Key Container, Verify Action, Decrypt Action, Encrypt Action, Verify Action

Description

Digitally signs a file using private keys. The files can be signed by multiple keys.

Practical Usage

Protects files from being tampered with by digitally signing them. Digital signing uses a key pair and encrypts the message to be signed with the private key to produce a signature file. The Verify action can later be used to validate and decrypt the signature.

Parameters

General Tab

Source

Text, Required
MARKUP:
a) INPUTFILE="c:\sourcefoldername\file.txt"
b) INPUTFILE="c:\sourcefoldername\*.txt"

Specifies the path and file name of the file(s) to be digitally signed. Wildcard characters such as asterisk (*) and question mark (?) can be used to encrypt files matching a certain mask.

 

Destination

Text, Required
MARKUP:
a) OUTPUTFILE="c:\destinationfoldername\file.txt"
b) OUTPUTFILE="c:\destinationfoldername\
c) DEST="c:\destfolder\newdestfolder\*.txt"

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

Public Keyring File

Text, Required
MARKUP: PUBKEYRINGPATH="c:\destinationfoldername\file.pkr"

Specifies the path and filename 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, Required
MARKUP: SECKEYRINGPATH="c:\destinationfoldername\file.skr"

Specifies the path and filename 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.  

 

Options Tab

Include Subfolders

Yes/No, Optional default - NO
MARKUP: SUBFOLDERS="YES"

When set to YES, specifies that, if present, sub-folders should be searched for files matching the mask specified in the Source [INPUTFILE] parameter.

Preserve Folder Structure

Yes/No, Optional default - YES
MARKUP: KEEPFOLDERSTRUCT="NO"

Valid only if the "Include subfolder" [SUBFOLDERS] parameter is YES. When set to YES, specifies that sub-folders 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 target folder specified in the "Destination" [OUTPUTFILE] parameter. If the "Include sub-folders" [SUBFOLDERS] parameter is set to NO this parameter is ignored.

Overwrite if Exists

Yes/No, Optional default - NO
MARKUP: OVERWRITE="YES"

When set to YES, specifies that, if destination files already exist, they should be overwritten.

Only if Newer

Yes/No, Optional default - NO
MARKUP: ISNEWERTHAN="YES"

Valid only if the "Overwrite if exists" [OVERWRITE] parameter is YES. When set to YES, specifies that only files that are newer than those in the destination folders will overwrite existing files.

Only if Exists in Destination

Yes/No, Optional default - NO
MARKUP: ONLYIFEXIST="YES"

Valid only if the "Overwrite if exists" [OVERWRITE] parameter is YES. When set to YES, 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.

Overwrite Read-Only Files

Yes/No, Optional default - NO
MARKUP: OVERWRITEREADONLY="YES"

Valid only if the "Overwrite if exists" [OVERWRITE]  parameter is YES. When set to YES, specifies 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.

Overwrite Hidden Files

Yes/No, Optional default - NO
MARKUP: OVERWRITEHIDDEN="YES"

Valid only if the "Overwrite if exists" [OVERWRITE]  parameter is YES. When set to YES, 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 bypassed.

Turn Archive Attribute Off

Yes/No, Optional default - NO
MARKUP: ARCHIVETURNOFF="YES"

When set to YES, specifies that the "archive" attribute of the source files 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, Optional default - (blank)
MARKUP: EXCLUDE="*.txt"

Causes the action to not decrypt 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, Optional default - NO
MARKUP: RE="YES"

If set to YES, specifies that a regular expression is used in the Exclude Mask [EXCLUDE] field.

Only if Newer Than

Text, Optional default - (none)
MARKUP: ISNEWERTHAN="%DateSerial(2007,10,12) + TimeSerial(00,00,00)%"

 

Causes the action to only decrypt files if the source is newer than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter).

Only if Older Than

date, Optional default - (none)
MARKUP: ISOLDERTHAN="%DateSerial(2007,10,12) + TimeSerial(00,00,00)%"

Causes the action to only decrypt files if the source is older than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter).

 

Attributes Tab

Attributes

Text, Optional (blank)
MARKUP:
ATTRFILTER="+R+A-S-H" (decrypt read-only and archive files, not System or Hidden)"
ATTRFILTER="-S" (do not decrypt "System" 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:

 

Signatures Tab

Email or Name

Text, Required
MARKUP: KEYID="joe@companyname.com"

Specifies the name or e-mail address to used to locate the private key. Existing signatures (populated using the Public Keyring File and Secret Keyring File parameters located in the General tab) can be added by selecting the signature and clicking the Add button or simply double-clicking the signature.

To manually enter an e-mail address or name along with keyring passphrase, click the Create button and enter the e-mail address or unique name and associated passphrase in the appropriate fields.

To remove a signature, select it from the list and click the Remove button.

NOTE: At least one signature is required. Therefore, one e-mail address or name from the keyring along with its keyring passphrase needs to be entered. If there is no password associated with the e-mail address or name in the keyring, then the Passphrase field can be left blank. Additionally, if no name or e-mail address is used to identify the key, make sure to empty the Email or Name field of any contents.  

 

Passphrase

Text, Required
MARKUP: PASSWORD="password"

Specifies the passphrase to be added to the private key. Existing signatures (populated using the Public Keyring File and Secret Keyring File parameters located in the General tab) can be added by selecting the signature and clicking the Move Up button or simply double-clicking the signature.

To manually enter an e-mail address or name along with keyring passphrase, click the Add button and enter the e-mail or name and passphrase in the appropriate fields.

To remove a signature, select it from the list and click the Remove button.

NOTE: At least one signature is required. Therefore, one e-mail address or name from the keyring along with its keyring passphrase needs to be entered. If there is no password associated with the e-mail address or name in the keyring, then the Passphrase field can be left blank. Additionally, if no name or e-mail address is used to identify the key, make sure to empty the Email or Name field of any contents.  

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

 

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMSIGN INPUTFILE="C:\Temp\File.txt" OUTPUTFILE="C:\Destination\" PUBKEYRINGPATH="C:\Temp\file.pkr" SECKEYRINGPATH="C:\Temp2\file.skr"><SIGNATURE KEYID="joe@mycomany.com" PASSWORD="AM1iQewUvQe/N4BiSj7WAR1+Q==aME" /></AMSIGN>