XML - Verify

Declaration

<AMXMLVERIFY VERIFYUSING="KEYFILE" PUBKEYFILE="text" />

OR

<AMXMLVERIFY VERIFYUSING="KEYCONTAINER" KEYCONTAINERNAME="text" KEYCONTAINERLEVEL="text (options)" />

See Also

XML - Create Node | XML - Create Session | XML - Dataset to XML | XML - Delete Node | XML - Edit Node | XML - End Session | XML - Evaluate Xpath | XML - Export | XML - Import | XML - Node to Dataset | XML - Read Node | XML - Save | XML - Sign | XML - Transform | XML - Validate

Verify XML Document

Declaration

<AMXMLVERIFY VERIFYUSING="KEYFILE" PUBKEYFILE="text" />

OR

<AMXMLVERIFY VERIFYUSING="KEYCONTAINER" KEYCONTAINERNAME="text" KEYCONTAINERLEVEL="text (options)" />

See Also

Create XML Node | Dataset to XML | Delete XML Node | Edit XML Node | End XML Session | Evaluate Xpath Expression | Extract XML Fragment | Merge XML Files | Output XML | Read XML Node | Sign XML Document | Start XML Session | Transform XML | Validate XML File | Verify XML Document | XML Node to Dataset

Description

Verifies whether the signature of the specified XML file is valid. If the XML file has been signed, this action can detect modifications made to that file that may invalidate the signature.

IMPORTANT: AutoMate's XML actions require a basic understanding of XML and related terms, such as XPath, DTD and XSLT.

Practical Usage

Commonly used to verify the integrity of an XML file.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Verify Using

Text (options)

Yes

Key Container

VERIFYUSING="Keyfile"

The method in which to verify the XML document. The available options are:

  • Key Container (default) - Verification will be performed using a key container.  

  • Key File - Verification will be performed using a key file.

NOTE: Different parameters become active depending on which option is selected.

Key container name

Text

Yes

(Empty)

KEYCONTAINERNAME="Automate"

The name of the key container to identify which private or public key to use. You can select the key container by clicking the Select Key Container button. This opens a key container browser allowing you to select from a list of available keys. This parameter is available only if the Verify Using parameter is set to Key Container.

Key container level

Text (options)

Yes

User

KEYCONTAINERLEVEL="Machine"

Specifies the level in which the keys are stored. This parameter is available only if the Verify Using parameter is set to Key Container. The available options are:

  • User Level (Default)

  • Machine Level

Public key file

Text

Yes

(Empty)

KEYPAIRFILE="c:\secret.pri"

The path and file name of the public key (.pfx or .pri) file on your system. This parameter is available only if the Verify Using parameter is set to Key File.

Password

Text

Yes

(Empty)

PASSWORD="password"

The password used to authenticate the public key. This is normally required during creation of the private key (usually used for .pfx file). This parameter is available only if the Verify Using parameter is set to Key File.

Session Name

Text

No

(Empty)

SESSIONNAME="FirstXMLSession"

The session name created by a previous Start XML Session step that this action should identify with. This allows several in-memory XML documents to be active simultaneously within the same task.

Comparing Machine-Level and User-Level RSA Key Containers

User-level RSA key containers are stored with the Windows user profile for a particular user and can be used to encrypt and decrypt information for applications that run under that specific user identity. User-level RSA key containers can be useful if you want to ensure that the RSA key information is removed when the Windows user profile is removed. However, because you must be logged in with the specific user account that makes use of the user-level RSA key container in order to encrypt or decrypt protected configuration sections, they are inconvenient to use.

Machine-level RSA key containers are available to all users that can log in to a computer, by default, and are the most useful as you can use them to encrypt or decrypt protected configuration sections while logged in with an administrator account. A machine-level RSA key container can be used to protect information for a single application, all the applications on a server, or a group of applications on a server that run under the same user identity. Although machine-level RSA key containers are available to all users, they can be secured with NTFS Access Control Lists (ACLs) so that only required users can access them.

Link: http://msdn2.microsoft.com/en-us/library/f5cs0acs.aspx

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

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

 

Sample 1 - Verify an XML document using a key container.

 

<AMXMLVERIFY VERIFYUSING="KEYCONTAINER" KEYCONTAINERNAME="David" KEYCONTAINERLEVEL="USER" SESSIONNAME="Session4" />

 

 

Sample 2 - Verify an XML document using a key file.

 

<AMXMLVERIFY VERIFYUSING="KEYFILE" PUBKEYFILE="C:\Sing.pfx" PASSWORD="AM17o9+6JHieFc=aME" />

 

↑ Top of Page